RPi to Control Power Outlet

Hi all,

What’s the best way to control a power outlet with a RPi? I’m really not sure how it’s meant to work, but conceptually, I’m sort of thinking that my RPi will be plugged into a power board, and I want to control the switching on and off of another outlet on that board. In short, I’m trying to control a light, and the light is plugged into a power outlet.

Thanks again,
Kirk.

Hey Kirk,

While some of our parts are rated for that use, we recommend that those decisions are made qualified technicians that are licensed to work with mains power. That goes for the work itself, it is a legal requirement anyhow.

To wrap-up: Mains power isn’t just lethal. It’s lethal.

Stay safe & keep to low voltage projects. Or employ a contractor to help.

Personally i would just grab a smart home wall switch, that way your aren’t messing with 240v at all.

Got it. Thank you.

1 Like

Hey Kirk,

A good way to go about it is to use a remote controlled GPO relay. Purchasing a commercial 433MHz, IR, or WiFi activated relay is a great way to do it.

That way, the mains voltage side of things is all taken care of by engineers who sign their lives away that it’s safe for consumer use, and you can just work with hacking together something to reproduce the control signals to your liking, which allows you to stay safe by only working with ELV components.

Here’s something from Jaycar you could use:
https://www.jaycar.com.au/remote-controlled-3-outlet-mains-controller/p/MS6147

2 Likes

That’s a wonderful solution @Oliver. Thanks so much.

2 Likes

Hi All, What would you recommend to use RFID or similar for remote control of 12 volt outdoor lights?

3 Likes

Hi Darren,

For 12v stuff you could use any microcontroller with wifi, IR, or another form of RF communication (eg. XBee), along with a relay module like this:

And here’s a cheap Arduino compatible RFID module you could use:

1 Like

Hi Oliver, I’m new to this level of electronics, how does the relay receive its signal? is that through the RFID module? Would it work over a distance of 10 metres? cheers Darren

Hi Darren,

The relay just takes in a voltage to control it - how you supply that voltage is up to you. You’ll need to combine a few principles to get a system that works for your purpose. Here’s some handy tutorial links:

And a few on different methods of communicating with a device remotely (you can then send a signal to a device to switch the relay):

2 Likes