1
\$\begingroup\$

I am somewhat new to electronics and I've got a problem.

I made a H-bridge, I'm trying to control it indirectly with my Ardunio through a PNP (BC557). The motor spins once PNP is in place however the motor keeps spinning even when I coded the digital pin (D6) to HIGH. I've tried using pull-up resistors connected to 5 V on my Arduino to get it to turn off but it still keeps on going.

I've got some experience with NPN and know that PNP transistor logic is reverse but I still don't know what I'm doing wrong.

enter image description here

Any help would be great, thanks in advance.

(Ingnore the other transistors in the schematic, trying to keep it tiding and just get once side working for now.)

!!!!!UPADATE!!!!!

Thanks for everyone for the help and feed back. i was able to get the answer from Transistor by following this website (http://lednique.com/gpio-high-side-driver-fail/) , what i did was added a NPN low-side switch to the base of the PNP, and control the NPN low side switch with my Arduino, which help get rid of the PNP always turning on. Now it works great and saves me going done to the shops and getting NPN's and re doing the circuit all over again to get this H-bridge working.

i will keep in mind the feedback revived when i do more motor projects in the future.

Thanks again.

enter image description here

\$\endgroup\$
4
\$\begingroup\$

enter image description here

Figure 1. A few problems.

Q2 or Q3 should be PNP transistors. The problem with this schematic is that 1 and 2 are "emitter followers" and the emitter voltage will be lower than the base voltage by 0.7 V. It is impossible with a single supply to drive the transistors fully on.

Q6 is an attempt to interface with the logic level but it fails too.

enter image description here

Figure 2. High-side switch fail. Source: LEDnique.com.

Your Q5 circuit (3) won't work either. There will be enough leakage through your micro's protection diodes that the transistor can't be turned off.

You need to find a better design or use a proper H-bridge driver.

\$\endgroup\$
  • \$\begingroup\$ Thanks for the feed back thats very helpful. when i get a chance i will switch out the Q2,Q3 transistors. i will still se if i can salvage with what i got some how until then. \$\endgroup\$ – ElQwerto Oct 8 '17 at 8:36
  • \$\begingroup\$ See Pentium's answer to electronics.stackexchange.com/questions/26129/…. \$\endgroup\$ – Transistor Oct 8 '17 at 8:45
  • \$\begingroup\$ AWESOME thanks Transistor. i follwoed the diagram that added a NPN low-side switch. to the base of the PNP and now it works perfectly. \$\endgroup\$ – ElQwerto Oct 8 '17 at 9:09
2
\$\begingroup\$

to turn it off you have to drive it close to the power rail (9v) something your arduino can't do

BTW you need a current limiting resistor between D6 and the transistor's base .... and also, pulling D6 above 5V is likely to do bad things to the Arduino

\$\endgroup\$
  • \$\begingroup\$ by drive it close to 9v do you mean connecting the base to the 9v through a pullup resistor? ive tried that and it still doesn't completely turn it off. thanks for your help so far \$\endgroup\$ – ElQwerto Oct 8 '17 at 8:28
  • 1
    \$\begingroup\$ the problem is that there are transistors in the D6 pin that are there to protect the Atmel chip from static discharges, when you try and pull the pin voltage above 5V they turn on, effectively pulling the base towards 5V, and possibly pulling lots of current through the base - you really need an NPN transistor there with a pullup to 9v \$\endgroup\$ – Taniwha Oct 8 '17 at 9:07
0
\$\begingroup\$

Have you got a multimeter to check that D6 is actually going high and that the emitter is low. I noticed you used different transistors on the H bridge. Check that the threshold voltage of those transistors is not the same or lower than the base emitter voltage of your bc557.

\$\endgroup\$
  • \$\begingroup\$ I not talking about the voltages drop when I say base emitter voltage. I mean the voltage coming out of the emitter after the drop \$\endgroup\$ – william smith Oct 8 '17 at 8:08
  • \$\begingroup\$ the arduino is going high and low. however the emmitter doesnt drop to zero. and where on the datasheet do i find the threshold voltages from the emitter you talked about? \$\endgroup\$ – ElQwerto Oct 8 '17 at 8:24
  • \$\begingroup\$ On the datasheet for the 2n2222a the base-emitter saturation voltage, the voltage needed to turn on the transistor, is between 0.6 and 1.2 volts. Check that the emitter voltage of the BC557 is not between those two voltages. \$\endgroup\$ – william smith Oct 8 '17 at 8:36
  • \$\begingroup\$ the emitter voltage out of the bc548 is 8.4v so it insint between those two readings but still turns on the 2n2222a \$\endgroup\$ – ElQwerto Oct 8 '17 at 8:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.