Close
0%
0%

LED bedroom light hack

Switch off the LED light while lying in the bed. Use warm/cold light depending on the time of day.

Similar projects worth following
116 views
0 followers
I was used to switch off the light in my bedroom via a switch near to the bed, so I dont have to enter the bed and arrange the bed cover in the dark. Sadly my new flat just has a switch far from the bed. So I put some LED stripes above my wardrobe and under the bed and extended the functionality of the original LED electronics with a touch switch and a sensor to adapt the light according to the time of day.

I did not want to change the electric circuitry in the walls as

  1. this flat is just for rent, 
  2. I don't like to play around with "dangerous" voltages (I like 5V or max 12V :), 
  3. there are so many unused LED stripes in my electronics corner.

So I decided to just take some LED stripes, I lasercut small acrylic, quite flexible stripes where I glued them on to - to easily move them around e.g. when cleaning the floor. The cables (R, G, B, 12V) also had to be extended with long cables through the whole room.

I needed two switches that smoothly fit in the room - one next to the existing light switch and one next to the bed. Touch switches can easily be created with aluminium tape and don't require much space. But I don't like touch sensors that are working with HF in my bedroom, so I went for a darlington transistor circuit. This way only one pin of the arduino is needed for both switches, because by touching the two electrodes (5V and Darlington base input) of any of the two switches at the same time, the Darlington transistors base gets a tiny current that switches the Darlingtons output.

But just for switching on RGB LEDs when the switch is touched we don't need an arduino. Of course I plan to do some fancy things like setting different colors (depending on the current mood) or do color fadings e.g. after "double-touch" or so. One thing I want in addition is that the "usual" light changes its color temperature (warm/cold) depending on the time of the day. So when I wake up in the morning the light should motivate me to stand up and in the evening the light should support to come to sleep easily. Simple idea - but the arduinos clock accurancy could not be enough over the years and I don't want to set the time again after a power loss. Also I don't want a RTC - quite an overkill to just detect if it's morning or evening - I thought about an "easier" solution. A LDR came on my mind: I could measure the change of light brightness during all the day and so the arduino could calculate the time of day. This light/dark cycle is very constant, too; so no fear of any drifting/inaccurancy effects. This ideas was crazy enough to motivate me for this solution. As in real life, once again we have a very cheap HW (1 resistor + LDR) and clever SW has to compensate it by some smart algorithms. Let's go!

20180713_184235.jpg

touch sensors (aluminium tape) at the back of the bed

JPEG Image - 1.06 MB - 07/13/2018 at 17:43

Preview
Download

20180703_195854.jpg

schematics

JPEG Image - 542.81 kB - 07/13/2018 at 17:42

Preview
Download

  • 1 × original LED driver electronics providing 12V and LED drivers (transistors)
  • 1 × arduino nano which controls the LED drivers and reads the sensors
  • 1 × Light Dependent Resistor and 22k pullup to measure light brightness and thus the time of day
  • 1 × BC517 Darlington transistor touch sensor + 1k6 base-, 9M pulldown-, 16k pullup-resistors and 22n capacitor

  • Plenty of space

    Chris B07/13/2018 at 19:15 0 comments

    First I opened up the box of the electronics that came with the LED stripe. I saw that there is a lot of unused space and I just had the idea "this could be enough for a nano". In fact it seems like the box is designed exactly for this. ;)

    On the back side of the PCB I soldered some wires on it: Ground was easily detectable (big copper area, two pins of the 12 V adapter) and the third pin on the connector for the power supply had to be  12 V. Measuring the switched on device with a multimeter confirmed this assumption. Arduino nano can just handle 12 V,  and will generate 5 V anyway - I'm lucky! So I don' t need to use an extra 12 to 5 V converter.

    The three drivers/transistors for the R, G, B LEDs are on the left side and cables have already been connected to their collector pins to sink the current through it. Instead of adding my own transistors I wanted to use these existing ones. I just had to cut the lines from theis bases to the IC that controlled them. After cutting one copper line I had the idea to just remove the pins on the controlling IC and use the pins pad to solder on my cables to let arduino control the LEDs.

    I tried out some resistor values for my Darlington touch sensor schematic on the breadbord and soldered it onto a small piece of board that was lying around. The piece was exactly big enough to place all parts but small enough to fit into the box - in addition to the arduino! I'm so lucky!

View project log

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates