24 Channel Relay Board with ESP8266

Post Reply
k6xtc
Site Admin
Posts: 26
Joined: Sat Oct 26, 2019 12:09 am

24 Channel Relay Board with ESP8266

Post by k6xtc » Sun Aug 06, 2023 1:41 am

I purchased this 24 channel relay board about a month ago. It came with absolutely no documentation and was programmed to just cycle through the relays. I tried contacting the seller and they were no help.

1-23021Q51603153.png

Time for some reverse engineering.

24c relay board main schematic.pdf
24c relay.board bank1 schematic.pdf
24c relay board bank2 schematic.pdf
24c relay board bank3 schematic.pdf

Pin 12 is latch
Pin 13 is clock
Pin 14 is data
Pin 5 is OE (Needs to be pulled low to enable the relays)


A simple sketch to randomly turn the relays on and off

Code: Select all

int latchPin = 12;
int clockPin = 13;
int dataPin = 14;
int oePin = 5;
long randNumber;

void setup() 
{
pinMode(latchPin, OUTPUT);
pinMode(clockPin, OUTPUT);
pinMode(dataPin, OUTPUT);
pinMode(oePin,OUTPUT);
randomSeed(analogRead(A0));
}

void loop()
{
digitalWrite(oePin, LOW);
randNumber = random(1, 255);
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, randNumber);
digitalWrite(latchPin, HIGH);
delay(500);
}

ESP12F_Relay_X24_V1.2
24 Channel Relay Board
ESP8266 ESP12F ESP-12F
74HC595
You do not have the required permissions to view the files attached to this post.

Post Reply