Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

h-bridge - again

Status
Not open for further replies.
On an earlier thread I sought help with the problem of driving a small electric motor with a bipolar h-bridge. I didn't really resolve the problem except to decide that mosfets may be a better device to use for the bridge. However in playing around with the bipolar version I discovered an odd effect. The problem has been that when I try to increase the speed, or duty cycle of the pwm input to the bridge, with the motor attached it does not respond to the speed increase. It starts to rotate but does not speed up. With the motor replaced with a resistor, the average voltage across the resistor increases as expected from 0v to about 11.5v, in both directions. Now for the odd effect. Disconnecting the motor and increasing the duty cycle to produce an average voltage of say 6v, then if the motor is reconnected it runs at 6v. Disconnecting it again and increasing the duty cycle to say 9v, then reconnecting the motor, and it runs faster at 9v, and so on up to the full voltage of 11.5v. When running at these increased speeds the speed cannot be increased with the motor running, but it can be decreased in a perfectly controlled manner. What is happening? I will have to buy myself an oscilloscope, but does anyone have experience of bipolar bridges, and can you explain what is happening. It would save me the cost of a 'scope.

Sorry to keep going on about h-bridges, but it is a puzzle.

I have attached a circuit schematic. The pwm waveform is shown as being applied to Q1 while Q3 is grounded. The waveform is generated by a PIC16F630 microprocessor.
 

Attachments

  • h-bridge.gif
    h-bridge.gif
    5.8 KB · Views: 186
Last edited:
Wouldn't you want to be applying your PWM signal to either Q2 or Q3? I don't understand how you have things configured. I see the GND which is fine, your PWM I assume is referenced to GNC would that be correct? The way things are configured just doesn't seem correct to me.

Ron
 
Last edited:
Personally i would PWM the 12V feed, not the Fwd/Rev feeds. Thats how its done in all the H bridges Ive seen.
 
Last edited:
I am using two outputs from the 16f630 - RC0 and RC1. For forward direction RC0 provides pwm and RC1 is at zero. For reverse RC0 is zero and RC1 is pwm. Lets assume that the schematic shows the input to the bridge for forward. Thus a pwm signal is applied to Q2 while Q3 is held at ground and is OFF. Reverse would be the other way round - Q2 OFF and pwm to Q3. The output from the 16f630 is from 0v to about 4.5v, and the ground for both the 16f630 and the bridge is the same. Thus Q2 is being turned ON and OFF at a duty cycle that is determined by the input to the 16f630. Thus I can increase the speed, hold it constant or decrease it; both forward and reverse.

I have tried different values of resistor and it doesn't seem to make any difference.

Just noted an error in my first entry. The pwm is applied to Q2 not Q1.
 
Last edited:
The two feedback resistors are 5.6k. I have also used 560ohm here. The two resistors in series with Q2 and Q3 bases are 1.8k, and I have tried 270ohm here. As for the transistors, while they are shown as single devices, I suspect they are Darlingtons as the small signal gains are quoted as 450 typical. The transistors are in a single package - ZHB6718 made by Zetex. The maximum current rating of the transistors is quoted as 2.5A, with a voltage rating of 20V.
 
Nice part! I do not think they are darlingtons! The HFE is hard to find in the data sheet. I found a graph where they show VCE and IC with a current gain of 50. Because the VCE was very small I think it can not be a darlington. Look at graph (VCE vs IC) I think your base current needs to be greator than the motor current/100. If motor current is 1 amp then base current needs to be 10mA. The top resistors could be 1k or less. The bottom resistors.......What is you uP supply? Vbe=0.8V The output of the PWM will drip down some with 10mA load.

I think you need more base current!!!
 
Nice part, but I think I have just blown it. Yes you may be right. I don't have the data at the moment, but I thought I saw 450 somewhere. However, as I said I did try a circuit with feedback resistors of 560 ohms and input resistors of 270 and it made no difference. The odd thing is that I can disconnect the motor and set the pwm for say a 50% duty cycle which the dvm reads at the PIC output as 2.5V. (The PIC voltage is 5V) I can then connect the motor and it runs and the voltage at the output of the PIC remains at 2.5V. With the motor still connected I cannot increase the speed further, but if I disconnect the motor I can increase the duty cycle to say 3.5V, reconnect the motor and it runs at the increased speed, and I can repeat this up to the full duty cycle of about 4.5V. I can then decrease the duty cycle with the motor still running until I get a minimum reading of about 0.75V (25% duty cycle), but if I now try to increase the speed with the motor still connected the PIC output voltage only increases to about 0.85V.

