ESP32 LC-Relay 4R-A2
Beschreibung:
Ein fertiger ESP32 mit 4 Galvanisch getrennten relais.
Komplett fertig.
https://www.amazon.de/dp/B0D3WJMCC3?ref=fed_asin_title
Gehäuse 3D Druck
| Name | Bild | Link |
|
Box |
4Channel_ESP32 - BOX.stl | |
|
Deckel |
4Channel_ESP32 - LID.stl |
Quelle: https://www.printables.com/model/1084217-esp32-4-channel-relais-modul-case/files
PIN Belegung:
Programming header pinout
| Pin | Comment |
|---|---|
| 5V | 5V for programming |
| TX | Exposed on board 3.3V level! |
| RX | Exposed on board 3.3V level! |
| GND | |
| GND | |
| GPIO0 | 3.3V level! (Connected to a push button for programing) |
Internal pinout
| Pin | Function |
|---|---|
| GPIO23 | Status LED |
| GPIO32 | Relay #1 |
| GPIO33 | Relay #2 |
| GPIO25 | Relay #3 |
| GPIO26 | Relay #4 |
Flashen:
Siehe Programmer : AZ-Delivery Programmer
Den Programmer Jumper auf 5V einstellen
GND und GPIO0 mit einem Jumper überbrücken
5V vom Prgrammer an V5 ESP32
RX vom Programmer an TX ESP32
TX vom Programmer an RX ESP32
GND vom Programmer an GND ESP32
Jumper über GPIO0 und GND am ESP32 für Boot button
Keine Stromversorgung Extern.
ESP32-Home Code Beispiel für 4 Relais als TasterSwitch
output:
- platform: gpio
pin: GPIO23
id: led
- platform: gpio
pin: GPIO32
id: relay_pin_1
- platform: gpio
pin: GPIO33
id: relay_pin_2
- platform: gpio
pin: GPIO25
id: relay_pin_3
- platform: gpio
pin: GPIO26
id: relay_pin_4
# Define the switches based on the relay pins
switch:
- platform: output
id: relay_1
name: "Relay 1"
output: relay_pin_1
- platform: output
id: relay_2
name: "Relay 2"
output: relay_pin_2
- platform: output
id: relay_3
name: "Relay 3"
output: relay_pin_3
- platform: output
id: relay_4
name: "Relay 4"
output: relay_pin_4
interval:
- interval: 1000ms
then:
- output.turn_on: led
- delay: 500ms
- output.turn_off: led
Als Taster
button:
- platform: template
name: "Taster Relais 1"
id: relay_1_button
on_press:
- output.turn_on: relay_pin_1
- delay: 500ms
- output.turn_off: relay_pin_1
- platform: template
name: "Taster Relais 2"
id: relay_2_button
on_press:
- output.turn_on: relay_pin_2
- delay: 500ms
- output.turn_off: relay_pin_2
- platform: template
name: "Taster Relais 3"
id: relay_3_button
on_press:
- output.turn_on: relay_pin_3
- delay: 500ms
- output.turn_off: relay_pin_3
- platform: template
name: "Taster Relais 4"
id: relay_4_button
on_press:
- output.turn_on: relay_pin_4
- delay: 500ms
- output.turn_off: relay_pin_4



