Holiday Lighting Control
Holiday Lighting Control

FloodBrain – 18 Channel 10W RGB LED Floodlight System

Here’s a few details on the flood light system I designed for our Halloween display this year.  This is the first real project I’ve ever done from scratch with a micro of any kind.  I’ve dabbled with AVRs on breadboards and built my fair share of kits, but had never designed or built anything that was my own.  Arduino? Have one and its never left the package.  I’ve been eyeing the Xmegas for a while and decided to go that route.  The Xmega8E5 is such a bargain for what you get.  Anyways, they say blinking LEDs are supposed to be your first project.  So this is my first blinky-flashy LED project… just taken a little further. FloodBrain!

Like any good little tinkerer, I needed to do some prototyping first.  I wanted to stay all SMT with 0603 discretes, so I laid out a DIP module for the Xmega and a comms module for my RS485 link.  Sent them off to oshpark and got some really purty purple boards back.  The Xmega module is a 600mil DIP with a 3.3V linear regulator, power status LED, programming header, and decoupling caps.  Basic reference implementation.  The 3.3V rail is sent to a pin as well to drive other parts if needed.   The comms module contains everything needed to do RS485 and breaks out to 4 pins (3.3v, GND, data in, data out).  This is the setup I used to write and test the firmware while waiting for my boards from Elecrow to show up by seahorse.

At the heart is an Atmel AVR Xmega8E5 chip which is controlling 6 10W RGB LED flood lights via RS485.  I included a header for a NRF24L01 module on the controller as well for future wireless integration.  Power is provided by a laptop power supply from the junk bin and is fed to 4 seperate buck converters.  One NCP3063 based 3.3V converter on the bottom of the controller for logic, and 3 eBay buck modules to feed the RGB rails (one buck per color).  The RGB bucks are dialed in around +2V above the forward voltage for the color they’re driving in order to give the current regulators proper headroom.  Everything is switched high side with P-Channel MOSFETs and sent out a 4 wire cable.

Of course, it all starts with this.  After dabbling with a few design packages, I settled on DipTrace.  Their free version is good for up to 300 pins and you can request a non-profit license which increases the pin count to 500.

 

My attempts to swoon the fab into v-scoring my 10×10 boards failed, however my metal bandsaw setup vertical made quick work of the panels.

This is all stuffed into a TA-200 case with the eBay buck modules mounted in the lid.  The first prototype (shown below) proved difficult to close.  For my other controllers, I just hot glued the modules into the lid instead of using standoffs and no problems yet!  These crimpers made quick work of building the connectors for the interconnects and pigtails.

I decided to try stencils on this project and got one from OSH Stencils.  Made life much easier, highly recommended!

To keep costs down and still have nice weather sealed lights, 10W White LED Floodlights were bought off eBay (~$8 each).  For quick prototyping, you get some from Amazon via Prime for a little more. These were stripped down to just the casing and fitted with 10W RGB LEDs from eBay.  The NSI50350 linear current regulator modules are housed in the back the lights.  24ga stranded CAT5 is used for cabling with pairs doubled up.  Each light has a 20-30′ cable with a 4 pin barrel connector for connection to the controller.

Ended up with a bunch of leftover 10W white LEDs and power supplies.  I see strobes in my future!

Now, to make it all magically work!! Thanks to the great community over at doityourselfchristmas.com, this part was easy.  A few guys over there developed a system called “Renard” a few years back for Christmas lighting control.  It utilizes PIC micros and RS485 feeds with a really straight forward protocol.  Armed with the Renard protocol description and the AVR136 appnote on software PWM, I fired up Atmel Studio and got to it.  It was my first time coding for the Xmega and thought I’d try ASF to speed things up.  Definitely bloats your code, but I haven’t run into any performance issues yet.  I’m running the Xmega at 32MHz with an interrupt driven 250Hz PWM routine controlling 18 channels.  The RS485 is polled and comes in at 115200.  Sequencing is done in Vixen 3 using Renard output. Planning to get the NRF24L01 wireless stuff going after the holidays and implement DMX as well. I’ll post the source for the firmware in the near future, just need to clean it up a little.

All said and done after 3 controllers, 12 lights, and hours of sequencing, you get this.  Looks much better in 720p!

And here’s a playlist on youtube with all of our 2013 Halloween sequences. Enjoy, Happy Halloween!

Leave a comment

Your email address will not be published. Required fields are marked *

29 thoughts on “FloodBrain – 18 Channel 10W RGB LED Floodlight System”