Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Fancy RGB LEDs with built in control chip
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 38 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Bob Clough  
View profile  
 More options Oct 24 2012, 9:21 am
From: Bob Clough <para...@ivixor.net>
Date: Wed, 24 Oct 2012 14:21:06 +0100
Local: Wed, Oct 24 2012 9:21 am
Subject: Fancy RGB LEDs with built in control chip

Hey All,

Kimball and I have just bought some cool looking LEDs.  They are RGB and
have a built in controller chip, so you feed them 5v and send them a 1 wire
control signal, and they stay that colour!

http://www.aliexpress.com/item/5050-SMD-LED-WS2811-built-in-the-5050-...

We split the cost (and the LEDs) between us, but I don't need the full 100
I've bought.  If you want to buy 20 of them off me for a fiver, give me a
shout.

Datasheet for the chip:
http://auschristmaslighting.com/wiki_source/images/b/ba/WS2811.pdf
Some more details, including sample code for talking to them:
http://www.insomnialighting.com/products/rgbsmdws2811.html

Ta,
Bob


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alan Burlison  
View profile  
 More options Oct 24 2012, 9:29 am
From: Alan Burlison <alan.burli...@gmail.com>
Date: Wed, 24 Oct 2012 14:29:44 +0100
Local: Wed, Oct 24 2012 9:29 am
Subject: Re: [HACMan] Fancy RGB LEDs with built in control chip
On 24/10/2012 14:21, Bob Clough wrote:

> We split the cost (and the LEDs) between us, but I don't need the full 100
> I've bought.  If you want to buy 20 of them off me for a fiver, give me a
> shout.

I'll take 20.

--
Alan Burlison
--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adrian Godwin  
View profile  
 More options Oct 24 2012, 9:30 am
From: Adrian Godwin <artgod...@gmail.com>
Date: Wed, 24 Oct 2012 14:30:28 +0100
Local: Wed, Oct 24 2012 9:30 am
Subject: Re: [HACMan] Fancy RGB LEDs with built in control chip
I'll have some please, at least if there's any left after the genuine
HACMEN have placed their orders.

-adrian


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Barry Carter  
View profile  
 More options Oct 24 2012, 12:43 pm
From: Barry Carter <barry.car...@gmail.com>
Date: Wed, 24 Oct 2012 17:43:19 +0100
Local: Wed, Oct 24 2012 12:43 pm
Subject: Re: [HACMan] Fancy RGB LEDs with built in control chip

Count me in for 20!
On Oct 24, 2012 2:30 PM, "Adrian Godwin" <artgod...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tom Bloor  
View profile  
 More options Oct 24 2012, 2:58 pm
From: Tom Bloor <tom.bl...@googlemail.com>
Date: Wed, 24 Oct 2012 19:58:46 +0100
Local: Wed, Oct 24 2012 2:58 pm
Subject: Re: [HACMan] Fancy RGB LEDs with built in control chip

I'l have 20 :P
On Oct 24, 2012 2:21 PM, "Bob Clough" <para...@ivixor.net> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bob Clough  
View profile  
 More options Oct 24 2012, 7:12 pm
From: Bob Clough <para...@ivixor.net>
Date: Thu, 25 Oct 2012 00:12:46 +0100
Local: Wed, Oct 24 2012 7:12 pm
Subject: Re: Fancy RGB LEDs with built in control chip

All gone.
On Oct 24, 2012 2:21 PM, "Bob Clough" <para...@ivixor.net> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kimball Johnson  
View profile  
 More options Oct 25 2012, 8:04 am
From: Kimball Johnson <kimb...@bowerham.net>
Date: Thu, 25 Oct 2012 13:04:31 +0100
Local: Thurs, Oct 25 2012 8:04 am
Subject: Re: [HACMan] Re: Fancy RGB LEDs with built in control chip
They have been shipped today,  When I have tracking details I will let you know.

Kimball

On 25 October 2012 00:12, Bob Clough <para...@ivixor.net> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alan Burlison  
View profile  
 More options Oct 28 2012, 8:55 pm
