Skip to content
article

I deleted a comment today and I'm not sorry: mains voltage is not a beginner project

No jokes in this one. Read it anyway

Matt O'Brien@pi_tinker_matt

October 13, 2026 · 3 min read

Normally I'm the bloke laughing at his own failures on here. Not today.

Today someone posted (in a comment on another thread, I've removed it and messaged them, they were very good about it) a build where a cheap relay module sitting on a breadboard switched a 2400W heater on and off. Live and neutral running through breadboard jumpers. No fuse, no earth, no enclosure, screw terminals exposed on the bench. They wanted help with the Python.

The Python was fine. Everything else could have killed them or burnt the house down.

Why that build is dangerous

  • Breadboards are for low voltage, low current. The spring contacts are typically rated for about an amp. A 2400W heater on 240V pulls 10A. That current is going through contacts made for LEDs. They heat up, loosen, arc.
  • Those relay modules lie. The relay itself may say 10A 250VAC on the top. The little PCB it's soldered to often has thin traces and only a couple of millimetres between the mains side and your 3.3V side. The relay's rating is not the module's rating.
  • 10A on a 10A relay is no margin at all. It'll work. For a while.
  • Exposed terminals on a bench. One slip with a screwdriver, one cat, one kid.
  • No fuse and no earth. When it fails, nothing stops it.

And in Australia there's the legal side: fixed mains wiring is licensed electrician work. Your insurer will be very interested in what was on that breadboard.

What to do instead

  1. Buy a certified smart plug and control it. Something with proper approvals that you can flash with Tasmota or ESPHome, or a Shelly with its local API. Your Pi or ESP32 sends a message, the certified box does the switching. Same result, nothing live on your bench.
  2. Learn on low voltage first. 12V LED strips, 12V fans and pumps, a MOSFET and a flyback diode. You learn every concept (switching, current, heat, protection) and the worst case is a burnt finger and a bad smell.
  3. If you genuinely need to switch mains in a project, that's a real engineering job: proper enclosure, fusing, earthing, rated terminals, creepage and clearance distances, and in Australia a sparky. Not a weekend breadboard.
  4. Test your safety switch (RCD). There's a test button on your switchboard. Push it this weekend. If it doesn't trip, ring an electrician on Monday.

The topic rules say "if it plugs into the wall, say so up front". That's not there for fun. Say so, and let people tell you to stop. They'll be right.

cheers, Matt

Written by

Matt O'Brien

Brisbane maker. I put Raspberry Pis in things that did not need Raspberry Pis. 400k on YouTube, a shed full of half-finished builds and a very patient wife. Parts lists always included 🍓

Get the best of #raspberry_pi_lab weekly

One email each Monday with the most useful posts. No spam; unsubscribe in one click.

Comments

10

Sign in to join the conversation.

Sign in to comment
Jaxon Pearce@j4x0n_mods#9 in Pi Lab
lowkey that was almost me last month 💀 i bought a relay module to turn my desk fan on from my pi. its still in the bag
6 net votes
Matt O'Brien@pi_tinker_matt#1 in Pi Lab
Mate I'm really glad you said it, and leave it in the bag. A smart plug with Tasmota does exactly that job safely, about $20. Or get a 12V PC fan and a MOSFET and learn the electronics on that. Message me and I'll send you a wiring diagram
4 net votes
Mehmet Aydoğan@malloc_mehmet#9 in Pi Lab
I have seen these relay modules. 2mm between 230V and 3.3V side, no slot in PCB. This is not a product, this is a fire with an LED on it.
4 net votes
Hamish Turner@hamish_on_the_farm#3 in Pi Lab
100% this. people on farms think they know power because of the electric fence. the fence is 8kV but tiny current and pulsed. mains is the one that kills ya. good on ya for saying it Matt
5 net votes
Dazza@dazza_rates_ur_desk#9 in Pi Lab
for once mr blinky lights is right. 6/10 post. highest ive ever given a post. dont let it go to ur head
5 net votes
Karthikeyan S@karthik_embedded#2 in Pi Lab
In our pump controllers the creepage between mains and logic side is designed, tested and certified, and still we get field failures from moisture and dust. On a breadboard, no chance. Good post Matt.
7 net votes
Nate Calloway@nostep_nate1 rep in Pi Lab
The licensing part is just regulatory capture by the electricians' lobby. A competent adult should be allowed to wire their own house.
4 net votes
Graham Whitfield@greybeard_graham#7 in Pi Lab
Nate, the licence exists because people died, and because the next owner of the house did not consent to your experiment. You are welcome to your opinion on most regulation. This is not the hill. Cheers, G.
3 net votes
Hamish Turner@hamish_on_the_farm#3 in Pi Lab
yeah nah Nate, not this thread mate
2 net votes
Gwen Albright@gwenprints#4 in Pi Lab
Thank you. I fix appliances for a living-ish (right to repair forever) and the number one thing I tell people is: learning to repair something does not mean you should repair the mains side of it this weekend. Unplug it, discharge it, and if there is a big capacitor in a power supply, leave it alone until someone shows you how (those can bite long after the plug is out).
8 net votes