Browse over 10,000 Electronics Projects using the Page Numbering provided at the bottom of each Page.

A Connected Lamp to Wake Me Up

A Connected Lamp to Wake Me Up

I’ve always wanted to play with these 10W RGB LEDs!

The Idea

lamp.JPG
So for some reason I bought 2 IKEA lamps at a flea market. As IKEA furniture has a long history of being hacker-friendly, I figured they shouldn’t be an exception to the rule.
My plan? Fit a few 10W RGB LEDs in there together with an ESP8266 to use the final result as an alarm clock.

The Schematics

schem.png
When you are dealing with a LED consuming that much current, you can’t simply use a series resistor as the latter would need to dissipate R*I² in heat. I’m therefore using a dedicated LED driver that automatically adjusts the LED voltage to match a given current. As you can guess, it isn’t much different than a standard step-down and just uses a shunt resistor to measure the current flowing through the LED.
The A6211 has an adjustable switching frequency set using R2/R3/R4 (to 700KHz in our case) and an EN input meant to be connected to a PWM signal. Its datasheet is well made so you can easily find all the information needed to select your passive components values. C13/C14/C15 are here to decrease the current ripple.
The complete board is 12V powered through P1. A DC/DC is placed on the board (I was lazy) to provide the 5V needed by my ESP8266 dev board. The P3 connector therefore serves as an interface beween the latter and our main PCB.
P4 is meant as an expansion connector to which will be connected an accelerometer. The goal is to hopefully measure REM sleep cycles to gradually increase the light at optimal times.
The great thing in this project is that the ESP8266 has all the required IOs for my purpose (PWM outputs, I2C, std IOs).

The Realization

lamp_inside.JPG
The inside of the lamp is fairly simple, I just needed to remove the socket to make room for my PCB:

PCBA.JPG
That was a fun PCB to design!
As you can see its outline is made at the right diameter and has slots in which will fit the RGB LEDs. The ESP8266 board will nicely fit in the middle. Keeping in mind that 10W LEDs don’t have a 100% efficiency, I machined an aluminum plate that will be used for heat dissipation:

al_ring.JPG
In this picture you can get an idea of the stackup:

assembly.JPG
After applying some heat paste and soldering the LEDs:

assembly_2.JPG
And this is what it looks like from below:

assembly_3.JPG
You can notice the M2x6mm brass standoff spacers and the power supply/expansion connector.
Here is the final result:

assembly_4.JPG
Obviously the USB port won’t be used 😉 .

All Done!

lamp_on.JPG
The hardware is tested (I’ve been blinded a few times!) and the software is still a work in progress but the core functionalities are there.

alarm_control_panel.png
You may find all my files in this repository (HW part is CERN licensed). As you will see, all of the code is based on esphttpd with esp-open-sdk.
Cheers!

 

Top




Shares