1

I need to turn on and off a very power-hungry appliance using my Raspberry Pi. I know a lot about software, and next to nothing about electronics and hardware. I looked around, and I saw a few rather scary things. Is there a 220v plug out there with a simple input, which I can connect to one of my Raspbery Pi's inputs, and which will decide whether the 220v plug is active or dead?

Surely, this is a common case...? I am amazed I can't find anything out there.

Merc
  • 145
  • 6

4 Answers4

1

I would use two relays. One connected to the PI. The contacts would then switch the coil on the second relay.

A power hungry appliance would need a larger relay. The coil drain would be to much for the PI.

I would also have the coil voltage for the second relay low voltage, just in case of a problem. I would locate the second relay away from the PI.

Here is a good relay for the second high voltage one. https://www.amazon.com/Functional-Devices-RIB2421B-208-277-Housing/dp/B00788B0MO/ref=sr_1_1?keywords=Power+Relay&qid=1654186619&refinements=p_n_feature_nineteen_browse-bin%3A18945469011%2Cp_n_feature_sixteen_browse-bin%3A18644709011&rnid=18644703011&s=industrial&sr=1-1

RP_Joe
  • 21
  • 3
0

You need to buy a relay module.

The relay module contacts (switch part) should be rated for a minimum of 220V AC at the current you need.

The relay modules inputs should operate from 3V3.

Note, a relay module is a relay plus the components needed to make it safe to drive from a microcontroller.

joan
  • 71,014
  • 5
  • 73
  • 106
  • I found this https://raspberry.piaustralia.com.au/products/pirelay-relay-board-for-raspberry-pi#description But I feel VERY uneasy to actually put 220V stuff anywhere. I was hoping to have something like a powerboard where you plug things in and then control what is on and what is off by I/Os... – Merc Jun 02 '22 at 16:08
0

If you do not have much experience with electronics or hardware, it is generally a bad idea to start directly with 220V. Common ways of switching are of course relay boards, but those require wiring.

Another solution would be to use domotica components. A cheap way would be to buy a 4.33MHz transmitter and Klikaan KLikuit or equivalent (see f.e. https://dullaart.website/raspberry/2_433Mhz.html#a2 and https://www.trust.com/en/product/71182-compact-wireless-socket-switch-set-apc3-2300r). In that way, you'll get some experience with hardware without the risks of getting a shock or burning the Pi.

A better way would be to get a Zigbee USB stick (I use the DeConz) and get simple power plug switches (f.e. Sonoff, which you can get at Amazon or other shops). This will report back the actual status of the switch. The DeConz software has a fairly well documented API.

Alternatively, use WiFi (without the cloud). Sonof WiFi plugs can be used in DIY mode (see https://sonoff.tech/diy-developer/ and https://sonoff.tech/sonoff-diy-developer-documentation-basicr3-rfr3-mini-http-api/) or a device with the Tasmota firmware.

Ljm Dullaart
  • 2,491
  • 9
  • 15
  • All of the "smart" switches seem to require wifi/internet, so that they can be talked to from anywhere. I need something I can control even if the internet is down. Nobody made a power board where things can be controlled via USB? (As in a simple protocol where you can send 'on 1' and the switch 1 is on, 'off 1' and then 'status 1'..?) – Merc Jun 04 '22 at 02:12
  • The options that I gave are not internet or WiFi based. Zigbee is a separate protocol, not Internet. And the 433MHz is also used by those remote thermometers. – Ljm Dullaart Jun 04 '22 at 07:41
  • Wait a sec. Sonoff have a LAN mode! So I can talk to them using my WIFI directly, without having to get a Zigbee switch etc...! – Merc Jun 04 '22 at 14:57
  • OK this is it... please add this link to your answer, since this really is "it": https://sonoff.tech/diy-developer/ – Merc Jun 04 '22 at 15:03
0

The GPIO pins on the Raspberry Pi are 3.3 volt logic rated for only 3 mA and are static sensitive. You need to use something like this relay module to control a 220 volt mains device. https://www.ebay.com/itm/221962380923

You could also use an optocoupled thyristor to control AC mains voltage: https://www.ebay.com/itm/203158790920

Best to use an optocoupler to sense the mains voltage: https://www.ebay.com/itm/311864741981

N0YWB
  • 11
  • 1