Introduction: PCB Motor Driver Circuit (H-Bridge)
In this tutorial i will try to explain working principle of the H - Bridge Motor Drive and we are going to test it and then print it PCB.
Here also i have video about this project. You can have a look at this video and see how it worked.
Note that : Video language is not in English , that is why i will try to explain important parts here as in English.
Step 1: Required Hardware
In order to be able to desgin such a Motor driver there are a lot of different choices therefore, i have used following components :
x4 BD135 or BD137 or BD139 BJT npn Transistors (any npn transistor most of the time is ok)
x1 7805 Voltage Regulator
x4 Diodes (1N4001 or such a diodes are ok)
x1 74HC08 quad NAND GATE Logic chip (You don't have to exactly use this one , you can make our own NAND gates by using transistors as well )
x1 74LS14P Not Gate (any 2 Not gate(inverter) will be ok )
x1 100nF Capacitor
x1 0.33uF Capacitor
x1 0.1uF Capacitor
x1 Dc motor (12v) for testing
x4 Terminals for conneciton to the PCB
Soldering wire etc. will also be required after we have designed the board for soldering components.
Step 2: Circuit Schematic and Working Principle
Well, we have actually simple schematic here. By the help of the 3 input pins (IN1, IN2, ENABLE) we will be able to drive our motor in both directions. In this schematic, ENABLE pin is used for to enable our driver, whatever the other inputs are, if ENABLE = Logic LOW(0v) then motor will not be driven by the circuit due to AND Gate. That is why any Low input of the and gate will give us low output.
NOTE THAT: By using PWM into ENABLE we will be able to control speed of the motor.
AND GATE TRUTH TABLE SHOWN IN THE PHOTO!
Lets say ENABLE =0 and IN1 = 1 (5V) First And gate output will be = 1 , Second one will lbe = 0 and Q4( in the schematic) Transistor will be ON state, Q3 will be ON state. Also, IN= 0 , namely U1:C And gate will have output Logic 0 . U1:D will be 1 accordingly.Therefore, Q1 transistor will be OFF state and Q2 transistor will be ON state. According to these logics motor will be driven by the two transistors which are in ON state in one direction. To drive other way around, opposite logic can be applied into INPUTS.
NOTE THAT : If any inputs (IN1 and IN2) applied the same logic in the same time such as (IN1=0, IN2=0 or IN1=1, IN2=1 will not drive the motor therefore, this is brakins situation)
Step 3: Testing Code for PWM (using Arduino)
Here we have very short code in order to test our circuit in speed control way. To do this, we have to generate PWM. I have generated PWM by using arduino.
Codes and Arduino testing Schematic is shown here.
Note that: You must connect the GND of the Arduino to the PCB's GND .
Step 4: PCB Order
After testing in the simulation, we can draw the PCB Schematic with any program you want. Here i have mine own design and gerber file. After you get the gerber file you can upload it into PCBWay and you can order it .
Link for PCB Company (PCBWAY) :Click HERE!
NOTE THAT: This PCB Design is not unique. It is the half of the L298N. However, it does not supply same amount of current as in L298N due to components we used. That is for just educational purpose.
Step 5: Soldering the Components
After we get the PCBs we can solder the related components on the PCB and test it.
Hint: one by one put the components on the pcb , flip it and solder it by one by .
Soldering part is shown in the video as well. You can just have a look at it.
Step 6: Subscribe My Channel If You Like
Hope it will be useful project in order to understand the principle behind the H-Bridge motor driver.
You can have a look at the video to see how this project works .
If you like my project, you can have a look at others on my channel and you can support me . Don't worry about the language , mostly i prepare my codes with english explanation. If any question, you can either ask your questions from here or Youtube channel.
Do not hesitate for asking any question.
My Youtube Channel : YouTube Channel (ARDUINO HOCAM)
Please Let me know if you face any problem without any doubt!