Introduction: Make Any Lamp a Touch Lamp
In this project, I'm going to walk you through the steps needed to convert any lamp into a cool touch lamp using a capacitive touch sensor commonly known as the TTP223 module.
This project does require you to modify "lives" AC voltage, so proceed with caution or seek help from someone familiar with working with "live" 120VAC power.
The video above also covers all of the steps if you would prefer to watch a video over a written build guide.
Let's begin! Make sure you post your versions in the comments or "I made it" section so we can all see them.
Step 1: Gather the Parts
For this project, you'll need the following supplies:
You will also need some tools:
Ideally, try to find a lamp with a large space in its base to hide the electronics. While we are not going to be using a lot of electronics, it does make the project easier if you can hide them in the base. Alternatively, you will need an appropriately sized project box to store the electronics outside of the lamp.
You may need to improvise the parts and tools based on the donor lamp you are using.
Step 2: Explore the TTP223 Module
The TTP223 comes in various form factors, but the one shown here is the most common. They are also extremely cheap, as little as $0.10/each.
Don't let the price fool you. These are extremely powerful and reliable modules, I have used them in many projects and they work great.
They will not toggle a circuit out of the box but instead work in "momentary" mode, which is not useful for this type of project.
You MUST add a small solder blob between the two pads labeled "B" on the module to turn it into "toggle" mode - like a switch.
Step 3: Test the Circuit
Before we get started, I strongly suggest you wire up the circuit on a breadboard so you can become familiar with the wiring and each component. Once we get started, the lamp may have a restricted space to work in, and knowing the circuit now will help later.
In the next step, I will cover the circuit diagram. It is a straightforward wire diagram. However, if you are not familiar with relays and working with "live" AC power, it is best to do it on a clean bench with plenty of space to move.
NOTE: This circuit uses "live mains AC voltage," aka 120ACV, which can be extremely dangerous - even cause death. If you are unfamiliar or uncomfortable working with "live mains voltage," I strongly suggest that you skip this project entirely.
Step 4: Circuit Diagram
Study the attached diagram and make a plan before you start. Measure the existing lamp's wires and use the appropriate gauge wire when working with the mains AC part of the circuit. In my case, I used 18AWG wire where I needed new connections.
As you can see from the diagram, we will switch the "AC live" wire through the relay. The DC part of the circuit can use smaller gauged wired, 24 or 26 AWG for example, since it is only 5V.
Either solder and heat shrink all joints or use the appropriate connectors for mains AC. I choose to solder and heat shrink mine for a permanent solution.
BEFORE you plug your lamp in, double-check every joint and trace each wire to ensure it was properly wired. Use a multimeter to verify the AC circuit is properly wired.
Step 5: Mounting Electronics
My donor lamp has a large concrete block in the base for ballast, which is common. In my case, the AC module will fit between the concrete block and the side of the lamp, but the relay is just slightly too large.
Disassemble the lamp, remove the ballast, and make room for your electronics. In my case, I had to take concrete out into the garage to chip away some of it to make room for the relay. The concrete block did split on me, but it didn't really matter since it's just used as weight. Using some hot glue, I re-mound and secured the pieces in place.
Once you had enough room for the electronics, you can start the final wiring process. Now is a great time to test fitting your electronics, note which wires need to go where, and calculate the easiest path to avoid the wires from being pinched.
Make sure none of your electronics are shorting out against your lamp or other components. I slipped a large piece of heat shrink over the entire AC to DC module so that it would not touch the lamp's base. Your project may require a different solution.
The final mounting step is to drill a hole in the base of the lamp for the TTP223. Don't forget this step!
Step 6: 3D Print a Switch Box
Above is an STL file for the 3D box that I designed and printed for my lamp. This box could be used with most lamps but may not fit exactly the same way mine did, which is fine.
My box does have a mount for the TTP223 module and tabs to use foam adhesive for a permanent mount to your lamp.
Other suggestions, you could mount the box next to the lamp or in a more convenient location if your lamp is out of reach. Since it is a capacitive touch sensor, you need to get 'kind of' close to the sensor toggle it.
Step 7: Testing Lamp
Before we do the final assembly, let's do a quick test. I used a small 3-pin header and a standard 3-pin female connector to attach the TTP223 to the rest of the circuit. This makes it very easy to mount after everything is assembled, and it allows you to remove the box if needed.
When testing the lamp for the first time, it is strongly suggested that you plug it into GFCI (ground fault circuit interrupter) outlet, like what is found in modern kitchens or bathrooms. That way, if you do have a short or something is incorrectly wired circuit, the breaker should trip instead of giving you a shock.
Step 8: Final Product
And there you have it. You just converted a regular lamp into an awesome touch lamp! No more struggling to reach those crazy tiny switches in the dark.
This project doesn't need to stop here either.
You could use this same circuit to add a touch circuit to pretty much any AC appliance. I would avoid switching heaters, air conditions, blenders, or anything with a huge initial current draw, compressor, or inductive load.
Please post pictures of your converted lamps in the comments below!
Participated in the
Trash to Treasure Contest