Motion sensing led strip with dimming on/off?

Hello,

I'm making a coat rack that will be hung in a poorly lit hallway. The coat rack will have a basic mountain shape to it and I'd like to put some LEDs behind the mountains that fade on when I approach and fade off after a minute or so. Is this possible? 

I'm brand new at this but I'm not afraid to learn. The shelf is about 3 feet long and I thought I'd use about 3 feet total of an LED strip (1' behind the mountain and 2' pointing at the hooks).

I'm incorporating a charging station into this as well. I would love for the LEDs to be able to run off a USB charger (like this one from Anker)

I'd love some recommendations for how to do this. Arduino? Raspberry Pi? Something else?

Thank you in advance. 

Picture of Motion sensing led strip with dimming on/off?
sort by: active | newest | oldest
Downunder35m9 months ago

Why not go simple?
Instead of paying a few bucks for the controller, another few bucks for LED's and battery holder get something already utilizing most of what you need :)

http://www.ebay.com.au/itm/Human-Motion-Sensor-Sea...

Runs on 3 1.5V batteries so it will be fine with a 5V charger too - if in doubt add a series diode to drop the voltage to 4.3V.
Rip the stuff apart, integrate into your board and enjoy :)

iceng9 months ago

I use an inverted (pointing down) led strip can't be seen but lights the Keyboard im typing on now... It has three light reducing steps and off.. Each step adds a series diode 1N4001 and that was still too bright at night...

I finally had to add a fourth diode always in series to get it right...

So be ware your very cool coat rack shelf may be shockingly too bright...

You may want to tie the range to the ambient light level like an iPhone does...

ddemayo9 months ago

On The arduino front you could have a few approaches to this you would need basically any arduino a sensor of some sort and some programming knowledge for arduino. If you want help i could work with you on it.
Easiest and cheapest method would be a arduino nano.

A cheap motion sensor

use this tutorial to see how to make an led fade

https://www.arduino.cc/en/Tutorial/Fade

then all you have to do is add to that to start the fade when motion is detected then after motion stops the fade can go the other way.

Here is a tutorial for motion sensors.

https://learn.adafruit.com/pir-passive-infrared-pr...

You can use any arduino

The uno is very beginner friendly since you do not need to solder.

The nano will be nice once you get it working to be bale to hide it easy.

Best thing is the arduinos can be powered by usb like you want.

If you need any advice let me know

JeffB156 (author)  ddemayo9 months ago

Wow, this is great stuff. Thank you so much. I'm going to give it a try.

Here's what I think I'll need (minus wire) would you add/change anything about this list?

-Arduino Nano (Here): Is this even an Arduino Nano?

-PIR Motion Sensor (Here)

-LED Strip (Here)

-12V 5A Power Adapter for the LEDs. (Here): Is there a way to power both the Nano and the LEDs (1 Meter) from USB port(s)?

ddemayo JeffB1569 months ago

I would Definitely get an arduino Uno aswell

https://www.amazon.com/Elegoo-ATmega328P-ATMEGA16U...

it is a less permanent for practicing your build.

Also the arduinos usually do not come with the usb cord for them so make sure you get those.

I am trying to think how to do the fade since you are using 12 v LED strips because the arduino cannot power those so you would need to control the voltage going to the strip somehow but i need to think of the most straight forward way to do that. with as few components as possible.

Regular LED's are easier because you can place them where you want exactly to add more light in certain spots and the uno can power a lot of them by itself, but they can be more work because you have to figure out how to attach them and wire each one individually. The nicest thing about them is you can control over 64 led's individually using multiplexing. but let me think on the LED strips i always wire my own and actually have never bought a strip so ill have to think about that. unless someone else comes along that plays with them. I am no expert by any means but i tinker until i figure out what i need to do.

Also you might consider getting a breadboard to layout the circuit without making it permanent so if you get something wrong you can change it.

Let me think on this and ill provide some more info.

ddemayo ddemayo9 months ago

Actually did a quick search and this seems to have the function you are looking for. it has a lot of extra code to control the color changing feature, but you could always upgrade or you should be able to adapt this code to what you need. the trick is to find the bits you need and adapt to controlling those with the motion sensor. arduino forums help a lot though when you have coding questions. It all takes some learning. You are going to use pulse width modulation to control the fade, basically you are putting in a transistor(really tiny switch) into the circuit to flip the leds on and off at a really fast speed in different lengths of time to control the brightness of them and that is how you will make them fade.

ddemayo ddemayo9 months ago

http://genericnerd.blogspot.com/2009/05/arduino-mood-light-controller.html

ddemayo ddemayo9 months ago

https://www.instructables.com/id/How-to-fit-LED-ki...

Here is another example that will help.

ddemayo ddemayo9 months ago

also cool effect I have used is to use three separate sets of LEDs and have the two on the outside start to fade on first then the middle one it kinda simulates a sun rising

JeffB156 (author)  ddemayo9 months ago

You're blowing my mind right now, that would be awesome!

-max-9 months ago

A small embedded micro controller (like arduino, being the most noob friendly) would be your choice. Using a PIR sensor (Passive InfraRed) and getting the data from that to control a pin would probably work well.