How to make a motor driver by ourselves?
Motor driver is commonly used to control motor. Is not a difficult task to make a simple motor driver by ourselves! Here I would like to share my experience of making a simple motor driver.
First of all, the electronic components will be used are resistors,
relay,
transistors, capacitors, push button, and
diodes. The specification of the components are:
1. 4700 ohm resistor
2. 1000 ohm resistor
3. BC547 NPN transistor
4. 12V relay
5. 0.1 microfarad capacitor
6. 1N4147 diode
7. push button
Figure above shows the schematic of the motor driver circuit.
+12V and +5V is the power supply to the circuit, D1 and D2 represent 1N4147 diode, R1 and R3 are the 4700 ohm resistor, R2 and R4 are 1000 ohm resistor, C1 and C2 represent 0.1 microfarad capacitor, Q1 and Q2 are BC547 transistors. Terminal NO (normally open) is connected to 12V, terminal NC (normally closed) is connected to ground.
Function of D1 & D2 : act as protection to the relay.
Function of R1 & R3 : pull down resistor that make sure the voltage is 0V.
Function of R2 & R4 : limit the current that flow through the transistor.
Function of C1 & C2 : eliminate the bouncing effect when the push button is pressed and unpressed.
NO is connected to 12V, NC is connected to ground.
Once the circuit is complete, we can supply the 12V and 5V power supply to the circuit for testing the circuit by pressing one of the push button.
When the lower part push button is pressed, the +5V will pass though the resistor R3 and produce current to the transistor Q2. Transistor Q2 is activated and act like short circuit to the ground. The current will flow through the relay coil from 12V to ground, relay coil now is become electromagnet and switch the terminal to NO which is 12V. Since there is voltage drop across the motor, the motor will rotate.
On the other hand, if we press another push button as shown in figure above, Q1 will be activated and the current flow through the relay coil. The left terminal of the motor will connected to 12V whereas right terminal connected to ground. This voltage drop will rotate the motor in clockwise direction.
Conclusion...
If you wish to build a motor driver circuit as explained above, you can buy the components here:
1. 12V Relay - https://www.sparkfun.com/products/10924
2. BC547 NPN transistor - https://www.sparkfun.com/products/8928
3. 0.1 microfarad capacitor - https://www.sparkfun.com/products/8375
4. 1N4147 diode - https://www.sparkfun.com/products/8589
5. push button - http://www.cytron.com.my/viewProduct.php?pcode=SW-PBM-4N-060601&name=6x6x1%20Push%20Button%204Pin
6. Resistors - https://www.sparkfun.com/products/8374