Pages: [1] 2   Go Down
Author Topic: Hooking up basic WS2801 string  (Read 2321 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey everyone,

For starters, I'll admit I'm a complete noob, this is my first project past blinkers so bare with me smiley-grin

I have this plan to build a 60 RGB LED map that I can remotely control via ethernet. I have been planning to do this with multiplexed over TLC5940 but I recently realized that it may be much easier to do this with an addressable LED strip. I will have to add distance between each LED in order to properly fill my map, but thats a problem to worry about after the basics.

Here is the strip I bought
http://www.ebay.com/itm/160946023566?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649

Here is the documentation
http://www.insomnia.org/led/documentation/rgbpxws2801.html

It states "Red is +5v, Green is clock, Yellow is data, and blue or grey is ground. The input side is the side with the IC."

Here is my string

However, when I look at my string, it doesnt look like that matches up. I'm a bit afraid to cut into my cords until I'm a little more certain, so i was hoping someone could advise. I plan on driving these with FastSPI once I actually get it hooked up

  • Which side should I cut? I'll need to extend the lines on the left side (too short to easily reach breadboard) or cut off the SM connector on the right
  • Is the mapping correct? If so, why does one side have 2 extra lines out on the right side? I assume these are an extra ground and power
  • Why are there 4 lines when the spec says 3?

Thanks in advance, I'll do my best to give descriptive replies to help you help me.
AceoStar
Logged

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Look on the plastic, molded housing itself for arrows that indicate which side is in and which side is out.  See the attached image where I highlighted the arrow in red.  Each "pixel" will have one side that's in and one side that's out.  You want the wires on the IN side.

The red/black wire pair is always VCC and Ground.  The three on the connector are DATA, CLOCK, and Ground.  This design allows you to connect the red/black pair to an external power source (recommended) while the DATA, CLOCK, and additional Ground is connected to your controller (Arduino I presume.)

So figure out which of the three wires on the connector is connected to Ground.  Just look closely at the molded plastic where the wires go in.  It should be very easy to tell.  If not, use a continuity tester to find it.  The other two are your DATA and CLOCK.  You can either follow the documentation and see if it's correct, or you can simply connect one wire to MOSI and the other to CLK and run a test program such as the FastSPI testleds sketch, see if the string works.  If it doesn't, swap wires.


* 2013-02-27 20.51.23.jpg (775.19 KB, 1936x2592 - viewed 47 times.)
Logged

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

Look on the plastic, molded housing itself for arrows that indicate which side is in and which side is out.  See the attached image where I highlighted the arrow in red.  Each "pixel" will have one side that's in and one side that's out.  You want the wires on the IN side.

tyvm! After reading your reply and looking a bit more closely, I realized what the product desc meant by "side with IC is input". So I will have to cut off the connector and make my connections to the arduino there. No big deal though, I'll end up having to line up 60 varying segment lengths through this project so this will be the first of many cuts.

The red/black wire pair is always VCC and Ground.  The three on the connector are DATA, CLOCK, and Ground.  This design allows you to connect the red/black pair to an external power source (recommended) while the DATA, CLOCK, and additional Ground is connected to your controller (Arduino I presume.)
Assuming this, I think the other specs line up quite nicely. I traced the wiring in the housing and the blue wire is soldered on top of the extra ground, so I think the rest should line up.

I'll take a stab and this tonight and report back. Thanks a ton for the help so far smiley
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 152
Posts: 5759
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The connection to the Arduino needs "ground", "clock" and "data". That would be the three wires going to the three-pin connector in your photo.

The connection to the power supply needs +5V and ground. They would be the two wires with no connector at the top (red/black?)

To be sure, check with a multimeter that the blue wire in the three-pin connector is connected to the loose black wire.

Note that strings like this can require a surprising amount of current. If you switch all LEDs on simultaneously that's 60*3*0.02 = 3.6 Amps. You need at least a 4 Amp power supply, preferably 6 Amps or more if you plan to switch it on for hours at a time (although you probably won't have it all white very often in practice so 5-6 Amps is probably OK).

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

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

Note that strings like this can require a surprising amount of current. If you switch all LEDs on simultaneously that's 60*3*0.02 = 3.6 Amps. You need at least a 4 Amp power supply, preferably 6 Amps or more if you plan to switch it on for hours at a time (although you probably won't have it all white very often in practice so 5-6 Amps is probably OK).

Hmm. This map will have about 50 LED to be exact and I plan to keep them at a solid color to indicate account status. Ideally I could leave this plugged in forever, but if I need to switch out off I can. You said I need 5-6 Amps, does that mean the v5 won't do it?
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 152
Posts: 5759
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmm. This map will have about 50 LED to be exact and I plan to keep them at a solid color to indicate account status. Ideally I could leave this plugged in forever, but if I need to switch out off I can. You said I need 5-6 Amps, does that mean the v5 won't do it?

