An H-Bridge module/shield allows a micro controller like Arduino to operate a motor in two directions (clockwise and anticlockwise). An H-Bridge fits many applications like a mini car. Usually a H-Bridge contains an IC like L293D. In this instructable I'm going to show you how to make a H-bridge shield for Arduino which can control up to 2 motors using only NPN transistors. It is not only fun to make but, is also cheaper than buying commercial H-bridge shields.

Step 1: Materials Required

Components needed to make the shield-

  • 8* NPN transistors (I used some BC 547 and some 2N2222a because I didn't have 8 of either one)
  • 8* 1k ohm resistors (a value close to that should work)
  • Stack Headers (optional)
  • Pin Headers
  • 9V Battery and clip
  • Perf Board

Hey, if you want a fun project for determining if your transistor is NPN or PNP please refer to my 'The Transistor Testenator' instructable.


  • Soldering iron
  • Wire cutter and pliers

You, of course, need to have an Arduino and motors. A breadboard would also help as it allows you to prototype the circuit before soldering it permanently on to the perf board.

<p>Your circuit wastes at least 4.6V (x current) as heat in the upper side transistors. Their emitter will have a voltage equal with the difference between the voltage of their base and the voltage drop on the diode made by the base-emitter junction - that is 5v (arduino out) - 0.6V drop = 4.4V. As your source voltage is 9V, the difference is a voltage drop (waste) on the transistor. Measure it if you don't believe me.</p><p>Suggestion: google for &quot;level switch BJT&quot; and use a &quot;push-pull emitter-follower switch&quot; as the half-bridge.</p><p>Alternatively, use a 6V source rather than a 9V one - it will put less stress on the upper BJT-s and the output will be the same. </p>
<p>Thanks for telling me, but why does this happen? I am quite new to electronics and so don't know too much about the working of transistors. Also you said that the voltage the emitter would be 5v - voltage drop made by the diodes. So, does that mean that the source voltage doesn't as the voltage over 4.4V would be wasted as heat? Would this cease to happen if I used a mosfet?</p><p>Thanks.</p>
<p>&gt; but why does this happen?</p><p>Because the BJT amplifies currents. The current through the transistor and the current through its base is in a relation of Ice=?*Ibe. Assume the base-emitter diode is perfect and has a 0 voltage drop; the moment your emitter has a higher voltage than the base, the base current becomes zero, thus the collector-emitter current will cease as well. Therefore, the maximum emitter voltage which will still let the current through the BJT is the voltage that keeps a non-zero current through base-emitter diode. That diode is not a perfect one, it will need somewhere between 0.6-0.7V to let any current through.</p><p>&gt; I am quite new to electronics and so don't know too much about the working of transistors.</p><p>A good time to learn, then. Google is your friend, &quot;BJT basics&quot; or &quot;transistors explained&quot; or whatever your google-fu tells you.</p><p>allaboutcircuits.com seems a good starting point. See this one: </p><p><a href="https://www.allaboutcircuits.com/textbook/semiconductors/chpt-4/bipolar-junction-transistors-bjt/" rel="nofollow">https://www.allaboutcircuits.com/textbook/semicond...</a></p><p>&gt; So, does that mean that the source voltage doesn't as the voltage over 4.4V would be wasted as heat?</p><p>Essentially, <em>with 5V applied on your base</em>, yes. With 9V applied to your base as input and 9V as your source, you will waste only the power caused by the drop on the base-emitter diode.</p><p>This is where my suggestion of &quot;use a level switch&quot; comes in - it will <br>help &quot;translate&quot; your 5V input in a voltage (almost) equal with your <br>source (9V battery in your case).</p><p>&gt; Would this cease to happen if I used a mosfet?</p><p>Ummm... no and yes.</p><p>No - you can't simply substitute the BJT in your circuit with mosfets and have it working.</p><p>Yes - properly designed H-bridge circuits using mosfets are more efficient than their BJT counterpart. </p><p>As I said, time for you to do some learning - it well worth it, electronics are fun.</p>
This is really helpful: thanks for sharing!
<p>Good work. But these days probably you should use power mosfets.</p>
<p>Thanks. Yes I could use power mosfets but I didn't have them at home. Transistors for small DC motors like the ones I have work fine.</p>
<p>Good work</p>

About This Instructable



More by Tanmay Deuskar:DIY H-Bridge Shield for Arduino With Transistors The Tic Tac Adjustable Power Supply The Transistor Testenator 
Add instructable to: