loading

Step 11: Cabling and Switchbox

Now for the controls. Since I want the controls to be separate to the light, I'll need some cable. The circuit needs live and ground connections, and the potentiometer will need three connections. One of these will be live from the Arduino, one with be the connection to the analog pin that the arduino will use to read the pot. The other is earth, so that means I need just four cores going up to the light.

Since I don't have any four core cable, I twist two long lengths of speaker wire together. Not perfect, but not bad. You can easily do this as shown in the photos below by zip tying the ends of two lengths of cable, putting one end under something heavy enough to hold it, then braiding the cables yourself.

I'll be making the control box out of an empty white plastic moo card box I've had for quite a while. Some of the components, such as the power socket, are also recycled from previous projects. An end cap and some zip ties will serve as strain relief at the light end of the cable.

I start marking out the box for the pot, then set to connecting the cables up at the light end. By stripping one pair but not the other when they're entwined, it makes it easy to identify them. One of the stripped ones will go to ground on the potentiometer in the switch box, one will go to +12v at the power socket. The other two will be signaling wires connected to the other pins on the pot.

At the other end, one of these will go to the analog pin that the code tells the arduino to take a reading from, and one to +5v. Again, all heatshrinked up when in place.

The pictures should show you better how I made my switch box, which almost went disastrously wrong. I tried gluing it first, and the plastic seems to be impervious to superglue... in the end, I sorted it by using a couple of rubber pads inside the box then putting a couple of PC case screws though all the layers of the box to hold them together and keep the pot in place. The power socket also needed a zip tie since I didn't have any nuts to fit the thread on it.