How to power WeMos D1 Mini without USB?

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. :-\

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

Your arrangement is correct. Clearly something is badly wrong.

What does "fry the WeMos" actually mean?

The ULN2803 is basically obsolete. You can control a TPIC6B595 with three I/O pins feeding the data to it serially.

Check the voltage your buck converter is putting out. Check the voltage at the "5V" pin of the WeMOS.

The ULN2803 IC has a notch on one end, which end on the picture has the notch?

Paul__B:
What does "fry the WeMos" actually mean?

The ULN2803 is basically obsolete. You can control a TPIC6B595 with three I/O pins feeding the data to it serially.

Check the voltage your buck converter is putting out. Check the voltage at the "5V" pin of the WeMOS.

I did not see it but I could smell the magic smoke that came out. Now plugging it into USB, nothing happens. Completely dead.

I will see if I can figure out how to use the TPIC6B595. Reading about it, it sure sounds like a better way to go. Do you know of an example schematic and code I can learn from?

I did check the voltages at the buck converter and the 5v pin and confirmed they were correct. At this point, I have to assume that I must have touched a wire somewhere and did not notice. Since these are so cheap I'll try again and see if I get any more smoke. Haha.

JCA34F:
The ULN2803 IC has a notch on one end, which end on the picture has the notch?

The notch is on the right in this diagram. Keep in mind, it worked correctly when I powered the WeMos with USB and the 2803 with 12VDC.

Nothing to do with frying the D1, are you using WiFi? I would expect that you will have problems with WiFi with the D1 on the breadboard like that. The aerial should be away from the breadboard contacts or any other metal. I put them at the end of the breadboard with the aerial hanging off the end. Using headers to lift it off the breadboard also helps.

And yes, that makes connecting the USB cable awkward.

I've never had wifi problems orienting wemos mini on breadboard like that, Perry. Admittedly, I've probably always had a reasonably strong wifi signal in the places I've tested in. Maybe where the wifi signal was very weak, it might make a difference.

@OP, I agree with the other comments, your circuit should have been fine. I have also fried wemos mini with 12V, but each time immediately realised my wiring error that caused it. You could think about a quick-blow fuse in an in-line holder in the +12V wire from the battery. But I guess whatever you are using the relays to switch will need far more current than it takes to fry a wemos.

Why are you using relays anway? How much current do the relay loads draw? Could power mosfets be an alternative?

Hi Paul,
It was one of the things I noticed when I first used an ESP8266 board; having it dangling on the end of a USB cable it was fine, plugged into breadboard it wouldn't connect to WiFi. The advice I've given is based on that experience. I guess the message to the OP is if it works don't worry about it, if it doesn't then you know what to try.

I’d check those connections to the Darlington driver . It’s easy to get that wrong and create a short .
If you look at it and have the notch at the top, pin 1 is top left and they numbered anti clockwise from there .

PaulRB:
@OP, I agree with the other comments, your circuit should have been fine. I have also fried wemos mini with 12V, but each time immediately realised my wiring error that caused it. You could think about a quick-blow fuse in an in-line holder in the +12V wire from the battery. But I guess whatever you are using the relays to switch will need far more current than it takes to fry a wemos.

Why are you using relays anway? How much current do the relay loads draw? Could power mosfets be an alternative?

Thank you so much for confirmation that my wiring should be OK! :slight_smile:

I have yet to learn how to use mosfets. I am a total newbie here. I'm a programmer but have not done anything with electronics for 40 years. Primarily the reason for the relay is I need 4PDT. I'm sure it can be done solid-state but that's over my head for now. I am having SO much fun learning and doing this. Loving it! :slight_smile:

PerryBebbington:
Hi Paul,
It was one of the things I noticed when I first used an ESP8266 board; having it dangling on the end of a USB cable it was fine, plugged into breadboard it wouldn't connect to WiFi. The advice I've given is based on that experience. I guess the message to the OP is if it works don't worry about it, if it doesn't then you know what to try.

Hi Perry,

I hear what you are saying. WiFi works fine in my test setup. I just need to stop the magic smoke from escaping. :wink: