Turn off D1 mini with software only

Hi,
I did search the forum but did not find what I am looking for.
I am looking to know if there is a way to fully turn off the D1 mini with software? I have read about Power MOSFET logic circuit (I might have that name wrong), but I am not looking to add anything physically to the board. Just run a simple program (turn on when plugged in, turn on an LED, wait, turn off the whole board, not just turn off the LED). So far what I have found involves adding an additional chip to the board, which I don't want to do as I really like the form factor of the D1 mini v4.0
Is this even possible?
Thanks

No. The D1 Mini cannot turn itself off without external hardware. Why do you want to do this ?

If it is to save power then you might consider putting the chip into a sleep mode

See Redirecting...

Thanks. Basically.. I have this fear of the device being left on indefinitely, overheating and starting a fire. Irrational, I know. I'll look at the deep sleep option. Thanks.

Why can't you just turn it off until it is needed ? You can obviously get to it because you will need to turn it on again at some time

What is the board really doing rather than turning on an LED for a period ?

1 Like

Low end microprocessors like the ESP8266 are designed and intended to run indefinitely without overheating, even in a closed box.

1 Like

You are correct. I can access it. Currently the device has a power cord switch, after which it plays a series of led colors for specific times (like a timer for someone who can’t read numbers). Currently I have it finishing indefinitely on white. As a reminder to the person using it to turn it off. However I now want to make it so it can be used as a falling asleep nightlight. So I know I can fade the LED to black/off but was hoping to turn off the whole device. But as the next poster said, it is designed to be left on, so I guess I don’t have to worry about it.
Yes I know there are other ways I could do the LED for the timer. However as it is, it works exactly as the person wants and it’s quick for me to change the program if I ever were to need to (I basically only change the program if making a new one for someone else). I have a working delay and working milis program but I actually prefer the delay program Presently.
Thanks

Why the reluctance to use external components to control the power to the board when you are obviously prepared to use external LEDs ?

As to how you do the timing in the sketch, if it is doing nothing but control the timing of LEDs and does not need to monitor inputs then using delay() is a perfectly valid way to implement the timing

Thanks. So the D1 mini has an LED sheild which I have soldered headers and pins onto so it’s one compact little module now.

Thanks, I’ve always felt that the delay function was just fine for what I’m doing but some other people in here gave me flack about using milis instead :woman_shrugging:t2:

Thanks

This is one of the things I make so I don’t want external parts outside the D1 mini combined module.

If you used header sockets with long pins on them the LED module could go on top and a power control module could go on the bottom of the D1 Mini

However, as has been said, there is very little chance of the D1 Mini causing any heat problems

Don't fret about getting flak for using delay(). It is just a knee jerk reaction made without examining what the requirement really is

Thanks!
That is how I have it set up although I’m just using the usb c to power it rather than another board :slight_smile:

This is how I have it built

That is how I imagined it from your description. What I was suggesting was to use sockets on the D1 Mini with longer pins that would protrude below it an plug into a power management board of the same size, thus retaining the all in one nature of it

Are you really using USB C as I did not think that was what the D1 Mini used. What is the white "blob" to the bottom right of the picture ?

Correct! The D1 mini v4.0 uses usb c. The little white blob is a spot to plug in a lithium battery I believe.

My soldering job on this module is not great, which is why I haven’t given it to anyone and just use it to test codes



Thanks for the explanation. My D1 Mini is ancient, hence my question

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.