0
\$\begingroup\$

I do not have an L293NE or SN754410 H-bridge chip, but I need to drive a motor in 2 directions using only a pin on a micro-controller to switch between them. I was originally driving the motor with a single NPN transistor, which gave me enough speed and torque for my project (it's a 4 wheel drive robot). However, it became clear that I would need both forward and backward movement. I drew up a simple circuit diagram using a PNP transistor to switch the flow of the motors, however, when I created the circuit, there was no movement when pulsing.

Here is the circuit diagram: 2-way Motor control

What exactly is wrong with my circuit here? Why does it do nothing as opposed to maybe frying the board or working in someway?

Most importantly: How can someone drive a dc motor in 2 directions with transistors? Will my way work or would you need to try something else to get it to move clockwise and counterclockwise?

\$\endgroup\$
0
\$\begingroup\$

The two leads of the motor are shorted together so no matter the state of the transistors, the current will always flow around the motor instead of through it.

For example, if the "Switch Motor" signal is pulled HIGH, then the current completely bypasses the motor as shown below:

enter image description here

When the "Switch Motor" signal is pulled low, nothing happens. The base of the upper transistor is reverse biased, so it is in the OFF state and no current flows. Unless you meant for that transistor to be a PNP instead of an NPN, then current would flow from 5V to GND but it would still bypass the motor. Either way, the result is no motion from the motor.

I recommend studying how a classic H-bridge functions. They're relatively simple circuits, and doing so will also teach you about flyback diodes to protect your circuit. Here's a good explanation.

\$\endgroup\$
  • \$\begingroup\$ Thank you. This is very helpful. I now have a working h-bridge. However, there is very little torque. How could I increase the current to the motors? \$\endgroup\$ – Blue Okiris Aug 8 '16 at 16:11
  • \$\begingroup\$ You will have to give more information for us to answer that. What parts are you using? If something is limiting the current or your voltage is too low, then your torque will suffer. Also, keep in mind that a motor pulls more current when it starts than when it is already moving. So, if your power supply can only source 1 A, but the motor uses more than that to start, then the motor may run just fine once it's moving, but struggle to start. \$\endgroup\$ – Joe Mac Aug 8 '16 at 16:22
0
\$\begingroup\$

Its probably not the answer you want, but depending on the scarcity of components in your area, a very rudimentary H-bridge can be built with 2 relays:

schematic

simulate this circuit – Schematic created using CircuitLab

p.s.: good thing is, shoot through is practically impossible.

\$\endgroup\$
  • \$\begingroup\$ Thanks, this is very helpful. Sadly, I don't have two relays lying around. \$\endgroup\$ – Blue Okiris Aug 8 '16 at 16:23
  • \$\begingroup\$ Full speed direction change would cause contact arc fatigue, so 3 state logic helps with stop before changing direction on motion. Also since surge current is usually 5~8x steady load current on DC motors. Relay contacts >>2A preferred. \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Aug 8 '16 at 16:25

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.