H bridge driving motor control does not run - Page 1
Forum section: electronics / beginners

author: lambinou
author_rank: Newbie
timestamp: July 20, 2016, 02:57:58 pm
content: Hello everybody,I am currently trying to drive a motor with an Hbridge.I have 2 NPN to drive the mosfets inside the HBridge component. but when I plug a motor between P1D/N1D and P2D/N2D , the motor does not runs. if I plug the pin supposed to be the positive and the other motor one to the GND, it runs.It seems that the pin supposed to be to the ground is not. why?thanks for your advices

author: MosherIV
author_rank: Super Contributor
timestamp: July 20, 2016, 03:02:31 pm
content: In a H bridge you are not suppose to put the motor to ground, it is the bar in the H.The motor is suppose to go between P1D/N1D and P2D/N2D.Your circuit is not going to much driving P1G.Only driving P2G will do anything to the motor.To use a H Bridge properly, you need put the motor as I described and drive opposite legs of the Hie drive p2G and N1G at the same time for 1 directiondrive N2G and P1G for the other direction(If I understand the FET pack correctly)

author: lambinou
author_rank: Newbie
timestamp: July 20, 2016, 03:37:30 pm
content: Thanks but if you look at the schematic, the motor is described as plugged in parallel to the capacitor linking P1D ans P2D. the PWMsI know I don't have to put the motor to ground but it was a test to see what happened.I drive both N1 and P2 with the same signal, N2 and P1 with the other.

author: MosherIV
author_rank: Super Contributor
timestamp: July 20, 2016, 03:52:30 pm
content: QuoteYou are not going to achieve much.Putting the motor from P1S/P2S to ground will bypass both N1G and N2G FETs.So you only need to drive P1 or P2. The motor will only go round in 1 direction.Driving both will make no difference (other than causing a slight imbalance between them).The point of the H bridge is to drive pairs of drivers in oppisite legs so that you can control direction.All you are doing is proving that a single FET can turn on/off a motor.FYI, does the FET pack have flyback Diodes? You may need to add flyback protection diodes if the H Bridge pack does not already contain them.They are to stop the back emf blowing up the FET/BJT when the motor stops. I need to go remind myself how they are suppose to be put into a H bridge configuration.

author: lambinou
author_rank: Newbie
timestamp: July 20, 2016, 03:58:10 pm
content: Well this is an idea I got but the thing is I am driving an arm with 6 motors in it and I need to drive each motor in both sensesthat is why i literally need this circuit to work!

author: lambinou
author_rank: Newbie
timestamp: July 20, 2016, 03:59:46 pm
content: Oh yeah there are the diodes inside the package, everything is integretad in the Hbridge. That's why I chose it !

author: MosherIV
author_rank: Super Contributor
timestamp: July 20, 2016, 04:07:41 pm
content: OK, I have just spotted why it does not work for you. Silly meYou have connected the motor to P1S/P2S - this should be connected to the power source.The motor should be connected between P1D/N1D or P2D/N2D to ground, if that is what you want.(In a H bridge the motor should be connected between P1D/N1D and P2D/N2D )

author: klunkerbus
author_rank: Unknown
timestamp: July 20, 2016, 04:17:37 pm
content: I think there's some confusion here. Mosher, the round symbol connected to P1S/P2S is the power source, not the motor. The motor connects to the rectangle at the lower right.I think the problem is with N1G and N2G being driven by PWM31 and PWM41, which is at the base of the drive transistors. PWM31 and PWM41 can never be higher than Vbe of the transistors, so the H-bridge will never see them go high.

author: lambinou
author_rank: Newbie
timestamp: July 20, 2016, 04:22:32 pm
content: Sorry guys the schematic is not very clear. The connector is just here for the foot print. the pins on the right are not connected to the ground. I designed it that way and I double checked it.(the big circle is actually a big capacitor just after the power supply). I drove the motor with paint so don't be offended by its face!!

author: Kilrah
author_rank: Unknown
timestamp: July 20, 2016, 04:27:56 pm
content: +1, you may be able to drive the N FETs with PWM3 / PWM4 depending on what's supplying that, but they will never turn on with PWM31/41.

author: MosherIV
author_rank: Super Contributor
timestamp: July 20, 2016, 04:32:51 pm
content: QuoteSorry, you are right klunkerbusQuoteNot sure I agree.When the PWM signal is off (0V), the gate P1G or P2G should see VMOTOR due to Q3/Q? both being high impedance.When the PWM signal is high (5V ?), Q3/Q? should be fully switched on and P1G/P2G should see (VMotor-1.4V) * (10K/100R)(The 100R resistors are not really needed, I think)Or am I getting P Channel devices wrong?(I never could get the hang of PNP or P-Channel)It might be easier to use MOSFET drivers instead of the transistors. I remember that is what I did when I interfaced PIC to MOSFE H-Bridge, I used discrete FETs because I was planning to drive upto 100A, my failed Robotwars project. Did get a small scale prototype H bridge working, do not remember if it was FET or BJT though

author: Kilrah
author_rank: Unknown
timestamp: July 20, 2016, 04:38:37 pm
content: The problem is not with the P channel FETs, those work fine. It's the N ones that never turn on.BTW before fixing the problem it's a good time to check your signal timings with a scope to make sure both your PWMs never cause both legs to conduct together.

author: lambinou
author_rank: Newbie
timestamp: July 20, 2016, 04:49:03 pm
content: exactly both of the P channel works fine. If I bypass the N channel, the motor runs but not any more when I plug it back on the pin P1D or P2D, where it is supposed to belong to.

author: lambinou
author_rank: Newbie
timestamp: July 20, 2016, 04:50:51 pm
content: for the moment I don't use PWMs anymore, just a 6V power supply to avoid the timing issues you are talking about.This is crazy!! I have a base current freaking high! more than 100 mA without plug the motor on!

author: MosherIV
author_rank: Super Contributor
timestamp: July 20, 2016, 04:58:31 pm
content: QuoteSorry, klunkerbusAs a quick test, try removing the link to PWM41 and connecting N1G to P1GTry looking at something like these :http://www.infineon.com/dgdl/ir2181.pdf?fileId=5546d462533600a4015355c93cdd16ceLike I said, I gave up trying to drive MOSFETs with BJTs from micro controllers, it is easier to use these little devices.(I have never used these ones before, just for illustration purposes but you get the idea)As Kilrah said, make sure that the micro controller can only turn on opposite sides of the H bridge, otherwise the bridge will be shorting the supply out!

author: Kilrah
author_rank: Unknown
timestamp: July 20, 2016, 05:18:44 pm
content: Quote from: lambinou on July 20, 2016, 04:50:51 pmWhere are you supplying 6V?? If you supply it at PWM3/4 you should have (6-0.7)/150 = 35mA, the P FETs will work but NOT the N FETs.If you're supplying it at PWM31/41 your Q2/Q3 transistors are a dead short above 0.7V, nothing is limiting the current, the N FETs will still not work but you'll likely blow Q2/Q3.Suggest you read a bit about bipolar transistors again.

author: lambinou
author_rank: Newbie
timestamp: July 20, 2016, 07:23:32 pm
content: I am supplying the 6V at the PWM3 and PWM4. I think I don't have time to look after this I will have to use a moter controller this will be much easier because I lost so many time on this issue. Thanks anyway guys for being involved with me in this!

author: MarkF
author_rank: Super Contributor
timestamp: July 20, 2016, 10:30:30 pm
content: Wire the motor and H-bridge like the following: