Motor on a roller blind - ESPHome version?

great, i’ll try it

@fondberg

How did it go?

trying it tomorrow on my second roller blind that I’m currently soldering.

BTW, what voltage do you supply to the stepper?

I use 9v for both the stepper and the ESP board. I’ve had no issues with the boards I’ve been using.

9v on wemos or nodemcu?

Wemos :slight_smile:

And you power it with 9v? It will fry after a while. Max is 6.5v with a nominal of 5.5v

My mistake, it’s definitely This one

Aha, I use a buck converter and use 12v power supply.

BTW, why do you write that the pins (D3 and D2) needs to be swapped, is that because of your board?

  pina: D1 # Swap these \_ coil a
  pinb: D3 # Swap these /
  pinc: D2 # Swap these \_ coil b
  pind: D4 # Swap these /

Looks like I’m not good at writing clear instructions :slight_smile:

You need to swap D1,D3 (coil a) and D2,D4 (coil b) if your blinds are rolling the wrong way.

I see! I’m soon finished with my 2nd one which I aim to test this on. 3d parts printed and soldering is done. Just need to wait for my 12v adapter to arrive

@RoadkillUK
I get errors when using your template.
https://hastebin.com/adixozisuq.m

Do you use the latest esphome?

I use the DEV version these days, however I believe it works with the beta version too.

I see. Ill upgrade to beta

I tested your one but it seems sluggish (not smooth) compared to mine. Could it be the while condition in open_action?
Also my one which is very simple can close and open with the pins wiring I have but your one only opens.
Are your ones smooth?

I have 28byj-48 motors on 12v

I have 4 blinds working fine on this, there is a small pause occasionally, it is caused by the ‘while’ condition (it’s used to update HA as to the position of the blind).

As for the pin wiring, I made it match the original ‘motor on a roller blind’ for a simple swapover. Change the pins for what you have setup.

Working fine on 9v.

first, thank you very much for that. It works perfectly. Did you manage to resolve the breaks?

If you mean the pauses while moving then it’s possible but it’s not an issue., unless it is, in which case it can be changed.

EDIT: I’ve changed the repo to add a sketch with no delay for you :wink: HERE

1 Like

Thanks for the great job! Say it is possible to add a function to a button (not in setup mode) to stop the motor. For example, the blinds open -> they stop on pressing -> on another press they continue to close

Great! I’ll test that soon. The new one (no delay) works smoother with just a small pause every second.
Great job!

It must be possible to get this functionality to be 100% smooth isn’t it? I will have a look at the generated code and figure out what makes it stutter