Switching each 230V socket in a multiple socket / socket strip induvdiually with Raspberry Pi

Hello,
I want to convert a standard multiple socket with a Raspberry Pi.
I found a project that exactly covers my needs but it is quite old so the parts and approach could be outdated, see here Projekt: Steckdosen schalten mit Pi | ComputerBase Forum (German). The thread itself is dead, not anyone is answering anymore but as it is a nice project, why not make it available to a wider user base?

  • circuit layout
  • part list
    1. multiple socket e.g. 37,95€ Völkner
    2. Raspberry Pi
    3. Power Supply (Steckernetzteil) for the Pi
    4. Micro-SD Card min. 8GB
    5. 4x Sharp SSR S202 S01, which nowadays?
    6. 4x Insulating cap for SSR
    7. 1x ULN2003
    8. 1x IC Sockets & Adapters
    9. Pin headers and female connectors
    10. 4x Resistance 150 Ohm
    11. 4x Varistor 460V, 0,6W
    12. (4x LED)
    13. Heat shrink tubing

QUESTIONS

  1. Which would be the right part list for the electrical parts nowadays?
  2. What to choose if the circuit includes snubbers

Let me know what you think :slight_smile:

Welcome aboard! A google search for “SSR 240VAC 8A triac 4pin SIP” turns up a bunch of parts from various vendors so pick one. Then you either need to find a Fritzing part via a google search of the form “fritzing part part-number” (where part number is the part number of your selected triac.) If there isn’t one you would need to either make one your self (not easy) or ask for one us to make one for you (usually much easier!) The Raspberry PI is likely already available as a Fritzing part (depending on which model you want.) The ULN2003 is likely available as a Fritzing part as a chip or as a module (which is likely easier to deal with.) The Varistor likely needs to be selected by what you expect it to do and/or your local electrical code as power line related stuff needs to match the local electrical code. The headers are available as generic connectors in Fritzing core parts.

Peter

thanks for reminding me to use google :slight_smile:
Did indeed, but the problem was more my lack of in-depth knowledge of electronic components for building circuits like this.
I can understand (or look up and understand) everything in it, but when it comes to choosing the right one, the air gets thin :blush:

There probably isn’t a single “right thing”. It depends what you want to do. Driving light bulbs is easier than driving motors for instance. I’d guess due to the varistors this one is intended for inductive loads, so you need to know the characteristics of the inductive load to select an appropriate varistor. As noted your local electrical code (and your legal liability under the electric code) are also considerations. There isn’t enough information here to provide good answers (and there likely aren’t general purpose answers!)

Peter

I’ll switch

  • plasma tv
  • surround receiver
  • Chromecast
  • apple tv

None of those should be particularly inductive so you likely don’t need the varistors. So now you need appropriate sockets, I made a 120v socket for someone a while back I don’t immediately see any 220V ones. The power bar you referenced above probably isn’t a good choice as you likely want one socket for each triac. A data sheet for a suitable socket for where ever you are would be a good start.

Peter

thx for the replies :slight_smile: I have been diving into the SSRs and got some helpful (for me) information.

Summary
  1. Understanding Solid State Relays | DigiKey
  2. Varistor: Wie sie Schaltungen vor Überspannungen schützen (all-electronics.de)
    some help on Varistor design
  3. Varistor am Solid State Relais? (iobroker.net)
    Zero-Crossing not necessarily good for motors as starting-current is maximum possible. So may chose Peak Switching.
  4. Elektronik: SSR (sprut.de)
    some design tips and words regrading cooling

I wasn’t sure how to consider the TV and the receiver, as at least the receiver supplies some large coils, but a load is only considered an inductive load if the (in our case) the SSR is directly connected to the coil. As soon as power supply is in between, it can be considered as Resistive Load (no starting current etc.) , can’t it?

The TV and Receiver consume quite a lot of energy:

  • TV (on/standby) 438 W / 0.2 W → max. 2 A
  • Receiver (on/standby) 450 W / 6 W → max. 2 A
    so
  • a 3 A SSR without Snubber (S201S06), could be enough?
  • how to size the Varistor (if needed)?

that is how it was realized, see here:


What do expect from that datasheet?
Here is the one referenced in my part list: https://docs.rs-online.com/0f10/0900766b80f21616.pdf

I would probably go with 7 or 8 amp SSRs to give you extra capacity. While 3A should do for a 2A load, having more capacity won’t hurt and %50 of capacity is usually a good place to design. I’m not sure what the varistors are for I would assume to prevent overvoltage from inductive loads so you shouldn’t really need them. I don’t know how you would size them (it would depend on how much energy you are expecting them to deal with which is likely hard to figure out!) if you use them the same size used in the original should be a good start.

A datasheet like this which makes it clear that each socket is independent

rather than connected together as in a standard power bar. The datasheet you referenced doesn’t make it clear that each socket is independent (as appears to be the case!) I guess they expect you to understand that “without supply” means that each socket is independent and that wasn’t clear to me. With that it is possible to make a part for this.

edit:

OK, here is a part for this. There is no pcb view as it isn’t useful. All the sockets and switches are broken out individually as the device seems to be so you can wire it as you like. The other parts you need should be findable via google, if not post again and I’ll either find or make one…

Schuko-5gang-power-distribution-unit.fzpz (5.3 KB)

Peter

1 Like

HI @vanepp ,
I’m afraid that the idea is downgraded to learning project as for the price of the power bar I get Tasmota ready:

It is often the case you can buy a ready made item cheaper than you can make it. They get the quantity discount by building thousands (and that can be much cheaper than buying one of!)

Peter

it could change if I need space for ten plugs but that is not the case :slight_smile: