A automatic light for under the bed.

It activates on motion, the sensors are placed so that they wont activate when you are in the bed. But when you step out of the bed or aproach the bed. They turn of after there has been no motion after a set time.

Because i dont need them to go on when its is light in my bedroom i added a ldr to measure the ambient light.

Step 1: Leds

U used a cheap white led strip from ebay (search for led strip). I didnt used rgb because i just wanted to have light when i go to bed and when i get out of bed.

I mounted the ledstrip to the bed with the adhesive backing of the strip itself. I used alcohol to clean the area where the ledstrip would go so it would stick better.

My bed is made of wood, normally i would advise to mount a ledstrip on some aluminum for cooling. But because the leds are only on a couple of minutes or less its not necessary.

<p>after putting this together I noticed that the LDR and 10k resistor are wired in reverse, the LDR should go to grd and the 10k resistor should go to the vcc side. check the Arduino diagram then look at the board diagram and check how the LDR is orientated. </p>
<p>Congratulations! your I'ble made the &quot;<a href="http://lifehacker.com/top-10-kickass-arduino-projects-1747407543">Top 10 Kickass Arduino Projects</a>&quot; @ Lifehacker.com</p><h1><a href="http://lifehacker.com/top-10-kickass-arduino-projects-1747407543">Top 10 Kickass Arduino Projects</a></h1>
<p>Can you give us a link for the motion detector you used? Also would it turn on the light if my cat walked into the room?</p>
<p>Thank you for this! I am in the process of making this RIGHT NOW. Parts are ordered, waiting ever so impatiently for delivery. The floating bed, altered into a queen sized fitting, is going to look AWESOME floating in a green light.</p>
<p>I'm attempting to build this (I've never tried anything like this before), but your schematic fails to show where the motion sensor(s) are connected. Will you add that information please? The PIR sensor I purchased (just one for now) has three interface pins, labeled &quot;VCC&quot;, &quot;OUT&quot;, and &quot;GND&quot;. I assume these are to be connected to the Arduino, but I have no idea how.</p><p>Also, would you mind explaining in a little more detail how multiple motion sensors would be connected? Thanks - cool little project!</p>
<p>If you look at the board layout as pictured above, the topmost pin of each of the bank of PIN array is connected to Vcc (+5V), the bottommost pins are all connected (through vias) to ground, and the center pins are the signal that carries to the Attiny. If you connect multiple motion sensors, just expand the array and count of digital input pins (pir_pins[numberOfPirs] = {8}) to include the PIRs you're using, and also note that a value of '8' as listed is completely invalid for an Attiny.</p>
<p>Can you supply the correct pinouts for the board as drawn?</p><p>Using one PIR, on JP3, I've done the following, but I want to make sure it's correct:</p><p>#define ldr_pin 2</p><p>#define led_pin 3</p><p>const int numberOfPirs = 1;</p><p>const int pir_pins[numberOfPirs] = {7}; </p><p>Do you think that's correct?</p>
<p>So I think your initial code is a little bit buggy. Your mileage may vary, of course, but I've fixed it up and put a project on github. Anyone who's doing this project should take a look:</p><p>http://github.com/mattcole3/motion_led_nightlight</p>
<p>You may infer by this comment that I have had your boards printed. You would be correct. :) I used OSH Park to get the boards for ~$5 USD each, with about a 10 day turnaround.</p>
<p>I like it, maybe adding a ambient light sensor to detect if the LEDs are needed would be a good idea?</p>
<p>It has and ldr to measure ambient light.</p>
<p>Sounds like a fun project.</p><p>Or, you can go to Home Depot and buy one of the many 120 VAC motion detector for security lights that have a built in light sensor for night-only operation for about $10 (more if you wish). Then plug an led strip into it.</p>
<p>Yes that could be a solution but than i have less freedom in time settings. And when its activated it slowly increase light.</p>
<p>cool project. I will try it out</p>
<p>Is it possible to wire multiple motion sensors so that, no matter what side of the bed detects motion, it will switch on?</p>
<p>Yes in the code you can increase the number of sensors and add the corresponding pin to the array. Look at at the software section for a more detailed explanation. I haven't tried multiple sensors parallel to a single pin because i only have a single sensor at the moment. Im waiting on a delivery with new sensors</p>
<p>Could the hardware assembly part be explained more in detail for the non technical people.</p>
<p>I will try to do that in the next couple of days</p>
<p>Cool! Built an EL-wire variant some time ago https://www.instructables.com/id/Motion-Triggered-Bed-to-Bathroom-Floor-Illuminatio/</p>
<p>integrate with a real-time clock (RTC) and you will have a winner. the LED's only activate at night.</p>
<p>it would be better with warm white led (and not cool white)</p>
<p>Yes that probably would be better. But the thing is i ordered the ledstrip a couple of weeks ago and at that time i didn't had an idea of what to do with it. And i became this. And until now i haven't had a problem with the cool white.</p>
<p>Great idea!</p>
<p>Thank you.</p>
But what do you do when you see the shadows moving? The monster under the bed doesn't lie still.
<p>As long as the monster stays under the bed it stays dark. The sensors are mounted on the edge of the bed and point out so they don't detect movement under the bed. And when he crawls out from under the bed he has some light to see where he is going. No need to always be unfriendly against the monster under the bed.</p>
Love it! Orginal and useful, gets my vote :)

About This Instructable




More by VeryEvilBetty:Under the bed nightlight 
Add instructable to: