I have a stepper motor, and a Uln2003a stepper driver, which is connected to an ESP8266.

The ESP8266 is powered via USB, and the stepper motor is powered via the driver, which is then powered by an external power source, providing it a bit more than 12 volt. When powered on the LED D1 and D2 lights red.

Pins D0, D1, D2, D3 are used for input signal for the drive, the stepper board.

Everything should be connected correctly, but for some reason I am not able to make my stepper motor move. It doesn't react on any of my commands - why?

I suspect that the logic level might have to be 5v instead of 3v. But I've seen stepper motors being driven by an ESP before. So why does this not work? Any suggestions?

Any ways to debug?


  name: steppermotor
  platform: ESP8266
  board: d1_mini

  ssid: "ssid"
  password: "password"

# Enable logging

# ESPHome configuration
    - service: control_stepper
        target: int
        - stepper.set_target:
            id: my_stepper
            target: !lambda 'return target;'

# Example configuration entry
  - platform: uln2003
    id: my_stepper
    pin_a: D0
    pin_b: D1
    pin_c: D2
    pin_d: D3
    max_speed: 250 steps/s

    acceleration: inf
    deceleration: inf
  • Do the pins, that you use for controlling the driver, are set correctly? The datasheet says, that it can work with 3.3V logic input voltage. I'm not familiar with that kind of code. Where are the functions defined, that actually control the output pins? – chrisl May 20 '19 at 20:53
  • the code is part of the esphome.io/components/stepper/index.html – Carlton Banks May 20 '19 at 20:59
  • I am pretty sure about the pins... I don't know whether picture would help or? – Carlton Banks May 20 '19 at 21:00
  • 1
    Mhh, I don't think I can help with the code. Haven't seen that before. The pins are just connected straight to the 4 input pins of the driver. Not much to fail there. The LEDs on the driver will light depending on wether there is a HIGH voltage level on that pin. If nothing happens I would think, that either the pins are not set by the code, or your driver is dead. You can test the latter by connecting the 4 phases one by one to 3.3V. If the LEDs light up correctly, the error must be in your code. – chrisl May 20 '19 at 21:15
  • From your code I guess, that you try to control the stepper via an API. How do you call to this API? Do you construct your own call string, or do you have some kind of UI on that site of the project (ESPHome)? – chrisl May 21 '19 at 10:35

I hope there must be an inbuilt pull-up resistance for each GPIO registers of ESP.

Test like this and post your observation: 1. Don't connect anything(ULN2003 jumper wires) to your ESP and check the GPIOs you selected whether they are floating or not. If no float in reading then it's fine. 2. Connect the load and test the GPIOs are floating or not.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.