OctoWS2811 LED Lib and Audio Lib - Freq/Amplitude driving LED color and brightness

Status
Not open for further replies.

Davidelvig

Well-known member
I'm picking up on Audio + LED strips because my 13 year old is bugging me for a cool led strip in her room... responsive to audio (amplitude and pitch). I offered this to her 2 years ago, but bailed on this project shortly thereafter because of (probably) interrupt conflicts between the audio library's FFT1024 and the fastLED library's simultaneous use of interrupt routines.

I'm back on it.

I have the "Teensy 3.2 OctoWS2811 Adaptor" and can run examples\Octo...\rainbow installed with Teensyduino.
I'm using a Teensy 3.2 and have 3.6's in stock.
The latest Arduino and Teensyduino is installed on a Mac accessible to her.

I've not added back the Audio yet.

By default, I'd plan to use a Neutronned mic and the ADC input from the audio library... piped into an FFT1024 object.

I've seen other posts about the interrupt problems... one suggesting disabling the audio interrupts before executing the LED update call, and reenabling thereafter.

What's the best practice for making a frequency-and-amplitude-responsive LED strip?


Thanks!
 
What's the best practice for making a frequency-and-amplitude-responsive LED strip?

The 2 easy ways are:

1: ADC input and OctoWS2811 or WS2812Serial.

2: Audio shield and WS2812Serial.

Both WS2812Serial and OctoWS2811 do not block interrupts, so the audio lib can run just fine with either of these controlling the LEDs. No need to disable audio or do anything special with the interrupts.

If using FastLED, both OctoWS2811 and WS2812Serial can be used as a FastLED driver. Just don't use FastLED's built in WS2812 driver, since it blocks interrupts.
 
Will do.
I took the quick route and used:
- a Teensy 3.2 with the USB power cut
- a 5V, 8A power adaptor
- a teensy audio shield, and the AudioInputI2S for an electret microphone
- a teensy OctoWS2811 Adaptor
- one LED strip... 150 LEDs - 5 meters in length (Alitove)

I'd like to add some touchable buttons for user interface (using the capacitive touch pins on the Teensy).
I'm struggling to find a free pin that would allow a capacitive touch for input.
I see at https://www.pjrc.com/store/octo28_adaptor.html that the shield draws many pins to ground, and pins 15 & 16 are tied to each other.

Are the touch pins accessible in any way with the shield in place.?
Otherwise, what input means (buttons, potentiometers, encoders) might work with the shield in use?

I'll be downloading the WS2812Serial library and also trying the Neutronned mic and ADC input to free up some hardware. (no audio or Octo shield)
I have a buffer chip I can use to get 5V singles to the strip.

Pictures will come when it's more beautiful!
 
Will do.
I took the quick route and used:
- a Teensy 3.2 with the USB power cut
- a 5V, 8A power adaptor
- a teensy audio shield, and the AudioInputI2S for an electret microphone
- a teensy OctoWS2811 Adaptor
- one LED strip... 150 LEDs - 5 meters in length (Alitove)

I'd like to add some touchable buttons for user interface (using the capacitive touch pins on the Teensy).
I'm struggling to find a free pin that would allow a capacitive touch for input.
I see at https://www.pjrc.com/store/octo28_adaptor.html that the shield draws many pins to ground, and pins 15 & 16 are tied to each other.

Are the touch pins accessible in any way with the shield in place.?
Otherwise, what input means (buttons, potentiometers, encoders) might work with the shield in use?

I'll be downloading the WS2812Serial library and also trying the Neutronned mic and ADC input to free up some hardware. (no audio or Octo shield)
I have a buffer chip I can use to get 5V singles to the strip.

Pictures will come when it's more beautiful!
There are some pins that overlap between the audio shield and the octows2811 shield. I'm not sure they would play together.

The 7 pins brought out to the side of the octows2811 shield (0, 1, 23/A9, 22/A8, 19/A5, 18/A4, and 17/A3) all support touch sensitive inputs, and 5 of the pins can also be used for analog inputs. Note, if you plan to use i2c, you would need to use pins 18/19 for that, and that would leave 0, 1, 23, 22, and 17. Pins 23 and 22 are used for I2S.

If you haven't soldered things together yet, you might be able to slip one of the shields that fit underneath the Teensy to bring out the pins underneath the Teensy:

Or switch to a Teensy 3.6 (note, the 3.5 won't support touch sensing, but the 3.5 is 5v tolerant).
 
WS2812Serial is much better for this single-string project.
Thanks, Paul & Michael.
It's very easy using one LED control pin for a single string of 209 LEDs. All of the other pins are open for the push-button encoder, ADC microphone, I2S accelerometer, and I expect, capacitive touch.
This might be a good intro project for someone wanting to try a bunch of input devices, and have the LEDs as feedback.
I'll post pics, schematics, wire gauges, etc (and an STL file for 3D printing a controls housing.
Mounting on the canopy bed today.
 
WS2812Serial is much better for this single-string project.
Thanks, Paul & Michael.
It's very easy using one LED control pin for a single string of 209 LEDs. All of the other pins are open for the push-button encoder, ADC microphone, I2S accelerometer, and I expect, capacitive touch.
This might be a good intro project for someone wanting to try a bunch of input devices, and have the LEDs as feedback.
I'll post pics, schematics, wire gauges, etc (and an STL file for 3D printing a controls housing.
Mounting on the canopy bed today.

Hi,
I'm doing something very similar (trying to use aux input in audio shield)
I would really appreciate more details as I can't seem to make audio shield and octows work together.
 
@gavra,
I'm happy to help. There a a few main options that will affect your choices.
Can you list your available parts?
- Teensy ? version
- LED lights - brand, technology (WS2812?), number of strips, LEDs per strip
- audio source (is this a line out from a radio?) or a microphone
- 5V power supply
- Teensy Audio shield
 
OK, here's a simple LED project that works with WS2812Serial and the Audio library
My first attempt with Fritzing:
Mic-To-LED.png
Note there are two voltages represented in red:
  • 5V from the jumper into the LED strip and Teensy through VIN, and
  • 3.3V out of the Teensy to power the mic.

The mic is fairly unique - it's the right voltage (1.2V) to use directly with the Teensy Audio Library's ADC input.
@Neutronned sells them on Tindy, I think.

The LED strips use 5V and noticeable current. Lots of posts on this forum (and guidance from Paul) on 5V power supply sizing.
Note, this also assumes cutting of the VUSB bridge on the back of the Teensy to avoid feeding power back into the PC's USB port.

This setup allows using the audio libraries FFT1024 object, and analyzing the bins to make a sound visualizer on the LEDs.
I could share a sketch to demonstrate that.
 
Updated graphic. The signal line to the LEDs must use a Hardware Serial pin on the Teensy. I moved the yellow connector.
Mic-To-LED.png
 
My sketch will only be for a single string, and a 150 LED string will be great fun.
I think you'll have trouble with the OctoAdaptor (which uses many pins and ties most of the others to ground) and the Audio Shield, which also needs a number of dedicated pins for all of its functions.

Start with a single LED strip solution above if you can get a mic at the right level (close to 1.2 V peak-to-peak, such as the Neutronned)
If no acceptable 1.2V Mic, use the Audio shield (and not the Octo shield) for a single strip solution, using the WS2812Serial library for LED, and picking an unoccupied hardware serial pin for the LED signal line.

For a 7-strip solution, I think it will be the Octo shield and find a free pin to connect a Neutronned mic for the ADC input using the Audio library, but not the Audio shield.
 
Status
Not open for further replies.
Back
Top