I'm trying to build some sound sensitive shirt which uses OctoWS2811 using the Adafruit mic breakout board (https://www.adafruit.com/products/1063) on a Teensy 3.1.
With no sound playing, running the following code, I find I get much larger noise if I'm calling OctoWS2811's show() method in the same loop(). (Something like ~400 vs ~50). I've tested with an external pre-amp circuit on the same pin and don't see the same noise difference and the main thing I can think of is that the external pre-amp circuit has a cap on it's power supply. Both my circuit and the breakout board are being powered from the 3.3V output of a Teensy 3.1.
The attached schematic is close to what I'm testing with. Differences include:
- R6 is 10K
- VIN isn't attached to VDD, Teensy is powered via USB.
- VDD is 5V wall wart
- At the end of R9 is the data line for a NeoPixel 8x8 grid, currently unplugged/unpowered.
- In the problem configuration, the out of the breakboard is attached directly to A3 (I've also tested it with A4).
- Have a 74HCT244 attached instead of the 74HCT125.
I was thinking that the power supply is being drained too much with the DMA and a capacitor across the 3.3v would help. I don't feel confident about this idea because the other circuit is still attached to the 3.3v with it's capacitor.
Using 10 bits analogReadReference() and analogReference(DEFAULT) (do I need to attach AREF back to 3.3v?). I've tried both with and without analogReadAveraging(16) without any major difference.
Thanks in advance...
With no sound playing, running the following code, I find I get much larger noise if I'm calling OctoWS2811's show() method in the same loop(). (Something like ~400 vs ~50). I've tested with an external pre-amp circuit on the same pin and don't see the same noise difference and the main thing I can think of is that the external pre-amp circuit has a cap on it's power supply. Both my circuit and the breakout board are being powered from the 3.3V output of a Teensy 3.1.
The attached schematic is close to what I'm testing with. Differences include:
- R6 is 10K
- VIN isn't attached to VDD, Teensy is powered via USB.
- VDD is 5V wall wart
- At the end of R9 is the data line for a NeoPixel 8x8 grid, currently unplugged/unpowered.
- In the problem configuration, the out of the breakboard is attached directly to A3 (I've also tested it with A4).
- Have a 74HCT244 attached instead of the 74HCT125.
I was thinking that the power supply is being drained too much with the DMA and a capacitor across the 3.3v would help. I don't feel confident about this idea because the other circuit is still attached to the 3.3v with it's capacitor.
Using 10 bits analogReadReference() and analogReference(DEFAULT) (do I need to attach AREF back to 3.3v?). I've tried both with and without analogReadAveraging(16) without any major difference.
Thanks in advance...
Code:
int min = analogRead(AUDIO_INPUT_PIN);
int max = min;
for (int i = 0; i < 10000; ++i) {
int value = analogRead(AUDIO_INPUT_PIN);
min = min(min, value);
max = max(max, value);
}
Serial.print("m=");
Serial.print(min);
Serial.print(" M=");
Serial.print(max);
Serial.print(" D=");
Serial.println(max - min);