Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

WS2801 led strip...why is my netduino plus 2 being so difficult

WS2801 led strip netduino plus 2 spi

Best Answer justified777, 25 February 2014 - 10:07 PM

I thought I already replied what the issue what before.   I see that I didn't.

 

My problem was that I didn't tie the ground on the powersupply that powered the LED strip to the ground on the netduino....thus the issues I was having.  Once they were tied together...walla worked like a charm!!!

Go to the full post


  • Please log in to reply
12 replies to this topic

#1 justified777

justified777

    Member

  • Members
  • PipPip
  • 14 posts

Posted 26 September 2013 - 01:28 PM

So after my thread, http://forums.netdui...ser-led-strips/, I set out with my netduino plus 2, bread board, seperate 5v 60amp power supply, quad 2 input AND gate, 4 WS2801 led strips, tried to make this work.  I've used the NETMF WS2801 code, every WS2801 code I've seen posted with the netduino to no success.

 

Now i'm at the point of just having a ws2801 33 led strip(I cut this off from the original) connected directly to the netduino plus 2 board. I have the ground on the led strip connected to one of the grounds on the netduino plus 2, I have the C(clock connection) wire connected to pin 13, I have the D(data connection) connected to pin 12, and of course the 5v wire of my strip I have connected to the 5v pin on my netduino plus 2.

 

I run the sample netmf toolbox RGB code...nothing. I've tried various other ways to do it but nothing is working. I get no response. Only time I get a response is if at the end of the led strip I press my finger upon the 4 exposed connections randomly on the strip it will make the last 7 or less lights light up variably in some random mess :) 

 

So, what am I doing wrong here? anyone? I've spent countless hours trying all sorts of combinations to no avail.  I've reached the point of reaching out to you, the community. 

 

Justy

 

 



#2 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 26 September 2013 - 01:52 PM

I don't have WS2801 to verify that, but according to its datasheet, the minimum voltage for logic high is VIH = 0.8*VDD, so if you are powering it by 5 V then VIH = 4 V and Netduino 3.3 V outputs cannot provide correct logic level. What AND gate do you have? Using 74HC-series logic should work, it serves as level shifter (when powered by 5 V it has 5 V logic level outputs, while accepting 3.3 V inputs VIH >= 1.6..2 V).



#3 justified777

justified777

    Member

  • Members
  • PipPip
  • 14 posts

Posted 26 September 2013 - 02:32 PM

Even before I went directly to the card, I was first powering the strip independently with a 5V 60amp AC power supply and then just connected the clock and data to 13 and 11 pins on the netduino + 2 card.

 

I have the 74LS08.  But I wish the gate was even my problem and I had one strip working directly to the netduino



#4 Juzzer

Juzzer

    Advanced Member

  • Members
  • PipPipPip
  • 135 posts
  • LocationHertfordshire, UK

Posted 26 September 2013 - 07:10 PM

Are they 2801 or 2811? post some code.

#5 Juzzer

Juzzer

    Advanced Member

  • Members
  • PipPipPip
  • 135 posts
  • LocationHertfordshire, UK

Posted 26 September 2013 - 07:24 PM

This works for me with WS2801 on the other brand of NETMF boards....

 

//Data is sent as Blue,Red, Green            SPI.Configuration _config = new SPI.Configuration(Cpu.Pin.GPIO_NONE, false, 0, 0, false, true, 2000, SPI.SPI_module.SPI1);            SPI _spi = new SPI(_config);            int numLeds = 10;            byte[] _data = new byte[numLeds * 3];            // LED 1 = Red            // LED 2 = Green;            // LED 3 = Blue            _data[0] = 0; //Blue            _data[1] = 255; //Red            _data[2] = 0; //Green            _data[3] = 0;            _data[4] = 0;            _data[5] = 255;            _data[6] = 255;            _data[7] = 0;            _data[8] = 0;            _spi.Write(_data);


#6 justified777

justified777

    Member

  • Members
  • PipPip
  • 14 posts

Posted 27 September 2013 - 06:13 PM

Thanks guys, and thanks for the code, Juzzer.  I tried that code, and that is what i'm ultimately doing with the other code tries.  These are cut up sections of the LED strip.  I have another 6, full 300 count 5m strips(60 led per 1m) at the office. I'll be trying these later this afternoon(before any cut ups). wish me luck.

 

oh and they are indeed WS2801..says so right on the chip on the strip :)



#7 justified777

justified777

    Member

  • Members
  • PipPip
  • 14 posts

Posted 27 September 2013 - 06:14 PM

Also, these are the waterproof ones, but took the waterproofing off of them.



#8 Juzzer

Juzzer

    Advanced Member

  • Members
  • PipPipPip
  • 135 posts
  • LocationHertfordshire, UK

Posted 27 September 2013 - 06:37 PM

And you have connected the external power supplies gnd?

#9 justified777

justified777

    Member

  • Members
  • PipPip
  • 14 posts

Posted 27 September 2013 - 07:31 PM

Good question. So, I connected the negative from the power supply to gnd. Should I actually use the ground from the power supply to go to gnd instead?



#10 Juzzer

Juzzer

    Advanced Member

  • Members
  • PipPipPip
  • 135 posts
  • LocationHertfordshire, UK

Posted 28 September 2013 - 06:30 AM

You need to tie all the gnd's together

#11 justified777

justified777

    Member

  • Members
  • PipPip
  • 14 posts

Posted 29 September 2013 - 07:22 PM

Okay, so I got it working with the 'uncut' strip.  When I say got it working...didn't change anything I was doing just tried it on the uncut strip and walla, they worked....but....

 

It seems the values i'm sending should result in uniform colors/combinations and i'm getting totally random colors sporadically throughout....from beginning to end. Any clue?



#12 Juzzer

Juzzer

    Advanced Member

  • Members
  • PipPipPip
  • 135 posts
  • LocationHertfordshire, UK

Posted 29 September 2013 - 07:53 PM

Show example code for all red

 

*edit*

 

This should turn the first 5 LEDS red

 

SPI.Configuration _config = new SPI.Configuration(Cpu.Pin.GPIO_NONE, false, 0, 0, false, true, 2000, SPI.SPI_module.SPI1);SPI _spi = new SPI(_config);byte[] data = new byte[] { 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0 };_spi.Write(data);


#13 justified777

justified777

    Member

  • Members
  • PipPip
  • 14 posts

Posted 25 February 2014 - 10:07 PM   Best Answer

I thought I already replied what the issue what before.   I see that I didn't.

 

My problem was that I didn't tie the ground on the powersupply that powered the LED strip to the ground on the netduino....thus the issues I was having.  Once they were tied together...walla worked like a charm!!!







Also tagged with one or more of these keywords: WS2801, led strip, netduino plus 2, spi

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.