A to D using Basic Stamp
gatesa
Posts: 2
I would like to use a Basic stamp to receive 16 analog inputs from variable resistors ranging from 20KOhms to 20 MegaOhms, convert the analog signals to digital values, and compare the data with stored values. The closer the data coming in to the stored values will increase the volume of an audio signal. Can I do this with a Basic stamp and if I can't what do I need to do this.
·
Thanks Al the beginner ·
·
Thanks Al the beginner ·
Comments
The Stamp is capable of determining the value of a variable resistor without converting it to an analog signal directly by measuring the time it takes to charge or discharge a capacitor using the resistor. Look at the RCTIME statement in the Basic Stamp Manual for details. The manual can also be downloaded from Parallax's website. The main issue for you is that there are only 16 I/O pins on most Stamps (the BS2p40 has 32 I/O pins) and your project requires 16 separate values. Another option is to use an external analog to digital converter. Some of these can handle 16 inputs, most multi-input ones can handle 8 inputs and you'd need two of them (like the ADC0831). The StampWorks tutorial discusses this.
You didn't indicate how the volume of the audio signal would be controlled. There are digitally controlled pots that could be used and a Stamp can control them. It takes a couple of I/O pins (usually two) to set them. Again, if you need several of these, you'll need to have enough I/O pins.
There's a tremendous amount of educational information downloadable from the Parallax website. Avail yourself of it. Also check out this website:
www.emesystems.com. It has a lot of information on the use of Stamps, particularly with sensors.