I would like to build a drum machine/metronome using a BASIC Stamp 2 (maybe later on PICAXE) which would allow the user to control the beats per minute (bpm) with a dial/potentiometer. They could select a value from 1-255 (later I might add a module to display the current value).
I would like the timing to be as accurate enough to a real clock to be comparable to a real metronome or drum machine.
This is the main problem, since the BASIC Stamp 2 (and PICAXE models I am considering) don't have a real time clock (see link/citation below). Would I need to connect the microcontroller to a Dallas real time clock to accurately control the timing or would it be possible to make my own with a
555 timer or other component for less money?For my purpose the 555 or similar would have to be accurate enough to measure actual seconds (or milliseconds? how granular should it be?) to get real beats per minute. I have found numerous "555 calculator" pages (some listed below) which let you enter different resistor/capacitor values and see what the time high / time low would be (you can reverse the math to figure out what R/C values to measure milliseconds, or 1/100 of a second, or whatever would be accurate enough).
You can get gold resistors with +/- 5% tolerance, would this variance throw off the timing? Furthermore I read that capacitors of the type needed for the 555 are a lot less tolerant (+/- 20%) than gold resistors. If this is true, would this totally throw off the timing? I picture myself having to buy 100 capacitors and test each one with a meter until I find the exact value, and even then its capactiance might change as it ages, making the device not accurate.
Any advice or links to a similar project or good solution would be most appreciated... The simpler the better : )
Thanks again
----------
Shaun's Basic Stamp II Beginners Page
555 Timer Calculator