From: Alan Burlison <alan.burli...@gmail.com>
Date: Mon, 29 Oct 2012 00:55:17 +0000
Local: Sun, Oct 28 2012 8:55 pm
Subject: Re: [HACMan] Fancy RGB LEDs with built in control chip
On 24/10/12 14:21, Bob Clough wrote:

> Some more details, including sample code for talking to them:
> http://www.insomnialighting.com/products/rgbsmdws2811.html

I think this code is working more by luck than by anything else.

Assuming the pixels are set to high speed mode (800Kbps) then each bit
period is 1.25usec long.  It appears that the WS2881 reads each incoming
bit by looking for a rising edge at the beginning of each bit cell, and
then sampling 1/2 way through each cell - if it's high a 1 is being
transmitted, if it's low then it's a 0.

The example code is using a 4MHz SPI clock and writing 8 bits for each
bit of the value it is sending, either 0b10000000 for zero or 0b11110000
for a one.  8 bits @ 4MHz = 2usec per bit cell or an effective baud rate
of 500Kbps, whereas the spec says it should be 800Kbps, so it's 37.5%
out - a huge margin.  I think the only reason it works is because the
WS2881 must be re-syncing on the rising edge at the start of each bit
cell - if this was a normal async serial connection it just wouldn't
work with that degree of clock skew.

What the code *should* be doing is writing 5 bits for each bit it sends,
say 0b10000 for 0 and 0b11110 for 1.  5 bits @ 4MHz = 1.25usec, which is
the specified bit cell length.  Of course, writing 5 bits a time is a
lot more complicated to implement as there's a more bit-fiddling to do
to marshal the 5-bit chunks into the 8-bit SPI output register.

On the AVR it *may* be possible to do this more easily with the USART
than with the SPI hardware.  The USART has a synchronous mode where it
doesn't use start/stop bits, using instead a clock signal on one of the
pins.  If I've read the docs correctly, it *should* be possible to get
it to run at 4MHz (just!).  The advantage of the USART is that it can be
set to transmit 5-bit frames, which will then give exactly the right bit
cell length of 1.25usec.  The other advantage that the USART has over
the SPI hardware is that unlike the SPI hardware it is double-buffered,
so you can drive it at full line speed.

There's other not-so-good stuff in the code as well, such as the use of
the modulo operator and multiplication instead of bit masking and
shifting.  It might work OK on a 64Mhz PIC but on an AVR the
consequential multiplication and division operations will be problematic.

--
Alan Burlison
--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kimball Johnson  
View profile  
 More options Oct 29 2012, 2:06 am
From: Kimball Johnson <kimb...@bowerham.net>
Date: Mon, 29 Oct 2012 06:06:25 +0000
Local: Mon, Oct 29 2012 2:06 am
Subject: Re: [HACMan] Fancy RGB LEDs with built in control chip
I believe the example code is for the pixels at 400Kbps.

Kimball

On 29 October 2012 00:55, Alan Burlison <alan.burli...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alan Burlison  
View profile  
 More options Oct 29 2012, 9:25 am
From: Alan Burlison <alan.burli...@gmail.com>
Date: Mon, 29 Oct 2012 13:25:31 +0000
Local: Mon, Oct 29 2012 9:25 am
Subject: Re: [HACMan] Fancy RGB LEDs with built in control chip

On 29 October 2012 06:06, Kimball Johnson <kimb...@bowerham.net> wrote:

I believe the example code is for the pixels at 400Kbps.


It's still wrong then - 500Kbps != 400Kbps ;-)

And according to the webpage that links to the source code:

The WS2811 recommended timing essentially divides the bit cell into fifths.
A 1 is sent as 1000ns high (4 segments) followed by 250ns low (1 segment),
while a 0 is sent as 250ns high and 1000 ns low. The fact is that either
approach will work, the only thing the pixel chip really cares about is the
state of the data line at 625ns.

That doesn't agree with the intra-cell timings given in the datasheet, but
it does agree as to the overall cell length, 1.25usec, i.e. 800Kbps.

I guess we'll just have to wait until they arrive to find out :-)

