View Full Version : adc questions

04-24-2007, 11:12 AM
i am new to the microcontroller game, and have been working to develop my system for the last month or so

i am now trying to adapt a current transformer (to sense line current) and take the voltage from the CT
to work within the bs2

i understand that i need to use an analog to digital converter, but here is the rub
the adc's i have looked into require 8 lines (pin's) plus to take the variable voltage and convert it
into something the bs2 can work with within the codeing.

is there another way to get an adc to communicate to the stamp without using so many IO pins?

it would appear that an 8 bit adc will give me 256 step resolution,, i need only 3 or 4 steps of resolution
i am thinking of just using 3 or 4 CT's and input each into the stamp on seperate pins, that way i only use up 3 or 4 pins

somehow i am missing the boat here, surely there is a way to get the adc to communicate to the bs2 with far fewer pins?

can anyone point me in the right direction?


bob g

Mike Green
04-24-2007, 11:22 AM
The ADC0831 and ADC0834 are analog to digital converters that use a serial protocol so they can be controlled with 3-4 pins. They're sold and supported by Parallax. Have a look at the webstore page (www.parallax.com/html_pages/products/componentshop/integrated_circuits.asp (http://www.parallax.com/html_pages/products/componentshop/integrated_circuits.asp)) and at the "Basic Analog and Digital" tutorial (www.parallax.com/detail.asp?product_id=28155 (http://www.parallax.com/detail.asp?product_id=28155)) which is downloadable for free. The StampWorks tutorial also talks about the ADC0831 (www.parallax.com/detail.asp?product_id=27220 (http://www.parallax.com/detail.asp?product_id=27220)).

Tracey Allen's website (www.emesystems.com (http://www.emesystems.com)) has a section where he discusses measuring battery voltage using a Stamp's RCTIME statement with a few passive parts. This might do the job for you.

04-24-2007, 08:46 PM
The LTC1298 is another good a/d and gives 2 channels of 12-bit conversion.

It, too, is talked to serially and only uses a few Stamp pins.

Tom Sisk