Loading
cabuu

Automatic Blind Controller Version 2 - Amazon Alexa compatible

by cabuu Apr 8, 2019
Download All Files

Thing Apps Enabled

Please Login to Comment

Hi,
I'm getting a successful compile & sketch upload buy my D1 never appears to boot (no green lights and no wifi connection)
Any ideas?

Thanks!

Got it working, had to use version 2.4.2 of esp board

Hey Camaroon, glad you got it working in the end, thanks for sharing, will hopefully help someone else out if they're having similar messages.

Trying to compile the code in Arduino IDE & am getting the error code "Error compiling for board LOLIN(WEMOS) D1 R2 & mini."

Any ideas?

Cheers

Sorry george, way to vague! Is there any more to that message?

Just purchased some of your PCB boards, looking forward to this project!

Hi Camaroon,

Thanks so much for your support, good luck with your build!

Hi, Connecrion to blynk app works fine, but im unable to set up the device in wemo app causing by the wemos not opening a wifi spot im able to connect to. Because of that im not able to set up the device.
Any suggestions?

Hi there is some advice on my website for this and id recommend checking out the github page for the wemo switch library. It's very sensitive to the versions of libraries you're using. Sorry I can't be of more help, too many variables!

after successfully uploading the code the serial monitor repeadly shows the following:
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v8b899c12
~ld

this goes on and on and it wont start the wifi connection. i got that to work for one or two times but i didnt changed anything.
tried on 4 different wemos, different baud rate and everything else i could imagine... im out of ideas.

EDIT: Fixed it by using Version 2.5.0 instead of 2.5.1 for esp8266.

Glad you managed to sort it, thanks for sharing

Comments deleted.

Hi Cabuu,
Some help required, I've made up this project but have run into a problem. Uploaded the latest sketch which connects to my WIFI and local Blynk server. The geared DC motor lights up and the LED on the blind controller is a static yellow. However, the up and down buttons do not work. The DC motor does not move when either button is pressed. All connections have been check and all seem fine.
I've attached the serial monitor log (changed IP addresses to XXX.XXX.XXX.XXX for safety)

Some help to get this project working would really be appreciated.
Many Thank Scottian.

Hi Scottian,

Solid yellow suggests it's trying to drive the motor. Suggest you check everything to do with that and my first suspicion would be the L298N driver board as these are very easy to damage especially if you subject them to more than 10V. Check your motor connections and replace individual components in turn to try find the source of the problem, the D1 is another possibility. The good news is the serial monitor looks otherwise promising and I think you'll be up and running very shortly. Let me know how you get on.

Hi Cabuu,

Thanks for the speedy response. I have now tested the following...

  1. DC motor by wiring M1 & M2 to +9v & GRD this results in a motor that turns.
  2. DC Motor encoder by wiring 3.3V, GRD, C1 & C2 via the corresponding pins in the PCB with the Wemos connected and uploading a small amount of 'encoder' code, checked via the serial monitor in the arduino IDE this results in data being read.
  3. Push Buttons by uploading some code to switch the built in LED on the Wemos on, this appear to function but in reverse, push button to switch off the LED, which suggests a pull up resistor on the PCB, but I think it's a pull down resistor circuit??
  4. Tested the Wemos DC-Power shield, 5v between +5v pin and GRD but only 2.5v between the Vin & GND pins. Is this correct?
  5. Tested L298N power supply which is getting 2.5v to the board from the DC-Power shield. Is this enough voltage?

Conclusions...

  1. DC-Power shield could be defective. I can't find any specs to do with Vin riser voltage but it does power the Wemos D1 so is probably fine.
  2. As you suggest the L298N board could be defective... Any advise on how I go about testing this L298N??

Many Thanks

Scottian

I'd just replace it, I've broken many of them (all my own fault) and now have a near constant supply, luckily they are cheap enough.

Hi

