Monday, 30 September 2013

Shelf Lighting Project

In my first post I briefly discussed a bedroom shelf lighting project that I was working on.  I have now completed the programming, wiring and installation of all the electronics that control the lights, so it's time to share some insights with the world.

Shortly after my last post I ran into one final challenge, I fried both the Arudino Uno and the Digispark that I was using.  I never quite figured out how that happened, but I am pretty sure that I put 12V power to the 5V power rail somehow. I used silicone to hold various PCB together to reduce the overall size of the assembly, and I suspect that I was a little bit too conservative between the 12V board that ran the lights and the 5V hub that powered the sensors.  

When I went to fire it up the first time the PIR motion sensor/Photoresistor, night light combination worked properly, but the IR remote system that I just finished, didn't do a thing.  After double checking the wiring, I ripped everything apart again and started to troubleshoot.  

I proceed to un-comment all the Serial.write() commands that I had left in the code, but when I hit the upload button the dreaded avrdude stk500_getsync() not in sync resp=0x00 error flashed up in red in the debug window.  I followed all the instructions that I could find.  Nothing worked.

The Digispark had a similar problem.  The computer/IDE wouldn't recognize it when it was plugged in.  It wouldn't send commands via serial like it did before.  The power LED would turn on, but that's it.

I gave up and loaded the working sketches on to a spare set of micro controllers.  After double checking all the solder joints and testing for connectivity between every possible combination of 12V and 5V leads, I decided it was safe to plug it back in.  Luckily it worked just fine.

Here's the final sketch.


Video and pictures to follow tomorrow.

No comments:

Post a Comment