Blog
ULN2003 Stepper Motor Driver Board
Hey electronics enthusiasts! Have you ever stared at the ULN2003 sequence, wondering how this magical ULN2003 driver board tames wild stepper motors? Whether it’s the brute-force elegance of driver ULN2003 , the precise dance of an ULN2003 stepper motor, or even hacking minimalism with an ULN2003 4 wire stepper motor—it all hides inside that unassuming ULN2003 chip. Ready to crack its secrets?
Don’t let the dirt-cheap ULN2003 cost fool you—inside lurks a beast with 7 pairs of ULN2003 darlington transistors! From the minimalist genius of its ULN2003 driver circuit to the built-in overcurrent protection in its ULN2003 function, this ULN2003 transistor is basically the Swiss Army knife of electronics. Our ULN2003 tutorial will help you tame it hands-on. Ready to rock the motor world with a chip that costs less than coffee?
What is ULN2003 stepper motor driver board?
The ULN2003 is a high operating voltage and high current Darlington transistor array consisting of seven silicon NPN Darlington transistors. It also integrates back EMF suppression diode for the coil, which can be used to drive relays. It is a dual-in-line 16-pin package, NPN transistor matrix, with a maximum drive voltage of 50V, current of 500mA, and input voltage of 5V, suitable for TTL CMOS. It is composed of a Darlington tube drive circuit.
ULN2003 is an integrated Darlington tube IC. Its output terminal allows a current of 200mA, with a saturation voltage drop VCE of about 1V and a withstand voltage BVCEO of about 36V. The external load of the user’s output port can be estimated based on the above parameters. It adopts a collector open circuit output, with a large output current, so it can directly drive relays or solid-state relays, or directly drive low voltage bulbs. When a microcomputer drives the ULN2003, a 2K pull-up resistor is more appropriate, and the COM pin should be left floating or connected to the power supply. The ULN2003 is a non-gate circuit, containing seven units, and each unit can drive a maximum current of 350mA. Pin 9 can be left floating. For example, if pin 1 is the input and pin 16 is the output, your load is connected between VCC and pin 16, and pin 9 is not used.
The main function of the ULN2003 is to provide a large current drive capability for the microcomputer, thereby achieving the current required to drive a stepper motor. Four pairs out of the seven pairs on this board are used.
This board has a connector that can perfectly match the wires of the motor, making it very easy to connect the motor to the board. There are also connections for four control inputs and power connections.
There are four LEDs on this board, which show activity on the four control input lines (indicating the step state). They provide a good visual effect when the motor is running.
This board also comes with an ON/OFF jumper to isolate the power supply of the stepper motor.
Working Principle
ULN2003 Stepper Motor Driver Module Schematic Diagram
ULN2003 is composed of seven identical Darlington pairs.
Each individual Darlington pair consists of two bipolar transistors, with a maximum operating voltage of 50V and a maximum current of 500mA (peak 600mA).
The two transistors in the Darlington pair share a common emitter, while their collectors are open-circuited. This is the circuit diagram of a single Darlington pair, and the internal circuit uses connected Darlington transistors, as shown in the following figure:
The ULN2003 features a freewheeling diode to prevent back electromotive force. The logic diagram of the ULN2003 IC is shown as follows (ULN2003 IC Circuit Diagram):
Feature
- The ULN2003 features a high operating voltage and large operating current, with a sink current up to 500mA and the ability to withstand up to 50V in the off state. It has a powerful output capacity and can operate in parallel under high load currents, demonstrating its outstanding performance.
- The ULN2003 is available in DIP-16 or SOP-16 plastic packages, with a compact design that makes it easy to integrate into various electronic products. The internally integrated back EMF suppression diode for the coil provides convenience for driving the relay.
- The built-in back EMF suppression diode for the coil in ULN2003 can effectively prevent electromagnetic interference and ensure the stable operation of the circuit.
- Input pins placed opposite to output pins to simplify layout.
Pin Functions
ULN2003 Pin Diagram
Pin number | Pin name | Definition |
1-7 | IN1 to IN7 | The Darlington has seven input pins, each of which is connected to the base of a transistor and can be triggered using +5V. |
8 | GND | grounding |
9 | COM | Used as test pins or voltage suppression pins (optional) |
10-16 | OUT1 to OUT7 | Each of the seven input pins outputs independently. Only when the respective input pins are at a high voltage (+5V), will each output pin be energized. |
Parameters
Parameter | Value |
Output voltage | 50V |
Input voltage | 30V |
Continuous collector current | 500mA |
Operating ambient temperature range | -40℃ to +85℃ |
Storage temperature range | -55℃ to +150℃ |
ULN2003 VS L298D
| | ULN2003 | L298D (L298N) |
| Type | Darlington Transistor Array | Dual H-Bridge Motor Driver |
| Channels | 7 (open-collector outputs) | 2 (full H-bridge outputs) |
| Operating Voltage | 7V to 50V | 5V to 12V |
| Current Driving Capability | It integrates seven switches, which can be used to control high current loads, such as driving relays. | It has a relatively high current driving capability and is suitable for some small to medium power DC motors. |
| Max Current | 500mA per channel (600mA peak) | 2A per channel (4A peak) |
| Logic Input | 3-30V (TTL/CMOS compatible) | 5V TTL (requires logic-level input) |
| Output Type | Sinking only (low-side switching) | Bidirectional (H-bridge) |
| Built-in Diodes | Yes (for inductive loads) | No (requires external flyback diodes) |
| PWM Support | No (only on/off control) | Yes (speed control via PWM) |
| Storage Temperature | -55℃ to +150℃ | -40℃ to +150℃ |
| Direction Control | No (unidirectional) | Yes (forward/reverse control) |
| Efficiency | Low (high voltage drop) | Moderate (lower than modern drivers) |
| Heat Dissipation | Requires heatsink at high current | Requires heatsink (>1A per channel) |
| Typical Use Cases | Relays, small solenoids, unipolar stepper motors | DC motors, bipolar stepper motors, robotics |
ULN2003 Arduino Tutorial
1、ULN2003 Pinout
+ ——> 5V IN1 ——> D11 IN3 ——> D9
– ——> GND IN2 ——> D10 IN4 ——> D8
2、Wiring Diagram
Simulated Wiring Diagram
Physical Wiring Diagram
3、ULN2003 code
#include
#define STEPS 2038 // the number of steps in one revolution of your motor (28BYJ-48)
Stepper stepper(STEPS, 8, 10, 9, 11);
void setup() {
// nothing to do
}
void loop() {
stepper.setSpeed(1); // 1 rpm
stepper.step(2038); // do 2038 steps -- corresponds to one revolution in one minute
delay(1000); // wait for one second
stepper.setSpeed(6); // 6 rpm
stepper.step(-2038); // do 2038 steps in the other direction with faster speed -- corresponds to one revolution in 10 seconds
}
4、Effect Demonstration
The stepper motor first moves slowly in the counterclockwise direction, and then moves rapidly in the clockwise direction.
ULN2003 Application Note
- Ensure that the power current is sufficient (each ULN2003 channel has a maximum of 500mA).
- Pay attention to heat dissipation and take additional cooling measures if necessary.
- Avoid frequent emergency stops as it may damage the driver.
- Ensure reliable connection of the signal lines to avoid interference.
- It is recommended to add pull-up resistors to enhance the anti-interference capability.
ULN2003 Application Scenarios
- Motor drive: It can be used to drive stepper motors, DC motors and so on. For example, in automated equipment, robots, and small mechanical devices, ULN2003 can amplify the control signals and drive the motors to operate in the predetermined direction and at the specified speed.
- Relay drive: It can provide sufficient current and voltage to the relay, enabling it to reliably engage and disengage. In fields such as industrial control, smart home, and security systems, it is commonly used to control the on-off of circuits, achieving remote control or automatic control of equipment. For example, by using ULN2003 to drive the relay to control the switch of lights, the start and stop of motors, etc.
- Display Driver: It can be used to drive display devices such as LED screens and digital tubes. In electronic clocks, counters, billboards and other products, ULN2003 can convert digital signals into currents and voltages suitable for driving display devices, enabling the display devices to operate normally.
- Logic Buffer: In digital circuits, it can be used as a logic buffer to enhance the driving capability of signals, improve the stability and reliability of the circuit. For example, in computer motherboards, electronic instruments and other devices, it is used to connect circuit modules with different logic levels.
- Sensor application: It can be used in conjunction with various sensors to amplify the weak signals output by the sensors, so that subsequent circuits can process them. For example, in the application where the obstacle avoidance sensor controls the rotation of the motor, ULN2003 plays the role of signal amplification and driving.
Relative Information
ULN2003 stepper motor driver board Link
FAQ
1、Why does the motor only vibrate but not rotate?
- Possible reasons for the motor only vibrating but not rotating:
1) Insufficient power supply (insufficient voltage/current)
2) Fault in the driver (incorrect PWM frequency, phase missing, chip damage)
3) Mechanical jamming (excessive load, damaged bearings)
4) Signal problem (unstable control signal or program error)
- Quick checks:
1) Disconnect the load and manually rotate the shaft to see if it moves smoothly;
2) Supply power directly (without going through the driver circuit), see if it can rotate;
3) Check if the power supply and control signal are normal.
2、Does ULN2003 work with 3.3V?
Yes, ULN2003’s input is compatible with 3.3V logic level (need VIH ≤ 3.3V), and it can be directly driven by ESP32. The output terminal requires an external power supply (such as 5V/12V) to drive the relay. Pay attention to the common ground and freewheeling diode.
3、How to tell if a stepper motor driver is bad?
To check if a stepper motor driver is damaged, observe whether the motor only vibrates without rotating, skips steps, or overheats. Also, verify if the power supply voltage and current are normal, and use an oscilloscope to test if the STEP/DIR signals are stable. Additionally, check if there are any burnt marks or short circuits on the driver. If the problem persists, replace the faulty driver with a normal one for comparison testing. If the motor returns to normal operation, the original driver is faulty. This usually occurs due to overvoltage, overcurrent, insufficient heat dissipation, or incorrect parameters. The drive needs to be adjusted or replaced.
4、How to pick a stepper motor driver?
When choosing a stepper motor driver, it is necessary to match the motor current and voltage (for example, the 57 motor usually uses 2-4A). Select the subdivision accuracy (such as 1/16 step to reduce vibration) according to the requirements. Ensure that the driving method (such as constant current PWM) is compatible with the motor type (two-phase/three-phase). Also, consider the heat dissipation design (such as with a cooling fin or fan) and interface type (such as pulse/direction or serial control). If quiet operation is required, intelligent driver chips like TMC can be selected.
5、What is the life expectancy of a stepper motor?
The lifespan of a stepper motor mainly depends on the operating conditions, typically ranging from 10,000 to 50,000 hours (approximately 5 to 20 years).
Key influencing factors include:
1) Load conditions (longer lifespan for light loads, frequent starting and stopping or overloading will shorten the lifespan);
2) Cooling environment (high temperatures accelerate insulation aging);
3) Maintenance (regular cleaning and lubrication of bearings can extend the lifespan).
If the motor produces noise, skips steps, or overheats, it may be necessary to replace the bearings or the entire motor. Industrial-grade high-quality motors can have a lifespan of over 10 years under standard conditions.
6、What causes stepper motor failure?
Common causes of stepper motor damage include:
1) Electrical issues – overvoltage, overcurrent, unstable power supply or driver failure leading to coil burnout.
2) Mechanical faults – bearing wear, rotor jamming, excessive load or mechanical vibration causing structural damage.
3) Overheating – prolonged overloading or poor heat dissipation accelerating insulation aging.
4) Environmental factors – dust, moisture, corrosive gases eroding internal components.
5) Improper use – frequent sudden start-stop, failure to adjust sub-division resulting in resonance, abnormal pulse signals (such as skipping steps).
6) Regular maintenance, matching driver parameters and avoiding overloading can significantly extend the motor’s lifespan.