Design overview
Key specifications and signal flow at a glance
Block diagram
Each channel is independent: the MCU drives an optocoupler, which turns on a transistor energising the relay coil. A diode across the coil absorbs the inductive kick.
Bill of materials
Select the lines you need and send them to RFQ in one click
Tick the lines you need, then copy the list, download a CSV, or open the RFQ form. Part numbers are common catalogue items; equivalents are acceptable.
| # | Function | Suggested part | Key spec | Qty | |
|---|---|---|---|---|---|
| 1 | Optocoupler | PC817C | 5 kV, CTR 80-160%, DIP-4 | 4 | |
| 2 | NPN driver transistor | S8050D | 500 mA, 25 V, TO-92 | 4 | |
| 3 | Relay | SRD-12VDC-SL-C | SPDT, 10 A, 12 V coil | 4 | |
| 4 | Flyback diode | 1N4148W | 150 mA, 100 V, SOD-123 | 4 | |
| 5 | Opto LED resistor | CRCW0402680RFKED | 680 Ohm, 1%, 0402 | 4 | |
| 6 | MCU | STM32G031K8T6 | Cortex-M0+, 64 KB flash, 32-pin | 1 | |
| 7 | Driver array | ULN2003ADR | 7-channel Darlington, SOIC-16 | 1 | |
| 8 | Channel LED | LTST-C170KGKT | Green, 0805 | 4 | |
| 9 | Decoupling cap | GRM155R71C104KA88D | 100 nF, X7R, 25 V, 0402 | 8 | |
| 10 | Bulk cap | GRM21BR61A106KE19L | 10 uF, X5R, 10 V, 0805 | 2 |
Design notes
Engineering choices and common pitfalls
Coil drive and flyback
An NPN transistor or a ULN2003 array can sink the relay coil current. Always place a flyback diode across the coil with the cathode toward the positive rail. Without it, the inductive voltage spike will eventually damage the driver.
Contact life and snubbing
Relay contacts erode each time they break an inductive load. Add an RC snubber across the contacts for AC coils or a TVS for DC loads. Derate the contact rating: a 10 A relay is better used below 5 A in continuous service.
Isolation and creepage
Keep the low-voltage logic side and the relay contact side separated by at least 6 mm on the PCB. Do not route traces under the relay body. Mains wiring needs adequate creepage and clearance for the rated voltage.
Status and diagnostics
A channel LED on the logic side shows the commanded state, not the actual contact state. For real feedback, add a contact-sensing input or a current monitor on the load side.
Frequently asked questions
What does an industrial relay driver board do?
It lets a low-voltage controller switch higher-voltage AC or DC loads using relays, with isolation between the logic and load sides.
Why is a flyback diode needed?
The relay coil is an inductor. When current stops it generates a voltage spike that can damage the driver. The diode gives that current a safe path to decay.
Can I drive relays directly from a microcontroller pin?
No. A GPIO typically supplies under 20 mA while a relay coil needs 70-100 mA. Use a transistor, a driver array or a MOSFET stage.