Introduction: Greene and Greene Inspired MQTT Controlled LED Bar Lamp
I needed a lamp to fit a specific area. I wanted to be able to control it with our home automation system and I like making things. The LED should not use energy when set to off. To do this I include a relay in my circuit that cuts the power to the led output. Without this relay, a small amount of energy will be used at all times.
The circuit is using a wemos d1 mini outputting PWM through a tip120 to control the power to the LED that the pin itself cannot handle. The power is first run through the relay before getting to the LED strip. When asking to turn on the relay triggers and the brightness goes to the last recorded state in the home automation system.
Supplies
Fusion 360 for design and CAM
Giant CNC or hand router
Saw of some sort
Walnut and Cherry wood
Steel cable to hang from ceiling
Fabric covered wire to hide the cable and make the electric parts look cleaner.
Acrylic for the lens to cover the LEDs
LED Strip lights in whatever color temperature you would like. I choose to use warmer LEDs for lighting throughout the house.
LED Driver to power everything
Buck converter circuit to output the voltage needed to use the wemos at 3.3v
If wanting to integrate into home automation, control board. I used a wemos mini and a circuit that allows PWM to output for brightness control. Integrate MQTT to talk with home automation.
Step 1: Design in Fusion
I first designed the lamp in Fusion 360. I have attached that file here. it includes the CAM needed to do the 3 sided operations. both sides and the led pocket cutout. There is a 4th operation to cut the acrylic as well.
I designed it based off of elements of Greene and Greene, FLW and Midcentury modern styles.
Step 2: Cut the Design on CNC
Using dogs to position the base material on the CNC and referencing the same corner for all the operations allows you to flip the stock and machine each side according to the design.
The CAM portion of the fusion file shows all operations and simulating it will let you understand the steps needed. It makes more sense when watching the simulation. I always simulate everything to understand what to look for when actually doing the work. I am a very visual person when learning things. I reinforce reading with example to have multiple points to reference in my head.
Step 3: Wiring and Code
The included diagram is not the exact one I used in the end. I seem to have misplaced the updated one and this one covers the output to the TIP120. A relay added to the pin in the code and routing power through the tip120 from the relay allows the dimming.
Look through the code to see where to input your wifi information and point it to your mqtt server. Then check the pins used and change to the ones you want instead.
In reality you can just use a switch or an LED dimmer circuit like this one from amazon to simplify the use. Many types of power/controls exist out there. I just like that using my own designs, I know exactly what is happening. not to mention, I have better reliability with self-made lighting projects than purchasing Hue lamps. They do not last long. Some do, some last 6 months and die.