A New Lighting Gadget

Another lighting gadget? Why? Because it’s necessary. If you’ve read the post about the office refit, you’ll know why “Data Central” needed a new lighting gadget. If not, let’s get you up to speed. Recently the office got a “facelift”. To be more precise, many of the issues with the office arrangement were addressed. In fact, this new gadget addresses an issue that way caused by the refit.

We added a new shelf over the monitors on the desk. Those monitors shared space with lamps hidden behind them. The lamps shone upward and bathed the white ceiling with light, then reflected and scattered back into the room, softly illuminating it. That is, until the shelf effectively covered them.

Well, it didn’t exactly cover the lamps, but it effectively blocked their light from doing anything but backlighting the monitors. And the monitors don’t need backlighting. The overhead light on the ceiling fan is too bright. The LED fixture over the gadget bench is WAY TOO BRIGHT. Now what? We need a new light.

Inspired by my latest lighting adventures controlling lithophanes, I decided to dig out those LED strip corner frames I bought years ago to use for the train station lighting. The train station we no longer have, lost when we removed the raised bed planters along the patio. Anyway, the idea is to place the corner frame along the back of the shelf over the monitors, facing toward the ceiling and out into the office.

Those corner frames have a face at 45º to either side, meant for the LED strip to stick to, and a snap in diffuser over top of it all. While I didn’t really need the scheduling additions from the lithophane lighting sketch, I did want all the updates and bug fixes that came with it. I also expanded the “build from config” feature to get us closer to not having to create a dedicated HTML page just to control all the different lighting arrangements.

ESP32 Arduino Testing LED Strip

Designing The Fixture

The picture shows the ESP32 I’m using to test the sketch, connected to the first 55 of 110 LEDs. The shelf is 72″ long, so I cut two of the meter long (39.36″) frames and diffusers to 36″ each. The plan is to connect the two at the middle to make a 72″ long fixture of sorts. But to do that I’ll need to design some sort of end caps that emulate those that come with the frames.

At full intensity those 110 LEDs will consume 60mA * 110. That’s 6.6A! I don’t think even the powered USB 3 hub will handle that much current. Time to order a dedicated power supply for this project. All I can find is 6A and 8A, but the 6A version will take too long to get here, so I go with the 8A version. It may be a bit overkill, but I’d rather have too much than not enough.

The frame extrusion is hollow behind that 45º face so the plan is to power one end and run the wiring through that hollow space to the middle to evenly distribute power between the two halves. The difficult part is trying to shoehorn an Arduino as well as the power connector into the smallest box at one end.

LED Strip Illuminated Running “Flicker” Effect

Baby Steps

Sounds easy, right? Let’s start with copying the end “stopper” to get the dimensions correct. It takes a few tries, but eventually the part snaps right into the end of the extrusion. From there, it’s a new design to snap over the extrusion rather than snap into the extrusion. The reason is original has a long “snout” that fills the hollow space we want to run the power wires through.

We need the snap over design to provide a “window” for the wires to pass through where the original snout would be in the way. That much is a no brainer, but it still take a second try to get it right. The next step is to figure out how to reduce the size of those “default” 3 pin connectors. For the life of me I cannot find a name for those standard black connectors.

But it doesn’t matter because they’re too big to use anyway. One of the JST connector styles in one of those assortments may work. Turns out an XH3 works just fine. Three pins on tenth inch (2.54mm) centers. Add that to the cap design, one opening for the power lines and one for the XH3 connector. We’ll need one on the power supply end and two for the connection between the two halves.

Making It Fit

Now all we need is some sort of box to house the power connector and the Arduino. The ESP32 we’re using is too big and way overkill for what we need it for. Even the ESP8266s we normally use is too big. One of the WeMos D1s ought to work. It’s the smallest we have that still uses the ESP8266 core.

Starting with the power connector for initial dimensions, the design is just the box with a hole in it for the connector. It takes two tries just to get the dimensions of that hole correct. Rather than design some elaborate attachment scheme, it’s assumed the control box will be glued to the end cap. For now the goal is to fit everything inside the box.

Shoehorning the Arduino in there pushes the dimensions a bit larger than desired, but it’s still roughly a ½” deep by a little more than the dimensions of the WeMos D1. Why ½” deep? Because there’s not much more space left between the wall and the doorframe to fit anything else. After capping the shelf with ¼” thick screen mold, it’s already 72½” long anyway.

End Cap and Control Box Design

That much is done. Now we need to modify the design to add a snap on lid that we’ll glue to the end cap to keep everything attached to the end of the fixture. The snap effect is decisive and holds tighter than the end cap snapping over the end of the fixture. Considering that control box will rest up against the wall that shouldn’t be an issue.

Not shown is the access port for the USB micro connector on the Arduino. It serves two purposes, the first of which should be obvious, programming access. But the real reason there’s an access port at all is to help align the Arduino and keep in in place as well as reducing the overall length of the box since the connector extends beyond the edge of the circuit board. It’s a small amount, but not negligible.

Joining The Fixtures

Seems like this should be the easiest to do, after all, we’re just sticking them together, right? At first I was thinking just a pair of connectors, one on each end, and maybe some sort of back to back plugs to connect the sockets together. That went out the window with how much the connectors would extend past the end.

The next idea is to allow a single connector from one end to extend through the opening in both and a plug with a short pigtail from the other end to connect them. The only concern now is how short of a pigtail and will it interfere with any of the LEDs. Sounds good. Until considering the power leads, or rather, failing to consider them.

Rather than take the time to drill holes in the aluminum extrusion, it’s quicker to just drill a couple holes in the 3D printed plastic end cap, then loop the wires from the bottom hollow section up and through the holes to solder them to the power traces on the LED strip. There are copper “pads” every LED, so the connector will solder to the pads at the end of the strip and the power wires to the next set of pads.

Adding The Controller

It’s a bit of a hack, but it works. With all the wiring work done for connecting the two fixtures together as one, it’s time get to work on the controller end. Time to “ohm out” how these fine Chinesium power jacks work. Three terminal, only need two, but which? There’s usually a set of switched contacts that provide continuity until contact is broken by inserting the power plug. Then only one of them is in contact with the plug, breaking the connection with other.

Generally the power connection would be switched, but in this arrangement, it’s actually the ground. Tip is power, ring or shroud is ground. Before all that, the lid needs glued to the end cap. Then the power lines can be run through the opening in both and soldered to the power jack. The jack can then be mounted to the control block, passing the wires through the lid unit.

That leaves the connection to the Arduino. And that means crimping the pins for the plug of the “harness” to the Arduino. Unfortunately, the crimper is loaned out. There’s a “backup crimper” that sort of works, but just as many pins are wasted as there are good crimps. There isn’t room for pin headers to be soldered to the Arduino, so the harness wires are soldered directly to it.

First Test of Assembled Lighting Fixture

The sketch is already loaded on the Arduino and it’s ready to go! The Arduino fit in its space, plugged in, and the box snapped on, all that remains is to plug in the power supply and wait for everything to come to life… And it does! WooHoo! Just had to try changing effect right off the bat. Christmas TruTone® effect, complete with blinking! Looking good!

Now to see if everything will fit on the new shelf over the monitors and continue to work. A few last minute tweaks to the sketch, including setting up the config for a warmish white. Well, try as I might, these LED strips are the finest quality Chinesium and it shows. There is just no way to make these things look warm. It’s either that pinkish “grow light” white or a harsh blue white, but at least it’s ready to deploy to the shelf.

Well, at least it’s sitting on the shelf and operational. Fully deployed would mean clips attached to the shelf or the wall to snap the fixtures into. And that sounds too much like work at this point. We’ll save that for later since the shelf will be taken down to stain and finish in the near future. It makes more sense to wait and do it then, if at all.

If anything needs done, it’s adjusting the brightness and tone of the light to match the desired lighting for the room, and that takes some doing. These LED strips probably weren’t the best choice. The red power and green power don’t seem to balance out to a warm yellow or amber. It’s either way too green or way too pink, with no happy medium between the two.

New Lighting Fixture Deployed on Shelf

Future Changes

Having spent hours trying already, it’s time to look for a better LED strip. If anything, those LED strips need swapped out with some quality Alitove strips. The problem is there are so many different “brands” available, most of which are cheap knockoffs, that it’s difficult to know what you’re buying beforehand. Paying for quality counts.

There seems to be a bug with the power button in the UI as well. It works fine after short delays up to hours, but overnight it somehow only enables the red of the first pixel. Turn it off then back on again and everything’s fine. Must be something in the loop handler for the power, or the effect, or both. For now, it works well enough to use as office lighting.

I’d really like to finish the “build from config” feature to get get away from having to create a dedicated HTML page for every gadget that has to address every minute detail of controlling it. There’s really no way to avoid having a dedicated page though. For example, favicons will differ along with files included based on what is being controlled.

But automating the control portion of the page based on configuration and what is being controlled will save plenty of time

New Office “Grow Light” White Lighting

If anything else is lacking it’s an Amazon Alexa interface. A quick and dirty way to enable that would be to just plug the power supply itself into a already Alexa compatible smart outlet. Eventually I’ll figure out what it takes to add that to the Arduino sketch. More like once there aren’t so many other pressing issues on the Barkyard.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Leave a Reply