On further investigation, the L298N is only getting around 1V supplied to it. This makes the DC motor have a high pitched buzzing sound which would suggest that the motor is trying to turn.. I'm now leaning in favour of the DC Power shield not supplying enough voltage for the L298N to function. Do you have any data on what the correct voltage output of the DC Power shield Vin riser pin should be?

Hi Cabuu

Okay I have got this to work. Went back to basics...

  1. flashed the Wemos at a lower baud rate.
  2. set the blynk toggle in the code to false.
  3. fully tested the DC Power shield, found a problem with Vin & GRD. The solder tags are very fragile and because the pins are slightly wider than a standard 2 pin header the parts are hard to solder correctly. This cause resistance and a voltage drop and therefore the L298N board wasn't getting enough voltage as I first thought. Corrected this by soldering 2 wires to bypass the PCB and power the L298N directly from the 9v PSU.

The blind controller now, calibrates for open & closed and functions as expected with the Up & Down buttons.

Issue remaining.
When the blynk toggle in the code is set to true the blind controller will not calibrate and repeatedly reboots and the push buttons no longer function. The blynk app recognises the blind controller connection but pressing an app button causes the blind controller to reboot.

I've tried commenting out the references to the wemo emulator think this could be causing an issue with the blynk code but without success.

Any thoughts on solving this?

Many Thanks Scottian

Sounds like a power issue potentially. Have you got at least 1a 9v psu? A different d1 may be worth trying too, I found some of the cheaper versions to be unreliable.

Update...
I had this completely working with the Blynk cloud server as per your videos, etc.I was very happy! Typically for me I tried pushing it a bit further by adding IFTTT webhooks to the add google voice control to manipulate the Blynk software which didn't work, then the Wemos D1 mini to started to reboot repeatedly, tried re-flashing which bricked the Wemos. Used the pull down method on pins D3 & D8 to reset the Wemos. I can now flash the sketch but the Blynk toggle in the code has to be set to false to get it to work.

Conclusion...
The Wemos D1 I purchased must be at fault so I've ordered more Wemos D1 minis... from different suppliers some clones and some that appear to be the originals Wemos.
I'll let you know what happens once these arrive.
It's still a great project, thank you for your continued interest and support.
PS; the PSU is 2.4A so should be fine.

You're welcome, glad you had some success!

Great project, thank you for sharing this.
Would it be possible to control more than one blind with the same Blynk app?
Any thoughts on how this multi-blind control could integrated into this project?
Could MQTT be incorporated?
Thanks

Thanks for your comments. I haven't tried it but I believe it should be perfectly possible to control two blinds with one app as you can use the same authentication token. I suggest you try see if you can find any similar examples on the Web to follow. If ever I need to control more than 2 I will be sure to update you with progress. Regards mqtt again its not something I have experience of but I don't think it would be a problem. Sorry I can't be of more help.

Would really like to do a few of these as i have alexa everywhere in the house.

are the required components available from a EU source?
too much shipping to sweden etc etc

Hi there,

Below are some Amazon (UK) links to the major components, should find similar within Sweden I would have thought. You can also purchase complete kits from my etsy page (soldered or unsoldered) I am awaiting stock at the moment but drop me a message if this would interest you.

Etsy Kits

Completed: https://www.etsy.com/uk/listing/692100674/blind-controller-completed-electronics?ref=listings_manager_grid
DIY: https://www.etsy.com/uk/listing/705954149/blind-controller-diy-electronics-kit?ref=listings_manager_grid

Components

D1 Mini: https://amzn.to/2JdVPj6

Torque Motor: https://amzn.to/2WK2812

Motor Driver: https://amzn.to/2JhN87r

DC shield: https://amzn.to/2Hkzj4Y

9V Power Supply: https://amzn.to/2JgVTPf

LED: https://amzn.to/2VxjO3y

Resistors: https://amzn.to/2HjNS8T

Buttons and Caps (rounded): https://amzn.to/2E5mZ7y

Header Sockets (not exact - male and female req'd): https://amzn.to/30is1r2