Go Down

Topic: Tricolor LED Strip (Read 3395 times) previous topic - next topic

werd75na

Hello Community,

I recently bought this at my local Radio Shack:
http://www.radioshack.com/product/index.jsp?productId=16306856&clickId=489254786&affiliateId=59782&affiliateCustomId=#

I'm a bit confused with this LED strip as it only has 3 Wires coming of it. I think it's 12v, GNG and Data. Does anyone know how I would wire this with an arduino?

Thanks!

werd75na

Here's a better picture:
https://www.dropbox.com/s/eylotot0jpaqtd1/2012-11-10%2018.58.51.jpg

Grumpy_Mike

Look at that chip U4. What type does it say it is?
Then look up that for using with the arduino.

It is a serial protocol where you send data by waggling the data line to control each of the colored LEDs.

werd75na

As the LED strip continues each chip & led is incremented. I have U1 -> U5.

Grumpy_Mike

Yes I know but all the chips are the same.
You talk to them with a protocol.

What that protocol is depends on the type of chip you have.
If you are not going to tell what type of chip you have then the only chance I have of helping you is if I actually buy that strip myself and look at the chip.

That is not going to happen.

werd75na

I've found the type of chip. This strip has poor documentation. I'm working with a TM1803 v2.

I'll post back with what ever information I manage to find. I appreciate your help.


werd75na

Thank you very much for your help.

Looks like I have some timing issues to work out.

Dustin

I have the same LED strip. Have you gotten anything else figured out?

Runaway Pancake

At the RadioShack link there are hotlinks to a ZIP with PDEs and the datasheet for the strip's controller and there's a PDF, too. 
It's the "Product Summary" tab, "Downloadable content" (they aren't highlighted - probably so as not to call attention to them and keep consternation and anxiety stoked.)
You have to make a folder to put each of the PDEs into.
I've attached the ZIP and the PDF to this post.
"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Emailguy

I have several of these strips as well. I have them working fine on an Uno, but cannot seem to make them work on the Yun. Somehow it auto detects the Uno or Mega. However that works, it doesn't work for the Yun. I can imagine it would have issues with other boards as well. I'll paste in some sections of the code so people don't have to download the files from a previous post.
Code: [Select]
#include <avr/pgmspace.h>

// ******** DEBUG ==== should auto config to adapt different mother board *********
//#define DATA_1 (PORTF |=  0X01)    // DATA 1    // for ATMEGA
//#define DATA_0 (PORTF &=  0XFE)    // DATA 0    // for ATMEGA
//#define STRIP_PINOUT DDRF=0xFF  // for ATMEGA
#define DATA_1 (PORTC |=  0X01)    // DATA 1    // for UNO
#define DATA_0 (PORTC &=  0XFE)    // DATA 0    // for UNO
#define STRIP_PINOUT (DDRC=0xFF)    // for UNO

Code: [Select]
void setup() {               

  STRIP_PINOUT;        // set output pin - DEBUG: should auto detect which mother board for use

  reset_strip();
  //noInterrupts();

}


Grumpy_Mike

Quote
Somehow it auto detects the Uno or Mega.

No. Don't be silly.

That code uses direct port addressing, that will only work on the Atmel xx8 sort of chips. On other chips the I/O ports are at different addresses. So it won't work on boards with other processors.

Emailguy


Quote
Somehow it auto detects the Uno or Mega.

No. Don't be silly.

That code uses direct port addressing, that will only work on the Atmel xx8 sort of chips. On other chips the I/O ports are at different addresses. So it won't work on boards with other processors.


I wasn't trying to be silly. The comments claim the code would auto detect the board type and I didn't understand how that could work.

The Yun has two processors. The first is the Atmel ATMega32u4. Can that do direct port addressing? Is it just a matter of finding out the correct ports and edit the code to use those ports for that controller chip?

The Yun also has a second processor running Linux. That should not matter since the I/O pins are attached to the Atmel AtMega32u4 chip.

Emailguy

I just found what I needed. I found the FastLED library. It supports the TM1803 chips used in the Radio Shack LED strip I purchased. I tweaked the examples in the library for the TM1803 chip and the number of LEDs to match my strip and they work perfectly on the Yun. This is a much easier way to control LED strips than using direct port manipulation. It also works better across different boards.

Go Up