User Manual

39
In this experiment, connect two IOs of the Raspberry Pi to two optocouplers which isolate
the power supply to protect your Raspberry Pi from interference and crashing when the
motor works. Connect the output port of the optocoupler to the driver IC (L293D) of the
motor. When one of the two IOs of the Raspberry Pi is at high level and the other is low, the
motor will rotate clockwise or counterclockwise. By adjusting the pulse width, you can
realize DC motor speed regulation as well. A motor is an inductive device. Its four diodes
play an important role in freewheeling and suppress the surge voltage of motor coils to
prevent irreversible damages to driver ICs.
The module comes with a yellow jumper cap, which is for selecting between power off and
voltages (3.3V and 5V). You can switch the output voltage (0/3.3/5V) by putting the cap
into the exact pin.
In this experiment, it needs large currents to drive the motor especially when it starts and
stops, which will severely interfere with the normal work of Raspberry Pi. Therefore, we
separately supply power for the motor by this module to make it run safely and steadily.