IoT & Smart Home

Tiny Contacts Fits Four Relays Onto a 42 x 38 mm ESP32 Board

Tiny Contacts Fits Four Relays Onto a 42 x 38 mm ESP32 Board

Your ESP32 home automation controller needs four switched outputs, but the enclosure only has room for one of those blue hobby relay modules. Now what?

Sergio Ghirardelli’s answer is Tiny Contacts, a four-channel relay board that measures 42 x 38 mm. That is barely larger than the single-channel modules sitting in most parts drawers, except it carries four independent channels. Anyone who has tried to fit a switching board, a 5 V supply, and a dev board into one project box knows why that footprint matters more than any spec on the datasheet.

How does it get that small?

The size comes down to relay choice. Instead of the tall through-hole relays found on inexpensive modules, Tiny Contacts uses four Omron G6K-2F-Y surface-mount relays. Those are signal-grade parts that claim far less PCB area, which is what frees up room for four channels on a board this size. Read the G6K contact rating against your load before you wire anything to a wall outlet, because a signal relay is not a mains appliance switch. The board itself runs from 5 VDC and accepts 3.3 V to 5 V on its control inputs, so ESP32, ESP8266, Arduino, ATtiny, and STM32 boards all drive it without a level shifter.

Why not just drive the coils from a GPIO pin?

Because a relay coil pulls far more current than a GPIO pin should ever source. Tiny Contacts puts a ULN2003A between your microcontroller and the coils. The ULN2003A is a seven-channel Darlington array, and four of those channels supply the coil current here while your GPIO pins only see a logic-level signal. The chip also carries the flyback suppression diodes that absorb the inductive spike when a coil de-energizes. Leave that diode out of a hand-wired relay circuit and you get random resets first, then a dead microcontroller. Onboard LEDs show board power plus per-channel state, which turns “is that output actually closed?” into a glance instead of a multimeter probe.

Try this on your own bench

You do not need the board to learn the circuit. Drop a ULN2003A on a breadboard, tie pin 8 to ground and pin 9 to your 5 V rail so the internal clamp diodes are connected, then run one relay coil from an output pin. Toggle it from GPIO 4 on an ESP32 and watch what happens to your serial output if you disconnect pin 9. That single experiment explains flyback protection better than any diagram. Ghirardelli’s write-up on the board is at Hackster, and the Omron G6K and TI ULN2003A datasheets are both worth a read before your next switching build.

Frequently Asked Questions

What relays does the Tiny Contacts board use, and why?

Four Omron G6K-2F-Y surface-mount relays. They are signal-grade parts that take up much less PCB area than the through-hole relays on typical hobby modules, which is how four independent channels fit into a 42 x 38 mm footprint.

Can I drive it straight from an ESP32 or Arduino?

Yes. The board takes a 5 VDC supply and its control inputs accept 3.3 V to 5 V logic, so ESP32, ESP8266, Arduino, ATtiny, and STM32 boards all work without a level shifter. A ULN2003A Darlington array on the board supplies the actual coil current, so your GPIO pins only carry a logic signal.

What will I learn if I build this?

You get hands-on with the parts of a switching circuit that datasheets gloss over: why a GPIO pin cannot source coil current, how a Darlington array solves it, and what flyback diodes do when an inductive load switches off. Wire a ULN2003A and one relay on a breadboard first, then compare it to a compact PCB layout. Those two exercises cover current budgeting, logic-level compatibility, and inductive load protection, which show up in nearly every thesis-level automation or robotics project.

This article was inspired by reporting from Hackster. Find the parts and modules to build it at Circuitrocks.

// written by Ann Arandia

Ann Arandia covers community projects and maker events for the Circuitrocks blog. She writes about local workshops, kid-friendly electronics, and the Philippine maker scene — the people, the meet-ups, the projects that come out of them.