Chromation systems 24-channel-usb-connected-led-controller-v3
1. 24 Channel USB Connected LED Controller, upto 1A per Channel
by ChromationSystems on February 9, 2011
Author:ChromationSystems www.chromationsystems.com
Designing electronic creations from microcontrollers, LEDs and anything else I can pull out of a dumpster and make use of. Check my Profile
Intro: 24 Channel USB Connected LED Controller, upto 1A per Channel
This device is designed to be a versatile high-current LED controller, with the ability to sink or/and source currents up to 1A per channel with dissipation of up to 2.5w per
channel. The various jumpers and transistor placement allow the device to control many different types of LED configurations with LED voltages of up to 36v.
Easily controls 5mm , 1w, 3w, 3w RGB, 5w RGB, 12v RGB LED lightstrip, 12v solid color light strip, common anode RGB LEDs, common cathode RGB LEDs. Any
combination of LEDs in parallel/series. Whatever kind/wattage/configuration can be made to work, to a max of 1A per channel or 2.5w dissipation.
A PIC18F4550 controls 24 high-current darlington transistors. The PIC is ready for USB communication and using Microchip's Library there is a multitude of USB
connected devices can be made. From a simple emulated serial port, keyboard, mouse, HID, MIDI Devices, Audio Devices, and more. The available premium firmware
allows the device to interact with the ColorMotion computer software, to create and upload patterns and settings to the device.
There are 4 pins left to use for other purposes, such as AdC, more transistors/mosfets, shift register whatever is needed. Accessed via the 6-pin polarized header, which
can be used to connect to RA0, RA1, RA2, RA3, V+ and V-.ase. It accepts data from a PC/MAC/Linux over emulated serial port to the circuit board which outputs 8-bit
PWM for all 24 outputs.
There are kits available in the Chromation Systems Store and all the files to recreate this project is in the ZIP file below.
Previous Version Assembly Instructions, Datasheet, Updates and More Info Can Be on the Main Website
The zip includes PCB diagram, Schematic Layout, and drill files. It is a single sided version of this circuit, so it is very DIY PCB friendly.
The 48 Channel Mono / 16 Channel RGB LED Controller , which is also USB connected, and is made for lower current LEDs is now available.
Image Notes
1. Here the v1 hardware controlling a 3w white LED, a 5mm blue LED, and a few
sections of 12v RGB Lightstrip. All from the same controller.
http://www.instructables.com/id/24-Channel-USB-Connected-LED-Controller-upto-1A-p/
2. File Downloads
ChromationSystems-24ChanUSB_v1-1-eagle.zip (80 KB)
[NOTE: When saving, if you see .tmp as the file ext, rename it to 'ChromationSystems-24ChanUSB_v1-1-eagle.zip']
ChromationSystems-24Chan-Project-Files-v3.zip (4 MB)
[NOTE: When saving, if you see .tmp as the file ext, rename it to 'ChromationSystems-24Chan-Project-Files-v3.zip']
Step 1: Supplies
Electronics: Purchase a Kit from The Store or Purchase a PIC or PCB separate.
18F4550, DIP Buy One
Circuit Board, v.3 Buy One
24x MPSW45AG Darlington Transistors or similar
USB Type-B jack, board mount
20 mhz, version 3 can use any type, v1 & v2 require a series oscillator
10kohm 1/4w resistor
24x 1k ohm 1/6w resistor, value may vary depending on transistor
220nF disc capacitor, VUSB
2x 0.1uf disc capacitor
2x 1uF electrolytic capacitor
2x 22 pF disc capacitor
5 pin ICSP header, optional
6x 4-position screw down terminal blocks
2-pin header, KK6410, use is optional
2-pin housing, KK6471, use is optional
6-pin header, KK6410, use is optional
6-pin housing, KK6471, use is optional
8 wire crimps for housings
7805, 5v regulator, optional, can't be used in most cases
Button assembly parts: Momentary Push button, perfboard, ribbon cable, and 10kohm resistor
Tools:
Soldering Iron
Diagonal Cutters
Wire Strippers
Flat screw driver for terminals
Multi meter
Other: Not included with the kit
USB Type A to Type B cable
LEDs or LED Strip, Find Some In The Store
Resistors for the LEDs
For controlling lower current LEDs over USB, please view 48 Channel Mono / 16 Channel RGB LED Controller
http://www.instructables.com/id/24-Channel-USB-Connected-LED-Controller-upto-1A-p/
3. Step 2: Resistors
Resistors:
Start with the transistor base resistors, R1-R4 are all 1k ohm(Brown - Black - Red)
R25 is a 10k ohm (Brown - Black - Orange) pull-up for MCLR
R26 and R27 are 22 ohm (Red - Red - Black) for the USB Data lines, these must be crossed on version 3 PCBs, one on the top side, and one on the bottom side
of the PCB. See Images.
http://www.instructables.com/id/24-Channel-USB-Connected-LED-Controller-upto-1A-p/
4. Step 3: Select Jumpers
This board features jumpers to select if the transistors will be sinking or sourcing current. The board's transistors are laid out with 16 on one side and 8 on the other. Each
side can be set to sink or source voltage based on the SEL jumpers and the position of the transistors. SELx to NEGx for sink, SELx to POSx for source.
Set all transistors to sink:
SEL1 to NEG1
SEL2 to NEG2
SEL3 to NEG3
SEL4 to NEG4
SEL5 to NEG5
SEL6 to NEG6
Set all transistors source:
SEL1 to POS1
SEL2 to POS2
SEL3 to POS3
SEL4 to POS4
SEL5 to POS5
SEL6 to POS6
Set 16(Output1-16) to Sink and 8(Output 17-24) to Source
SEL1 to NEG1
http://www.instructables.com/id/24-Channel-USB-Connected-LED-Controller-upto-1A-p/
5. SEL2 to POS2
SEL3 to POS3
SEL4 to POS4
SEL5 to NEG5
SEL6 to NEG6
See datasheet for more jumper selections.
*Note that each side has 3 selection points, so if it was needed, the main trace could be cut at any point and transistors on the same side could be mixed sink/source.
http://www.instructables.com/id/24-Channel-USB-Connected-LED-Controller-upto-1A-p/
6. Step 4: Oscillator, Disc Capacitors
Oscillator:
Oscillator, OSC position, goes in either way
Disc Capacitors:
C1 - 220nF, labeled 224M, goes in either way
C2 & C3 are installed later, leave them out for now.
C4 & C5 - 0.1uF, labeled 104, go in either way
C6 & C7 - 22 pF, labeled 224, goes in either way
Socket:
Line the notch on the end of the socket up with the notch in the top-side drawing.
Carefully line up the pins with the holes on one row of the socket then hinge it down into the adjacent row of holes.
Check to make sure all the pins are lined up, then press it in firmly.
http://www.instructables.com/id/24-Channel-USB-Connected-LED-Controller-upto-1A-p/
7. Step 5: Transistors
Transistors:
*For transistors that are sinking current, the transistors are placed as seen on the top-side illustration. Transistor Pin 1(Collector) goes to hole labeled 1, Transistor Pin
2(Base) goes to hole 2, Transistor Pin 3(Emitter) goes to hole 3.
*For transistors that are sourcing current. The transistors are placed opposite of the top-side illustration. Transistor Pin 1(Collector) goes to hole labeled 3, Transistor Pin
2(Base) goes to hole 2, Transistor Pin 3(Emitter) goes to hole 1.
Start by taking a transistor and a needled nose pliers.
Figure out what way the transistor's center pin(Base) needs to be bent. Depends on sink/source configuration.
Grab the center pin with the needle nose pliers and bend it out a bit as seen in the images below.
Starting with T1, insert the transistor into its proper holes
Work your way around the board and solder in all 24 Transistors.
http://www.instructables.com/id/24-Channel-USB-Connected-LED-Controller-upto-1A-p/
8. Step 6: Voltage Regulator & Electrolytics
7805 Voltage Regulator: A standard 7805, without a heatsink, cannot regulate the current that the device draws. If a 5 volt input is available the 7805 position must be
jumped and soldered closed. For voltages greater than 5v the 7805 and a good sized heatsink can be used or a DC/DC Step Down Converter .
5v Input:
Connect the two outside holes with a length of 22ga solid strand wire, make sure it doesn't touch the middle solder pad.
Solder it on
Fill in the center hole with solder.
5v+ Input with 7805:
Install the 7805 as pictured.
Attach your heatsink with some heatsink paste.
Other Method: If you need assistance deciding or figuring out what to do, please Contact Us or PM.
Electrolytic Capacitors:
C2 & C3 are polarized and must be placed in correctly. The line going down the side indicates the negative lead, both the negative leads are facing inwards,
towards each other.
http://www.instructables.com/id/24-Channel-USB-Connected-LED-Controller-upto-1A-p/
9. Step 7: Terminal Blocks, USB Jack, & Headers
Terminals:
When installing the terminal blocks make sure the slot for the wire is facing outward.
The terminal blocks have connectors on the ends used to connect them together. Line up the tab with a notch in another one and slide them to attach. A string of
16 will be needed for one row, and 2 sets of 4 for the other.
USB Jack/Receptacle:
Only fits in one way, solder the case tabs first, make sure it is seated tight to the board and solder the 4 other pins.
Headers:
Start by inserting the 5-pin ICSP Header into its position and soldering securly. This is used to reprogram the PIC, it is optional.
Insert the 6-pin polarized header, it can go in with the ramp inwards or outwards, if any other hardware will be connected make sure it will be compatible. This is
used for external connections and interfacing, and is optional.
Insert the 2-pin Power Header, put it in what ever way will work best. Solder it in.
For attaching wires with the Headers and Housings, See This Webpage for details and instructions.
http://www.instructables.com/id/24-Channel-USB-Connected-LED-Controller-upto-1A-p/
11. Step 8: Inputs/Additional Outputs
Headers and Housings:
Please See This Webpage for Instructions and Details on Using the Headers, Housings and Crimps to connect wires to the PCB.
RA0, RA1, RA2 and RA3 run directly to the PIC pins they can be used for switch inputs, AdC Input, or even for additional outputs, such as MOSFETs for multiplexing or a
shift register.
The 6-pin header and housing can be used to attach an external circuit into the main controller. There are the 4 input/output pins in addition to +5v and GND.
Button Connection: All kits come with a single push button assembly, on perforated board with a pull up resistor. Use of the EXTHEADER header and housing is
optional, it can be left off and the button(s) soldered directly to the PCB.
Center the momentary push button on the perforated board.
Bend the leads in the opposite directions
Position the 10kohm resistor so it can be attached to one of the button leads.
Strip the 3 strand ribbon cable
The ribbon cable connects RA3 to the unconnected button lead, +5v connects to a button lead and a lead of the 10kohm resistor, GND connects to the other
unconnected lead of the 10kohm resistor.
Trim the ribbon cable to length.
Either solder the wires to the proper points on EXTHEADER or use the crimps and housing to connect the wires to the EXTHEADER header.
Optionally, Hot glue the wires down to the perforated board and a drop of hot glue where the button wires attach to the PCB.
http://www.instructables.com/id/24-Channel-USB-Connected-LED-Controller-upto-1A-p/
13. Step 9: Final Testing
Look it Over for Errors:
Go over the parts layout and make sure all the parts are in their correct position.
Flip the board over and from the bottom, under good light, look over every solder joint. Look for solder bridges, dull solder joints, drips or any thing else that could
cause a short or error.
If you are not using a 5v input voltage, apply voltage to the device, through your choice voltage regulator, and check around with a multimeter to ensure the device
is getting the correct 5 volts.
Once any issues are found and fixed continue.
Install the PIC:
Find the dot on the top side of the PIC, that indicates Pin 1. Line the dot end up with the notch on the socket, line up all the pins in the socket, and press it in
carefully. Watch for any pins that didn't line up as they could break off and wreck the PIC.
Power it Up:
Apply power to the device.
If you purchased a kit the PIC will come with firmware already flashed to it, so it should be ready to use.
Or if you are using a blank PIC, use the ICSP header to connect your programmer, it should detect the device and flash your firmware.
Test It:
Depending on your devices firmware, it may be ready to use now.
To test that the device is running, example ColorMotion Compatible, use a LED, resistor and some alligator clips to connect a LED to an Output(Connection
depends on the LED and Controllers sink/source configuration) The LED should cycle or flash on and off, depending on what setting the device is playing.
Step 10: Firmware Options and Explanation
Available in the ZIP file on Step 1 are a few different firmware options. The Full Featured ColorMotion Compatible Firmware must be purchased from the Store, but the
demo version is included and has most of the same features, but has full Live Mode compatibility.
Project 2:
ColorMotion Compatible Demo Firmware- 18f4550-ColorMotion-Demo-v1.hex
This firmware is a demonstration version. All features of the Full ColorMotion firmware work except for the uploading and saving of user created patterns and settings.
Patterns can still be created and previewed(Demo Button) and will run till the device is powered down. Live communication from a computer to device is fully functional.
There are several patterns included in the Demo Firmware, they can not be changed. The full version of the firmware is available from the The Store .
Processing Application - RGB Demo Link to Webpage
The included application, including source code, can be found in the Project files on step 1. The program is used to demonstrate how to control a compatible ColorMotion
device using Live Mode communication over USB. Using this software, colors can be selected on a computer and sent to the device to display. The color select options
are Sliders, which select Black -> White -> Red -> Green -> Blue -> Purple, or there is an option to open a gradient image, then use the mouse to select the colors to
display. There is a Color Cycle button which starts sending the device data that cycles it through all the colors. And lastly there are buttons, Settings Up and Settings
Down, that can cycle through the patterns that have been uploaded to the device.
The code is well commented and can be used to create new compatible software or tweak to do what you require.
Project 1:
USB Communication, Old Processing Application - This is obsolete but still included.
Included is an application written in Processing, quite a simple language to learn, it is Java based, so works on most OS Platforms. Included is versions that should work
on Windows, Linux and Mac.
http://www.instructables.com/id/24-Channel-USB-Connected-LED-Controller-upto-1A-p/
14. It is just 24 sliders, that are labeled 0 - 100, position the sliders then press Spacebar to send the data to the circuit board. It converts the number to 0 - 255 and sends it to
be used in the PWM routine. If more or less data bytes are sent, the data used in the PWM, will be out of alignment and the circuit will have to be reset.
Sliders are provided by the G4p library
Feel free to use any of my code for other projects, but please credit if it is released.
Firmware: 18F4550-24chanusb.hex
The firmware included here, written in C18, outputs 8-bit PWM to all 24 channels with the data sent from a Processing application. USB Communication is set up to go to
the high interrupt and the simple PWM sequence is done in software in the main() function. But could easily be moved to an interrupt routine.
The project was originally in Microchip's Solutions library, under USB Device - CDC - Serial Emulator. So there are lots of comments and un-needed code still in it. The
project already had setup files for the PICDEM USB board, which uses a 18F4550, so it was a matter of changing some lines of code and project setup.
In the Project folder I have included all the USB headers and Includes with in it, otherwise it expects them to be in the default folder, which gets confusing. So it should
compile as is after changing the directories.(above)
Converting Microchip Solutions to work with the 24 Channel USB LED Controller, from Microchip's Solutions Install folder: Any PICDEM Sample Code or
Projects can be converted to work with this controller.
Open Project -> Build Options -> Project -> Directories
Add ../.. and ../../.. to Include & Library Search Path
Change include search paths to YourMicrochipDirectoryMCC18h
Change Library search Path to YourMicrochipDirectoryMCC18lib
Should compile then.
Converting Microchip solutions to work with the 24 Channel USB LED Controller from a different folder:
Open USB Device - CDC - Serial Emulator - C18 - PICDEM FSUSB.mcp
Open Project -> Build Options -> Project -> Directories
Add ../.. and ../../.. to Include & Library Search Path
Change include search paths to YourMicrochipDirectoryMCC18h
Change Library search Path to YourMicrochipDirectoryMCC18lib
Copy the USB folder from YourDirectory/Microchip/microchip solutions/microchip/include to your project directory.
Copy compiler.h from YourDirectory/Microchip/microchip solutions/microchip/include to your project directory.
on Hardware Profile - PICDEM USB.h comment out #define PROGRAMMABLE_WITH_USB_HID_BOOTLOADER
http://www.instructables.com/id/24-Channel-USB-Connected-LED-Controller-upto-1A-p/
15. File Downloads
HardwareProfile - ChromSys USB.zip (2 KB)
[NOTE: When saving, if you see .tmp as the file ext, rename it to 'HardwareProfile - ChromSys USB.zip']
Step 11: Hooking Up LEDs
LED Types:
12v RGB LED Light Strip, usually common anode based, set all outputs to sink, Colors go into the Outputs and the 12v+ is wired to voltage.
Single Color 12v LED Light Strip, Outputs set to sink or source, sink is preferred, wired from the voltage source to the output.
5mm LEDs, outputs set to sink or source depending on needs. Each LED, or set of LEDs in series, are wired with a current limiting resistor in series.
1w or 3w LED, outputs can be set to sink or source, with a properly rated resistor in series with the LED.
Other, there are other options of types and configurations, Contact Us or Send a PM with any questions.
Hooking the various configurations of LEDs up to to the circuit board is quite easy.
If a transistor is setup to sink current, the LED's cathode is connected to the terminal block.
And the LED's anode should then be hooked to the voltage source with a properly rated resistor in series.
Do not hook any LEDs up without a resistor in series with it, otherwise it will be destroyed as there is no onboard current regulation for the outputs.
When hooking up large amounts of high-current LEDs the select jumpers should be wired directly to the voltage input, so not as much current is ran through the PCB
traces.
http://www.instructables.com/id/24-Channel-USB-Connected-LED-Controller-upto-1A-p/
16. Image Notes
1. Here the v1 hardware controlling a 3w white LED, a 5mm blue LED, and a few
sections of 12v RGB Lightstrip. All from the same controller.
http://www.instructables.com/id/24-Channel-USB-Connected-LED-Controller-upto-1A-p/
17. Step 12: Future Designs/Projects
This is a very versatile controller and could be used for many different projects, such as,
RGB Tube Light
Control LEDs from a computer
LED Multiplex controller
3w or 1w LED array, PCB could do a 4x4 array directly, but a 8x16 LED Array with multiplexing
PC Case lights, as its USB connected, could even hook certain types of PC fans to an LED output, with some additional protection circuitry.
Cabinet Lights
There are kits for this and many other projects Available In The Store
The project files, including the files needed to make a PCB are on Step 1.
Thanks for reading and please check My Profile for more of my Projects and stay tuned for some great projects utilizing this circuit.
Image Notes Image Notes
1. Crested Gecko riding the rainbow 1. Here the v1 hardware controlling a 3w white LED, a 5mm blue LED, and a few
sections of 12v RGB Lightstrip. All from the same controller.
http://www.instructables.com/id/24-Channel-USB-Connected-LED-Controller-upto-1A-p/