First Custom PCB for 5050 LEDs and Tilt Sensors
New Tilt Switches
First off, I've got some new tilt sensors (switches):
These babies are awesome. Cheap, mercury free, reliable, and each one detects any tilt beyond 45 degrees in either direction along one axis. So with two, I can detect tilt in all four directions, and even know which direction we're tipping.
Custom PCB
Next, I etched my first PCB! I used the laser printer + ironing method for transfer. It took me a couple of tries to figure out how to get a good transfer. (The secret: Take a good 10 minutes ironing with a lot pressure, making sure to press the edge of it the iron all over the board to catch any surface curvature.) If I was going to do this a few times, I'd go out and buy the $30 laminating machine from Harbor Freight and skip the ironing, but my long term plan is to order a batch professionally printed PCBs.
I verified the PCB by wiring it up with my 5V Arduino Mini Pro:
Mounting System
Next, I put together the first draft of my plan for packaging the light boxes up. The plan is to mount the PCB inside of a standard outlet box, right next to an AC outlet. Then I'll run a DC plug back inside of the box, to the PCB. (There were actually going to be two DC plugs, until I realized that the Arduino Mini Pro has a voltage regulator, and can run directly from 12VDC.. duh.) I didn't bother cutting my first PCB down to fit inside the box, but I will for the final version.
Next, I tried out my plan for mounting the LEDs: a PVC stick running through the diagonal of the box. Why the PVC? It suspends the LED in the middle of the box (better diffusing the light) while casting very little internal shadows. In the end, it's looking pretty good.
(Upside-down video courtesy of Vimeo... too lazy to fix...)
Up Next?
I've got a few things to fix in my PCB layout...
- Fix hole sizes--most were too small. That should be a relatively minor fix, but I've gotta figure out how to copy/edit library components properly.
- Add a 12VDC connection directly to the Arduino
- Consider eliminating the four pull-down resistors on the tilt switches. It turns out that the Arduino has pull-up resistors built in! Dunno why this wasn't pointed out in all of the button tutorials floating around.
Then on to the fun stuff. I need to try out the 2.4Ghz RF adaptors. It turns out, contrary to the specs on Amazon, you can't run these off of 5VDC, so I'm pretty sure I burned out the pair I had. Now that I have a couple of new adaptors, and couple of new 3.3V Arduino Pro Minis, I should be good to go.