0

16-Channel 12-bit PWM/Servo Driver & NeoPixel Strip
Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Please be positive and constructive with your questions and comments.

16-Channel 12-bit PWM/Servo Driver & NeoPixel Strip

by afterdark73 on Sat Jan 12, 2019 4:50 pm

Hi

Fairly new to this game but loving every minute of it! Is it possible to connect one (or more) NeoPixel addressable RGB strips to the outputs on an 16 channel PWM driver? I have it driving single LED/s and servos fine but would like to connect a number of NeoPixel strips as well if possible (running on R.Pi 3B+)
I suspect my issue is more working out how to use the software libraries correctly than physical connectivity but would really appreciate any gueidance anuyone can gine - even if its that it wont work :)

Many thanks

Paul

afterdark73
 
Posts: 7
Joined: Sat Jan 12, 2019 4:44 pm

Re: 16-Channel 12-bit PWM/Servo Driver & NeoPixel Strip

by adafruit_support_bill on Sat Jan 12, 2019 4:59 pm

The PWM/Servo driver is not capable of driving Neopixels. Although it is possible to control neopixels directly from a Raspberry Pi. See this guide for details:
https://learn.adafruit.com/neopixels-on ... i/overview

adafruit_support_bill
 
Posts: 70982
Joined: Sat Feb 07, 2009 10:11 am

Re: 16-Channel 12-bit PWM/Servo Driver & NeoPixel Strip

by afterdark73 on Sat Jan 12, 2019 5:12 pm

adafruit_support_bill wrote:The PWM/Servo driver is not capable of driving Neopixels. Although it is possible to control neopixels directly from a Raspberry Pi. See this guide for details:
https://learn.adafruit.com/neopixels-on ... i/overview


Many thanks for the quick reply and confirming my fears LOL

The documentation states the NeoPixel must be connected to GPIO10, GPIO12, GPIO18 or GPIO21 - does the PWM use any of these ports or am I ok to take a feed from them with the PWM still attached (trying to avoid the need for a second Pi in my model)

cheers

Paul

afterdark73
 
Posts: 7
Joined: Sat Jan 12, 2019 4:44 pm

Re: 16-Channel 12-bit PWM/Servo Driver & NeoPixel Strip

by adafruit_support_bill on Sat Jan 12, 2019 5:22 pm

The PWM/Servo driver uses only the SDA and SCL pins (GPIO02 and GPIO03). So all the others are all available for use.

(trying to avoid the need for a second Pi in my model)

If you were going to add a second processor, an Arduino or compatible would be a better choice for controlling Neopixels.

adafruit_support_bill
 
Posts: 70982
Joined: Sat Feb 07, 2009 10:11 am

Re: 16-Channel 12-bit PWM/Servo Driver & NeoPixel Strip

by afterdark73 on Sat Jan 12, 2019 5:27 pm

adafruit_support_bill wrote:The PWM/Servo driver uses only the SDA and SCL pins (GPIO02 and GPIO03). So all the others are all available for use.

(trying to avoid the need for a second Pi in my model)

If you were going to add a second processor, an Arduino or compatible would be a better choice for controlling Neopixels.


understood, thanks!

Not really looked at the Arduino yet - what does it offer over and above what I can do with a Pi? Does that out weight the complexities of using two different technologies in the solution?

thanks again

afterdark73
 
Posts: 7
Joined: Sat Jan 12, 2019 4:44 pm

Re: 16-Channel 12-bit PWM/Servo Driver & NeoPixel Strip

by adafruit_support_bill on Sat Jan 12, 2019 5:46 pm

The Raspberry Pi is a general-purpose microconputer - running Linux, which is a time-sharing operating system. Since Linux cannot guarantee the timing of your code execution, you cannot meet the tight timing constraints of the Neopixel control protocol with code alone. You need to utilize the low-level PWM and DMA capabilities of the processor.

Arduino and compatible processors are microcontrollers. There is no operating system, so you have 100% control over every processor cycle. Even an inexpensive & low-powered processor like a Trinket can easily meet the timing constraints and control multiple strings of Neopixels. And, if you use one of the 5v microcontrollers, you can avoid the level shifting requirement too.

adafruit_support_bill
 
Posts: 70982
Joined: Sat Feb 07, 2009 10:11 am

Re: 16-Channel 12-bit PWM/Servo Driver & NeoPixel Strip

by afterdark73 on Sat Jan 12, 2019 6:04 pm

adafruit_support_bill wrote:The Raspberry Pi is a general-purpose microconputer - running Linux, which is a time-sharing operating system. Since Linux cannot guarantee the timing of your code execution, you cannot meet the tight timing constraints of the Neopixel control protocol with code alone. You need to utilize the low-level PWM and DMA capabilities of the processor.

Arduino and compatible processors are microcontrollers. There is no operating system, so you have 100% control over every processor cycle. Even an inexpensive & low-powered processor like a Trinket can easily meet the timing constraints and control multiple strings of Neopixels. And, if you use one of the 5v microcontrollers, you can avoid the level shifting requirement too.


ok, cool - will add it to my every growing research list :)

many thanks for all the help - really useful!

afterdark73
 
Posts: 7
Joined: Sat Jan 12, 2019 4:44 pm

Please be positive and constructive with your questions and comments.