# Power on/off

**URL:** <https://wled.discourse.group/t/power-on-off/6841>\
**Category:** Usermods\
**Created:** [December 22, 2022, 7:14pm UTC](https://wled.discourse.group/t/power-on-off/6841 "2022-12-22T19:14:07Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![RobG](https://avatars.discourse-cdn.com/v4/letter/r/a698b9/32.png) [@RobG](https://wled.discourse.group/u/RobG)\
**Post date:** [December 22, 2022, 7:14pm UTC](https://wled.discourse.group/t/power-on-off/6841/1 "2022-12-22T19:14:07Z")

</div>

Not sure if it’s already there, but can we get one of the pins assigned as power status? Currently, when you use power off UI feature, LEDs are dimmed, but the power is still present. If we could get power status on one of the pins, we could use it to switch off power supply when the power is off, and then switch it back on when power is on.

---

<div class="post-metadata">

**Author:** ![Jinx](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@Jinx](https://wled.discourse.group/u/Jinx)\
**Post date:** [December 22, 2022, 7:21pm UTC](https://wled.discourse.group/t/power-on-off/6841/2 "2022-12-22T19:21:08Z")

</div>

You can use a relay to switch your power supply on/off. There is no way to switch the power off to the LEDs from the Esp because the power to the LEDs does not come from the Esp. Power comes from your power supply and that can be connected to a relay and the relay can be controlled from the Esp.

---

<div class="post-metadata">

**Author:** ![RobG](https://avatars.discourse-cdn.com/v4/letter/r/a698b9/32.png) [@RobG](https://wled.discourse.group/u/RobG)\
**Post date:** [December 22, 2022, 8:10pm UTC](https://wled.discourse.group/t/power-on-off/6841/3 "2022-12-22T20:10:15Z")

</div>

That’s exactly what I want to do, but to control a relay, I need to know if the “power” is on or off, meaning I need one of the pins from ESP to provide that signal.

---

<div class="post-metadata">

**Author:** ![tonyno](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/tonyno/32/242_2.png) [@tonyno](https://wled.discourse.group/u/tonyno)\
**Post date:** [December 22, 2022, 8:23pm UTC](https://wled.discourse.group/t/power-on-off/6841/4 "2022-12-22T20:23:41Z")

</div>

That is set in LED Preferences and called Relay GPIO. 😉

---

<div class="post-metadata">

**Author:** ![RobG](https://avatars.discourse-cdn.com/v4/letter/r/a698b9/32.png) [@RobG](https://wled.discourse.group/u/RobG)\
**Post date:** [December 22, 2022, 11:12pm UTC](https://wled.discourse.group/t/power-on-off/6841/5 "2022-12-22T23:12:40Z")

</div>

Awesome! Thanks.

---

<div class="post-metadata">

**Author:** ![tsuckow](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/tsuckow/32/4120_2.png) [@tsuckow](https://wled.discourse.group/u/tsuckow)\
**Post date:** [December 23, 2022, 5:22pm UTC](https://wled.discourse.group/t/power-on-off/6841/6 "2022-12-23T17:22:35Z")

</div>

I would recommend putting it above IR, with the “IR Info” link above it, it makes it look like it is something for the IR input.

Or in it’s own section because it is an output while everything else is input

---

<div class="post-metadata">

**Author:** ![Knubbi](https://avatars.discourse-cdn.com/v4/letter/k/958977/32.png) [@Knubbi](https://wled.discourse.group/u/Knubbi)\
**Post date:** [April 5, 2023, 4:19pm UTC](https://wled.discourse.group/t/power-on-off/6841/7 "2023-04-05T16:19:32Z")

</div>

Instead of using a relay, has anyone a MOSFET switch schematic that switches a 5V strip from an ESP32? On the web I found countless discussion which never ended but arguing about what MOSFET to choose. Any ready-to-use circuit would be very much appreciated. Thank you!

---

<div class="post-metadata">

**Author:** ![blazoncek](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/blazoncek/32/1886_2.png) [@blazoncek](https://wled.discourse.group/u/blazoncek)\
**Post date:** [April 6, 2023, 4:54am UTC](https://wled.discourse.group/t/power-on-off/6841/8 "2023-04-06T04:54:31Z")

</div>

Any MOSFET that fully opens at 3.3V (Vgs) will work and since it works as a “switch” you can deploy it as a switch. Use Google for sample schematics or ready to use circuits.  
Be mindful that you still need to respect Vgs and Id limitations. A basic electronics knowledge will suffice.

---

<div class="post-metadata">

**Author:** ![Knubbi](https://avatars.discourse-cdn.com/v4/letter/k/958977/32.png) [@Knubbi](https://wled.discourse.group/u/Knubbi)\
**Post date:** [April 6, 2023, 9:41am UTC](https://wled.discourse.group/t/power-on-off/6841/9 "2023-04-06T09:41:19Z")

</div>

Thanks but you repeated exactly, what I mentionend. I could not find any out-of-the-box working schematic but just tips as “respect Vgs and Id limitations”, “don’t take this”, “consider this type but watch out for that”. Again, does anyone has a working schematic to switch a 5V strip with a ESP32? Thank you so much for any help.

---

<div class="post-metadata">

**Author:** ![blazoncek](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/blazoncek/32/1886_2.png) [@blazoncek](https://wled.discourse.group/u/blazoncek)\
**Post date:** [April 7, 2023, 4:16am UTC](https://wled.discourse.group/t/power-on-off/6841/10 "2023-04-07T04:16:29Z")

</div>

Come on!

[https://www.google.com/search?q=mosfet+as+a+switch+schematics](https://www.google.com/search?q=mosfet+as+a+switch+schematics)

---

<div class="post-metadata">

**Author:** ![Knubbi](https://avatars.discourse-cdn.com/v4/letter/k/958977/32.png) [@Knubbi](https://wled.discourse.group/u/Knubbi)\
**Post date:** [April 21, 2023, 11:10pm UTC](https://wled.discourse.group/t/power-on-off/6841/11 "2023-04-21T23:10:49Z")

</div>

Again, I only find _general_ examples most of them are “low side switching” which seem not to be suitable for ESP32 WLED applications as GND will float when switch is off.

Is anyone out there with a in-the-field working schematic?

---

<div class="post-metadata">

**Author:** ![Molotochek](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/molotochek/32/5320_2.png) [@Molotochek](https://wled.discourse.group/u/Molotochek)\
**Post date:** [June 15, 2023, 5:39pm UTC](https://wled.discourse.group/t/power-on-off/6841/12 "2023-06-15T17:39:07Z")

</div>

[https://kno.wled.ge/basics/getting-started/](https://kno.wled.ge/basics/getting-started/)
