This video demonstrates the simple way to control the direction of a DC motor which in this case a 12V car power window. Two relays were used to build the required circuit and in this video, a 2-channel RF wireless remote control relay module was the perfect choice to do that. The connection is so simple; everybody with or without basic electronic knowledge can build the circuit in minutes and use it right away. This video intends to give some basic idea on building a bidirectional motor control circuit and you can apply it in your own project/application.
For those who are having trouble catching up the connection for 2-direction motor control in the video, you may refer to this diagram: [ Ссылка ]. Just ignore the Arduino side as the relays themselves will be activated through button click. However, if you in case to build Arduino controlled 2-direction motor control, then this may be the diagram you are looking for.
The Arduino code to make the motor run forward and backward continuously with 2 seconds of duty cycle: [ Ссылка ].
Circuit diagram: [ Ссылка ].
Demonstration video: [ Ссылка ].
The Arduino code to make the motor interact with input from serial communication: [ Ссылка ].
Circuit diagram: [ Ссылка ].
(Updated on 26 Feb 2019): For 8 channel relay module: [ Ссылка ] (pin connections are described in the code introduction).
(New - Updated on 29 November 2017) The Arduino code to make the motor interact with input from serial communication + manual push buttons: [ Ссылка ], with help of circuit diagram: [ Ссылка ].
For those who don't want Arduino in the diagram, refer this circuit: [ Ссылка ], with truth table included.
(Updated on 1 March 2018) For those who are interested to use limit switch in the circuit (such as for linear actuator motor control), refer this circuit: [ Ссылка ] for LOCAL controlled single limit switch version and this circuit: [ Ссылка ] for LOCAL controlled double limit switch version. And for REMOTE controlled double limit switch version, see here: [ Ссылка ]. Hope that helps :)
(Updated on 29 November 2018): If you want to make the motor turns forward until a limit switch is pressed, then wait for let say 1 hour before going reverse until another limit switch is found, then wait 1 hour again and repeat the process again like more or less shown in this video: [ Ссылка ], here is the code: [ Ссылка ].
B/G Music: "Dalam Air Terpandang Wajah" - Legendary Tan SRi P Ramlee
![](https://i.ytimg.com/vi/QmLQMQ-eAZY/maxresdefault.jpg)