How to make a light switch with Electric Paint and your Touch Board
Paint your own light switch with the Touch Board and Electric Paint
Ever thought of creating a custom light switch on your desk or wall? This tutorial will guide you through setting up a touch sensitive light switch in your home or studio using a Touch Board, PowerSwitch Tail and some Electric Paint. You can buy the PowerSwitch Tail here.
Our studio is based in the UK, so we used the 240V version of the PowerSwitch Tail. Depending on where you live, your mains voltage might be different so you need to make sure you choose your PowerSwitch Tail accordingly.
This is not a tutorial for beginners so unless you have experience working with mains electricity, or have someone with you who does, we don’t recommend you try it – this is for electronics pros only! Remember – mains electricity can kill.
Get creative and make your own light switch design. And don’t forget to send us your pictures!
Update 2019: The PowerSwitchTail has been retired. Please contact us at email@example.com if you have any questions.
Materials To begin you will need:
1x Touch Board
1x Electric Paint
1x PowerSwitch Tail
1x Power extension cable
1x Desk lamp
Soldering iron and solder
Step 1 Why use a relay?
In this tutorial, we need to control mains electricity, which is considered high voltage and high current with respect to the 5V logic operating on the Touch Board. Working with mains electricity is dangerous, hence we recommend only those of you who are experienced in working with electronics attempt this project.
In order to control a mains device safely – for example a desk lamp – with the Touch Board, we need a relay. A relay is able to turn on a mains device in response to a signal from the Touch Board and isolates the signal from the dangerous mains supply. The PowerSwitch Tail that we are using contains such a relay.
Step 2 Assemble the PowerSwitch Tail
When you receive your PowerSwitch Tail (PST) you may need to assemble it. If you have bought a pre-assembled PST you can skip to the next step.
Before assembling, the first step is to cut the power extension cable in half – you will use it as the power input and output for the PST. After you cut it in half, strip both cut ends to expose the two three inner conductors and strip around 6mm from the end of these conductors. If you have never stripped a wire before, have a look here:
The manufacturers of the PST provide clear instructions on how to assemble it. Depending on which kit you bought, follow the assembly instructions on their website. The PST can be triggered by different signal voltages – in order to correctly configure this you have to choose two resistor values. The Touch Board’s output voltage is 5V, so we need to use a 1kΩ resistor for R1 and a 470Ω resistor for R2. Note that we want the relay to be Normally Open (NO), so you need to solder the jumper accordingly. If you need some guidance with soldering, you might want to have a look here:
After completing this step, you should have a PST with a cable terminating in a plug connected to the input and a cable terminating in a socket connected to the output. This should match the final image for this step.
Step 3 Upload the code to the Touch Board
If you haven’t already set up your Touch Board, please do so by following this tutorial here. Once you have, connect your Touch Board to the computer and turn the board on.
Open the Arduino IDE and load the sketch under File→Sketchbook→Touch Board Examples→Light_Switch. Then select the following:
“Bare Conductive Touch Board” under Tools→Board
“Bare Conductive Touch Board” under Tools→Port
Finally, hit Upload!
Step 4 Solder wires to the Touch Board
You now need to solder some hook-up wires to the Touch Board so that you can connect it to the PST. First, turn off the Touch Board and unplug it from the computer. The pin that is going to control the PST is pin 13, so you need to solder one end of a wire to pin 13. The PST also requires a connection to the 5V and to Ground (GND), so you need two additional wires soldered to the respective pins. It’s conventional to use a red wire for the connection to 5V and a black wire for the connection to GND.
Cut the wires according to their required length and strip both ends. Solder one end of each wire to the appropriate pin on the Touch Board.
Step 5 Connect the Touch Board and PowerSwitch Tail
Once the solder has cooled, you can insert the free ends of the hook-up wires into the terminals of the PST and tighten the screws. The connections are as follows:
– in→PIN 13
Make sure to completely tighten the screws to ensure that these connections are robust.
Step 6 Connect lamp and test
Now it’s time to connect the lamp. Please make sure that you have followed each step carefully and correctly. As mentioned, working with mains can be dangerous if done incorrectly. Plug one end of the PST into your power source and the lamp into the other end. Now power up your Touch Board and try touching electrode 11. It should turn on the desk lamp. If it does, congratulations – you have a light switch!
If you need to update the code on the Touch Board, always make sure to disconnect the PST from power and disconnect the Touch Board from the PST by loosening the screws.
If your switch doesn’t work, have a look at all the wiring inside and outside the PST to check that it has been set up correctly. TURN OFF the power to the PST before investigating any faults!
Step 7 Paint the switch
Now we want to use Electric Paint to create a switch to turn on the desk lamp. For this, you can be as creative as you want! We’ve used a stencil to paint an ‘On/Off’ switch, but you can draw one free hand or create a custom design. You can also create the switch on a wall, or on other surfaces. Check out the tutorial below for some guidance on best practice when designing sensors with Electric Paint.
Once you’ve decided on your design, plan where your Touch Board and PST will be located. You’ll have to connect the painted switch to the Touch Board so you’ll either need to paint a line to electrode 11 or use copper tape if the distance is further than around a metre. Once you’ve planned out your layout, go ahead and paint your switch.
If you haven’t painted a stencil with Electric Paint before, have a look at this tutorial:
Step 8 Cold Solder
Once your switch has dried you can cold solder the Touch Board’s 11th electrode to it. Disconnect the PST from the power, turn the board off and disconnect it from the PST. You also might like to secure the Touch Board and PST with some double sided tape. Apply a small blob of Electric Paint to link electrode 11 to your painted switch. Once the Electric Paint has dried, you can connect the Touch Board to the PST again and turn everything on.
If you haven’t cold soldered using Electric Paint before, have a look at this tutorial:
Step 9 Success!
Now if you touch your light switch, your lamp should come on. Congratulations! You’ve set up everything correctly.
Of course, a lamp is not the only device you can connect to the Touch Board. For example, you could give your speakers a makeover!
Step 10 Troubleshooting
You might experience some difficulties with your Electric Paint and Touch Board in attempting to complete this tutorial. For example touching the paint may not trigger the Touch Board. In this case, make sure all the paint has dried and that there are no interruptions in the path of the paint. If it still doesn’t work, it might be that your path is too long. Remember that our Electric Paint is resistive, and so its effectiveness decreases over longer distances. You can test this by touching the paint closer to the Touch Board to see if it triggers. If this is the issue, you can try changing the sensitivity of electrode 11’s touch and release threshold. To find out how to do it, have a look at this example:
If you do this, make sure to turn off the PST first. Good luck!