# Relais not working after a night

**URL:** <https://wled.discourse.group/t/relais-not-working-after-a-night/11024>\
**Category:** Issues\
**Created:** [February 5, 2024, 1:45pm UTC](https://wled.discourse.group/t/relais-not-working-after-a-night/11024 "2024-02-05T13:45:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeLunZ](https://avatars.discourse-cdn.com/v4/letter/l/b9e5f3/32.png) [@LeLunZ](https://wled.discourse.group/u/LeLunZ)\
**Post date:** [February 5, 2024, 1:45pm UTC](https://wled.discourse.group/t/relais-not-working-after-a-night/11024/1 "2024-02-05T13:45:49Z")

</div>

Hey Wled Community.

I recently moved my Raspberry Pi setup to an ESP32 with wled installed.  
Everything works great. Also love that there is a homebridge integration for HomeKit 🙂

But sometimes after a night or a while not using the setup, wled or the esp can’t trigger the Relais anymore. (It can’t change the Pin to Low/0V)

The pin always stays high and I can measure voltage on the pin.

The Relais I am using has a optocoupleur (read that’s important). ([Here more info](https://asset.conrad.com/media10/add/160267/c1/-/en/002268118ML00/bedienungsanleitung-2268118-tru-components-tc-9072472-relais-platine-1-st-passend-fuer-entwicklungskits-arduino.pdf))  
And the cable between Relais and ESP is about 1.2 meters long.

I also had a problem where the esp32 wouldn’t even boot while the „data“ cable of the Relais was connected. I mitigated it with using the same 61 Ohm resistor, I used on my data cable for the LEDs.  
Could it be that I need a larger resistor? Or do you have any other ideas?

---

<div class="post-metadata">

**Author:** ![kilrah](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/kilrah/32/5927_2.png) [@kilrah](https://wled.discourse.group/u/kilrah)\
**Post date:** [February 5, 2024, 2:26pm UTC](https://wled.discourse.group/t/relais-not-working-after-a-night/11024/2 "2024-02-05T14:26:34Z")

</div>

How is it connected? The LED VCC on the relay board should not be more than 3.3V.

---

<div class="post-metadata">

**Author:** ![LeLunZ](https://avatars.discourse-cdn.com/v4/letter/l/b9e5f3/32.png) [@LeLunZ](https://wled.discourse.group/u/LeLunZ)\
**Post date:** [February 5, 2024, 3:59pm UTC](https://wled.discourse.group/t/relais-not-working-after-a-night/11024/3 "2024-02-05T15:59:18Z")

</div>

So the Relais is connected to the esp (Devkit V4) like that.

Relais VCC → 5V ESP  
Relais Ground → Ground ESP  
Relais Control → Pin 26 in esp?

the Relais is a TTL Relais so the control can also be Less than 5 Volts.

---

<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:** [February 5, 2024, 4:06pm UTC](https://wled.discourse.group/t/relais-not-working-after-a-night/11024/4 "2024-02-05T16:06:53Z")

</div>

It would need to operate on only 20mA or so.

---

<div class="post-metadata">

**Author:** ![LeLunZ](https://avatars.discourse-cdn.com/v4/letter/l/b9e5f3/32.png) [@LeLunZ](https://wled.discourse.group/u/LeLunZ)\
**Post date:** [February 5, 2024, 4:54pm UTC](https://wled.discourse.group/t/relais-not-working-after-a-night/11024/5 "2024-02-05T16:54:26Z")

</div>

Yes I know.  
And in normal use everything works great. I can turn LEDs off. The Relais go off.  
I turn LEDs on. Relais go on.

But after a night. I want to turn the LEDs on. And nothing happens.

I checked the voltage on my relay pin and it’s still 3.3 Volts. (Should be 0V)  
Even though Wled shows the LEDs as turned on

---

<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:** [February 5, 2024, 5:04pm UTC](https://wled.discourse.group/t/relais-not-working-after-a-night/11024/6 "2024-02-05T17:04:56Z")

</div>

Maybe it’s inverted? There is a checkbox for that.

---

<div class="post-metadata">

**Author:** ![kilrah](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/kilrah/32/5927_2.png) [@kilrah](https://wled.discourse.group/u/kilrah)\
**Post date:** [February 5, 2024, 5:25pm UTC](https://wled.discourse.group/t/relais-not-working-after-a-night/11024/7 "2024-02-05T17:25:43Z")

</div>

The doc shows separate supplies for the relay and optocoupler LED.

 ![image](https://global.discourse-cdn.com/free1/uploads/wled/original/2X/0/0b6c03af83d635b436ff877a3f4677c30fee1de1.jpeg)

Asking for the complete connections because we don’t know if you drive the optocoupler LED to ground, from what high side, or if you instead supply it with the ESP pin etc…

Also what pins are used on the ESP, some have caveats
