Pages: [1]   Go Down
Author Topic: Tricolor LED Strip  (Read 2810 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 603
Posts: 33408
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 603
Posts: 33408
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 603
Posts: 33408
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Found this if it helps:-
http://www.deskontrol.net/blog/arduino-based-artnet-node-for-led-pixels/
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you very much for your help.

Looks like I have some timing issues to work out.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 73
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Edison Member
*
Karma: 64
Posts: 2465
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

* 2760249.zip (309.95 KB - downloaded 95 times.)
* 2760249_PM_EN.pdf (449.27 KB - downloaded 114 times.)
Logged

"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?"

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
#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:
void setup() {               

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

  reset_strip();
  //noInterrupts();

}
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 603
Posts: 33408
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: