Shop OBEX P1 Docs P2 Docs Learn Events
Need Help w/ Leaking Chips — Parallax Forums

Need Help w/ Leaking Chips

SunflowerSunflower Posts: 48
edited 2005-04-24 23:27 in BASIC Stamp
Need Help w/ Leaking Chips

I am having trouble with leakage or something in the ADC PCF8591 using I2C from the BS2p.

It seems I must read each channel twice because reading an adjacent prior channel drops the current channel by as much as 20%, especially noticeable when the prior channel is pulled to Vss. The reflection disappears when the prior channel is pulled to Vdd. Software and hardware are all ok. I have clean power and bypass caps. I have also replaced the PCF8591 twice from the same package. Should I be paranoid of a bad batch of chips? I have no prior experience with ADC. The mid point value of 128 drifts +/- 4 in isolation, but drops to 105 when the prior channel (tied to Vss) receives an I2COUT command.

I2COUT cport,$90,[noparse][[/noparse]%00000010] 'Channel 3
I2CIN cport,$91,[noparse][[/noparse]dummy,chan3]

I2COUT cport,$90,[noparse][[/noparse]%00000011] 'Channel 4
I2CIN cport,$91,[noparse][[/noparse]dummy,chan4]

DEBUG CRSRXY,15,0,DEC chan4," "

I2COUT cport,$90,[noparse][[/noparse]%00000011] 'Channel 4 again
I2CIN cport,$91,[noparse][[/noparse]dummy,chan4]

DEBUG CRSRXY,15,1,DEC chan4," "

I've tried leaving the oscillator on (which pulled values down a little), and used PAUSE between commands, but the problem persists. Anybody out there with experience on such anomalies?

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-04-23 06:03
    Sunflower -

    Do you have 4.7K pull-up resistors on BOTH I2C lines as is required? If not, add them and the problem will probably disappear.

    Regards,

    Bruce Bates
  • SunflowerSunflower Posts: 48
    edited 2005-04-23 06:10
    Yes, the pull-ups are pulling 4 devices, all are working fine except for the ADC, which needs help.
  • JonathanJonathan Posts: 1,023
    edited 2005-04-23 13:33
    What are you measuring? Is it a high frequency signal or DC? Is the ADC mounted on a breadboard or on a PCB? Breadboards can make for flakey readings on an ADC. If it is on a breadboard, try mounting it on a proto baord and see if that helps.

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • SunflowerSunflower Posts: 48
    edited 2005-04-23 15:46
    I am reading 5 M ohm pots (DC voltage dividers). I noticed voltage drift on the meter from the 5 meg ohm pot when unused ADC channels were released from Vss and Vdd. Perhaps I should use 100 K pots.

    The ADC is on one of those white experimenters boards. Would that cause problems?
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-04-23 18:39
    5 M ohms is quite high -- I think the ADC input has like 10 M ohm resistance, so you may be creating a voltage divider, or even getting leakage currents through the air.

    100 K pots would be much more likely to minimize the affect of any leakage currents.
  • SunflowerSunflower Posts: 48
    edited 2005-04-23 20:24
    Yes! Thanks! The 100 K pots made the ADC rock steady, all lost LSBs came home.
  • Tracy AllenTracy Allen Posts: 6,658
    edited 2005-04-23 20:28
    Yes, 5mohm is quite high, and 100k will probably give better results. You might also try adding a small capacitor from each input to ground, say 0.1uf.

    The chip itself has a small capacitive coupling from one channel to the next, but those white breadboards add a large capacitance from pin to pin, on the order of 100pf. Adding a capacitor from the input to ground can absorb some of the energy. Also use the 100k pot.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • SunflowerSunflower Posts: 48
    edited 2005-04-23 20:57
    Thanks again. The input caps are a good idea. Reading the same channel twice also isolates the problem. I have learned much about leaks. Everything is dry now with the 100 K pots.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-04-24 22:39
    Ah sorry sunflower, asking what the input source current was (established through the pot your using) slipped my attention in the other thread. An ADC needs the voltage at its input to have enough current availible to charge a tiny capacitor inside the chip within a certain amount of time. The 5 MOhm pot you were using only had 1uA running through it, this was too low.
  • SunflowerSunflower Posts: 48
    edited 2005-04-24 23:27
    So it wasn't leaks, it was hungary. I did not think of ADC port current requirements. I am quite new at this stuff, but not in fear of the unknown. Thanks for helping me venture into this wonderful world of digital electronics.
Sign In or Register to comment.