Saturday, June 28, 2014

Project: LedBlaster 8000

This is one of my active projects at the moment. I started it around december of 2013 after reading an awesome article on about a DIY light controller. I designed my own boards on the same month and ordered them from IteadStudio and made a parts list and ordered them from Digikey. We'll continue this story later in the post.

It's a lighting controller for RGB-leds to be used with DMX lights software like Freestyler or with christmas lighting software like Vixen 3. This project was based on Shelby Merrick's original project* for the same thing, but I did some changes here and there. For example, Shelby's original Floodbrain board was 18-channel controller, which you could use to control 6 RGB-leds, but mine has 24 channels, which is good for 8 RGB-leds.

(*Link to Shelby Merrick's original controller project)

First populated prototype version pcb

The layouts for each channels drivers and the general layout overall are pretty much lifted straight of Merrick's design but I changed the µC from the smaller Xmega that he used to a larger pin count one. This was my first time using a Xmega series chip from Atmel. Everything before this has been just ATtiny and ATmega chips with their ISP programming interfaces and familiar innards. I also used different peripheral ICs for the RS485 communications and regulation for 5 volts for the RS485 chip and then 3,3 volts for the Xmega µC and the optional nRF24L01 2,4 GHz wireless receiver, which I have not ordered and tested at all, but it does have a place for it (not super sure how well it actually fits *shrugs).

USB to RS485 interface for the computer, connected via ethernet cable to the controller

I wanted to make my controller DMX512 standard compatible, so I used the RS485 standard for the logic level communication between the computer and controller. The DMX512 standard does have a wiring standard for the RJ-45 connector and the board complies to it.

Super cheap USB->RS485 converter
The nice thing about the USB->RS485 board is super cheap, 10 $ and it is first a FTDI FT232RL chip which the computer sees as a COM port and the chip then converts it to the RS232 standard, which goes directly to the input of the RS485 chip, which then generates the differential lines and Wham! Away go your bits down the line. So you can use it the same way as the Arduino's serial monitor for example.

Small breakout board into a RJ45 connector from the RS485 terminals

Continuing the story from the top. I had ordered the boards and the components, and I finally got all the components on my worktable. I did put it together quite soon except for a little detail, which was I had ordered some components from a smaller supplier Futurlec, which normally is quite a nice little electronics shop. You can get things much cheaper than ordering small amounts from a bighouse supplier, Digikey. I don't know what went wrong, maybe they had a new intern or something, but they sent me 2 wrong components. The 3,3 volt regulator LM1086-3.3 was LM1086-5.0 regulator, which is for 5 volts and I already had 5 volt regulators 7805 bought in bulk in my parts cabinet. The second thing they got wrong was the microcontroller, instead of the Xmega16D4, they sent me AT!mega!328. I even did not check the actual chip's model before I had soldered it on the board and then I checked all the components and discovered that the regulator was wrong too.

Long story short, I was pissed.

Later (couple months) I was ordering some components from Digikey again and added the correct parts on my order (not to say Digikey doesn't make mistakes, because they do, but maybe more on that on another project post ). Then after I had soldered the correct components in and I'm beginning to start on the programming side of things. I remember that the Xmegas don't use the same ISP programming as the other 8-bit µCs from atmel, so I needed to buy a new programmer for that and I ended up buying the AVR-ISP-MK2, which should fill in all my programming needs for the AVR-family components. The other I like about is that I can use it from Atmel Studio directly, whereas before I used an usbasp programmer and I compiled the projects first in Atmel Studio and then fetched the new .hex file, which I then moved onto my centralised .hex folder after which I used AVRDUDE to actually program the µC.

Credited Merrick as the original board designer, cheers mate! The jumper on the bottom there is used to change between the DMX protocol and generic serial communication (USART).

Also if you're wondering why the P-channel fets on the very edge of the board next to the molex headers are on a weird angle. Well this was my first time using P-channel fets and I had connected them the wrong way on Eagle's schematic side and in the end I had to desolder all of them, bend the legs to the package's top side and mount them upside down on that weird angle, but hey. It works :)

Here are the floodlight enclosures (same ones as Merrick) that I used. Of course I had to change the white led diodes into RGB ones and do some rewiring inside the enclosure. I also made lens holders for the reflector and lens to focus the light into more narrow area. The collimator and lens aren't exaactly made for the 10 watt diode that I use, the diode is smaller than the intended size meant for the collimator and lens, but it does focus it.

Here is the CCR (constant current regulator) board that I use to limit the current to a maximum of 350 mA and I designed the board to be a bit smaller the Merrick's. The tape on the board is to protect the solder joints from shorting on the case. So they burn off any extra current that would otherwise flow through as heat.

Nice and simple

And if you're wondering what the lens holder is made out of, it's cardboard.

Here you can see the project box where the controller will reside in and connected to the board next to the RJ45 connectors are super cheap, switching mode buck converters, which are used to lower the power supply's higher voltage to correct voltage for each colors bus' forward voltage. So each of the converters supply power for only one color (RGB), which all have different forward voltages.

I use just a general laptop power supply at 19 volts (changeable), which is then bucked down by the converters.

Simple DC plug and socket connection between the power supply and the controller

The 1 £ buck converter from ebay.

All packed inside

Looks kinda neat without any wires, doesn't it? But the two big holes on the front are there to take all the RGB leds' wiring through and the power supply's DC connector and at the side you can see the RJ45s for communication and daisy chaining.

There has been a lot of new things that I have learned during this project.
I had never used an Xmega µC,
never used an device with a PDI programming interface,
never used an USART (arduino doesn't count),
never had pcbs made somewhere else,
never done anything with RS485,
never done anything with DMX512,
never done a project on this scale.

Those are couple of the biggest new things I encountered during this project and I am now updating the design of the board, as you could see there were some jumper cables and voltage dividers in there.

No comments:

Post a Comment