--
Alan Burlison
--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kimball Johnson  
View profile  
 More options Nov 9 2012, 6:16 pm
From: Kimball Johnson <kimb...@bowerham.net>
Date: Fri, 9 Nov 2012 23:16:58 +0000
Local: Fri, Nov 9 2012 6:16 pm
Subject: Re: [HACMan] Fancy RGB LEDs with built in control chip
Test on a minimus, bit banging directly.

Video:
http://youtu.be/H1lzfXfXpTs
Code:
https://gist.github.com/4986900519c04814951a

Kimball

On 29 October 2012 13:25, Alan Burlison <alan.burli...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alan Burlison  
View profile  
 More options Nov 14 2012, 6:57 pm
From: Alan Burlison <alan.burli...@gmail.com>
Date: Wed, 14 Nov 2012 23:57:09 +0000
Local: Wed, Nov 14 2012 6:57 pm
Subject: Re: [HACMan] Fancy RGB LEDs with built in control chip
On 09/11/2012 23:16, Kimball Johnson wrote:

> Test on a minimus, bit banging directly.

Just got hold of mine tonight from Bob, gonna see if I can drive them
from the USART in synchronous mode.  For power, did you use any current
limiting with it, or did you just wire the LED up directly to 5V?

--
Alan Burlison
--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alan Burlison  
View profile  
 More options Nov 15 2012, 3:16 pm
From: Alan Burlison <alan.burli...@gmail.com>
Date: Thu, 15 Nov 2012 20:16:10 +0000
Local: Thurs, Nov 15 2012 3:16 pm
Subject: Re: [HACMan] Fancy RGB LEDs with built in control chip
I've got the datasheet for the controller, but not the pinout of the
pixels themselves.  Are they as per the pinout on this page?

http://www.aliexpress.com/store/product/5050-SMD-RGB-LED-with-built-i...

And do they need current limiting?

Ta,

--
Alan Burlison
--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kimball Johnson  
View profile  
 More options Nov 15 2012, 3:50 pm
From: Kimball Johnson <kimb...@bowerham.net>
Date: Thu, 15 Nov 2012 20:50:36 +0000
Local: Thurs, Nov 15 2012 3:50 pm
Subject: Re: [HACMan] Fancy RGB LEDs with built in control chip

Yes :) And thanks as they show with voltage is for the LEDs and which is
the controls :)

On 15 November 2012 20:16, Alan Burlison <alan.burli...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kimball Johnson  
View profile  
 More options Nov 15 2012, 3:52 pm
From: Kimball Johnson <kimb...@bowerham.net>
Date: Thu, 15 Nov 2012 20:52:06 +0000
Local: Thurs, Nov 15 2012 3:52 pm
Subject: Re: [HACMan] Fancy RGB LEDs with built in control chip

Oh current limiting, not sure.

On 15 November 2012 20:50, Kimball Johnson <kimb...@bowerham.net> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alan Burlison  
View profile  
 More options Nov 15 2012, 4:31 pm
From: Alan Burlison <alan.burli...@gmail.com>
Date: Thu, 15 Nov 2012 21:31:46 +0000
Local: Thurs, Nov 15 2012 4:31 pm
Subject: Re: [HACMan] Fancy RGB LEDs with built in control chip

On 15/11/2012 20:50, Kimball Johnson wrote:

> Yes :) And thanks as they show with voltage is for the LEDs and which is
> the controls :)

For testing I've just wired them together, I'm sure they'll need a
separate 5V for longer runs, and caps.

> Oh current limiting, not sure.

Actually, I think they probably don't.  The WS2811 datasheet says:

Built in stabilivolt, Only add a resistance to IC VDD feet when under
24V power supply.

Which if if I have my Chinglish straight means 'no', and if you look at
the attached image of them on a strip there's just a cap next to each
LED and nothing else.

--
Alan Burlison
--

  strip.jpg
86K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alan Burlison  
View profile  
 More options Nov 15 2012, 8:02 pm
From: Alan Burlison <alan.burli...@gmail.com>
Date: Fri, 16 Nov 2012 01:02:05 +0000
Local: Thurs, Nov 15 2012 8:02 pm
Subject: Re: [HACMan] Fancy RGB LEDs with built in control chip

I noticed the code you posted on github wasn't displaying red properly so
I've fixed that in my copy.

I adjusted the on/off times to 250nsec/1000nsec to match the datasheet that
Bob sent a link out to, and that seems to work fine too - the timings don't
seek to be all that critical.

I also noticed that the data order in the datasheet is wrong, it has to be
sent GRB not RGB.

And finally, I stuck the scope on the output and measured the actual times
- on my tweaked version of the code they are about 62nsec longer than the
value that's passed to the _delay_ns function, or about 1 instruction.  The
original version showed a bit more variability, not sure why.

On 15 November 2012 21:31, Alan Burlison <alan.burli...@gmail.com> wrote:

--
Alan Burlison
--

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kimball Johnson  
View profile  
 More options Nov 16 2012, 4:44 am
From: Kimball Johnson <kimb...@bowerham.net>
Date: Fri, 16 Nov 2012 09:44:35 +0000
Local: Fri, Nov 16 2012 4:44 am
Subject: Re: [HACMan] Fancy RGB LEDs with built in control chip
As these are (allegedly)¡ high speed mode this is why I halved the times.

I know red wasn't' working - what did you do?

Can you paste your version of the code?

Kimball

On 16 November 2012 01:02, Alan Burlison <alan.burli...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kimball Johnson  
View profile  
 More options Nov 16 2012, 6:18 am
From: Kimball Johnson <kimb...@bowerham.net>
Date: Fri, 16 Nov 2012 11:18:13 +0000
Local: Fri, Nov 16 2012 6:18 am
Subject: Re: [HACMan] Fancy RGB LEDs with built in control chip
Seems I have it working now, i'll put up the code later.

I misunderstood your timeings - they are high speed.  No idea why red
wasn't working on my original, but I think the bringing the line up
high again after the reset was the issue - misinterperation of the
datasheet by my Father and I.

thanks.

Kimball

On 16 November 2012 09:44, Kimball Johnson <kimb...@bowerham.net> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alan Burlison  
View profile  
 More options Nov 16 2012, 8:55 am
From: Alan Burlison <alan.burli...@gmail.com>
Date: Fri, 16 Nov 2012 13:55:38 +0000
Local: Fri, Nov 16 2012 8:55 am
Subject: Re: [HACMan] Fancy RGB LEDs with built in control chip

On 16/11/2012 11:18, Kimball Johnson wrote:

> Seems I have it working now, i'll put up the code later.

> I misunderstood your timeings - they are high speed.  No idea why red
> wasn't working on my original, but I think the bringing the line up
> high again after the reset was the issue - misinterperation of the
> datasheet by my Father and I.

Yes, I'm using high speed timings and yes, I seem to remember the issue
with red was as you say, although I've hacked the code a lot since then
so I don't have that version around any more.

Here's a version that steps through the 7 primary/secondary colours and
then does a slow fade across them all.  Note I'm using pin 0 on portb
rather than pin1 so you should change the PIN #define appropriately.

I can see glitching on some of the fades on the attached code.  The
timings on the datasheet are +-150nsec and on the AVR at 16MHz each
instruction takes 62.5nsec, so we are talking about less than 3
instructions. The unavoidable loop overhead is going to skew the
timings, probably enough to cause the glitching I'm seeing.  To get
reliable operation, it's probably going to be necessary to drop into
assembly.

--
Alan Burlison
--

  main.c
3K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alan Burlison  
View profile  
 More options Nov 16 2012, 6:01 pm
From: Alan Burlison <alan.burli...@gmail.com>
Date: Fri, 16 Nov 2012 23:01:22 +0000
Local: Fri, Nov 16 2012 6:01 pm
Subject: Re: [HACMan] Fancy RGB LEDs with built in control chip
On 16/11/2012 13:55, Alan Burlison wrote:

