seanspotatobusiness
Posts: 192
Joined: Tue May 22, 2012 11:19 pm

Was it always possible to control addressable LEDs with a Pi?

Wed Sep 11, 2019 5:10 pm

This is a somewhat stupid question but did it used to be impossible to control addressable LEDs with a Pi? I was under the impression that a microcontroller had to be used in order to give a reliably timed signal but now I've seen a bunch of tutorials that say it is possible to do this with a Pi. I'm now wondering where I got the idea that it wasn't possible and figure maybe it used to be that way with earlier Pis or was it never an issue?
Raspberry Pi 3 B and B+
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"

User avatar
joan
Posts: 14376
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Was it always possible to control addressable LEDs with a Pi?

Wed Sep 11, 2019 5:17 pm

It's always been possible with LED strips which have a separate clock and data line (e.g. APA102 based strips). Self clocking data lines have been the problem as the signals have to be timed accurately in the microsecond region (e.g. WS2801 based strips). The self clocking strips had to wait for Pi specific software to be developed.

mattmiller
Posts: 2115
Joined: Thu Feb 05, 2015 11:25 pm

Re: Was it always possible to control addressable LEDs with a Pi?

Wed Sep 11, 2019 5:19 pm

It used to be said in the early days but someone rose to the challenge and made it possible :)

Also, you'll find lots of articles saying you need level-shifters to drive them but I've never done so and not had a problem

I use WS2812 types

seanspotatobusiness
Posts: 192
Joined: Tue May 22, 2012 11:19 pm

Re: Was it always possible to control addressable LEDs with a Pi?

Wed Sep 11, 2019 5:22 pm

Thanks for the prompt responses!
Raspberry Pi 3 B and B+
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"

trejan
Posts: 757
Joined: Tue Jul 02, 2019 2:28 pm

Re: Was it always possible to control addressable LEDs with a Pi?

Wed Sep 11, 2019 5:31 pm

mattmiller wrote:
Wed Sep 11, 2019 5:19 pm
Also, you'll find lots of articles saying you need level-shifters to drive them but I've never done so and not had a problem
It usually works but there is no guarantee. You're violating the published specifications of the WS2812 if you do this. The datasheet says input high is 0.7 x Vdd which means > 3.5V is considered high if you power it via 5V. Feeding it 3.3V from the Pi means you're in the undefined region between input high and input low.

If it is for a one-off home project then skip the level shifter. If you're making it to sell or it'll be installed somewhere difficult to access then put the level shifter in for peace of mind.

mattmiller
Posts: 2115
Joined: Thu Feb 05, 2015 11:25 pm

Re: Was it always possible to control addressable LEDs with a Pi?

Wed Sep 11, 2019 8:36 pm

If you're making it to sell or it'll be installed somewhere difficult to access then put the level shifter in for peace of mind.
Sound advice :) I just use mine around the home

Return to “Beginners”