this time I'd like to share you about motor driver circuit. what is motor driver? motor driver is circuit that can driving a motor using simple control signal. a motor needs high current or high voltage. because of that, we need a motor driver circuit to make a bridge between microcontroller and motor.
in this circuit, the circuit is design to control motor direction (clockwise or counter clockwise) and PWM (pulse width modulation) to manipulate motor speed. it uses optoisolator (IC 4N25), power N-MOSFET (IRFZ44N), and relay 12v DPDT (dual pole dual throw. read here).
now I will explain how its works, control signal from microcontroller uses 5 volt TTL is too high to operates a optocoupler. as shown in optocoupler diagram above, pin 1 and pin 2 are connected to LED so we need a resistor to maintain lower voltage, because LED needs supply between 2-3.5 volts. if microcontroller uses 3.3 volts (low voltage CPU) then we don't need additional resistor.
these LED functionally as base in BJT (bipolar junction transistor), when current flows from base to emitter, it will trigger current flows from collector to emitter. noted that, we use optocoupler to separate microcontroller ground from motor ground. it prevent from backward current from motor while it loaded.
while LED on, current is flows from collector to emitter, with 12 v difference between collector and emitter. this will be enough voltage to control MOSFET's Gate to make current flows from drain to source. this MOSFET will be function as second switch. and to maintain the higher current to faced the next stages.
when it passed MOSFET, the logic "1" is 12 volts and logic "0" is 0 volts. this voltage is use to control the relay.
when the DIR is "1", there no current in relay's coil and the current will flows to negative direction. because positive motor connected to PWM and negative motor connected to supply 12 volts.
when the DIR is "0", there no current in relay's coil and the current will flows to positive direction. because negative motor connected to PWM and positive motor connected to supply 12 volts.
to more relay explanation, click here
wassalamu'alaykum wr wb
Fardhady HK Hanggara
Tidak ada komentar:
Posting Komentar