Shop OBEX P1 Docs P2 Docs Learn Events
Stray voltage fed thru an input pin to the 5V supply — Parallax Forums

Stray voltage fed thru an input pin to the 5V supply

BeevusBeevus Posts: 3
edited 2007-10-18 21:47 in BASIC Stamp
Hello all,
My first post.·

I am having problems with an application where I am sensing 12V·using an BS2.· I have the 12V input wired in series with a 10K resistor to an input pin.· What I notice is that my display will not start if that input is HI during startup.· I checked and I have found that I have stray voltage being fed thru the BS2 to the 5V supply if the input is HI before power up. Can anyone sugguest how to get around this.· I am sure it is something simple as I could not imagine that all your inputs would have to be active LOW during startup so that the display can start.

Thanks
·

Comments

  • FranklinFranklin Posts: 4,747
    edited 2007-10-18 19:41
    Since input pins should have no more than 5 volts on them (WITH a series current limiting resistor) you need at least a voltage devider circuit.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • stamptrolstamptrol Posts: 1,731
    edited 2007-10-18 19:44
    Beevus,

    Can you give us a schematic of what you're doing?

    Are you saying the 5v bus sees 12v?

    Cheers,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • Mike GreenMike Green Posts: 23,101
    edited 2007-10-18 19:46
    The Stamp, like most logic ICs, has protective diodes from each I/O pin to Vcc and to ground which "clamp" the applied voltage to about 0.6V above +5V or below ground. With 12V applied through the 10K resistor, there'll be about 1.2ma flowing from the 12V supply to the 5V supply line (which is what you see happening). It may be enough to just increase the value of the resistor to maybe 100K. An alternative would be to use an actual voltage divider for the 12V line, like with a 4.7K resistor from the I/O pin to ground. This will limit the applied voltage to the I/O pin to something like 4V which would be enough for the Stamp to sense whether the 12V is present, yet would eliminate this "phantom" current.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-10-18 20:02
    If your "12V" input is a reliable, regulated 12V when it's high, a voltage divider like the one Mike suggests is the best (and least expensive) way to go. However, if that voltage can range above and/or below 12V by any significant amount, a 5.1V zener diode connected between the input pin (cathode end) and ground (anode end) will provide clamping over a wider input range when used with your series resistor.

    -Phil
  • BeevusBeevus Posts: 3
    edited 2007-10-18 20:49
    I hooked up the 4.7K to ground like you mentioned with the 10K in series. Still same thing. The strange thing is when the BS2 is off, IN15=1.14v & .4v is on the 5v buss. The display will not start. The processor starts and runs but the display is in a funky state because of the .4v. I would draw a schematic, but Visio does not work on my new laptop with Vista.
  • BeevusBeevus Posts: 3
    edited 2007-10-18 21:47
    Ok, found that I had a small ground loop that did not help, but I increased the series resistor to 120K and then put a 47k pull down and it works now. I can not believe it if I did not see it for myself, but it in fact is true.
Sign In or Register to comment.