Controlling 3-wire PWM led light strips at same time as stereo card?
Moderator: flatmax
Controlling 3-wire PWM led light strips at same time as stereo card?
Hello. I have just started using the stereo soundcard so I am still trying to figure everything out. My goal is to use the input, have some kind of spectrum analyzer or other visual effect using a 3-wire led light strip (WS2812B), then have the audio run to a powered amplifier. From what I have read, the stereo card uses PWM but the light strip also uses PCM/PWM. Does that mean I should use something like a PWM HAT (Adafruit 16-Channel PWM / Servo HAT for Raspberry Pi: https://www.adafruit.com/product/2327)? I appreciate your input. Thank you.
Re: Controlling 3-wire PWM led light strips at same time as stereo card?
Hi there,
The audio injector sound cards use the I2S bus for comms. That means that it is likely that the PWM silicon on the Pi is free for you to use.
Oh hang on - does the PWM use pin 19 ? Pin 19 is the I2S LRCLK ... that may be a problem.
If that is a problem, then yes you should get a PWM hat.
Matt
The audio injector sound cards use the I2S bus for comms. That means that it is likely that the PWM silicon on the Pi is free for you to use.
Oh hang on - does the PWM use pin 19 ? Pin 19 is the I2S LRCLK ... that may be a problem.
If that is a problem, then yes you should get a PWM hat.
Matt
Check out our audiophile quality crossovers : https://bit.ly/2kb1nzZ
Please review the Zero sound card on Amazon USA : https://www.amazon.com/dp/B075V1VNDD
---
Check out our new forum on github : https://github.com/Audio-Injector
Please review the Zero sound card on Amazon USA : https://www.amazon.com/dp/B075V1VNDD
---
Check out our new forum on github : https://github.com/Audio-Injector
Re: Controlling 3-wire PWM led light strips at same time as stereo card?
Thank you for your response! I am refinishing an antique radio cabinet that i'm planning to put a Chromecast Audio in as input to a Pi3 with the Stereo Sound Card, use an led strip lights as a spectrum analyzer or some kind of music-synced light effects, then output to amplified speakers. I haven't worked a lot on the sound/lights combo yet since I have been working on the cabinet.
Prior to working with the stereo sound card I was able to get the lights working well but it required disabling all on-board sound by blacklisting everything on boot:
blacklist snd_bcm2835
blacklist snd_pcm
blacklist snd_timer
blacklist snd_pcsp
blacklist snd
With the stereo sound card I am able to get sound output and input to output when I put it into bypass, but the lights are not working properly. If I try to control the lights then either the wrong lights light up or in the wrong colors. I will look at what you suggested with the pins. I was also going to give the pigpiod library a try to see if I can do both without them interfering with each other. Thank you again!
Prior to working with the stereo sound card I was able to get the lights working well but it required disabling all on-board sound by blacklisting everything on boot:
blacklist snd_bcm2835
blacklist snd_pcm
blacklist snd_timer
blacklist snd_pcsp
blacklist snd
With the stereo sound card I am able to get sound output and input to output when I put it into bypass, but the lights are not working properly. If I try to control the lights then either the wrong lights light up or in the wrong colors. I will look at what you suggested with the pins. I was also going to give the pigpiod library a try to see if I can do both without them interfering with each other. Thank you again!
Re: Controlling 3-wire PWM led light strips at same time as stereo card?
I was able to get a working test by moving the LED strip control to PWM1. I have been able to have audio from the card and precise control of the lights without interruptions. Thank you!
Re: Controlling 3-wire PWM led light strips at same time as stereo card?
With the help of the suggestions here I have this working. To help anyone else struggling to get WS281x (Neopixels) RGB LED strips working at the same time as this card, use:
GPIO Pin: 13 (physical pin 33)
DMA Channel: 5,
PWM Channel: 1
I found all other options (PWM Channel 0, PCM, SPI) all conflict with the card in various ways.
GPIO Pin: 13 (physical pin 33)
DMA Channel: 5,
PWM Channel: 1
I found all other options (PWM Channel 0, PCM, SPI) all conflict with the card in various ways.
Who is online
Users browsing this forum: No registered users and 5 guests