Faulty/fried ULN2003a?

I have an ESP8266 FT232, ULN2003 driver (blue board module) and an 28BYJ-48 steper motor
They're connected this way
D1 to in1
D2 to in2
D5 to in3
D6 to in4

ESP8266 is connected directly to PC, ULN2003 is connected to 5v via a MB102 Breadboard Power Supply Module
ESP8266 and ULN2003 share a Gnd

I was going to make a cat feeder with this code:

#include <Stepper.h>

const int stepsPerRevolution = 2050;  

Stepper myStepper(stepsPerRevolution, 5, 14, 4, 12);

int const buttonPin = 6;

void setup() {
    myStepper.setSpeed(8);
}

void vibrate(int times) {
  myStepper.setSpeed(12);
  for (int i=0; i<times; i++) {
    myStepper.step(-45);
    delay(10);
    myStepper.step(45);
    delay(10);
  }
  myStepper.setSpeed(4);
}

void dispense() {
  vibrate(3);
  myStepper.step(-250);
  delay(10);
  for (int i=0; i<5; i++) {
    vibrate(3);
    myStepper.step(250);
    delay(10);
  }
  digitalWrite(8,LOW);
  digitalWrite(9,LOW);
  digitalWrite(10,LOW);
  digitalWrite(11,LOW);
}

void loop() {
  dispense();
  //delay(14400000);  // 4 hours
  //delay(10800000);   // 3 hours
  //delay(300000);   // 5 min
  //delay(30000);    // 30 sec
  delay(5000);     // 5 sec
}

I made a stupid mistake and misplaced 5v and gnd
at first try I uploiaded the cod but nothing happened, then I fixed the wire connections and tried again, now all 4 ULN2003 leds turn on together and stay on, no blink, no motor movment

I asked grok/chat gpt for help, they gave me like 10 other codes but all same results, ULN2003 leds turn on together and stay on

is there anyway I can make sure ULN2003 is ok?

What does "misplaced" mean? If you reversed them, assume that the chip is fried.

Those boards are cheap, buy a new one.

sorry English is not my first Language
yes I reversed them

I thought there is still a chance it works because leds still working

That means only that the LEDs are being powered.

If you can't turn the LEDs off under program control, the chip is fried. Which is what usually happens when you reverse power and ground.

  • There is a good chance you have destroyed your ESP.
    • Connecting +5V to the ULN2003 GND would forward bias the input diode(s) as seen here.
    • The ESP outputs would then be damaged.
    • Some of the ULN2003 diodes may have been stressed too.

:sob:

Good point.

Disconnect the motor and the ESP. Then try connecting each of the 4 inputs of the ULN board first to 5V, and then to GND, one pin at a time. Do the LEDs behave as expected?

If that's good, disconnect the ULN board and connect the ESP. Connect an LED + series resistor to each of D1,2,5,6 in turn and use the example blink sketch to test each output.

Hopefully you have a multimeter. They are inexpensive and almost indispensable when troubleshooting electronics.

What I would do is disconnect everything and then write a simple test program that turns each output on for a second or two and then off for a second or two. Measure the voltage on each pin. If the voltage is not within about 0.1V of Vcc when HIGH, or within about 0.1V of Ground when LOW, the output may be damaged.

Next, connect power to the ULN2003 module, but leave it disconnected from the Arduino. All of the LEDs should be off. If any are on, touch the corresponding input to Ground. If the LED does not turn off, that channel is likely damaged.

The possibility exists that both the Arduino output and the ULN2003 input have been damaged.

As @LarryD showed in the schematic, it is possible that an Arduino output configured as LOW was accidentally shorted to the battery positive terminal. If that condition existed for even a short time, it could damage the output transistor in the processor.

I tried uploading a blink sketc/code and it worked
can I suppose ESP is fine? or maybe EPS' led is ok but pins could be damaged?

nothing. leds won't turn on

just out of curiosity, why connect 5v first and then to GND? not the other way around?

I do but tbh because of severe disablity I can't use, I must ask someone to help me and it'll take a few days

please guide me how to Measure the voltage . multimeter's red wire to esp's pins, where should I connect the multimeter's blackwire ?

I'm pretty sure ESP IS OK
I just tested it with a little 9g servo motor and it works

tried this code, once with d1 pin, oncce with d2
both worked

 //TECHATRONIC.COM  
 #include <Servo.h> // servo library  
 Servo s1;  
 void setup()  
 {   
  s1.attach(4);  // servo attach D3 pin of arduino  
 }  
 void loop()   
 {  
   s1.write(0);  
   delay(1000);  
   s1.write(90);  
   delay(1000);  
   s1.write(180);  
   delay(1000);  
 }

No reason, you can test in either order. My point was to test both. The LEDs should be on when input is connected to 5V and off when input is connected to ground.

It does sound like your ULN board got fried.

Good news that the ESP pins are ok!