Would you like to connect a motor to your Arduino or Iskra? It's not really as easy as it sounds, as the microcontroller pins are low-current so the motor, when connected directly, will disable them. This issue is solved by using an 'H-bridge' circuit. It allows you to control the speed and direction of the motor's rotation by using the logic signals from the microcontroller.
To date, the most popular H-bridge is the L298P chip. This Motor Shield is an expansion board for Arduino, based on the L298P chip, which allows you to control motors within a range of 5-24 V on multiple power supplies or 7-12 V on a single power supply.
The board has 2 independent channels. Due to this you can connect:
The outputs for each of the motor terminal blocks has a screw, so soldering is not required.
During acceleration and braking, the motors themselves induce a large, short-duration pulse of reverse current, which can burn out the contacts on the microcontroller. In order to prevent this from happening, the Motor Shield has flyback diodes.
The Motor Shield has a set of pass-through Arduino Rev3 headers, which means that other expansion boards, that don’t rely on control pins, can be installed. However, you cannot stack several Motor Shields to independently control a large number of motors. All the boards will work in parallel because you are using the same pins. However, you can bite off (or twist off) the control legs and wire them to unused pins to get independent control and your daily dose of minerals.
You can choose to power the board from an Arduino board, or from an external power supply connected to the "+" and "-" terminals. By default, split mode is enabled, but by moving the jumper, you can join the power circuits of your Arduino and Motor Shield and you only need to power one of the boards.
On the board there are LED indicators that show the direction and speed of each channel and the status of the power supply.
Since a USB port on a computer not provide more than 500 mA of current, it is recommended to use external power supply. The other option is to use motors whose current draw does not exceed this threshold.
At high loads the driver chip can become very hot. Be careful about touching it; it can and will burn you. We, however, are not your parents and won't stop you from trying.
To control a 4 motor chassis, you do not need to use two Motor Shields. You can connect the left pair to one channel and the right pair to the other. After all, motors on one side must work synchronously.
Attention! When installing the board above an Arduino Uno, or by another board that has a tall USB/RJ45 connector, add a couple of layers of electrical tape to the connector to avoid shorting the traces on the underside of the board.
For communication with the microcontroller, four digital pins on the Arduino are used as follows:
These contacts are connected via jumper. If you need to use several Motor Shields, you can remove the jumpers and use the free Arduino pins to control the motors.