Shop OBEX P1 Docs P2 Docs Learn Events
Negative pin voltage? — Parallax Forums

Negative pin voltage?

Jay KickliterJay Kickliter Posts: 446
edited 2008-11-20 06:04 in Propeller 1
I just got my first PCB back. Of course I made a few errors, but it seems to work. Except for one thing. Has anyone seen a negative voltage on a propeller pin? I have a NPN transistor that is supposed to fire a camera when pin 23 pules high, but all I get off it is -.4 V. When I set pin 23 to an input, and 22 high, and short the two, the camera fires, leading me to believe that the transistor is good. Any ideas?

Comments

  • Erik FriesenErik Friesen Posts: 1,071
    edited 2008-11-19 23:14
    Negative voltage has to come from somewhere. You definitely need a current limiting resistor between the pin and base of your transistor. 1k? or so
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-11-19 23:15
    Jay,

    You may have damaged P23's output buffer, I'm sorry to say. Your transistor base circuit is missing a series resistor, which is necessary to limit the base-emitter current. If you want to jury-rig something, cut the trace from P23 and install a 2.2K resistor there. If that doesn't work, pick another pin to solder the resistor to. You should also replace the transistor, since it likely got damaged as well.

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Just a few PropSTICK Kit bare PCBs left!
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2008-11-19 23:15
    Jay,

    There is always the assumption that your test instrument is perfect and that it is hooked-up correctly. Never assume. The -0.4V could be because you are not actually connected to ground or it could simply be induced voltages on a high-impedance input that are being clamped by the chip. This is only minor anyway but your problem with pin 23 and 22 sounds strange, I think that a look at your actual pcb and layout may reveal the answer.

    *Peter*

    P.S. Yes, you need a current limit resistor and is the negative voltage still there when you have the camera disconnected?

    Post Edited (Peter Jakacki) : 11/19/2008 11:20:43 PM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2008-11-19 23:19
    A Propeller I/O pin has no way to generate a negative voltage. The circuitry simply doesn't exist to do so.

    The only way you could get a negative voltage is if there's an error somewhere on the PCB so that some points that are supposed to be grounded actually float somewhere above ground. If the supply to the Propeller chip is such that part of the board's ground connections float 0.4v above the ground voltage for the Propeller, then the I/O pins could look like they're below ground when measured against the other (higher) part of the ground system.
  • Jay KickliterJay Kickliter Posts: 446
    edited 2008-11-19 23:39
    Thanks for the replies everyone. I can't believe I forgot the limiting resistor. It was even suggested to me before I sent the file off to 4pcb, at least I get the student discount.

    As for the impossibility of a negative voltage, I agree with the theory, but that's not what I'm seeing. I measured every ground to every other ground, and read 0 volts, and from the battery ground and the propeller ground to the propeller +3.3 and saw *3.27. So it looks there are no floating grounds. But when I measure from any ground to pin 23 I'm seeing -.4 volts. And when 22 is high I'm seeing +.4 volts, not 3.3. I'm perplexed.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-11-19 23:56
    Maybe you damaged the I/O pins. You could see a small negative voltage if the I/O pin is set to input mode or the output structures are blown so that the pin is a high impedance and your meter leads are picking up some kind of induced voltage. Similarly with pin 22, 0.4V is roughly what you should see with the I/O pin set for a low output. If you should be getting over 3V, then something is broken, either the PCB or the Propeller I/O pin. The I/O pins are supposed to be pretty robust. They've been tested with short circuits and seem to handle that (they can't provide enough current to damage the chip - not true of many other microcontrollers).

    Again, if your PCB provides the circuitry shown in your schematic (other than the lack of a current limiting resistor), it should work and there should be no way that the Propeller can produce a negative voltage on an output pin. Since you're finding a negative voltage on an output pin, either your Propeller chip is broken or the PCB and your schematic don't really match or both.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-11-20 00:01
    Jay,

    When a pin is an input, you can see any voltage between -0.6V to +3.9V. This is because the pin is floating and any gate charge that's built up on the input capacitance will not get bled off by the protection diodes, unless it's outside that range or the chip is unpowered. I wouldn't worry about it. The +0.4V you're seeing on P22 could be the forward voltage of the transistor's base-emitter junction if you still have it connected; and/or you may have fried P22 as well.

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Just a few PropSTICK Kit bare PCBs left!
  • Jay KickliterJay Kickliter Posts: 446
    edited 2008-11-20 02:12
    I took the transistor out and and isolated the pin, and it is definitely bad. Very surprising. I wonder what I did to it. All its neighbors do work.

    Time to do some desoldering, order a new (and improved) board and a new propeller. Thanks guys.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-11-20 02:16
    Jay,

    When you drive a grounded-emitter transistor without a base resistor, it's nearly the same as driving a dead short. I'd've been more surprised if the pin had survived.

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Just a few PropSTICK Kit bare PCBs left!
  • AribaAriba Posts: 2,687
    edited 2008-11-20 02:24
    It's possible that the battery in the camera produces this negative voltage, if the camera battery is reversed in polarity compared to the battery of the propeller board. In this case you should swap the 2 connections to the camera.

    Andy
  • Beau SchwabeBeau Schwabe Posts: 6,562
    edited 2008-11-20 06:04
    Jay Kickliter,

    I don't know why you are seeing a negative voltage, however in a very rare circumstance you could have created a very small "solid oxide" fuel cell during the process of damaging your I/O pin. The problem is that a SOFC requires heat in the oxidized area to function. I suppose it could be getting some heat from the damaged I/O ... If there was a sufficient amount of heat, it would be in the right area for this to happen.

    How much current is your Propeller drawing when you are reading the negative voltage?

    Reference:
    http://en.wikipedia.org/wiki/Solid-oxide_fuel_cell


    That said, I tend to lean with Phil though... If the pin is floating then anything could be seen... check to see if you can actually drive the pin low or high in the first place.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 11/20/2008 6:12:47 AM GMT
Sign In or Register to comment.