Component guide · Intermediate · 3 min read
Solid State Relay (Fotek SSR-25DA and SSR Modules)

Wiring and Code
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
A solid state relay (SSR) switches an AC load with a triac and an optocoupler instead of a moving contact, so it is silent and lasts far longer. The Fotek SSR-25DA takes 3 to 32 V DC in and switches up to 25 A at 24 to 380 V AC; G3MB-202P SSR modules switch about 2 A AC per channel. DA types switch AC only, never DC loads.
Key specs at a glance
- SSR-25DA input
- 3 to 32 V DC, about 7.5 mA
- SSR-25DA output
- 24 to 380 V AC, 25 A (with a heatsink)
- SSR modules
- G3MB-202P, 5 V input, 100 to 240 V AC, 2 A per channel
- Switching
- Zero-cross turn-on on most models
- Leakage
- A few mA when off (enough to glow some LED lamps)
- Voltage drop
- About 1 to 1.6 V when on, which makes heat
This part is often wired to 230 V mains. Do all wiring with the plug pulled out, keep mains wires inside a closed box with strain relief, add a fuse, and never touch the board while it is plugged in. If you are new to mains wiring, have an electrician check it before you switch on.
Models in this guide
These are alternatives. Pick the one that fits your project; you only need one.
Option 1Fotek Panel Solid State Relay₹253
Option 2Solid State Relay Module (SSR)₹129
Option 3Solid State Relay Module (Multi-Channel)₹1,002
What the Solid state relay is
SSRs suit heaters, 3D printer beds on mains, kilns, sous-vide cookers and lamps that switch often. Zero-cross switching turns the load on as the AC voltage passes zero, which cuts electrical noise.
An SSR gets hot: about 1 W per amp of load. The 25 A rating needs a large heatsink; without one, keep to about 5 A. Fake SSRs are common, so derate to half the label.
Solid state relay pinout
The pins on the Solid state relay and what each one does.
| Pin | Function |
|---|---|
| 3 (+) / 4 (-) | DC control input |
| 1 / 2 | AC load terminals, in series with the live wire |
| Module DC+ / DC- / CH1... | Module supply and inputs (active-low or active-high, see board) |
| Module output terminals | AC load, per channel |
- 3 (+) / 4 (-)
- DC control input
- 1 / 2
- AC load terminals, in series with the live wire
- Module DC+ / DC- / CH1...
- Module supply and inputs (active-low or active-high, see board)
- Module output terminals
- AC load, per channel
Wiring the Solid state relay
Mains wiring must be done in an earthed enclosure with a fuse or MCB on the live wire and cable rated for the load. Have a qualified electrician check it. The ESP32's 3.3 V output drives the SSR-25DA input directly.
| Solid state relay pin | Arduino Uno | ESP32 |
|---|---|---|
| Input + (3) | D9 | GPIO 26 |
| Input - (4) | GND | GND |
| Load 1 / 2 | Mains live to SSR to heater; heater neutral to mains neutral | Same |
- Input + (3)
- Arduino Uno:
- D9
- ESP32:
- GPIO 26
- Input - (4)
- Arduino Uno:
- GND
- ESP32:
- GND
- Load 1 / 2
- Arduino Uno:
- Mains live to SSR to heater; heater neutral to mains neutral
- ESP32:
- Same
Example code
Do not use analogWrite() at 490 Hz on a zero-cross SSR: it can only switch at mains zero crossings (100 times a second at 50 Hz). Use a slow window of 1 to 2 seconds driven by a PID for temperature control.
const int SSR = 9;
const unsigned long WINDOW = 1000; // ms; zero-cross SSRs need slow PWM
float duty = 0.35; // 35 % power, set by your PID
void setup() { pinMode(SSR, OUTPUT); }
void loop() {
unsigned long t = millis() % WINDOW;
digitalWrite(SSR, t < duty * WINDOW ? HIGH : LOW);
}Setup and tuning
fit the SSR on an aluminium heatsink with thermal paste for loads above about 5 A.
use an SSR rated at least twice the load current.
motors and transformers need a random-turn-on SSR or a snubber.
an SSR may read open on a multimeter with no load; test with a lamp.
SSRs usually fail shorted (load stuck on), so add a thermal fuse or cut-out for heaters.
What you need
Shop this list5 of 8 found in our store · ₹1,950
Fotek Panel Solid State Relay: the part this guide coversFotek Panel Solid State Relay₹253
Solid State Relay Module (SSR): another version this guide coversSolid State Relay Module (SSR)₹129
Solid State Relay Module (Multi-Channel): another version this guide coversSolid State Relay Module (Multi-Channel)₹1,002- Uno R3 development board: the controller used in the wiring tableFind this part
ESP32-WROOM-32 38-pin development board: for Wi-Fi logging and dashboardsESP32-WROOM-32 38-Pin Development Board₹389- TO-220 aluminium heatsink: small loads; use a large finned heatsink above 5 AFind this part
- Fuse holder: to fuse the switched loadFind this part
Digital multimeter: to check supply and signal voltagesDigital Multimeter₹177
Alternatives and when to choose them
- SSR or relay: when to choose each.
- 5V relay module: mechanical relays that switch AC and DC.
- Optocouplers: the isolation inside an SSR.
Common mistakes to avoid
- Using a DA (AC output) SSR to switch a DC load.
- Running 25 A with no heatsink.
- Fast PWM on a zero-cross SSR.
- Relying on the SSR alone to stop an overheating heater.
Frequently asked questions
Can an SSR-25DA switch DC?
No. DA means DC input, AC output. Use a DD type or a MOSFET for DC loads.
Why does my LED lamp glow when the SSR is off?
Leakage current of a few mA. Add a small load or a resistor-capacitor across the lamp.
Can I dim a heater with it?
Yes, with slow time-proportional control over 1 to 2 seconds.
Does it need a heatsink?
Yes above about 5 A; it drops about 1.5 V, so 10 A makes 15 W of heat.
Can I use it with an ESP32?
Yes. The DC input works from 3 V, so a 3.3 V GPIO drives it directly.
Parts for this guide
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.



