

The ULN2003A is a high-voltage, high-current Darlington transistor array. It contains seven NPN Darlington pairs, each capable of driving loads up to 500 mA and withstanding voltages up to 50V. This component is widely used for driving inductive loads such as relays, stepper motors, and lamps. Its built-in flyback diodes make it particularly suitable for handling the back-EMF generated by inductive loads, ensuring safe operation.








The ULN2003A comes in a 16-pin package. Below is the pinout and description:
| Pin Number | Name | Description |
|---|---|---|
| 1-7 | IN1-IN7 | Input pins for channels 1 to 7. These are connected to the control signals. |
| 8 | GND | Ground pin. Connect to the ground of the power supply. |
| 9-15 | OUT1-OUT7 | Output pins for channels 1 to 7. These drive the connected loads. |
| 16 | COM (Vcc) | Common cathode for the internal flyback diodes. Connect to the load's Vcc. |
The ULN2003A is commonly used to drive stepper motors. Below is an example of how to control a 28BYJ-48 stepper motor using an Arduino UNO and the ULN2003A.
// Define the pins connected to the ULN2003A inputs
#define IN1 8
#define IN2 9
#define IN3 10
#define IN4 11
// Stepper motor sequence for 4-step control
int stepSequence[4][4] = {
{1, 0, 0, 0}, // Step 1
{0, 1, 0, 0}, // Step 2
{0, 0, 1, 0}, // Step 3
{0, 0, 0, 1} // Step 4
};
void setup() {
// Set the ULN2003A input pins as outputs
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(IN3, OUTPUT);
pinMode(IN4, OUTPUT);
}
void loop() {
// Rotate the stepper motor forward
for (int i = 0; i < 4; i++) {
setStep(stepSequence[i]);
delay(10); // Adjust delay for speed control
}
}
// Function to set the stepper motor pins
void setStep(int step[4]) {
digitalWrite(IN1, step[0]);
digitalWrite(IN2, step[1]);
digitalWrite(IN3, step[2]);
digitalWrite(IN4, step[3]);
}
Problem: The load is not turning on.
Problem: The ULN2003A is overheating.
Problem: Voltage spikes are damaging the circuit.
Problem: Stepper motor is not rotating correctly.
Can the ULN2003A drive a DC motor? Yes, the ULN2003A can drive small DC motors. Ensure the motor's voltage and current are within the component's specifications.
Do I need external diodes for inductive loads? No, the ULN2003A has built-in flyback diodes for inductive load protection.
What is the maximum input voltage for the ULN2003A? The maximum input voltage is 5V, which is compatible with most microcontrollers.
Can I use all seven channels simultaneously? Yes, but ensure the total current does not exceed 2.5A to avoid overheating.