> I can see glitching on some of the fades on the attached code. The
> timings on the datasheet are +-150nsec and on the AVR at 16MHz each
> instruction takes 62.5nsec, so we are talking about less than 3
> instructions. The unavoidable loop overhead is going to skew the
> timings, probably enough to cause the glitching I'm seeing. To get
> reliable operation, it's probably going to be necessary to drop into
> assembly.

I've tweaked the timings some more and as far as I can tell the
glitching is gone.  I could have gone through the disassembly and
carefully counted clock cycles but instead I cheated, stuck it on the
storage scope, measured the amount the pulses were out and just
subtracted that from the timings passed to the _delay_ns() call :-)

I'm still not convinced that these things are entirely practical when
driven from a 16MHz AVR because of the high clock rate and tight timing
constraints.  I'm going to see if I can devise some way of getting some
form of hardware assist rather than just bit-banging, because I think
but-banging is going to be impractical when trying to drive a reasonable
number of these whilst doing anything else at all.

--
Alan Burlison
--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alan Burlison  
View profile  
 More options Nov 16 2012, 6:45 pm
From: Alan Burlison <alan.burli...@gmail.com>
Date: Fri, 16 Nov 2012 23:45:26 +0000
Local: Fri, Nov 16 2012 6:45 pm
Subject: Re: [HACMan] Fancy RGB LEDs with built in control chip
 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Engineer's victory dance" by Alan Burlison
Alan Burlison  
View profile  
 More options Nov 18 2012, 8:02 am
From: Alan Burlison <alan.burli...@gmail.com>
Date: Sun, 18 Nov 2012 13:02:13 +0000
Local: Sun, Nov 18 2012 8:02 am
Subject: Engineer's victory dance

On 16/11/2012 23:01, Alan Burlison wrote:

> I'm still not convinced that these things are entirely practical when
> driven from a 16MHz AVR because of the high clock rate and tight timing
> constraints. I'm going to see if I can devise some way of getting some
> form of hardware assist rather than just bit-banging, because I think
> but-banging is going to be impractical when trying to drive a reasonable
> number of these whilst doing anything else at all.

They are practical - just.  There wasn't any way to realistically
generate the required waveform in hardware because the shortest pulse
you have to send (250nsec) equates to just 4 instructions at 16MHz.
After some googling around I ended up using 250nsec and 1000nsec as the
two hi/lo periods rather than the somewhat odd ones given in the
datasheet.  I've written some assembler to do it, which is compact
(around 120 bytes).  The assembler generated if you use the delay_x.h
routines comes out as a huge loop-unrolled routine, and it jitters badly
anyway.

I need to finish this up properly, but here's a screenshot of the
hand-crafted assembler outputting one byte of 0x0F.  It's running at
exactly 800KHz/bit :-)

--
Alan Burlison
--

  ws2811.png
17K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Fancy RGB LEDs with built in control chip" by Alan Burlison
Alan Burlison  
View profile  
 More options Dec 28 2012, 7:12 am
From: Alan Burlison <alan.burli...@gmail.com>
Date: Fri, 28 Dec 2012 12:12:34 +0000
Local: Fri, Dec 28 2012 7:12 am
Subject: Re: [HACMan] Fancy RGB LEDs with built in control chip
On 24/10/2012 14:21, Bob Clough wrote:

> Kimball and I have just bought some cool looking LEDs.  They are RGB and
> have a built in controller chip, so you feed them 5v and send them a 1 wire
> control signal, and they stay that colour!

I tried ordering 100 of these from aliexpress but I got a mail back
saying that payment could not be verified (I used a VISA card). How did
you pay for yours?

--
Alan Burlison
--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kimball Johnson  
View profile  
 More options Dec 28 2012, 11:56 am
From: Kimball Johnson <kimb...@bowerham.net>
Date: Fri, 28 Dec 2012 16:56:52 +0000
Local: Fri, Dec 28 2012 11:56 am
Subject: Re: [HACMan] Fancy RGB LEDs with built in control chip

> I tried ordering 100 of these from aliexpress but I got a mail back saying
> that payment could not be verified (I used a VISA card). How did you pay for
> yours?

Mastercard.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 38   Newer >
« Back to Discussions « Newer topic     Older topic »