Shop OBEX P1 Docs P2 Docs Learn Events
h bridge control problems — Parallax Forums

h bridge control problems

ObiwanObiwan Posts: 36
edited 2005-06-08 04:41 in Robotics
i have an h bridge set up with four transistors to the motor.· I use PNP transistors so bringing their base leads low via the i/o pins on the stamp should turn them on.· When I bring them low a certain amount of current is sunk into the i/o pin.· However, when it is brought high, their is still a smaller but significant amount of current being sunk into the stamp.· Is this because·I didn't use pullup resistors on the i/o pins?

Comments

  • ObiwanObiwan Posts: 36
    edited 2005-06-07 17:52
    I just thought of a possible problem.· When the stamp pin is brought high it is brought to 5V.· The emitter of the transistor in the h bridge is connected to the positive of a 9v battery.· Is this why current still flows into the pins?
  • ObiwanObiwan Posts: 36
    edited 2005-06-07 17:55
    Even when the pins are not connected ( I wrote the program just to pause) the pins still sink current.· How can I stop this?

    Post Edited (Obiwan) : 6/7/2005 6:00:44 PM GMT
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2005-06-07 19:07
    Looking at a schematic of your H-Bridge that you are using and how you are connecting it to the Stamp might help give us a better picture.

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

    IC Layout Engineer
    Parallax, Inc.
  • ObiwanObiwan Posts: 36
    edited 2005-06-07 19:18
    I dont have any way of posting a picture of it but i can deescribe it.· I am actually using two motors but we really only need to discuss one.· The emitter ( positive ) pin of two transistors are connected to the positive bus from a 9v battery.· Their collectors are then connected to oppositite terminals of the motor.· Two more transistors are connected with their emitters connected to opposite terminals of the motor.· Their collectors then go to the negative bus.· Each base is connected to an i/0 pin of the stamp through a 2.2K resistor.· They are PNP so as far as I know I just have to bring the pins high to turn on the transistors.
  • ObiwanObiwan Posts: 36
    edited 2005-06-07 20:17
    oh, and i have diodes with the cathode attached to the emitter ( positive pin ) and the anode on the collector so that current cannot flow around the base between these two
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2005-06-08 03:10
    By your description, this really isn't the proper way to drive an H-bridge. By adding two NPN transistors, here is a
    modified version of what you described. I might point out that to turn a PNP transistor "ON" you need a negative
    voltage difference of .6V across the B-E junction. This is the opposite for NPN transistors.

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

    IC Layout Engineer
    Parallax, Inc.
    889 x 635 - 15K
  • ObiwanObiwan Posts: 36
    edited 2005-06-08 03:29
    thanks for the advice, but it would be really helpful if there was a way to make my way work and stop the pins from allowing current.· If it is at all possible, I would greatly appreciate the help.
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2005-06-08 04:08
    Not unless you lower your 9V supplying the H-Bridge to 5V.

    Think of it this way...

    Assume that a LOW signal on the BASE of a PNP transistor relative to the Emitter turns the transistor on.

    If the Stamp Pin is LOW (0V), the PNP turns "on"
    If the Stamp pin is HIGH (5V), the PNP turns "on"

    Why does the transistor stay "on" you ask? Even though the Stamp is supplying 5V, there
    is still a 4V difference between the B-E junction of the PNP transistor.

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

    IC Layout Engineer
    Parallax, Inc.
  • ObiwanObiwan Posts: 36
    edited 2005-06-08 04:41
    thanks for the help, i understand it now
Sign In or Register to comment.