Part 2: Soldering one of the LED system controllers

Joseph Flinn
The Tiny Library Project
6 min readMar 28, 2022

Over the last few years I have discovered that I am — let’s say…particular — when it comes to the combination of lighting and daylight at any given time. I like the cool white light of daylight bulbs while the sun is up (or if it should be up but hidden by clouds). But as soon as dusk starts setting in, I want the house to be lit in a warm glow instead of the aggressive artificial daylight.

Because of my particularities, I have decided that the lighting system of my tiny house will be run on LED strips that have both cool white and warm white (yellow) LED bulbs. I bought 250 ft (76.2 m) of it those LED strips. However, I feared that that strip lighting wouldn’t be bright enough during the day, so I decided to buy some similar LED can lights that are used in RVs. I was assuming that the wire interface would be the same between the two. Boy was I wrong.

LED can light for RV
Disassembled LED can light for RV

LED strip lighting normally comes in RGB (red, green, and blue). Lately there have been some that add a white light since it is hard to make true white with RGB. These are RGBW strips. LED strip lighting have n+1 connections for n colors on the strip. One connection provides power and the rest provide the PWM “signal”. PWM essentially just turns the LEDs on and off faster than the human eye can detect. The longer the LED is off, the dimmer it looks to the human eye. Mixing and matching the dimness of the LEDs is how different colors are made.

Both the LED strips and the LED can lights that I bought have a mix of both cool white LEDs and yellow LEDs. However, unlike the LED strips, the can lights only had a positive and negative lead running to the light unlike the expected positive, yellow, and white leads. It turns out that the can lights came with a remote control to turn the lights on and off and to tune them to the desired warmth and brightness.

While the remote control is a cool idea, I have a total of three other remotes that could control different parts of the house (the AC, ceiling fan, and the LED strips). This would increase to eight if I were to program the six different LED strip zones to different remotes. As interesting as this sounds, I didn’t really want a velcro strip of remotes on one of the walls to control my house. I want everything to be controlled from a central computer system.

So what’s the solution? Hack the remote of course! Well…at least that’s was the hope. There was a slight chance that the circuit board would be microscopic and too hard to read how the buttons worked or what they were connecting. As I disassembled the remote I was hoping for a really simple circuit board that I could read.

LED can light remote control
Disassembled LED can light remote control

Success!! As complicated as this might seem, every path on the board is easily readable. This is a single layer PCB which means there isn’t a layer hidden sandwiched between this top layer and the bottom layer being impossible to read. Nope, this hear is a simple single layer PCB that you can trace each path too. Doing a quick lookup on the specs of those push buttons (aka momentary switches), as seen here they switch the left of the button with the right. So the circuit is unbroken from left to right until the button is depressed.

The simplicity of this circuit board means that I can replace each button with a simple electronic circuit that can be driven by a microcontroller. This circuit is essentially a transistor and a resistor. I put together a quick circuit to test on a breadboard and used the normal Blink Arduino project with an updated digital pin to test.

LED can light microcontroller Blink test

I added a separate LED here for easy debugging. The test here was to light up the LED on the hacked controller which means a button has been pressed. So in theory, both LEDs should be illuminated at about the same time. It took a couple of tests of wrong wiring to figure out. The schematic was correct, but the implementation was wrong. Thankfully, the magic smoke never made an appearance during testing.

With the simple test out of the way, onto prototyping out the digital remote!

LED can light digital remote prototype (missing the microcontroller at the top)

Through more testing, the remote wasn’t acting like I assumed. I had assumed that the buttons chose from a finite number of predefined settings for both brightness and warmth. This is similar to PWM on an LED strip. This was not the case. Both the warmth and brightness were set by the length of time the button is depressed. In other words, the buttons could be long pressed and the brightness would continue increasing until it hit the ceiling.

When this was discovered after a couple of weeks of tinkering with the Arduino code, I decided that this project was starting to become a blocker for the progress on the tiny house. I decided to essentially replace the remote control with code that acts exactly the same: the settings are button-depressed-time vs predefined settings.

After this decision, the only thing left to do was to transfer the circuitry from the breadboard to a more long term prototype board.

LED can light final board

I removed the debugging LEDs since I didn’t want to waste the 100 ohm resistors and since I have a very limited supply of the LEDs. I have a bit more final testing to make sure that everything is working as expected. Hopefully removing the debugging LEDs doesn’t come back to bite me. I’m also not sure how I plan to power the microcontroller. I’d like to power it directly from DC since I have a DC specific electrical system, but it is currently set up to work off of 12V power to the remote controller (the white wire leads at the bottom) and a micro USB-A cable plugged into the microcontroller. One interesting idea could be to plug the microcontroller into a headless SBC that could be used to remote update the code on the microcontrollers. But that might be a bit over-engineering since I don’t expect to be flashing the microcontrollers all that often. And even if I did, I didn’t solder them to the board so I can just pop them off. I guess we’ll see what the best option is as I continue to build out the 12V DC electrical system.

--

--

Joseph Flinn
The Tiny Library Project

An Open Source advocate currently working in DevOps. My thirst for learning is insatiable and I love sharing what I have learned.