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
Contents
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
- 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.
- 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.
- 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.
- 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
Sign in to join the conversation.
Sign in to comment