Greetings, and thanks for the wonderfull teensies !
I have an issue on a product I'm developping.
My project is an audio effect with 1 input and two outputs using a teensy 4.0 and the sgtl5000.
The user has controls on the effects via several push buttons and 5 potentiometers which are hooked on A0,A1,A2, A3, A8
The project is working perfectly except for a noise issue : continuous digital noise int both of the audio outputs, even when the software send complete silence on the DAC outputs.
The cause of the noise are calls to analogRead.
The analog inputs are read continuously in a loop :
- read analog inputs
- read digital inputs
- update effect parameters and get outputs
- update digital outs (few leds)
- wait 5ms
the issue persists if I remove all code except analog reads, playing with the delay confirms the issue (with 1sec delay I hear a clic every second on the output)
We are 2 people working on this project, I handle the software part and my associate the hardware design.
They are analog gain stages pre-ADC and post-DAC.
I searched extensively the forum and google for leads and found theses interesting threads :
https://forum.pjrc.com/threads/69717-High-gain-audio-amp-picks-up-noise-from-analogRead
https://forum.pjrc.com/threads/25553-analogRead-and-audio
https://forum.pjrc.com/threads/63641-audio-input-output-noise
decreasing ADC bit depth, ADC sampling frequency, or even not using the analog inputs is not something we can do unfortunately.
So now the question :
- Could someone confirm that the issue is on the hardware side, I understand that triggering an analog read provokes a current draw from the Teensy which is causing the clics but my analysis may be incomplete.
--> if not, what could I do in software to remove/reduce this noise ? (once again compromising the depth, or sampling rate of analog reads is not feasible without compromising the whole project)
- Is there something that could be done / checked in hardware to reduce/remove this noise, that's not mentioned in the above threads ?
I didn't post any code as i don't expect a solution for my use case, and I don't think there is an issue in the code, but I'm rather expecting a list of checks that I'll give to the person in charge of the electronics (and to be sure I've not omitted anything on the software side of things) and I don't have access to the schematic. Once again, i don't expect someone to do the debugging for us but rather leads / ideas/ hypothesis of things we may have overlooked.
Thanks a lot.
JBAX
I have an issue on a product I'm developping.
My project is an audio effect with 1 input and two outputs using a teensy 4.0 and the sgtl5000.
The user has controls on the effects via several push buttons and 5 potentiometers which are hooked on A0,A1,A2, A3, A8
The project is working perfectly except for a noise issue : continuous digital noise int both of the audio outputs, even when the software send complete silence on the DAC outputs.
The cause of the noise are calls to analogRead.
The analog inputs are read continuously in a loop :
- read analog inputs
- read digital inputs
- update effect parameters and get outputs
- update digital outs (few leds)
- wait 5ms
the issue persists if I remove all code except analog reads, playing with the delay confirms the issue (with 1sec delay I hear a clic every second on the output)
We are 2 people working on this project, I handle the software part and my associate the hardware design.
They are analog gain stages pre-ADC and post-DAC.
I searched extensively the forum and google for leads and found theses interesting threads :
https://forum.pjrc.com/threads/69717-High-gain-audio-amp-picks-up-noise-from-analogRead
https://forum.pjrc.com/threads/25553-analogRead-and-audio
https://forum.pjrc.com/threads/63641-audio-input-output-noise
decreasing ADC bit depth, ADC sampling frequency, or even not using the analog inputs is not something we can do unfortunately.
So now the question :
- Could someone confirm that the issue is on the hardware side, I understand that triggering an analog read provokes a current draw from the Teensy which is causing the clics but my analysis may be incomplete.
--> if not, what could I do in software to remove/reduce this noise ? (once again compromising the depth, or sampling rate of analog reads is not feasible without compromising the whole project)
- Is there something that could be done / checked in hardware to reduce/remove this noise, that's not mentioned in the above threads ?
I didn't post any code as i don't expect a solution for my use case, and I don't think there is an issue in the code, but I'm rather expecting a list of checks that I'll give to the person in charge of the electronics (and to be sure I've not omitted anything on the software side of things) and I don't have access to the schematic. Once again, i don't expect someone to do the debugging for us but rather leads / ideas/ hypothesis of things we may have overlooked.
Thanks a lot.
JBAX