DIY
DIY

Add Some Color with the Tricolor LED Strip

This is post 2 of 3 in the Neat Stuff series

Here’s a fun and useful addition to your microcontroller arsenal.

The RadioShack Tricolor LED Strip gives you 1 meter of programmable LED fun. Even better, each 10cm segment features its own integrated circuit (IC) so you can cut the strip into (up to) ten segments. Create different shapes and then tweak the ICs to change the colors and flash rates.

RadioShack Tricolor LED Strip

RadioShack Tricolor LED Strip

To get started, you’ll need an Arduino board or other microcontroller, a soldering iron, some hookup wire, and a 12V 1A DC power source with a 5.5mm barrel plug. You can pick up all of these items at most RadioShack stores or online at RadioShack.com.

We’ve included the following user’s guides, programs, and specifications for the IC to help you customize your LED Strip:

RadioShack Tricolor LED Strip Support Files

What would YOU create with the RadioShack Tricolor LED Strip?

This is post 2 of 3 in the Neat Stuff series

Comments

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

25 Comments

  • A Mckinley

    The program sketch is empty in your support files.

  • D Caldwell

    I purchased this LED strip and found that the RGB 24bit value is not aligned with what the TM1803 chip is expecting.
    CHIP is %rrrrrrrr_gggggggg_bbbbbbbb
    RadioShack wired setup is %gggggggg_bbbbbbbb_rrrrrrrr

  • Jason Goewert

    D Caldwell is correct, red and green are backwards.
    0xff0000 green

    0x0000ff red

    0xffffff white

    0x00ff00 blue

    They wired it wrong inside the strip. Use the color codes listed below for solids.

  • John A

    Everything positive to report. Code and wiring work fine – impressive demo. I now will go over the source you supplied and try to learn all that you’ve done for myself. Thank you.
    To Mr. Sorci’s comment about the colors: don’t change any wires – the source code alone will correct. But everything unchanged is still very impressive.

  • Mike Harges

    the files from Radio shack are completely useless, they are just pdf files of the “user manuals” but no code,

    • George

      The RadioShack Tricolor LED Strip Support Files.zip includes a folder (_2760339) which contains the program file (_2760339_Program.ino).

      The PDF manual updates the paper manual that came packaged with the product.

  • Mike W

    The out-of-order hex color values were driving me nuts so I wrote a small function to convert a “standard” color hex RGB to the GBR format. You can insert this into the sketch and then make a one line change to the send_1M_pattern function that will do the correction. Then you can use standard hex colors in the data array.

    Here’s the new function:

    /*******************************************************************************
    * Convert standard 0xRRGGBB byte color order to 0xGGBBRR format compatible with
    * the Radio Shack tricolor LED strip.
    *******************************************************************************/
    uint32_t convertToRsColor(uint32_t color) {
    uint32_t b = (color & 0x0000FF);
    uint32_t g = (color >> 8 & 0x0000FF);
    uint32_t r = (color >> 16 & 0x0000FF);

    //GGBBRR
    uint32_t newColor = g << 16 | b << 8 | r;

    return newColor;
    }

    And a revised send_1M_pattern:

    void send_1M_pattern(const unsigned long data[][10], int pattern_no, int frame_rate)
    {
    int i=0;
    int j=0;
    uint32_t temp_data;

    for (i=0;i<pattern_no;i++)
    {
    noInterrupts();
    for (j=0;j<10;j++)
    {
    temp_data=pgm_read_dword_near(&data[i][j]);
    temp_data = convertToRsColor(temp_data);
    send_strip(temp_data);
    }
    interrupts();

    delay(frame_rate);
    }
    }

    • W Sanders

      Another way to get around the “GBR” order of the bytes is to define symbolic values for various colors:

      #define RED 0x0000ff
      #define ORG 0x7700ee
      #define YEL 0xff00ff
      #define GRN 0xff0000
      #define CYN 0×666600
      #define BLU 0x00ff00
      #define VIO 0×004040
      #define MAG 0x00ffff
      #define WHT 0xffffff
      #define BLK 0×000000

      Then, you can use something more legible for the static definitions of the patterns you send to the strip, for example, the rainbow pattern becomes:

      PROGMEM const unsigned long pattern_test_rainbow[10][10]={
      {RED , ORG , YEL , GRN , CYN , BLU , VIO , BLK , BLK , BLK},
      {ORG , YEL , GRN , CYN , BLU , VIO , BLK , BLK , BLK , RED},
      {YEL , GRN , CYN , BLU , VIO , BLK , BLK , BLK , RED , ORG},
      {GRN , CYN , BLU , VIO , BLK , BLK , BLK , RED , ORG , YEL},
      {CYN , BLU , VIO , BLK , BLK , BLK , RED , ORG , YEL , GRN},
      {BLU , VIO , BLK , BLK , BLK , RED , ORG , YEL , GRN , CYN},
      {VIO , BLK , BLK , BLK , RED , ORG , YEL , GRN , CYN , BLU},
      {BLK , BLK , BLK , RED , ORG , YEL , GRN , CYN , BLU , VIO},
      {BLK , BLK , RED , ORG , YEL , GRN , CYN , BLU , VIO , BLK},
      {BLK , RED , ORG , YEL , GRN , CYN , BLU , VIO , BLK , BLK},
      };

  • Chris

    I am working on a high mid and low range light box using the different colors to represent the different audio frequency of music with a rca or3.5 mini plug for Android an i-pod or mp3 with a in and out and sensitivity controls without the arduino board this will be tottaly from scratch

  • Henry

    Where can I find a simple program to let me toggle all LED’s: Red-Green-Blue-White using the push button on the board?

  • Eric

    Wow…. This took all of 10 minutes to setup. Now to display it here at #SLORADIOSHACK

  • jmcd

    The docs are not clear. Can you control the color of each tri-color led or can you only control in groups of three? The reason I ask is there is one TM1803 for three tri-color leds.

  • Eli A. Miletich

    just bought 3 sets of these (on close-out sale for $6.97!) can these LEDs be individually controlled?
    any suggestions on modifications or other tutorials?

    • Chad Lawson

      Based on the code, I would say no. But I really hope I’m wrong.

      I recently picked up one on clearance as well (though not quite as low-priced) and have just started poking at the code.

      Adafruit sells a similar strip (http://www.adafruit.com/products/1138) and they ARE individually accessible. I was hoping these were both sourced from the same place and would have the same capabilities.

  • Dylan Lawless

    I purchased 3 sets of these for around $7 each. I’m thinking about putting them in my car. Is there any way to control these without an arduino? I was thinking of putting a pot. on the power wire and adjusting the current. Would that change the color or am I completely wrong?

    • W Sanders

      Nope, this strip will not work without being controlled by an Arduino or some other microprocessor.

  • W Sanders

    So – the TM1803 is only rated at 5V VCC. How does this strip run at 12V without blowing up the chip?

    • Jay

      You can plug the 12 V power supply into the Arduino barrel plug. Just make sure you are using an Arduino that has voltage regulator (UNOs and ones sold at RS do, but some cheap kits and clones may not). The regulator will supply 5V to the Arduino, but 12 V will be available at the Vin pin. However, it is not clear to me how many amps the LED strip requires. If you don’t want to take the chance, you can power the Arduino with one source and the LED strip with another source that can meet its current requirements. Just make sure you tie both grounds together.

    • jim

      There is a separate 5V Zener diode for each and everyone of the TM1803 strips, supplying 5V to the chip, while the LEDs – in groups of 3, are configured in common anode mode, tied to the 12Volt line. The TM1803 then grounds the LEDs to complete the circuit and illuminate them.

  • Bob

    I was wondering if you can combine multiple of these together? I know you can cut the length and reconnect them back together again. I want to extend the length by adding another strand.

    Is this possible, if yes, what do I need to do to the code for the additional length?

  • Rob

    Found a library that allows you to control this strip much easier then the RadioShack code. Thought I would share it with everyone.

    https://github.com/FastLED/FastLED

  • jim

    There are some working sketches here at pastebin – with multiple patterns and an explanation of how the program works with the Arduino and RadioShack RGB LED strips:

    http://pastebin.com/eEB61uWV