2023-05-05 22:59:42 +02:00
|
|
|
|
This project is based on: https://github.com/mariusmotea/diyHue/tree/master/Lights/Arduino/Generic_Dimmable_Light
|
|
|
|
|
|
|
|
|
|
Most of the code was generated by ChatGPT.
|
2023-04-24 20:26:49 +02:00
|
|
|
|
|
2023-05-02 14:58:02 +02:00
|
|
|
|
The controller I use is a old NodeMCU v1.0, which is connected to 4x D4184 MOS breakout boards. See NodeMCU pins table beyond.
|
|
|
|
|
The cable I use is a https://amzn.eu/d/0jigRCh. I cut it in half and attached it to the MOS boards.
|
2023-04-24 20:26:49 +02:00
|
|
|
|
|
2023-05-02 14:58:02 +02:00
|
|
|
|
The NodeMCU‘s power supply is a 7805, it‘s output is connected to the Vin pin.
|
|
|
|
|
The input of the 7805 is connected to the 24V of the DC power plug.
|
|
|
|
|
|
|
|
|
|
NodeMCU pins:
|
|
|
|
|
|
|
|
|
|
| |ch1|ch2|ch3|ch4|
|
|
|
|
|
|--|--|--|--|--|
|
|
|
|
|
|LED color|blue|warm white|purple|white & red & green|
|
2023-05-02 18:10:52 +02:00
|
|
|
|
|Wire color|blue|black|red|white|
|
2023-05-02 14:58:02 +02:00
|
|
|
|
|Arduino pin names|D1|D2|D7|D5|
|
|
|
|
|
|GPIO|5|4|13|14|
|
|
|
|
|
|
|
|
|
|
The HTML content is pushed to the NodeMCU separetely by using the ESP8266 Sketch Data Upload plugin of the old Arduino IDE (not "Arduino IDE").
|
|
|
|
|
|
|
|
|
|
After the firmware is written the first time to the NodeMCU.
|
|
|
|
|
The EEPROM's default values are set to default.
|
|
|
|
|
All except of the timing control data block.
|
|
|
|
|
|
|
|
|
|
You have to click at the link "reset timing control data" on the webinterface.
|
2023-04-24 20:26:49 +02:00
|
|
|
|
|
2023-05-07 16:30:42 +02:00
|
|
|
|
Sample schematics (no NodeMCU pins defined in there)
|
|
|
|
|
|
|
|
|
|
![Sample schematics](pic/schematics.png)
|