I2C-addressable RGB...
 
Notifications
Clear all

I2C-addressable RGB LED Project

144 Posts
30 Users
0 Reactions
107.7 K Views
Posts: 597
Topic starter
(@entropy)
Honorable Member
Joined: 19 years ago
[#9903]

I've been mentioning a desire to do this for a few weeks now, but I now have a prototype up and running.

I'm working on an approach to individually addressable RGB LEDs. There are a couple of similar projects out there:

MPH/JEC's current project - Based on what I have read, depends too much on nodes sourced from an unnamed Asian manufacturer who refuses to even document the protocol used (they had to reverse engineer it!)

MPH/JEC's last project (the pixels) - Each pixel was DMX-aware, this drives cost quite a bit.

Matt Edwards' project at http://doityourselfchristmas.com/forums/showthread.php?p=80250#post80250 - Similar in concept to MPH/JEC's original pixels, but it was AVR-based. Like the original pixels, they were DMX-aware, driving cost up quite a bit. The RS485 receivers I have seen cost nearly as much as my entire parts BOM as it currently stands.

Parts used:
Atmel ATTiny85 AVR - Final design will be a Tiny25.
RGB LED - The unit I currently have is common cathode, final design will be common anode. (My order of 50 units didn't arrive on time, I had to pay $5 for a single unit in a local store today!)
Three current limiting resistors for the LED
One pullup resistor for the Tiny's RST line
Power supply bypass capacitor

The units respond to data sent over I2C. Each unit is sent three bytes at its I2C address - one for each color. I2C means that the nodes do not need any additional interface hardware. (Somewhat similar to MPH/JEC's Asian nodes)

I currently have it prototyped on a breadboard. I only have a single one at the moment, additional units probably won't happen until after the new year (no more RGB LEDs).

Right now I'm driving the I2C bus with a PJRC Teensy loaded with the Micropendous Serial-to-USB firmware:
http://www.pjrc.com/teensy/
http://code.google.com/p/micropendous/wiki/USBVirtualSerial_I2C

Eventual goal would be a DMX-to-I2C converter.

I2C only allows 127 nodes per chain, however since a DMX universe could only control around 170-180 nodes (brain is fried after working this all da...), this isn't too much of a limitation.

The firmware is GPL licensed. See the README and comments for known issues with the code. Known issues with the hardware are not documented in this file, but I have mentioned some in subsequent posts. It has been tested on an ATTiny85, but should work without any modifications other than the Makefile and the avrdude programming command in an ATTiny25.

Included is a small Python test script for those who have a USB AVR to play with.

Update: Demo of two nodes on breadboard uploaded to YouTube, see http://doityourselfchristmas.com/forums/showpost.php?p=100499&postcount=46

Firmware update released. It is not attached here, all future firmware updates will be in my github repository for this project at http://github.com/Entropy512/I2C_RGB


143 Replies
David_AVD
Posts: 991
(@david-avd)
Noble Member
Joined: 17 years ago

Sounds interesting. What's the expected cable distance limitation using I2C ?


Reply
Posts: 597
Topic starter
(@entropy)
Honorable Member
Joined: 19 years ago

Oh, and I realize there are some challenges yet to be solved:
1) How to set the address of each node - It's not based on physical location in a string. I'm going to move the address from a #define to EEPROM soon, however probably not before I post the first release of the source.
2) Final physical packaging. The cheapest approach (see the Asian nodes - solder wires to boards and then encapsulate the whole shebang) is not the most maintainable, especially with issue 1) above. However, if the maintainability hit can be tolerated, there are plenty of ways to goop up a circuit board. The stuff my family is using to repair their shoes seems like a good candidate and it's cheap - however it may prove to be too stiff when cured.


Reply
Posts: 597
Topic starter
(@entropy)
Honorable Member
Joined: 19 years ago
David_AVD wrote:Sounds interesting. What's the expected cable distance limitation using I2C ?

I need to look into that. Keep in mind that power injection proved to be a pretty big issue for MPH/JEC's node strands and not the bus length. The idea here is for pretty densely packed node strands anyway - isolated nodes are better suited to DMX and the like.


Reply
Posts: 44
(@qpm01-yahoo-com)
Trusted Member
Joined: 18 years ago

What do you guess the price per node will be in the quantities we would likely use for holiday displays?

jmk


Reply
Page 1 / 29
Share: