I switched to D5 pin on Wemos and grounded it (instead of D8) in wiring and changed configuration.
But it did not improve the torque on the motor and blinds will not rotate.
It must be something wrong with my setup as lots of other users have been to deploy it successfully (see YT videos) using similar set up. I will give it some break and then start from scratch in next few days in case I am doing something obvious stupid
Ok this one tested my whole knowledge of electrical engineering
I was under the impression that a 12V 28BYJ-48 will have more torque than the 5V version but seems like I may be better off using a 12V supply on a 5V version with A4988 driver in short burst. And this is actually true as the motor shaft literally need move just about 90 degrees (1/4th rotation) to get blinds to either open or close.
From all information that I have read/watch on the 28BYJ-48, I would say that all behave the same. I have used different brands on different projects and they are the same. Of course, that’s a generalization.
I’m trying to do exactly the same thing. Here’s where I ended up:
Hardware: D1Mini (ESP8266), A4988 motor driver, 28BYJ-48 motor (5V version, hacked to be bipolar), voltage converter (set to convert 12V to 5V), 12V power supply.
Mounting: I don’t have a 3D printer but I LOVE instamorph and use it for everything, and it’s perfect for this. You can get knockoff versions, they’re basically the same. Heat it up in a pot of hot water, and you get a gob of almost molten plastic, into which you can sink the motor to make a mounting. It hardens solid in < 5min and I found it was completely perfect.
Coupling: I have two blinds and they required different couplings because one has a very stiff tilt shaft, the other moves easily
For the easy moving one, I used a metal shaft coupler from Amazon. Not perfect as I had to grind down the tilt rod slightly but very strong.
For the stiff one, I left the worm gear mechanism in place and just removed the spool, replacing it with a LEGO 24-tooth Technic gear. I fitted a 16-tooth gear to the motor shaft, and mounted the motor sideways so that the gears meshed. This gear ratio plus the worm gear mechanism gave me enough reduction to allow the 28BYJ to tilt these very stiff blinds.
Connections (sorry I don’t know how to do the fancy diagrams!):
Control
D1Mini D2 — A4988 Sleep — A4988 Reset (see below!)
D1Mini D3 — A4933 Step
D1Mini D4 — A4988 Direction
Motor
A4988 1B pin 11 — Motor orange
A4988 1A pin 12 — Motor pink
A4988 2A pin 13 — Motor yellow
A4988 2B pin 14 — Motor blue
Motor power
12VAC — Voltage converter IN+ — A4988 VMOT
Voltage converter IN- — A4988 GND pin 15
Logic power
Voltage converter OUT+ (5V) — D1Mini 5V — A4988 VDD
Many tutorials tell you to bridge the reset and sleep pins but don’t say to provide a sleep signal. I tried various combinations before realising that I needed to connect a pin on my microcontroller to both the sleep and reset pins, and configure it in ESPHome as the sleep pin.
D4 is the built in LED on the D1 Mini so if you use it for the direction signal to the motor controller, it will light up when the motor is going in one direction and be off when it goes in the other direction!
It’s pretty vital to have the ESPHome remember the current position of the motor, because if not, and you have a power cut, when the power comes back you might break your blinds/motor/mount by trying to close already-closed blinds.
Having a bit of acceleration and deceleration in the ESPHome config gives you extra torque when you need it.
thnx for sharing your code,
i still got problems, current position value randomly “freaks”. been banging my head for days…
first some questions:
by globals: restore value is set to TRUE, makes it look at the stored value in “saved_position”"
so if i wan’t to calibrate i set this to FALSE ?
meaning: mij blind is up (stepper=0), set the global saved position to 0 and restore_value: FALSE.
then i do an upload (OTA) and i see op the webpage that the position is set to ). -ALL good so far.
then i go back to edit and make this value TRUE.
again an upload and the webpage is still saying position : 0.
now i do some movements, wait some seconds, make another movement that brings the blind back to 0.
now i wait again some seconds and do a restart…
instead of getting the position zero i get a totally different readout…
here’s “my” code…
I’ve got mine working today, same hardware. But it doesn’t quite pull hard enough at the end to fully close the tilt. How do you suggest setting up the acceleration for extra torque I require?
So I am trying your code to control a damper project I am working on.
My concern is if the stepper positioning gets out of sync with my damper - it could strip gears or snap the panel.
I see that this appears to save the last position to overcome this but in a recent test, it did not work.
I also see that you had another thread trying to get more information on this feature. Flash memory
Have you had any problems with losing positioning? How do you reset/correct if so?