I've got an old rc car laying around, of which i would like to swap the insides, but re-use some of the parts that are already in there. The car runs 2 dc motors: one for steering, one for throttle. The dc motors are both connected to H-bridges in the original setup to make their direction switchable. This is done via 8 transistors. 4 for the throttle and 4 for the steering.

The transistors for steering are 2x S8050 (NPN) and 2x S8550 (PNP). For throttle it uses 2x 2SD882 (NPN) and 2x 2SB772 (PNP).

I found a schematic in an online post of a arduino H-Bridge setup. It look promising, but it uses 2n4403 and 2n4401 transistors. I was wondering if I could copy the schematic, replace the Arduino 5v power source (as depicted in de schematic) with the battery voltage source of the car, and replace the transistors in the schematic with one pair of the transistors I described above (so 2x 2SD882 and 2x 2SB772 or 2x S8050 and 2x S8550) Would the arduino be able to switch the described transistors? Would the 1K ohm resistors in between the arduino and the transistors suffice?

I am planning on making this schematic twice, once for throttle and once for steering. The throttle output is max 11.5v and the steering uses around 5v. Therefore the throttle circuit would be powered from the battery voltage and the steering circuit would be powered of a 5v regulator.

Can this be done this way?

The schematic I am talking about

  • The 5 V (Steering) Version would not be a problem. But the 12V Version is a problem for the PNP transistor. You have 12 V on emmiter of the PNPs and only 5 V from the Arduino pin on the base to switch them off. That prevents the PNPs from beeing switched off and for a pin = HIGH the current flows through the PNP and NPN pair, but not trough the motor. Perhaps you could use MosFETs as a replacement. Or you use additional MosFETs connected to the arduino with their gates and drive the 12 Volt to the bases of the NPN and PNP Transistors. – Peter Paul Kiefer Mar 24 at 13:53
  • Thanks for the advice! Would a relay work for doing this as well? In my mind I'd switch the relay using 5V from the Arduino which then switches the transistor with Vbat. – Koen Van Den Elsen Mar 24 at 22:09
  • It should be possible to use relays. But be sure to use flyback diodes with them. You should also check isf the relay can handle the current and voltage. A relay is a mechanical part, so it has a limitted amount of scwitch actions, it can perform. Especially with high current; the contacts burn out. Have you considered using a LM298 breakout board for the 12 V Motor? – Peter Paul Kiefer Mar 25 at 6:43
  • Yes I did consider the LM298, but I don't think that it would be able to handle the amount of current that the 12v motor uses, since the LM298 has a 25W rating...? – Koen Van Den Elsen Mar 25 at 11:59
  • Would the BTS7960 make a better option? (media.s-bol.com/mER770rAkPw9/550x309.jpg) – Koen Van Den Elsen Mar 25 at 12:41

Just a comment about your diagram. The two transistors should not share an Arduino pin in that way. If the pin is pulled high the transistors saturate and your current 'shoots through' from supply straight to ground. Instead assign one Arduino pin to each transistor (using the base resistor in your diagram).

  • Sorry, but that is not good advice. It is much better to us one ARD pin on a NPN/PNP pair, becaus one transistor must be off and one transistor must be on for each state of the pin. That's how an H Bridge works. If you are able to switch both transistor on at the same time, the (fairly unlimited) current flows through both transistors and you'll see the famous smoke. ;-) – Peter Paul Kiefer Mar 28 at 6:57

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.