However, as I said I was messing around and things suddenly got hot, in particular the h-bridge.
 
I think you should add diodes across CE of the transisors. (4 diodes in the direction so current does not flow in the diodes) There may be reverse current when breaking. They may be inductive kick back from the motor under normall conditions. Add a diode-save a transistor.
 
Noise

I can then decrease the duty cycle with the motor still running until I get a minimum reading of about 0.75V (25% duty cycle), but if I now try to increase the speed with the motor still connected the PIC output voltage only increases to about 0.85V.

The problem is with the PIC PWM output not the bridge.
Did you try the .01Ufd. caps from each motor lead to case and across the motor leads?
This schematic doesn't show clamp diodes but I bet they are there?
 
Hi RonV, If capacitors are added across the motor, across the bridge, will that cause AC loss in the transistors. Maybe this PWM is running in the khz range and that is find. I use PWM in the 100khz to 2mhz range and capacitors will cause large losses.
 
Sorry, my schematic is oversimplified. There are protection diodes across each transistor, and there is a 100nF across the motor. The frequency is 100Hz.

As I said above I managed to blow the bridge. Rather than build another bipolar bridge circuit, I thought I would try some mosfets. I have just received some half bridges, ie two mosfets in a single package, one n-type and one p-type. Do you think the circuit shown attached would be okay? The device is a Si4500BDY. Again my schematic does not show the diodes across the device. I am not sure whether they are protection diodes or simply the bulk body diode. Presumably they will act in a similar manner.
 

Attachments

  • mosfet bridge.gif
    mosfet bridge.gif
    5.6 KB · Views: 242
Last edited:
There are 2 other things you can do to reduce the brush noise.

1- Add 100nf from each motor lead (At the motor) to the metal case of the motor.

2- Twist the motor leads and the +12 and the +12 ground leads. (Like twisted pair)

For the "kick back" noise add a cao (10 Ufd. or so) fron +12 to +12 ground close to the H-Bridge.

Make sure there is a decoupling cap on the +5 for the micro.

Make sure the reset for the micro is good.

Reset circuit:

https://www.electro-tech-online.com/custompdfs/2011/04/b1.pdf
 
Last edited:
Thought I would send one last post. I found a mosfet h-bridge in the form of Vishay's Si9986. But I had the same problem of the motor running slowly and refusing to change speed. I then decided that I must have an oscilloscope, so I built one from one of the miniature digital kits. (What would we do without the Chinese!). I was then able to see that the PIC was producing a pulsed pwm waveform, but it was not changing when the motor was attached. If I removed the motor I was able to increase the duty cycle as expected. I could then re-connect the motor and it would run at a new higher speed, but again it would not change speed, either up or down.

My program used interrupts to detect change on the input pins, and I think what was happening is that the pulse applied to the highly inductive motor produced interference which tripped the interrupt. The program then searched for an input which was no longer there, so according to my program it continued at constant speed, only to be immediately interrupted by the next pulse, and so on. I had used capacitors to decouple brush noise, although, Ron, I didn't try the 'kick-back' capacitor. That might have cured the problem. Instead I decided to re-program the pic and not use interrupts, but look directly at the inputs. The natural delay in the programming steps avoided the kick-back pulse and the program could detect the actual inputs. It worked, all problems solved. The motor now accelerates, decelerates, forward and reverse - great. All I need now is a sound generator to simulate a diesel engine.
 
I don't know what frequency your PWM is running at but if it is high then your PNP transistors have nothing (a resistor from base to emitter is needed) to turn them off quickly. Then when you increase the duty-cycle of the pulses to speed up the motor the transistors will not respond correctly without the resistors.

A few posts here suggest a base current of only 1/100th the collector current which is completely wrong!
A linear amplifier uses the hFE rating for its transistors but here you want the transistors to completely switch and saturate which needs a base current of 1/10th (or less) of the collector current.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top