A microcontroller pin can supply perhaps 20 milliamps. A small hobby motor can pull 500 milliamps the moment it starts, and a stalled gearbox motor will happily demand several amps until something gives. Connect a motor straight to a Raspberry Pi or Arduino and you will be shopping for a replacement board before the kettle boils. A motor driver is the middleman: it takes a low-current logic signal from your control board and switches a much larger current from your battery or power supply into the motor windings.
That separation is the whole point, and it is also where beginners come unstuck. The two sides of the driver — logic and motor power — must be wired thoughtfully. Get the basics right and your robot will trundle around the kitchen floor for years. Get them wrong and you will learn the smell of hot silicon.
Almost every motor driver module you can buy in the UK has clearly marked terminals, but the markings are small and the silkscreen is often printed on the underside where you cannot see it once the board is screwed down. Photograph the board before mounting it, or write the labels on a scrap of paper taped to your bench.
Before connecting anything, set a multimeter to continuity and confirm which terminal is which. It takes thirty seconds and saves a tenner. Also check your power supply voltage against the driver's rating: a driver rated to 12V fed from an 18V tool battery will not last long.
The logic signal from your microcontroller is a voltage measured relative to ground. If the driver's ground and the microcontroller's ground are not connected, that reference point floats and the driver sees nonsense — twitching motors, random direction changes, or nothing at all.
Run a single wire from the microcontroller's GND to the driver's logic GND. On many modules the logic ground and the motor supply ground are already tied together on the board, but do not assume it. If your board has separate GND pins for logic and power, join them. Keep that ground wire short and reasonably thick; thin jumper leads add resistance that shows up as jitter when the motor draws current.
While you are at it, keep your signal wires (PWM, direction, enable) away from the motor power leads. Motor wires carry fast-switching current and radiate noise. Two or three centimetres of separation is usually enough on a small robot.
A 6V motor driven from a 6V supply through a driver will not see 6V. Driver chips drop voltage internally, often 1V to 2V depending on the type. Choose a supply a volt or two above what the motor wants, or accept slightly reduced speed.
Also think about current. Stall current — the current drawn when the motor is held still but powered — is typically five to ten times the free-running current. A motor that idles at 200mA might demand 2A when your robot bumps into a skirting board. Size your driver and power supply for the stall figure, not the idle figure, and add a little more for luck.
Cheap driver modules quote impressive peak currents on the listing, then quietly overheat at half that figure. The copper track on a small board is a poor heatsink, and a bare chip in still air will get hot quickly at anything above an amp or so.
Stick a small heatsink on the driver chip with a thermal pad or a dab of thermal adhesive. If your board has a metal tab with a mounting hole, use it. Give the driver breathing room inside your enclosure rather than burying it under a battery pack, and cut a few ventilation slots if the case is sealed.
Many modern drivers have a current-limit potentiometer. Set it by measuring the voltage across the sense resistor, or simply by running the motor under load and checking the chip temperature with a finger after thirty seconds. Warm is fine. Too hot to touch for more than a second means turn the limit down.
Do not simply flick the switch and hope. Work through this sequence instead:
Once that works, wire the second motor and test the pair together. If something misbehaves, power down immediately and recheck your grounds and polarity. Almost every "dead driver" turns out to be a loose ground or a reversed supply, and both are easy to fix if you catch them early. Take your time, label your wires, and your robot will reward you with smooth, dependable motion.
Leave A Comment