Relay board, four channels
Four relays in a row, active low, each on its own terminal.
- 18 pins
- 4 settings
- In 2 projects
- In 1 lesson
The Relay board, four channels in brief
What it is, and every setting the properties panel gives it.
The four-channel relay board puts four SRD relays in a row, with a GND, IN1 to IN4 and VCC header at one end and NO, COM and NC terminals for every channel. On an Uno, four digital pins drive the inputs and VCC goes to the 5 volt pin; on an ESP32 the 3.3 volt outputs still read as high against half of VCC, but VCC itself must be 5 volts, because under 4 volts Mokxi’s coils will not pull in. It is active low, so LOW switches a channel on and HIGH switches it off. Each channel has its own 10 millisecond pull-in and 5 millisecond release, with its red LED lit while energized. The 12 and 24 volt versions are a coil property: they need 9 and 18 volts to pull in, and an active-low 12 volt board driven straight from a 5 volt pin never turns off, so each input wants a transistor. Four coils draw about 280 milliamps, more than a USB-powered Uno likes, but coil current is not modeled, nor is the separate JD-VCC jumper or contact bounce.
- Family
- Outputs
- Pins
- 18
- trigger
- low (or high)
low(the default, as on nearly every board sold) orhigh.- coil
- 5V (or 12V, 24V)
5V(the default),12Vor24V, the SRD relay the board carries.pull_msand- pull_ms
- 10
- release_ms
- 5
- 10 and 5 ms, the SRD-05VDC's times.
18 pins
Named as the editor names them, so a wire lands where you expect it.
coil says 12 or 24 V.How to use a 4 channel relay module with an Arduino
The relay board example drives IN1 to IN4 from pins 2 to 5, with the board’s VCC on 5 volts and its GND on the Uno’s ground. Each lamp is fed from its channel’s NO contact with every COM on the 5 volt rail, so a lamp lights only while its relay is pulled in, and the red LEDs on the board show which coils are energized.
Swap the digitalWrite(pin, HIGH) and pinMode(pin, OUTPUT) lines in the example’s setup() and press Run: all four relays click on together at startup, which is what a real board does in the instant a pin sits low as an output. Written HIGH first, every channel stays off until the sketch asks for it.
On an ESP32 the inputs can come straight from 3.3 volt pins, but VCC still needs 5 volts, or no coil pulls in.
What is true about the Relay board, four channels, here
In its help article’s own words: what the simulation gets right, and where it stops.
Modeled
Everything the single module gets right, per channel: the 10 ms pull-in and 5 ms
release, the arm touching neither contact while it travels, and no coil pulling in
under 4 V of VCC on a 5 V board. Each channel's red LED lights while its coil is energized.
Not modeled
The optocoupler as a circuit: the input is a logic level against half of VCC,
where a real one is an LED that a 3.3 V high on a 5 V board may still half light.
The JD-VCC jumper that lets the coils run from their own supply is not brought
out: VCC powers everything. Coil current (about 70 mA a channel, 280 mA for four and
560 mA for eight, more than a USB-powered board likes), contact bounce, and the 10 A contact rating.
From Relay boards: two, four and eight channels, in full.
See the Relay board, four channels in a project
2 built-in projects use it. Each opens in the editor, already wired.
Where it turns up in a lesson
One lesson places it in its own circuit.
The boards it is shown on
This board has a built-in project with the Relay board, four channels in it.
The rest of the bench
Every one of these is drawn and simulated the same way.
Wire up the Relay board, four channels
Open the editor and push it into the breadboard. It is free, and it runs on your own machine.