ESP Dimmer Led and Relay Nodemcu or Arduino IDE

6 years 9 months ago - 6 years 8 months ago #1087 by cdj
Hello folks, the idea is to integrate dimmer led strips in existing home light system.
I've done nodemcu/lua dimmer by Dennis and it works, but now i want to integrate in my home lights system:
Actually I've a 220v relay that power on a 12v supply with led strips attached.
I want to leave this system working and add dimmer easyiot lua support.
The idea is to connect a relay5v on gpio0 to turn on or off supply giving a "click" on existing 220v relay (150ms open/close 5v relay) and then connect mosfet on gpio2 to dimmer it. But the issue is :
1) some idea of lua code to pilot relay?
2)dimmer must start at 100% when I turn on relay, how to do this?
2) is it correct to connect 12v gnd coming from supply to mosfet and then to led strips to do this?

Pheraps is it better to use two separate circuit, one to power on supply and other for dimming, and only change code to start it at 100% ? If I turn off supply with relay who give power to esp and dimmer mosfet? :(

Thanks
Dario

Please Log in or Create an account to join the conversation.

6 years 9 months ago #1119 by cdj
Thanks mr.EasyIOT for esp relay example... Dennis please how to modify your code to set 100 dimmer value at startup?
In this way we can use a relay node mod (simulate a click) a to power on/off led strips in combination of existing home relay and then your dimmer code to dimmer it!

Please Log in or Create an account to join the conversation.

6 years 8 months ago #1315 by ArneiO
I programmed my startup values in the ESP firmware.
The following user(s) said Thank You: cdj

Please Log in or Create an account to join the conversation.

6 years 8 months ago #1316 by cdj
I've decide to leave last value, thanks

Please Log in or Create an account to join the conversation.

Time to create page: 0.275 seconds

Forum latest

  • No posts to display.