Motor on a roller blind - ESPHome version?

Im not sure what motor controller you plan on using. I used the ULN2003 and just hooked up both to the same output so no alternation of the code needed. And both my motors are connected to the gear on the blind so same direction to.

Here is a remix of a bracket for dual motor. I made my own since i wanted another gear ratio and fit all electronics in the same box as the moving parts.

Uuuh, I am completely lost.

@r1kkie
Thank you for info and for the link to thingiverse.

Would it be good idea to replace my single engine modules on that double one? I am lost as you told about making changes on gear ratio, but on this project that gears looks the same. I would like to find best solution as I am going on that project from 2 years without success.

When I read about 2 engines today morning I thought about mounting it on both ends - so that’s why I have asked about changing code.

Currently I have:
I have mounted it using 28BYJ-48 stepper motor + ULN2003. Unfortunately, I have hadn’t know the difference and have bought engines which has 5V mark on body year ago.
After reading lot of articles I have had planned replacing ULN2003 to another board, but… as I have LOT OF spare L298n boards I would be very happy if that would be possible to use that boards. That is really interesting about L298n which you have mentioned in last post.

Could you please let me know more about your code where you using L298n with 28BYJ-48 ? How to use that in HA?

I have some spare parts which I’ve ordered to finish works on this weekend:

  1. 28BYJ-48 12v + ULN2003
  2. A4988 modules
  3. L293d
  4. and… about 15pcs of new L298n modules.
    Yes, I do know that these parts are overlapping on oneself, but at this moment I really would like to choose best solution.

I currently have no idea what to do. I don’t know the best way to make working my 3 blinds.
The rollers are no such big

  1. 140cm in width, 1,5m high - biggest one
  2. 120cm in width 1,5m high (same as 3.)
  3. 120cm in width 1,5m high (same as 2.)

So, would someone could let me know how can I make something working with that ?

Thank you for any advices…

First I need to correct myself, I used the same controller you have ULN2003, mixed them up from another project I used them on. Sorry about that.

Dont worry about gear ratio and use whats in the thingivers files. I changed cause I wanted to test to increase the speed of my blind by modifying the gear ratio at the cost of losing force from the motors.

I use 2pices of 28BYJ-48 (12v) which it hooked to a single board of ULN2003 and a nodemcu with the ESPhome code from this thread.

Started playing with these engines and esphome (are beginners). Whatever I seem to do, the engine just wants to go in one direction, for others just vibrate it but if nothing happens then I can run it again in the direction that went before. (has tested with 2 different engines as well
Have a wemos d1 mini use and ULN2003
Ini 1 D1
Ini 2 D3
Ini 3 D2
Ini 4 D4
When I drive it in both directions, lamp A C D shines brightly and lamp B very dim.

How many motors can be controlled with 1 wemos d1 mini.

Dont know, my guess is the limit is how much current the boards can take. You have to look up how much current the motors draw and then see how much the boards can take.

Thank you for sharing the code with us, it is easy to understand but the most important calibration option works exceptionally, it is exactly what I wanted.

Hi there,
Almost one hour reading this, you guys have a lot of information spread in this topic congrats for the work.

To the point
I have an ikea tupplur 120cm wide x 200cm heigh black out and I would like to make motorized.
As i undertand for the project i will need:

  1. Mottor
    28BYJ-48 in 6 or 12 volts?
  2. Controller
    drv8825 for less noise
  3. End stop switch
  4. Buck Converer
    LM2596
  5. D1 mini or node mcu

Please let me know if i have it correct

Thanks for your time and again congratulations for the amazing info you have gather here.

I went with the 12v 28BYJ-48 and used the uln2003 motor that came with it. It makes a little bit of noise but much quieter than my Ikea Fyrtur blinds. I think any buck convertor should be fine. I powered my d1 mini with a 5v initially and blew it, make sure you use 3.3v for powering. This might not be the case with every d1 mini but it was with mine. I didn’t use the end stop switch. I used https://github.com/RoadkillUK/Motor-on-a-Roller-Blind-for-ESPHOME to calibrate the steps and it works really well.

2 Likes

Do you think your setup would work on a 6’X 6’ blackout roller blind as I know they are quite heavy.
Thanks

I’m using a 5v 28BYJ-48 with an ULN2003, powered by a NodeMCU, both powered by a 9V supply. It lifts an IKEA 1800mm wide x 1200mm roller blind fine. Its not really noisy, certainly quieter than my Zemismart curtains. It takes approx 70 seconds to lift it.

1 Like

Id like to use your code but my endstop is on the close side instead of the open. Can you tell me what I would need to change in the code for that to work?

get of the following two lines

    filters:
        - invert:

Some really good info here guys.
Question on saving/recalling the position.
Is there a way (maybe with another driver? I am using ULN2003) so that when it reaches some résistance (i.e. blind is closed) it stops automatically? Must be because that’s how some 3D printers work.
Or how about saving the position after HA is restarted so that it knows where the blind is after?
Using this for the position:

open_action:
      - stepper.set_target:
          id: my_stepper
          target: 4000
      - sensor.template.publish:
          id: position
          state: !lambda return id(my_stepper).target_position;
    close_action:
      - stepper.set_target:
          id: my_stepper
          target: 0

Also I am using a 12v 2A DC adapter to power the motor but it gets hot even after 6 rotations, should I perhaps switch to a 5V DC adapter like this one and then I can power both the esp8266 and motor from the same adapter?

Late answer, im sorry i have no clue if it works or not. :frowning:

Hi Tom did you manage to make the DC motor work for your blinds? I am thinking on going with your approach. Did you try the 200RPM Motor? I am thinking on starting with this motor:

But using the 100RPM version.

Any tips would be welcome

Do you mind sharing your wiring diagram? The ESPHome documentation does not provide wiring diagrams like Tasmota, so I followed the Tasmota diagram but left “Enable, MS1, MS2 & MS3” pins open as these are not needed as per ESPHome documentation.

So in my setup the motors just makes few erratic moves when I connect the reset and sleep pin but does nothing at all when I connect the sleep pin to a GPIO.

If possible please share your wiring diagram, thanks!!

stepper|690x488

It’s been a while (and still up and running :wink: ). I don’t really have a wiring diagram so this is from memory and the code I posted here:

ENABLE, MS1, MS2 & MS3 on A4988 not connected.
DIR on A4988 to D1 on Wemos D1 mini
STEP on A4988 to D2 on Wemos D1 mini
RESET & SLEEP (both connected to eachother!) on A4988 to D3 on Wemos D1 mini

And the pushbutton is just D8 on Wemos D1 mini - button - ground.

If you want other pins on the Wemos, you can just change them in the code posted previously.

1 Like

Thanks, the good news is that motor started moving!!

One question, so I grounded the D8 pin on Wemos board as you mentioned above. But this button does not really do anything or ever changes its state. Is anything required to be added to configuration.yaml?

Now I have another problem, I am using 12V version of 28BYJ-48 motor but it does not seem to generating enough torque - see the motor in action at https://youtu.be/ki9a8pFgZF0

Started out by reviewing the write-up on the ESPhome website and found it so confusing I almost gave up then I found your post.

Working with the 28BYJ-48 stepper motor working with the driver SBT0811 board and the ESP8266.
While searching for clear and concise instruction (thank you) I found a snippet on ESPhome stating if you want this to show up in Home Assistant you will need to copy some code into your Configuration.YAML. I didn’t see any such warnings in these posts. Did something change and now you don’t need to carry that step?
Will come back after I load the YAML file into ESPhome and test it. Thank you for posting the yaml code.