Shop OBEX P1 Docs P2 Docs Learn Events
ADC0838 as DVM for Propeller — Parallax Forums

ADC0838 as DVM for Propeller

edited 2008-05-25 10:32 in Propeller 1
Hey all,

I am trying to sense the voltage on a 3.3v lithium battery using an ADC0838 (20 pin DIP) and interfacing that to a propeller using 4 I/O pins.

I wrote a great object that interfaces flawlessly with the device. The serial communication can see the 0-255 resolution and draw it to the screen, when I use a voltage divider like a potentiometer knob to simulate the voltage from 0-5. ( I am using Differential mode, I have tried SGL and DIF modes, and both work with the knob)

but, when I hook up the 3.3v lithium battery, I get some strange behavior. the battery has to "float" so that it does not touch digital ground at either terminal. The battery does not power the board. The battery only gets a charger switched onto it using Relays that the propeller controls through a darlington array.

The ADC keeps frying when i hook a battery up to it. I tried some 110k dropping resistors in line, but that makes the voltage the ADC reads so miniscule that it becomes useless to me. I have tried diodes, resistors, and capacitors and nothing works reliably for me.

My question is: can I find a voltage follower or VoltMeter DIP IC (or even a 0-5v analog optoisolator) that will protect, filter, or otherwise interpret the battery voltage so that it can be read by the ADC safely, or what other methods are there to get a propeller to listen to a voltage from 2.8 volts to 4.2 volts without connecting battery ground to digital ground?

-Ryan Brandys

Comments

  • rjo_rjo_ Posts: 1,825
    edited 2008-05-25 01:41
    I don't know, but http://www.mcjournal.com/reviews/rev102/rev102.pdf has an spi interface
  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-25 01:51
    An ADC0838 can certainly measure a voltage in that range if it's hooked up correctly. You would need to post a schematic of what you've tried if you want specific help with your circuit. Perhaps there's something about the charger that's causing a problem. It's all guesses without further information.
  • Paul MPaul M Posts: 95
    edited 2008-05-25 10:32
    It sounds like there is a large common mode voltage - if large enough it may damage the ADC. Also, according to the datasheet the common mode voltage must be kept below Vcc+0.050V· for correct functioning of the device
Sign In or Register to comment.