So far we have discussed the theory and made a basic breadboard for the project.
This time out I went for the main build and assembly of the project. I wanted to keep most of the project modular so it can be modified and changed if need be, with a very small amount soldered to a section of perf board.
I used relays controlled by the Raspberry PI GPIO on this project to switch mains electricity (230V 50Hz AC). Please do not attempt anything with mains unless you are confident and know exactly what you are doing. There is risk to the electronics, risk to your permanent wiring and risk of injury.
The power supply came fitted with sockets both on the inlet and outlet, which I neither needed or had the corresponding plug for, so that was the first thing to go! A nice flex with a fused plug on the AC side and some fly leads that I could fit to my board on the DC side.
The relay board (which is optoisolated) is powered by the power supply directly (i.e. not taking 5V from the Pi). This was just in case I decided to use more than 1 relay for anything, I didn't want to pull high current through the GPIO. The Pi also has a dedicated 5V supply from the power supply soldered onto a micro USB plug.
The main assembly I treated as the main board, with the pi and relay board as daughters. This board has a 5V bus, a ground bus and GPIO header. The passives that drive the capacitive sensing are also soldered onto the board directly. This allowed me to make the rest of the connections using leads that could be plugged and unplugged (mostly as I connected things wrong the first time...).
The audio amp was a little less well planned, I ended up with screw terminals to fly leads so it can still be removed if I need to.
So next time is the big test and reveal!