Author Topic: My homebrew motion activated leds for glass shelves  (Read 2431 times)

0 Members and 1 Guest are viewing this topic.

Offline andrebarataTopic starter

  • Newbie
  • Posts: 7
  • Country: pt
My homebrew motion activated leds for glass shelves
« on: September 25, 2012, 12:18:39 am »
Hello guys,

so i thought it would be a nice idea to have the glass shelves on my living room closet lighted by a couple of led strips that would get activated by a motion senson.
And since i'm sot of an electronics beginer, why not make the device myself.

So i figured out how to hack out a PIR sensor from an motion activated home perfume dispenser, and got on with designing and testing a controller board for it.

I basicly used a atmega328 as a microcontroller, set some pins for the sensor, others for a front panel with 2 press buttons and 2 leds, and one to set the led strips on.
Also wrote the software for controlling the timings for the led strips to stay on, and the routine for changing these timeins as well as turning the device on, off or sence mode with the front panel buttons.

Also designed the Schematics, PCB and etched the pcd myself.

So, I am absolutely sure that are alot of fundamental flaws in the PCB and schematic designs. Some obvious to me, such as a bit overkill microcontroller and external oscilator, but probably you guys have alot more.

So it would be cool to know what things would you change if this was your project.

Thanks.

Here goes the photos:

PIR Sensor victim:


Hacked sensor:


Prototyping:
       arduino

       activating the 12V 1~A led strips, with a PNP transistor capable of handling up to 2 Amps and a NPN transistor to feed it with a 5V 200mA signal (see schematics)


Schematics:


Board:

Board etching and drilling






Soldered


Assembled:



Front panel:


Results:


The final result in the cabinet shelves


The Box (needs some painting):



The board has been working great for a couple of months, with no overheating and no over consumption :)

Hope you guys enjoy my litle beginner project.

email me if you want the schematics and source code (andrefbarata@gmail.com)
« Last Edit: September 26, 2012, 08:25:08 am by andrebarata »
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11880
  • Country: us
Re: My homebrew motion activated leds for glass shelves (beginer)
« Reply #1 on: September 25, 2012, 12:57:30 am »
So the fundamental question is, did it work? It seems like it did, so basically you did nothing wrong. Congratulations!  :)

The key thing with a project like this is not "What did you do wrong?", but "What would you do differently next time?"

You learn by experience, and your experience is what counts. Sure, maybe you could have done it more simply with fewer components (don't know this, just saying), or maybe you could have done some things more cheaply (again, just saying), but at the end of the day, if you are happy with it and it works, it is your creation and you can be proud of it. What's interesting for us, is what would you change if you did this again?

By the way, I think you are doing yourself a disservice if you call yourself a "beginner". If you can come up with a concept, design a solution, think about how to build it, then put it together and make it work--doing some programming, breadboarding and debugging along the way--then you are far ahead of many. Well done!
 

Offline Astroplio

  • Regular Contributor
  • *
  • Posts: 58
  • Country: gr
    • Welcome to myrobots
Re: My homebrew motion activated leds for glass shelves (beginer)
« Reply #2 on: September 25, 2012, 01:12:01 am »
Nice little project! Well done!
I have seen this product advertised here as well, and immediately though to get one and salvage the sensor  ;D
But how well does it perform sensor-wise ? My other choice is to get a sensor from a security system; I suspect these are better.

I have a couple of remarks/suggestions:

I noticed you used a BD238 that according to the datasheet is capable of 2A max and 25W @ 25 deg C.
Well depending on how long your LED strip is and how much power it needs, this little guy could get very hot, keep an eye on it and add a heatsink if necessary.
Also as a future modification you could PWM the LEDs and use a button for dimming the light.
And yeah you could probably use some attiny uC instead when you will make a final version of the board.

Again, good job, I like it!

EDIT: One more thing, you could have used here a 78L05 voltage regulator instead. It is the same as the 7805 but better suitable for smaller projects like this that don't use much power, and so you can save that one for a more demanding circuit.
« Last Edit: September 25, 2012, 01:26:45 am by Astroplio »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf