This will let you measure a ratio between a higher reference voltage and an input voltage. You need to calculate the actual voltage yourself because the basic stamp cannot calculate numbers below 1 (such as a percent)
Both the binary data and the decimal value will be displayed in the basic stamp debug window
This is done on a basic stamp 2 because it is the only microcontroller I have right now.
(I'll be making a programmer and cool toys for the PIC16F877A and PIC16F628A very soon.)
You will also need a 5v voltage regulator and a 3v voltage regulator (it's not really needed)
5v for the higher reference voltage, and the 3v for the test reading voltage (it's not really needed)
Your development board should already have a 5v supply though
And a MCP3001 analog to digital converter from Microchip at http://microchip.com/ , another converter can be used if it uses the same method to transmit the measurement result, and you may need to modify the code
datasheet:
http://ww1.microchip.com/downloads/en/devicedoc/21293b.pdf
Remove these ads by
Signing UpStep 1Understanding Resolution
8 bit resolution has a maximum decimal value of 255, which means you can measure 255 different voltages ranging from 0 to whatever reference voltage you are using
16 bits has a maximum decimal value of 65535, big difference in accuracy, but only twice the storage needed
Say, if you wanted to make a voice recorder, and you needed the top sound quality, you need to get better resolution because it will make the sound so much more accurate, but the file size will be bigger
| « Previous Step | Download PDFView All Steps | Next Step » |














































so it does NOT mean the chip can handle a bazillion volts. - not by any means,
treat CMOS parts (that's most everything now) with care.