Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

H-bridge problem in a circuit that controls a motor using PIC16F688

Status
Not open for further replies.

Thor

Newbie level 4
Newbie level 4
Joined
Apr 3, 2005
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,471
Hey!

I'm trying to control a motor with a PIC16F688, and I've wired up this circuit:

**broken link removed**

I'm using BC327s for the PNPs and 2N3704s for the NPNs. I've been able to drive this motor with a single 2N3704 in place of an H-bridge before, but I want bidirectional control now. I've connected A to D and C to B, and those pairs use one pin each on the PIC. The problem is that the circuit doesn't seem to work. It just seems to short the PICs outputs. I'd use matched pairs, but because I don't have that, I just settled for two high current transistors. I'd like this circuit to work 3 days ago, please, as veins are beginning to appear in my forehead. What's wrong with it?
 

Re: H-bridge problem

Thor,

The lower (NPN) transistor switches should worked OK. The problem is that to turn on a PNP transistor, the base voltage must be lower (less positive) than the emitter. To turn on diagonally opposite switches (transistors) in your configuration, you need to have opposite polarity drives to the diagonally opposite transistors. Another thing to be careful of, is that when you want the PNP to turn off reliably, you must ensure that the base voltage is more positive than the emitter. This means that the drive circuit for the PNPs must be operated from a power supply voltage that is > 12V.

With inverters used to drive the PNP (NPN), you can no longer connect (A,D); (B,C) together, since this would result in a transitor pair on either the left or right being turned on simultaneously, resulting in a short across the supply

Regards,
Jon
 

    Thor

    Points: 2
    Helpful Answer Positive Rating
H-bridge problem

Uhh... Right. I've read your reply over a few times, gave it a +3 helpful, but you'll need to lay it out more clearly for me, I'm afraid.

The base voltage must be lower than the emitter for a PNP transistor. Right. What about 0 volts on the base and +12V on the emitter. Wouldn't that satisfy it? I.e. it conducts when it's input is low? ... But I can clearly see the problem about the PNPs. They won't reliably switch off when they're fed a mere 5 volts at the base, right? I should mention that my actual supply is 9 volts and my chip runs at 5Vs through a regulator, so the actual relation is 5:9. Got any suggestions on how to get this working? Maybe an additional set of NPNs going from the chip, driving the PNP bases in the H-bridge? I just need simple backwards and forwards switching here, with as few components as possible. 4 transistors for a single motor seems a bit much already. I have many 0V/5V outputs available on the chip that I can switch on and off.

I originally tried an arrangement where one pin switched on two NPNs, one had it's emitter to ground and collector to the motor's cold, the base connected to the chip and the other NPN. the other NPN was connected with it's collector to +9V and the emitter to the motor's hot, the base as described earlier. This didn't work, for some reason. One'd think so, the current passing out one transistor, into the motor, and out the other way, and to ground, but no...

The plan was to have two such pairs, wired opposite of each other, going to the motor, a sort of H bridge with only two inputs and NPNs only. I'm not sure what the flaw in that setup was yet...
 

Re: H-bridge problem

Thor,

0 volts will definitely turn on the PNP. The problem is, that with (A, D), (B,C) connected together, when the NPN transistor is turned on (With a plus voltage), the diagonally opposite PNP would be turned off, since it also has a plus drive voltage. Conversely, when the PNP is turned on, with a 0 voltage, the diagonally opposite NPN would be turned off. Sorry I wasn't more clear on this point. An extra set of NPNs (they can be low power) with a pullup resistor to the +9V supply would do the trick as far as inverting the drive to the PNPs is concerned. Incidentally, I'm not familiar with the points system (I'm just in this for the fun); how do you award points?
Regards,
Jon
 

    Thor

    Points: 2
    Helpful Answer Positive Rating
Re: H-bridge problem

Kral is right. The PNP's will be on all the time.

Use two more npn's, connected to the PIC just like the bottom ones in the bridge and use them to drive the pnp's. A pullup from each npn's collector to the motor supply voltage will help keep the pnp's off.
It will work.
 

    Thor

    Points: 2
    Helpful Answer Positive Rating
Re: H-bridge problem

How is this different from what I tried to explain in my latter reply? It basically involved using two NPNs controlled by the PIC and powered by the motor's supply voltage to drive the bases of the PNPs. This is basically what you're suggesting too, right?

I think you can only award points to people if you posted a question. For each reply I get to my post, I see a button below named "Helped me", which I click if the post aided me. :)

Added after 1 hours 15 minutes:

Okay! I've read through all the posts, and I think this is going to help me get it to work! Thank you very much everyone! ^-^
 

Re: H-bridge problem

Hello Thor,
You may consider using a Bridge IC to do you r work rather than make the H Bridge yourself.
Look at the ones I have attached.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top