hi guys. im wondering how to control the rotation of dc motor by using relay and transistor..My input is LDR sensor (two sensor). If i compare the voltage between each sensor, and there is a difference on the sensor it will trigger the DC motor rotation. such as,
if voltageLDR1>voltageLDR2, rotation will be clokwise, and vice versa. Now im using TIP122 transistor. So, what type of relay need to use..is it SPDT (single pole double throw) or DPDT (double pole double throw) ?
i hope you guys can help me...
thanks...
double pole double throw - circuit is
A google image search for "relay motor reverse" isn't rocket science BTW...
ok. thanks markT.. what happen if the dc motor do not rotate if i have set the output pin to be HIGH ?
Are you driving the relay correctly? With a transistor/MOSFET and a freewheel diode?
The drawing assumes power is turned on or off to the relay to start or stop the motor. You can use a MOSFET to switch the 0v line to Gnd to turn the motor on.
Weedpharma
Your motor supply appears to be shorted to Gnd.
Weedpharma
And two of the relay contacts are wired to each other but nothing else!
Look at the diagram again, the supply goes to the relay, not the motor.
Personally, I would be presuming that you also want to turn the motor on and off as your unfortunate schematic suggests you propose to do with a transistor (not such a good idea - the TIP122 will supposedly control 5 Amps but I suspect your motor will draw more than that when stalled).
In which case, you use not one DPDT relay, but two SPDT relays (the common sort), each one switching one terminal of the motor from ground to 12V.
Operating one relay then connects one side of the motor to 12V, the other side still being grounded, or operating the other relay does the reverse connection to the motor. If you happen to operate both relays, the motor stops just as it does when neither is operated.
SPDT relays are generally available with much more current capacity in the contacts than similarly sized DPDT ones.
(The transistor base resistors should be no less than 220 ohms, )
hi paul_B. thanks for the recommendations. i've also tryout the SPDT connection as figure below.. is it like that ?
Feed ground to the emitter of the driving transistor and one contact of each relay ONLY!!
Hi,
Remove the wires shown here.
Hope it helps.
As you practice with your CAD, you will learn how to arrange components to make clearer diags.
Tom....