Colorduino

Beta Board Preview

The nice folks at iTead Studio were kind enough to send me a beta of their new LED matrix controller called Colorduino.

Colorduino running the Plasma demo.

The Colorduino takes a lot of the difficulty out of of controlling an RGB LED matrix, something I was stumped with as a beginner in electronics. It’s built around the ATmega328 CPU, the heart of the Arduino platform, and builds on previous matrix controllers like the Rainbowduino from Seeed Studio. iTead have made sure the Colorduino is pin compatible with the Rainbowduino so it can slot in with existing projects, but have upped the specifications to get better performance.

The Colorduino board

One of the Colorduino’s main features is that it uses a DM163 LED driver chip to provide hardware PWM. This allows each Red Green and Blue channel to have an 8 bit colour depth, resulting in a theoretical 16 million possible colours per pixel! As a comparison the Rainbowduino uses software PCM to achieve a 4 bit colour depth – that’s 4096 colours per pixel (which can be pushed to 5 bit firmware tweaks). Whether all those 16 millions colours are perceptible to the human eye is another question. iTead say their approach provides more accurate colour control than other boards.

The DM163 chip also provides 3 x 6bit correction registers, useful for calibrating the respective brightness of each color channel in software. This can be used for example to adjust the white balance of the display.

Colorduino (left) and Rainbowduino

Colorduino and LED matrix from Cool Components

The physical board is a little smaller than an LED matrix and is designed so multiple Colorduino’s can be plugged together to make larger grids of LED matrices. Data is passed between boards using the I2C protocol. I2C is well supported on the Arduino and there is lots of demo code out there to get you started.

Power to the board is either via pin headers or 2 sets of mini screw terminals. A slide switch selects between the two. Various Pins are brought out the edge of the board including RX, TX and DTS, which can be used to reprogram the onboard ATmega chip, and SCA and SCL for I2C communication. A green LED on the front of the board indicates power, although it is mostly obscured as soon as you plug the matrix panel in. A schematic of the board and demo code is available here.

Colorduino rear showing pin connections.

iTead have taken on Rainbowduino’s “Plug and Shine” ethos, making Colorduino ideal for beginners. I found setup really simple: after plugging in the LED matrix panel to the Colorduino, I applied 5v power to the board and was presented with the demo sketch that’s installed by default on the onboard ATmega CPU. This runs through a variety of patterns as seen in this video. Please note the flickering is just on the video, the display is rock solid and very very bright!

As mentioned iTead provide the demo sketch on their site to tinker with. It’s nicely set out and commented so you can easily see what each bit does. There are functions to draw pixels, print text or fill the screen with a certain colour. If you are a beginner it’s quite satsifying and it won’t take long before you are tweaking the arrays of pixel data to draw your own pictures.

I also discovered Lincomatic’s rather excellent blog. He has re-worked the demo code into a library making it even easier to use. Get it here as a download.

After you’ve tweaked the demo sketch you’ll want to upload it to the Colorduino to see your changes. There is no USB port on the Colorduino, so you can’t just plug it into a PC like an Arduino, however if you have a spare Arduino lying around there is a trick you can do.

Simply remove the ATmega chip from your Arduino and connect the Colorduino to the Arduino board as follows.

  • Arduino RX to Colorduino RX
  • Arduino TX to Colorduino TX
  • Arduino Reset to Colorduino DTR
  • Arduino +5v and GND to Colorduino +5v and GND.

This essentially turns the Arduino into USB to serial programmer. Then you can upload your sketch to the Colorduino using the Arduino software as normal.

Alternatively you could also use something like a USBtinyISP, as the Colorduino has an ICSP header port too.

As iTead use the DM163 LED controller to do the hard work of driving the display, there are plenty of resources left over on the onboard ATmega CPU for the taking. My demo board came with an ATmega 168, but I understand the final boards will come witn a 328 which has 32K RAM to play with. The demo code only takes up 4K and could easily be slimmed down.

