Matching Living Room Light Fixtures

After deciding we wanted new matching light fixtures over the couch and kitchen table, my wife and I picked out a couple of cheap flush mounts from Walmart. Rather than just stripping the 12V DC sockets out of the old fixtures to exchange with the 120V AC sockets in the new, I decided to use LEDs and add some touch sensor circuitry to control them. Also worth exploring is the complete desription of the control circuitry and microcontroller source code.


This project wasn't necessary. but it was just one of those things that we wanted to do. The light fixture over our couch is completely different than the one over the table. This may be the "camper version" of trying to separate rooms, but to us it just looked dumb. Plus, we didn't care all that much for either fixture anyway. After gasping at prices for something so simple, we settled on the cheapest we could find from Walmart - a very plain flush mount. The simple design seemed to fit the camper a lot better than the original fixtures. The only problem is that the new fixtures were meant for a standard house with 120V AC; the camper lights are all 12V DC.

Retrofitting the New...

Yes, I know this is kind of an oximoronical statement (and yes again, I know that isn't a real word), but it seems to fit. Rather than just buying expensive 12V fixtures like a normal person, I decided I would remove the guts of our original lights to replace the 120V AC sockets of the new, but after some deliberation, I decided that leaving the old fixtures as worthless shells wasn't in my best interest so I went with plan B: LEDs.

At first I was thinking of doing a simple bank of 5mm LEDs kind of like what I did with CycleLux, but I decided to kick it up a notch and build a complete control circuit. We also didn't want to have pull-chain switches, and I couldn't find any white buttons that would look OK or didn't cost $5 a piece (not to mention having to drill a hole in the new fixture for it) so I ditched the mechanical route and went straight electrical with a one channel touch sensor wired to the metal fixture.

The control circuit is relatively simple in design, centered around an ATtiny25 microcontroller and the AT42QT1010 touch sensor, also from Atmel. The entire circuit is described in detail here, and the source code for the MCU is described here. In summary, the microcontroller waits in a low power sleep mode until the light fixture is touched, at which time, the LEDs are turned on through a MOSFET constant current source. When the fixture is touched again, the lights brighten. A third touch turns off the lights and puts the circuit back to sleep. The brightness is controlled by a pulse from the MCU.

Schematic LED Current Driver

The Build

This was a pretty simple reconstruction; the old stuff came out, and the new stuff went in. After removing anything I didn't need from the fixture, I fitted the finished circuit on a small bolt through the hole mounting the original socket. This bolt also served to connect the light sensor electrode to the fixture. For LEDs, I picked a roll of warm white surface mount strip lights I found on Amazon for a pretty good deal. The only downside to these is that they are designed for direct installation, so they already have a series resistor in place. That had to go for my circuit to work (and for the lights to reach their brightness potential). Wait, am I suggesting you modify brand new, perfectly good LED strip lights? Yes; yes I am. This is a modification project after all! I shorted each resistor by soldering a piece of wire across the leads. The strips are designed to be cut every three LEDs to fit different applications. I made eight strips of three series LEDs in parallel groups of three.

SMD LED Strip Modification
  Purchased roll of SMD LEDs...      Series resistor - 151
Ω ...         Modified Strips...

With that done, I created a cardboard insert to house the LEDs and covered it with aluminum foil to redirect any stray light and match the interior of the fixture. This piece was attached to the fixture with a few pieces of velcro so the fixture can still be removed and the circuit is easily accessible.

LED Light Fixture
           New Fixture...          This AC socket has to go...     Control circuit mounted...

SMD LED Light Fixture
   LEDs adhered to insert...          LED insert in place...         Working light fixture...

A Note on LED Selection

Picking the right LEDs is not always an exact science. There are a lot of choices, but it really comes down to how much you want to spend and how good at modifying things you are. There are plenty of prebuilt LED lights that work right out of the box, but they can cost a lot. Aside from budgetary concerns, you also need to worry about the LED color. White light, at least the white lights we are accustomed with, is not exactly white but more of a yellow. In LEDs, this difference is denoted as warm white instead of the typical cool white LEDs which put off more a blue glow. Keep this in mind or you will be disappointed at the difference in the way things appear under your new lights!


   Check out the source code and Eagle schematic files!