Run multiple 28BYJ stepper motors on 1 esp8266

Hello,

I want to run 2 stepper motors with 1 esp8266, the idea is that the stepper motors lock a 3 door fridge by rotating 90 degrees back and forth synchronously. My question is, is this possible en how should i wire it? Ideally I want to add an additional (hidden) button to unlock the fridge if HA fails. (If the whole system fails you can still unlock everything with a screw driver and a few minutes work)

I read about a two different options, but i’m not sure which to choose and if there are other (better) options:

  • Use 2 drivers and wire them to different GPIO ports, should be possible with 8 GPIO ports. But then there is no place for the additional (emergency-)button.
  • Use 2 drivers and wire them at the same 4 GPIO ports, so they should always run synchroniously. I prefer this option but i’m not sure if this works. I can provide an extra power supply if that seems necessary.

Thanks in advance!

did you make any progress with this? Instead of using a larger stepper motor, I thought about using 2 28BYJ stepper motors to increase the amount of weight i can move.

well since no one seems to know the answer to this, I went ahead and tried it. I can verify that you can indeed operate 2 28BYJ stepper motors with a single esp8266 D1-mini. Now, I don’t have a way to time them to the ms to test if they are 100% in sync but, testing and visually watching them, they do appear to be in sync and start-stop at the same time.

number:
  - platform: template
    name: Stepper Control
    min_value: -1400
    max_value: 1400
    step: 1
    set_action:
      then:
        - stepper.set_target:
            id: my_stepper1
            target: !lambda 'return x;'
        - stepper.set_target:
            id: my_stepper2
            target: !lambda 'return x;'

# Example configuration entry
stepper:
  - platform: uln2003
    id: my_stepper1
    pin_a: D4
    pin_b: D2
    pin_c: D1
    pin_d: GPIO3
    max_speed: 250 steps/s

    # Optional:
    acceleration: inf
    deceleration: inf  

  - platform: uln2003
    id: my_stepper2
    pin_a: D7
    pin_b: D6
    pin_c: D5
    pin_d: D0
    max_speed: 250 steps/s

    # Optional:
    acceleration: inf
    deceleration: inf    
         
button:
  platform: template
  name: step2
  on_press:
    then:
    - stepper.set_target:
        id: my_stepper1
        target: 250         

    - stepper.set_target:
        id: my_stepper2
        target: 250