2
\$\begingroup\$

The title does not tell the entire story. I have successfully powered my WeMos by supplying 5vdc to the 5v pin. My power source is 12v battery so I am using a buck converter to drop the voltage to 5v. All is well so far. However, I need to trigger 12vdc relays so I am using a ULN2803 Darlington IC to drive the relays.

I am using the same 12v battery source. This is where my problem seems to be. Everything works if I power the WeMos via USB but if I unplug USB and apply 5vdc to the 5v pin. I fry the WeMos if I leave it connected for more than a few seconds.

If I remove the yellow 5V connection in the lower left and connect USB, everything works. This is my first WeMos project and I'm not great at electronics so I may have everything wrong here. :-\

I am powering the relay directly rather than using a relay module because I need a 4PDT relay. This is the relay I'm using: https://www.amazon.com/gp/product/B07QXYPJH7?pf_rd_r=QF9QDBDWNHVJMV4MH62T&pf_rd_p=5ae2c7f8-e0c6-4f35-9071-dc3240e894a8&pd_rd_r=80baeb28-2cc8-407f-a4c0-46fe12d96261&pd_rd_w=4PD2F&pd_rd_wg=826cB&ref_=pd_gw_unk&th=1

How can I use a single 12VDC power source to both power the WeMos and drive 12VDC relays?

Breadboard diagram

\$\endgroup\$
10
  • 1
    \$\begingroup\$ @tlfong01 I updated my question with relay info. I suppose I could use a relay module to drive the 4PDT one that I need to use. \$\endgroup\$ Commented Mar 7, 2021 at 0:55
  • 1
    \$\begingroup\$ It's much better to link to an actual datasheet rather than a shopping site that has limited technical information from the seller. \$\endgroup\$ Commented Mar 7, 2021 at 1:03
  • 1
    \$\begingroup\$ @tlfong01 It is not a relay module. Just a bare relay. Apparently, I have a LOT more to learn before I can do this project. I read the post you linked to. Great info. Much of it was over my head though. \$\endgroup\$ Commented Mar 7, 2021 at 1:09
  • 1
    \$\begingroup\$ @ScienceGeyser The Amazon link is all the info I have. Sadly, they do not provide any additional info but it is just a simple relay in a socket. \$\endgroup\$ Commented Mar 7, 2021 at 1:10
  • 1
    \$\begingroup\$ @tlfong01 I believe you are correct. It does light up when the relay is activated. \$\endgroup\$ Commented Mar 7, 2021 at 1:11

1 Answer 1

0
\$\begingroup\$

As I could understand from your schematic you are trying to use a D1 Mini to drive a 12V relay. But, the d1 Mini will not be able to drive a 12V relay and you are trying to use the darlington to do so.

Your d1_mini should be isolated from the 12V source. Which is most likely what is frying it. For that, you could use different approaches. But, the one that comes to my mind is using the d1_mini to drive a MOSFET. The MOSFET Drain -> Source would be the one to provide the 12V required by your relay to activate.

Take a look at this video https://www.youtube.com/watch?v=FrpYtBeKzKk. It shows how to implement it using a single power source(https://youtu.be/FrpYtBeKzKk?t=32) or using different power sources(https://youtu.be/FrpYtBeKzKk?t=43).

In your case, you have virtually, 2 power supplies. Although using the same battery, there is power supplied by the battery and power supplied by the buck converter. Which could be illustrated by the image in the external power supply mode. https://youtu.be/FrpYtBeKzKk?t=48

So, I think you tried to do the same with the darlington but I could not see it as a good way of doing so once the darlington in my opinion has different purposes

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.