Good, this may be a bit difficult;
for a start: I am not trying to start a flame ware or to offend. I just want to introduce a different point of view.
Apologies if the english is not totally correct but I hope you can/want-to understand.
First, an example:
The "danger" of an experiment involving mains appliances can be easliy (or should I write: should in all cases) be limited by a few simple measures:
1. the correct (smallest possible) fuse installed before (in an electrical sense) your testing/experimenting set-up and limiting the current in the tested circuit to anything reasonable for the tested application.
For my LED example earlier in this thread: this would, in a 220 Volt AC circuit (as common in Europe) and for a typical 220V/10watt LED come down to 0.045 Ampere per lamp which means that any 220 Volt fuse of 0.5 Amp would do. This is a substantial reduction of the risk.
2. By using a residual-current circuit breaker. We have two of these as standard for the whole house where I live, one switching of at 300mA, and another one for "wet rooms" such as the bathroom switching of at 30mA. Obviously, an experiment should preferably be done on a circuit covered by the 30mA circuit braker.
3. By ensuring that the EARTH connection is properly tested and functioning correctly, and that it is embedded in whatever you are producing (or what is the english technical term of this).
Second, What I try to explain:
The above informs a novice user to be carefull with mains and immediately (partly?) explains how to do that.
Now, compare this with the sentence: "Mains AC can and will KILL you or someone else and burn down your house given the chance."
Which of the above would be more helpfull?
Point is, people visit fora in search of information because they want to learn, because they have an interest, because they have a project ...
Sending them away with "i will not help you because you may be an incompetent idiot" will not stop them but may well lead to ill-informed dangerous experiments that do lead to tragedies. It seems also in contradiction with the very reason for having a forum.
The same for showing a video of a burned Solid State Relay where the victim was probably tricked in using a cheap fake SSR with internals not up to the job. I am sure that every experienced maker could have explained him that such cheap SSR from some internet store contaisn a 12A or 16A TRIAC instead of a 40A one as written on the box.
Stating this on the forum would be more useful than: "This will happens if you choose the wrong part and/or manufacture, or the design itself. " or "There is a lot more to safely controlling mains with a RPi than a schematic diagram".
Both of these answers may be entirely correct but don't provide any value to the reader.
So, let me repeat my question (a bit more elaborated than the first time and in the hope that I have not totally alienated all of you):
I can program, and I can make a 220v electrical circuit. In fact, I've done my whole house and it passed the legally required technical control without trouble.
However, I have little experience with electronic circuits but know that one can't simply connect a GPIO with a TRIAC or lamp without blowing things up.
Can someone point me to schema/drawings ... or other information showing me how to safely connect the GPIO with the external world. Consuming less than 3mA per GPIO ...
@davidcoton: thanks for the offer. As soon as I am far enough to produce a schema, I'll show you
By the way, schock risks are not determined by voltage alone as someone writes here. Electric cattle fencing can operate on 10 to 13 kiloVolt (which is much more than a 220 Volt home appliances) but the very limited current makes it safe (although higly uncomfortable) for cattle as well as humans.