Lighting Controller :: Part 3

I got the components mounted on the main and remote boards. After much deliberation we dropped $12 per remote node to pick up some waterproof plastic ammo boxes to put the electronics in. These boxes will be out in the yard exposed to snow/rain. The boxes worked out very well, as the 3-gang outlet box fit nicely inside. Just drilled a hole in the bottom so the cords can go in/out.

Wiring up the outlets was pretty easy. Common wire was shared across them all, and the hot (black) wire was sourced from the circuit board (triac). I did not use any ground wire as the Christmas light strings don’t have ground. I also used a pretty light gauge wire as I will only be driving a single string of LED lights per outlet.

WP_20121202_003
WP_20121201_004
WP_20121201_002

Got everything wired up at the neighbors and everything worked well. Even with 100′ cat5 runs to some of the remote boxes everything worked well. We did have some flakeyness where it would lock up occasionally after a few hours. I upgraded the wallwart power supply to an old computer supply, and at the same time fixed a solder joint for the ground wire that looked ‘cold’. Not sure which of the two upgrades fixed the issue, but all is good now.

Below is a picture of the main controller board wired up on the workbench. Will post a video of the light show in the next update!

xmas controller

One thing you may notice is the FTDI controller connected via USB. This is due to the fact the Arduino Mega changed the way they emulate usb/serial. This new chip on the arduino is not identified by the software running the lighting show (Vixen). Using an older-style FTDI board remedied that situation…

2013 Christmas light controller :: Part 2

The controller portion of this project will be based off an Arduino Mega 2650.  Of that the intent is to use 30 of the available digital channels.  The target for 30 is arrived that for each remote board I can get 6 channels pretty easily.  That is driven by 8 wires in an rj-45, with 2 being used for power – leaving 6.  Based off how many lights we actually wanted to hang, we decided 5 groups of 6 channels should fit the bill.  Getting to the design on the Arduino shield I quickly discovered I was limited by the 4×3 inch area provided by the freeware version of Eagle PCB design.  In hindsight I should have just ponied up the credit card and purchased the hobbyist version.  I will probably end up getting that for next years’ inevitable growth.

With the working limitations I had, I needed to break the shield up into two pieces, as I could not fit everything in the 4×3 working area.  I ended up making one board for 18 channels, and another for 12.  Here is a zip with the eagle files.  I warn you in advance the .sch files are not pretty… 🙂  They are free to use for non-commercial purposes.

Overall its a pretty simple design.  Arduino pin goes high, opens the gate on an NPN transistor.  This grounds the led on board lighting it, as well as proving a ground leg for the remote board which turns on the remote LED and Optocoupler which in turn flips the triac on.  Simple daisy chain effect.

master board

Turning that into a working board was a bit trickier, as I couldn’t get it designed as a single sided board.  That mean I had to get the board aligned perfectly after milling one side and flipping it over.  After the first board which I got close but not quite (pictures below) I figured it out on the second board.  It turned out to be much easier than I was making it..

Of importance is the get the board aligned straight along the x axis.  I did this by routing a .1″ deep square the board fit in.  The square was oversized, I just wanted a straight x-axis line.  I then mounted the board against that axis with double-sided tape.  make sure there is 100% coverage on the board.. don’t leave tape gaps as board will flex down on z axis in those spots.  I then aligned the x/y corner and etched the bottom of the board, and drilled the bottom.  The gcode for these operations were created through pcbgcode which I wrote about in another article.

To get the top of the board, flip, re-tape, and align to the x axis.  Then jog the CNC to line up on a few selected holes from the previous drilling operation.  In eagle, hover your  mouse over these holes and you will see the x,y location.  Enter these in your machine, and validate a few other holes.  You should be good to go for etching on the top!

eagle xy

First attempt with trying to measure offsets for the front/back operations.  This created some offset holes, which had to be managed a bit with a dremel grinder.  Still a usable board.

offset2offset1

Second attempt using the eagle offsets described above, which came out very nice.

master1master2

Next update will show assembled boards, and hopefully a video of everything operational.