Power supply volts is usually independent of amps. The 5 volts aren't negotiable, the amps are.

I'd get at least 6A if you're going to leave it on 24/7. 8A would be even better.

Make sure it's a 'regulated' supply, something like this: http://www.ebay.com/itm/110741575602

(nb. randomly chosen eBay item...)
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

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

Hmm. This map will have about 50 LED to be exact and I plan to keep them at a solid color to indicate account status. Ideally I could leave this plugged in forever, but if I need to switch out off I can. You said I need 5-6 Amps, does that mean the v5 won't do it?

Power supply volts is usually independent of amps. The 5 volts aren't negotiable, the amps are.

I'd get at least 6A if you're going to leave it on 24/7. 8A would be even better.

Make sure it's a 'regulated' supply, something like this: http://www.ebay.com/itm/110741575602

(nb. randomly chosen eBay item...)


hm, I'll probably come back to you on this one. I should be able to drive this from my PC until I know enough to try and attach an external supply.  Thanks for the recommendation!

Tonight, i'll cut of the SM connector, hook it to Arduino and let FastSPI fly.
thanks again
« Last Edit: February 28, 2013, 02:15:18 pm by AceoStar » Logged

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Any PC power supply can do this for you.  I have a ten year old power supply that provides me 5V @15A and it cost me nothing (it was salvaged from a dead PC).  Most modern power supplies will provide a lot more than that nowadays.  Some as much as 40A on the 5V rail.
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 152
Posts: 5759
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hm, I'll probably come back to you on this one. I should be able to drive this from my PC until I know enough to try and attach an external supply.  Thanks for the recommendation!

A USB port is good for about 7 fully-on RGB LEDs running at 20mA.

Some newer ports can do double that but if you connect more than 7 and and have weird problems, that's the reason.

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 152
Posts: 5759
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Any PC power supply can do this for you. 

Yep. Any old PC supply will do it. You have to short out two pins on the motherboard connector to get it to switch on but apart from that there's no problem.
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Any PC power supply can do this for you. 

Yep. Any old PC supply will do it. You have to short out two pins on the motherboard connector to get it to switch on but apart from that there's no problem.


Except on very old ones, you also need to provide a constant load, otherwise it either won't come up, or it will constantly cycle off and back on.  A small fan is plenty.

Newer ones don't require that anymore.
Logged

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

Sorry for the delay.

Documentation says
http://www.insomnia.org/led/documentation/rgbpxws2801.html
Red is +5v, Green is clock, Yellow is data, and blue or grey is ground. The input side is the side with the IC.

I've connected it up based on this spec, but all I really get is the first LED lit up blue. This is green to 13 and yellow to 4, to match the code.

If I switch Yellow and green, I get various lights lit up but it does not follow the pattern designated in the code. I get eratic flashing. If i remove the data from out 4, I still have various lights lit up. I've included a few shots to help debug whether maybe the lines are done wrong.

As for the code, I'm using Pin 4 as specified in FastSPI example. I commented out the other modes and just ran   FastSPI_LED.setChipset(CFastSPI_LED::SPI_WS2801);. I'm hooking clock into pin 13 and digital into 4.

Input

Output

My connection

Do these solders look okay?




Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 152
Posts: 5759
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As for the code, I'm using Pin 4 as specified in FastSPI example. I commented out the other modes and just ran   FastSPI_LED.setChipset(CFastSPI_LED::SPI_WS2801);. I'm hooking clock into pin 13 and digital into 4.

You can't use pin 4 if it's using SPI to send the data, you have to use pin 11.

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

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

I updated the sketch to reflect pin 11 and moved the green wire over to it. I'm still getting rather eratic output from the lights. See below
Sorry for the low quality, was trying to rush this in during lunch.  There are 25 lights in the strand, only the first few are lighting up in this example, but in various testing I have seen the whole string power on.

https://dl.dropbox.com/u/4099132/New%20Folder/VID_20130304_133219.mp4
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 152
Posts: 5759
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I suspect the code is wrong.

I've never used FastSPI: https://code.google.com/p/fastspi/

OTOH I noticed that near the bottom of the front page it says:


Note for people using sparkfun's ws2801 led strips - you need to call FastSPI_LED.setDataRate(1) before calling init/start. The library defaults to a data rate of 0 for ws2801 strips, which is valid for the chips on the 12v strips, but not on the 5v strips (or, at least, the 12v strips that I have here) - it's too fast and you get weird random flashing occuring.

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Pages: [1] 2   Go Up
Jump to: