[RELEASE] ESP8266 / Arduino servo controlled smart blinds

Don’t quote me but I did a test on a node and I went to ground I do believe and it just goes in one direction then hits the end and goes back the other way. I have a question for you Jacob, how did it go setting it up on a 8266? I want to buy one because there cheap and small.

Connecting digital pins to ground wont cause a problem as they already have internal pullup resistors that will just allow a small bit of current through and not damage the pin.

I had a bit of trouble getting the driver installed on Mac OS X High Sierra because it wasn’t digitally signed but I finally found one that was so from there it was smooth sailing with @jetpuf imgur walkthrough tutorial that he linked on this page. By the way, I was able to figure out the manual switch and hook it up to a toggle successfully. You’re right that it just goes in one direction until it hits 0° or 180° and then the same switch will reverse the direction. I actually modified the code a little to use a toggle switch so I could go either direction without having to hit the stop point. If anyone wants it, just ask. But to answer my question in case anyone is wondering the same thing, you can take any ground pin on the board and send it to the D6 pin and it will operate the blinds as you described.

Hey Jacob, good to hear you got it working.
I would be interested in that. Also what Esp8266 did you use was it a Esp8266 01 if so how many pins can you use on it. I just ordered ESP01 and a programme for it should be coming in 3weeks.

Makerfocus 2pcs ESP8266 Serial Wireless Module CH340 NodeMcu V3 Lua WIFI Internet of Things New Version Development Board EK1677 Arduino Compatible https://www.amazon.com/dp/B01N8UUE3L/ref=cm_sw_r_cp_api_4Mp8zbQ7PQ014

I’m really new to all this but that’s the chip I used. I’ve ordered the Wemos D1 Mini for the rest of my blinds because I’ve read they fit better and use the same chip.

Ok so your running the same as me then I want to use a ESP01 think it only has two usable io on it but there only 3.50us

I can tell you from experience that the ESP-01 is a lot harder to use in a design when compared to a NodeMCU or D1 Mini with the ESP-12. You’ll need to develop your own circuit board to power the ESP with 3.3V and then somehow get 5V to power the servo.

i will take your word for it ben after seeing the great work you did.
i was thinking of using an AMS1117


sort of like this or when i do the wiring run it all back to an old computer power supply with both 5 and 3.3

AMS1117 works great as long as you’re not on a battery, it’s not super efficient.

I’m running into power issues with a 2.1 amp USB wall block powering three blinds. I’ve soldered Y’s into a micro USB cable and split it off three ways and the total cable length approaches 15 feet. Each of the three Y ends are terminated in a male micro USB which is plugged into each Wemos board. They are working like this but they go through a series of reboots every time I power them up which can be avoided by giving each of them a single power wire so I’m pretty sure it’s a power issue. I’d like to avoid running three power wires to one set of windows if I can. I’m wondering if anyone has come up with a power solution for this. I was thinking about just getting some 18 gauge speaker wire and soldering it to a male USB terminal on one end for the 2.1A wall block and then splitting it out to the VIN power pin on each of the three Wemos. Is there a more elegant solution? How many amps might be required to power three windows? Can the Wemos VIN handle 5V input or just 3.3V? I have fried about four boards already. They work for a couple days and then go out and have a slight burn smell to them. Thanks for any help you guys might provide.

@jacobwtyler, when I first posted about running 3 blinds I was powering each blind with a 2.1amp USB adapter. Since then I have re-wired the three onto the same “main” connector. Powering that is from a USB/120v outlet. It has a capacity of closer to 5 amps.

I have noticed from time to time if there is too much current draw the ESP8266 will reset. To rectify that I installed a 470uf 16v capacitor between the power leads on the servo… A similar trick is used in the RC world with servo’s that draw lots of power. I have also noticed that my power setup is VERY sensitive to any voltage fluctuation on the mains as sometimes throughout the day the blinds will reset.

Finally the Wemos D1 and NodeMCU have a weak diode in the design if you are powering them through the USB port. You can remove the diode and short it out with some solder or power the device using the Vin and Gnd pins. I have changed my setup to provide power to the devices using those pins. Picture from Reddit of the diode that lets out magic smoke

To all, it’s great to see that @blebson is spring-boarding this into another more integrated idea! Sorry I have not been more active on here. Life is busy.

2 Likes

okay, I was just thinking of switching to the VIN for power instead of the microUSB so that I can use a thicker gauge of stranded wire and maybe preserve some voltage loss. Does the VIN pin skip the diode and why would I want to skip this diode by the way? I know (basically) what a diode does but I don’t see the advantage. Also my NodeMCU board has a dedicated VIN pin but my Wemos Mini D1 seems to only have a 5v and a 3.3v pin. I’m guessing the 5v is the VIN pin…

6177B1D6-7F94-4A50-9F8E-907CFE25A8BB

I’m no engineer but if this calculation is right, then switching from a (28 awg) usb cable to some 18 gauge 2 strand speaker cable should make a huge difference in powering by 3 bay windows. Maybe somebody smarter than me can correct me if I’m wrong. I’m going to give it a try today and see if it makes a difference.

You can certainly increase the wire gauge to reduce your voltage drop. Keep in mind, USB 2.0 spec has a 5m length limitation at 500mA, increasing your amperage also increases your voltage drop which is why you’re running into issues.

1 Like

18gage is good for 5amps at around 120ft all day long. I was planning on fishing In wires to each blind and using an old computer power supply. You just have to short out two wires on the power supply wiring and it will automatically start up when you plug it in. Right now just going to power the node and the take the two leads of the servo and tie it into the power before the node. Think it should work if any one sees flaws in this let me know. But right now I have to figure out how to add multiple servos to a node and have ST app see them. Any input would be helpful thanks

Hmm, never thought about a PC power supply for 5v. I’ve used them for 12v. That’s a great idea @Buzzshot!

The one great thing is it has 5v and 3v. And 12v for relays and light strips. Plus it’s switching power supply so it doesn’t draw a lot. One question for you jet how did u do the multiple servos on one node?

I’m running one D1 mini per blind. The USB outlet everything is connected to outputs 4.8a @5v Sometimes when all 3 blinds operate they can brownout. It’s not a frequent problem though.

The code is out there though if someone wanted to run multiple servos. I’ve thought about making a branch to run two servo’s. Power would be the biggest issue.

I am not so worried about the power I was planning on using core and have it setup if say you came home and al the blinds are to open, I would just have a task setup so blind1 open wait 4 second open blind 2 wait 3 seconds open blind3. So then your not taxing the power supply and would do a wave affect. I am just not sure what line of code I change in the smart app to tell the second Pin on the esp to change direction.

The programming on the ESP8266 handles the blinds direction. Just tell it how much to open and the arduino handles the rest.

I’ve not played around with having Core set the value on the blinds, I have mine automated to just open and close at sunrise and sunset. You should be able to specify the percentage. I did notice when I developed these that if you were testing using the web interface on the SmartThings IDE it would send numbers with a trailing 0 after the a decimal point, so 49 becomes 49.0. I have not accounted for that as I figured there was probably a way to code for that… I just never made that change.

1 Like