This self-powered motor driver board adds two DC motors to any existing microcontroller/robotics project, like an Arduino, or similar. The motor controller voltage can vary between 5V to 16V, and up to 1A per motor, based on power dissipation limits, and is completely independent of the microcontroller (eg: Arduino) power.
It features on-board logic circuitry to take a single PWM signal and adapt it to allow variable forward/stop/backwards speeds. No other control or direction I/O connections are needed. For example, only three wires connect a microcontroller (Arduino) to the motor controller: D5 (PWM), D6 (PWM) and GND.
The two enable pins (A-EN, B-EN) are pulled high on the board, but if they are grounded, the driver(s) will be disabled. Joining these two pins and connecting to an Arduino output will allow on-demand on/off operation, regardless of the PWM control signals. Useful, if you don't want the motors to potentially run during a bootloader delay. (see notes)
There is also an optional trace-cut to disable the single-PWM driving logic and configure it with the basic three I/O per motor; PWM, direction1, direction2 (seven wires in total, with ground!). The inputs will work with both 3.3V and 5V logic levels, but the motor supply must be at least 5V.
Hardware PWM is not necessarily required, a 1kHz+ square-wave is all that is needed, with a 50% duty-cycle being the motor "stopped" signal, 0% full-speed reverse, and 100% full-speed forward, and variable speed in-between. This method of "locked antiphase" PWM control makes the motors resist any rotation that is not at the speed dictated by the PWM signal. For example, "stopped" is effectively a very strong brake, and going downhill would be very close to the flat-level speed. (in an ordinary PWM system, going downhill would allow the motor to freewheel, making the motor speed up far beyond the given voltage level)
A unique feature of this board is the motor driver IC (SN754410/L293D) is easily replaceable, just in case the magic smoke inside the driver is somehow released! A good choice for someone just starting out, or those that like to push the envelope! These motor driver IC's can also be "piggybacked" to double the current handling capabilities.
The motor power supply is completely isolated and independent of the microcontroller power, making it safe and easy to connect. In the default set-up, two signal lines attach to the microcontroller PWM outputs, and one wire for a common ground.
- The power input is NOT polarity-protected! A power diode would drop the voltage too much, and dissipate too much power to be practical. A keyed or tabbed power connector is strongly recommended.
- Due to the way 1-wire "locked antiphase" PWM control works, the motors will run in the absence of a valid PWM signal (ie: just high or low). This means that the motors may run during an Arduino bootloader delay. If this presents a problem, utilize the EN pin(s), or a separate power switch for the motors.
Here's a video showing independent high and low speed control. The motor whine while stopped or moving slowly is normal due to the low default Arduino PWM frequency. (The camera exaggerates the volume of the whine, it's not loud at all!) Only three wires connect the Arduino to the motor controller: D5 (PWM), D6 (PWM) and GND.
Also notice how the motors are powered by a 2S (7.4V) Li-Po cell, and the Arduino is powered by USB at 5V.