
Wroom esp32 8 channel relay module With w5500 Lan
STDWroom esp32 8 channel relay module With w5500 Lan
License
:Public Domain
Description
This is a single layer board to control 8 relays using wifi and lan.
Here are hardware specifications.
- 8x relays
- 1x w5500 ethernet module
- 1x 5v to 3.3v supply for w5500 module
- 2x status led's
- 1x dc jack to power esp32
You may program it for your own purpose and manufacture in your country for production as its single layer and single layer pcb boards manufacturing is available in all over the world (mostly countries).
// Define pin numbers
const int DATA_PIN = 32; // Connect to the data (DS) pin of the 74HC595
const int LATCH_PIN = 33; // Connect to the latch (ST_CP) pin of the 74HC595
const int CLOCK_PIN = 25; // Connect to the clock (SH_CP) pin of the 74HC595
void setup() {
pinMode(DATA_PIN, OUTPUT);
pinMode(LATCH_PIN, OUTPUT);
pinMode(CLOCK_PIN, OUTPUT);
}
void shiftOutData(byte data) {
// Shift out each bit of the data byte
for (int i = 7; i >= 0; --i) {
digitalWrite(DATA_PIN, (data >> i) & 1); // Set the data pin to the current bit
digitalWrite(CLOCK_PIN, HIGH); // Pulse the clock pin (rising edge)
digitalWrite(CLOCK_PIN, LOW); // Reset the clock pin (falling edge)
}
}
void loop() {
// Cycle through the 8 LEDs (presumably connected to relays)
for (int ledNum = 0; ledNum < 8; ++ledNum) {
// Turn on the specific LED
shiftOutData(1 << ledNum); // Shift out a single bit (LED on)
digitalWrite(LATCH_PIN, HIGH); // Latch the data (rising edge)
digitalWrite(LATCH_PIN, LOW); // Reset the latch (falling edge)
delay(1000); // Wait for a short duration (e.g., 1000 ms or 1 second)
// Turn off the LED
shiftOutData(0); // Shift out all zeros (LED off)
digitalWrite(LATCH_PIN, HIGH); // Latch the data again
digitalWrite(LATCH_PIN, LOW);
delay(1000); // Wait again
}
}
Design Drawing

BOM


Project Members

Comment