-->
Page 1 of 1

Relay boards for WEMOS D1 R2

PostPosted: Sun Jul 03, 2016 7:41 am
by Asterion
I have been trying to the Catalex Relay Shield V1.0 (which appears clone of http://www.seeedstudio.com/wiki/Relay_Shield_V2.0) on my WEMOS D1 R2 V 2.1.0.

Seems simple enough, relay shield designed for UNO on an UNO clone. The problem is that when the shield is mounted the WEMOS does not come up. I am only powering from the usb port so I am suspecting I will have to power the board from the battery connector (certainly when I rechecked the schematic) it was apparent there no 5V coming from the USB up to the 5volt pin. Even so, I would have expect that I could not drive the relays but not that the WEMOS would not work.

When I take the shield out all is well. The relay driver inputs are D2, D3, D4 and D5 of the IOL header of the WEMOS, and the ground, 3.3V and 5V pins all are happily placed as well. So, it isn't obvious what the coupling is.

Has anyone else tried a UNO four relay shield on their WEMOS D1 R2?

Cheers,
A

Re: Relay boards for WEMOS D1 R2

PostPosted: Sun Jul 03, 2016 10:50 am
by martinayotte
This issue is caused by the fact that GPIO2/GPIO0 are not HIGH level at boot time, although Wemos has some pullups, they are shorted by the relays driving circuits.
Etiher you move them to some other Wemos GPIOs (but cutting those 2 pins and rewired them somewhere else) or you add stronger pullups such 1K on those GPIO2/GPIO0, but this will make that those 2 relays will be powered during startup.

Re: Relay boards for WEMOS D1 R2

PostPosted: Sun Jul 03, 2016 5:26 pm
by Asterion
#martinayotte thanks. I did ping the WEMOS people to think about their own 4 relay boards (I have bought half a dozen of the smaller WEMOS mini and their companion single relay shields). They replied they don't have them (DOH!).

I will have a play with the ideas you suggested. Only clarification is that the WEMOS GPIO0 and GPIO2 already have 10k pull ups to 3.3V according to the schematic (http://www.wemos.cc/Products/images/d1_r2.pdf).

Should I be replacing the 10K? I might use a 1K in parallel to get .9K or 1.2K to get the equivalent 1K pullup. As the resisters on board are surface mount a parallel normal resistor will have to do for me and my tired old eyes. I will likely put the pullups on the relay shield unless they need be on the WEMOS for any particular reason?

More info. I bent all four pins on the shield to test your theory. Indeed GPIO2 seems the main culprit as WEMOS is flaky if that is connected. GPIO0 seems okay but does get relay ON on powerup but relay goes OFF once ESPTool connects. I did get another flaky behaviour where my mouse started running around the screen resizing and selecting things! So it appeared to jam my mouse LOL.


Cheers,
A

Re: Relay boards for WEMOS D1 R2

PostPosted: Mon Jul 04, 2016 8:33 am
by martinayotte
Yes, I've check this schematic before my previous post, but also to the one of the shield which was showing clearly some 3K9 pulldown fighting against the Wemos pullup, but the 3K9 is winning over the 10K.
So, yes putting stronger pullups such 1K would be easier to install directly on the shield, especially that it can be soldered on the header easily. You don't need to do that on the 2 other GPIOs, only the GPIO2/GPIO0.
About your mouse issues, I don't have a clue since it is not related to the case here.