I had a go at adding I2C support, and managed to run the rather cool Plasma Demo over I2C, sending data from an Arduino acting as master – see video below. The code is very basic but if you want to try it it’s on now up on Google code here.

The ability to use I2C really expands the use of boards like Colorduino and Rainbowduino. Although it doesn’t make so much use of the onboard resources, you are no longer limited by the onboard storage and processing of the ATmega CPU. For example I have an SD shield for my Arduino  and was able to send graphics from a 1 Gig SD card over I2C to the Colorduino.  You could also be clever and use something like Processing to stream live data from a laptop. Of course all this really comes into it’s own when you combine a row of Colorduino’s all plugged together. Mini video wall anyone?

Overall impressions

As a prototype the board is a little rough round the edges which is to be expected. The extra colour depth and 6 bit adjustment features the DM163 provide are all big plus points for me, along with the freeing up of CPU resources for other tasks. All in all this makes the Colordiono stand out as an attractive alternative to the Rainbowduino.

64 thoughts on “Colorduino

  1. Great article. A couple of practical questions though:

    1) Do you have a part number for the 8×8 color led matrix? there seems to be zillions of them!

    2) Do I just plug in the colorduino into my PC using the same USB cable. I could not quite grock your reply.

    • Hey Owen, sorry for the delay.

      You can get the LEDmatrix from itead’s store. Model: MAT001. Seeed Studio also sell them and I have seen them on eBay.
      http://iteadstudio.com/store/index.php?main_page=product_info&cPath=35_37&products_id=189

      The Colorduino can’t be plugged direct into a USB port, although USB supplies the correct voltage (5v) for it to work.

      To get it to light up and run the demo code you just need a 5 volt supply, like a wall-wart power adapter. If you want to reprogram it, say using the Arduino code editor, you need to pick up a USB to serial cable.

      Hope this helps.
      Nick

      • Hi Jeff, sent you the link. The code is now on Google code and there is also a link in the text above.

        Nick

      • Hi NIck, I need a Conway’s Game of Life code which work on dual 8×8 matrix using I2C.
        Borads are colorduino v1.3 with two 8×8 matrix.If you could provide me the code,I will be really generous. I need it before 3rd MAY. cheers . my second email is maxiii2009@gmail.com

      • Sorry, but I barely have time for my own projects, let alone other peoples! Maybe start doing some research or ask on the arduino forum

  2. Hi Nick,

    Would it be possible to post your I2C code? Im looking at drving 8 of these via I2C for a medical reseach project im helping out with.

    Mat

      • Hi!! can i have the i2C code as well??? please!! i have a project called pick to light and i need to control a lot of LED.

  3. Hey people, great project!
    I bought an arduino + the color shield v1.1 + rgb square led matrix, and tried to make it work but couldn’t!
    Do you know how to addapt this project to it?
    Thanks,
    Felipe

  4. Hey, Did the IC2 code ever make it to public domain? Either in your form or integrated into Lincomatic’s library? I’m trying to make a spectrum analyser, and would like to drive my colorduino with my UNO.

    Thanks
    Scott

  5. What (board) should I use to connect 4 8×8 color dot matrixes like those in the video? The result should be a 16×16 matrix… Can this be done?

    Thanks.

    • You would have to build something yourself with driver IC’s I think, or have a look on ebay to see if there is anything there that is 16×16. I went with Sure’s displays as they are pre-built and it saves the hastle of building my own board.

  6. Hi there!

    I just got myself a beautiful colorduino, but what if I want to drive high power (let’s say 10w) LEDs?

    How exactly should I connect transistors between the 2X16pin socket and my 32 ‘big’ wires?

    Thanks for helping me

    • Hey, not too sure to be honest, you would be better off asking this in something like the arduino forum or the itead forum (if they have one)

      Nick

  7. I have a colorduino and I was able to run the plasma code but not the demo code from Itead. What is the Print text function on the colorduino.I just wana be able to print a shift a few letters.
    Thanks

  8. When uploading sketch colorduino_firmware_v1.1.pde I get this:

    sketch_apr19a.cpp: In function ‘void loop()':
    sketch_apr19a:67: error: no match for ‘operator[]’ in ‘* Colorduino.ColorduinoObject::curWriteFrame[x]‘
    sketch_apr19a:77: error: no match for ‘operator[]’ in ‘* Colorduino.ColorduinoObject::curWriteFrame[x]‘
    sketch_apr19a:87: error: no match for ‘operator[]’ in ‘* Colorduino.ColorduinoObject::curWriteFrame[x]‘

    I am using Arduino Uno and IDE 0023

  9. Hi!
    Thx for this article. I’m trying to play around with a few sensors over I²C, but I’m always getting this error “error: no match for ‘operator[]’ in ‘* Colorduino.ColorduinoObject::curWriteFrame[x]‘” in colorduino_firmware line 70.

    I’m using Arduino IDE0.23 and the library you provided.

    Thx for your help,

    karl

  10. Hi, I also get errors mentioned above, so i spend a few nice hours with playing and get it work.
    So, first i move to arduino ide 1.0.1 – i have colorduino and arduino mega 2560.
    The only things you have to change – i use colorduino library v1.2.4 from lincomatic – https://github.com/lincomatic/Colorduino/downloads – it supports new arduino ide and also mega boards. Then, as new ide, in both sketches, replace Wire.send/receive with Wire.read/write. Then patch wire library ( as decribed in arduino-demo-v1_0, twi.h and wire.h ). And finally source of those errors – in colorduino_firmware_v1.1 – i change :
    from
    PixelRGB *p = &(*Colorduino.curWriteFrame)[x][y];
    to
    PixelRGB *p = Colorduino.GetPixel(x,y);
    wich do the trick :)

    Hope, it´l help to someone …

    jarda

  11. I dont understand how to run a Programm on the colorduino with the arduino software. i tried to upload some Demos with a FTDI cabel but it didnt work. Can you maybe help me to start? Im from Germany and if i look in forums here i understand like nothing :(
    i also tried to find the Skechbook folder but i just found this : “sketch_oct05a” and not the real skechbook folder who i need.

      • Hi Jan,
        what hardware/software do you have? Download file i worked with and try – it should work.
        For now, it can be downloaded here : http://uloz.to/xfcboNT/colorduino-rar – sorry, interface is in czech, so click on [STAHNOUT] – it´s mead download :)
        Unrar, then files marked _library unrar to library folder under arduino folder – note – wire shoul be overwriten! iic.rar and ColorduinoPlasma unrar to your sketch folder – dormaly under Documents/Arduino.
        iic.rar has two parts – arduino_demo should be downloaded to an Arduino, and color_FW to Colorduino throug programer or FTDI cable. Then connect SDA,SCL,GND pins from Arduino to Colorduino, power Colorduino by external adapter (6V is best) and plasma demo should run.

        you can email me – jarda [at] vasatko [dot] info

  12. Thank you for your quik answer.
    Do i have to use my arduino to put a programm on my Colorduino? i have a Atmega Mega but i read somewhere that i have to pop out the Chip to use my Board to programm the colorduino!? I hoped that i just could use the ftdi cabel to directly put the programs on the colorduino.
    i have windows Vista and i use arduino 1.0.1 software.
    i connectet the colorduino to my Pc via theFTDIcabel like that:
    FTDI RXD -> Colorduino TXD
    FTDI TXD -> Colorduino RXD
    FTDI RTS -> Colorduino DTR
    FTDI GND -> Colorduino GND
    FTDI VCC -> Colorduino VDD

    • Hi,
      IMHO if you use any arduino board to program colorduino, you have to take out AtMega chip or you will program this arduino. So it is not possible with Mega (at least my mega have chip soldered to PCB, i think somebody succeeded by pressing reset button on mega during upload). It should be possible program Colorduindo through FTDI cable, i think your connection is OK, choose ArduinoIDE/Tools/Boards – Arduino Nano w/ATmega328 and serial port created by FTDI cable. Then use File/Upload to upload sketch. I use USBTinyISP programmer, I never use FTDI cable, so i have no experiences with it …

      Jarda

  13. Finaly my colorduino runs the plasma demo^^
    Thank you so much!!!!
    i hope that i can ask you some more questions in the future.
    I wont to connect 3 colorduinos and make my own 150cmx 50cm (8×24)dot matrix) and connect them to the colorduinos.
    So there will be many problems befor im done i guess :)

    • Hi Jan,
      nice to see you got it work :) No problem, you´re welcome with questions, but i have only one colorduino to play with. Connect more colorduinos on i2c bus shouldn´t be a problem, you only have to upload firmware to each of colorduinos with different i2c adress to be able to adress them separatelly from master arduino.
      —-
      #define I2C_DEVICE_ADDRESS 0x05 //I2C address for this device
      —-
      Jarda

      • Aloha!
        I have three colorduinos but haven’t a clue what software to change and what to change it to

        so that all three can work together. Help or direction greatly needed and appreciated.

        Can use Uno 3 or Leonardo

        Thanks, mo

      • Sounds like a whole new project. You’d need to use i2c and write a protocol to send data to each display in some kind of format you come up with. Quite in depth stuff. Maybe google around to see if someone has done it already.

  14. until now i also just have 1 colorduino but i will buy a second one…. if i solved my problems with the first one.

    im now trying to use RGBmtx host software but i have some problems to use it corectly. my colorduinoscreen freezes if i start the program.
    i followed this site: “http://www.instructables.com/id/Lampduino-an-8×8-RGB-Floor-Lamp/step18/RGBmtx-Host-Software/”
    and the description on it like changing this:

    “WARNING FOR THOSE USING ARDUINO 1.x

    The serial buffer has been decreased to 64 bytes, which is too small for RGBmtx to properly communicate with my ColorduinoSlave sketch. RGBmtx will just freeze up your Colorduino, and not work correctly.
    To fix it, you must exit the Arduino 1.x IDE and edit modify hardware\arduino\cores\arduino\HardwareSerial.cpp.
    Look for the line

    #define SERIAL_BUFFER_SIZE 64

    and change it to

    #define SERIAL_BUFFER_SIZE 128

    Then restart Arduino 1.x and re-upload the ColorduinoSlave.pde sketch to your Colorduino.”

    But it didnt helped :(
    Maybee i find the problem later on….

    i hope my English is not to bad but it seems to be good enough. You giving me the answers i need^^

  15. Hi, Nick
    I like to try the I2C control, and download demo code,
    but it need password to unzip,
    May I have the password?

  16. Hi Nick,

    Thanks for all the info you’ve posted about the Colorduino. I have a question about the Colorduino board specs, and have tried contacting iTead and posting on the Arduino projects forum, with no response from either. I’m hoping you might be able to help.

    I’m looking to drive an 8×8 matrix of ultra-bright white LEDs (100 mA nominal current, 120 mA max), with only one LED on at any time, and a very short duty-cycle (only one LED on at a time for only 3-5 seconds, then off for a few minutes). The Colorduino product page specs each channel as having a 100 mA output current capacity, which would be perfect for this project. But checking the datasheet for the DM163, it states that the maximum output current per channel is 60 mA. Max current per channel on the DM163 is set by external resistors, and when I check the values on the Colorduino schematic, these resistors are all 1Ks, which corresponds to 60 mA (even a bit less, say 58 mA). So is the actual channel capacity 100 mA, or (as I suspect) limited to 58-60 mA?

    If the current is limited to 58-60 mA, I was thinking of connecting the output from two channels (say R and G) in parallel to create a single 116-120 mA source, then dialing down the amplitude to reduce the current down to 100 mA total. Simple circuit theory says that you can combine two current sources in parallel; in your opinion, am I right, or am I overlooking something subtle or obvious with this hardware?

    Any help/advice you can give would be appreciated, and I won’t hold you liable if anything blows up. Thanks!

    • Hi,

      Thanks for the post, unfortunately I’m not sure on the specs you’ve mentioned you’d need to ask the guys. As for combining the channels, it sounds like a logical thing to do but I can’t vouch for whether it would work.

      Have you tried asking the guys on the iTead blog (not the forum) for help? They might be able to help. It’s http://blog.iteadstudio.com/ (Saying that looks like they are off for Chinese new year until the 18th).

      Nick

      • Thanks for the response, Nick; I appreciate it. I did already ask at the iTead blog, without getting a response, but as you said it’s Chinese New Year. I still think my idea would work, but given the uncertainty, I’m going in a different direction, using Darlington source/sink driver chips.

  17. I’m starting with arduino and I would like if you could support me in how to connect, schedule a Colorduino with arduino ftdi or a as well as a library, the advance would greatly appreciate it.

  18. Pingback: Nick’s LED Projects : COLORDUINO | isanthigeek

  19. Hi Nick,

    Great site!

    I have been playing around with LED and laser circuits for many years now and am really stoked on the Colorduino product.

    I am new to this type of driver platform – could I use an Arduino Uno to link the Colorduino to my PC (the chip can be pulled from the Uno)?

    I have pinged an inquiry to ITEAD Studio as I just gotta get one of those Colorduino boards and RGB matrix to run some colours!

    Thanks again for a great review and guide and for any help with my inquiry above,

    Regards,

    Nick

    • Thanks!

      I’m sure you could link to the PC via an Uno. How would you send data to the Uno? If it was over serial, you might as well use the on board ATmega on the Colorduino to save using an Uno at all. The Colordunio has the same chip as on an Arduino 328 and you can code it with the Arduino environment. You’d just need to adapt the demo code the Colorduino ships with to listen on the serial interface. See http://arduino.cc/en/Serial/read

      To program the new code to the Colorduino you can use the Uno with the chip taken out. When all was up and running a USB -> Serial cable from the PC would do that job, saving your Uno for another more exciting task!

      Nick

  20. Great, thanks for your prompt and helpful reply Nick – much appreciated.

    Optoelectronics has fascinated me for as long as I can remember, particularly the control of LED’s.

    I will order a Colorduino and dig into some coding (I have an Arduino MEGA that is proving to be great fun).

    As I said, I am new to the driver platform and still not sure how to set up comms to upload to the Colorduino, but that is all part of the journey!

    Regarding hooking up to my PC via an Arduino, I think I have perhaps misunderstood your guidance above……..
    “After you’ve tweaked the demo sketch you’ll want to upload it to the Colorduino to see your changes. There is no USB port on the Colorduino, so you can’t just plug it into a PC like an Arduino, however if you have a spare Arduino lying around there is a trick you can do.

    Simply remove the ATmega chip from your Arduino and connect the Colorduino to the Arduino board as follows…….”

    I will read your helpful reply again and revisit when I have the Colorduino set up and ready for some serious optoelectronics experimenting (the plasma effect is hypnotic) although I feel the comms part may have me baffled for a while!

    Again, rockin’ site and thanks for your help.

    Nick

    • Hey Nick,

      I’ve probably confused you! Completely forget what I wrote in the original post, which you were referring to!

      So forget the last answer. In short – yes I’m pretty sure you can use the Arduino Uno just like the Mega to act as a USB to serial converter to program the Colorduino.

      My reply a minute ago assumed you wanted to drive it from the PC continually – e.g. send it pixel data from a program running on the PC. In that case you could probably dispense with having an arduino in between the PC and Colorduino.

      Hope that makes more sense!

      Nick

  21. Hi Nick,

    Thanks again, very helpful – I really only want to upload sketches until I have a better understanding of the whole set up.

    At this stage I am hanging out to to run the plasma sketch and monkey with the code to see what happens and go from there.
    I want get to grips with the drivers (I am new to C programming to, after many years in BASICville!) and hopefully post some of my ideas/adventures on your site.

    Can’t wait to hear back from iTEAD Studio!

    Many thanks,

    Nick

    • Hey Nick,

      Colorduino arrived! stoked about that!

      I have the demo cyclic red/green/blue running and will begin experimenting shortly,

      Thanks again for your great site and help.

      Nick

  22. Hi Nick,

    I am trying to build a project that can power multiple IR LED’s at around 100ma each. The colorduino says it can supply this but my LED’s are just standard two pins, not RGB. It seems like every library I’ve seen for the colorduino is written for RGB so it’s confusing on how I can use it to control my LED array. Do you have any suggestions? My other option is the shield below, but it has zero documentation.

    http://ledsee.com/index.php/new-products/16-channel-i2c-fet-arduino-schield-pca9685-detail

    Thanks!
    -Corey

    • Hi Corey, I’m not too sure to be honest, the colorduino is designed mainly for rgb like you say.

      Maybe ask in the arduino or itead forums.

  23. Hi Nick,

    Thanks for this site..it helps me a lot but still i can’t try the i2c.
    Could you help me on this?
    I already by 20 sets of colorduino…is it possible that i can control that using the mtx 8×8 controller?i want to try to connect 8 colorduino//
    Please help me on this thing…
    Please…..

    Btw, my name is christine..just call me chris..
    i’m just new to this that’s why i want to have some help from you..
    Do you have an i2c demo program??
    Please send me the code…please everyone…
    Just contact me here: tinechrist1202@gmail.com

    i’m waiting for your response..

    • Hi, there is a link to the i2c demo code if you read the blog. You will need to adapt it to control multiple colorduinos.

      My code was written very quickly, there is probably better stuff out there if you google around.

      Nick

      • Hi Nick…

        Thanks for your reply, i will just try your code and explore more about this..
        Actually, this colorduino board is really useful to me since i used this in one project that i’m taking right now…that’s why i do really want to pursue this i2c so that i can control more LED..

        My project is to control a 12V LED…using this colorduino board..but right now, i don’t have any problem with my hardware…i only got some thorns in tweaking this software..hahaha

        So thanks nick…

  24. Hi Nick…

    I have another question…
    i already used your codes.. the colorduino firmware and the arduino firmware but nothing happen with my colorduino board after uploading the program to the boards..
    may i know if what should i so with this?

    I’m using an Arduino Duemilanove to program the colorduino..
    Do i need to put an IC on the Duemilanove while i program the colorduino?

    Hope you reply with this..
    i really need your help..

    Best Regards,

    Christine A.

    • Really hard to say without being able to look at it unfortunately.

      But no you shouldn’t have the ATMega IC in the Arduino when you program the Colorduino.

      Maybe try and program the colorduino back with the demo software from iTead and see if that works. That way at least you know you are programming it right.

      Nick

  25. A comment:

    If you’re getting the “avrdude:stk500_getsync():not in sync” error when trying to upload, try this:

    Finally got this uploaded and working after a lot of frustration and getting that error (which pops up a lot on the web with people trying to program this board/display).

    As it turns out the hangup was the settings in the Arduino uploader (I’m using v 1.0.5 with an old Xp laptop). Using either the wire connections in your article or the Foca 2.2 USB/Serial programmer, I set the Tools/Board selection to “Duemilanovew/ATmega328″ rather than the “Uno” setting and it worked fine.

    This may work with other board selections – I was just running down the list until one worked since I kept getting an “avrdude:stk500_getsync():not in sync” error.

    YMMV of course but I haven’t seen anybody find this solution – and if everybody already knows it, well…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s