Teensy 4.0 internal ADC Read precision (using SPI Screen, SDCard and DAC)

Status
Not open for further replies.

waxxmaster

New member
Hi !

I wonder if this is possible to get a 12 bit precision with Teensy 4.0, when using SPI devices at the same time?

I explain :

I'm developing a synthesizer (eurorack wavetable module) around the Teensy 4.0 and i need to get hi-precision ADC read for CV (control voltage) inputs (and for sliders/pots).

I manage to get this precision (without noise at all) using ADC + DMA reads, and averaging the 128 values of the DMA buffer for each inputs. (i'm doing a sort of round robin reading on two ADCs).

But, as soon as i send data to a SPI DAC (TI DAC8565) + a screen (SSD1322 256x64), i get lot of noise in ADC reads, i can't manage to obtain minus than 5 values of noise (on 12 bits readings, 4096 values).

Is there a way to reduce SPI device noise in ADC reads ?

My prototype is on a breadboard

i've tried to :
- separate the 3.3v power for analog and digital, but i didn't get any improvement.
- the teensy is powered by external 5v (not USB)
- add decoupling capacitors almost everywhere, but same problem

sorry if that is a naive question, i'm not very well experienced in electronics.

Thank you if anyone has any clue.

20200412_170902.jpg
 
Your quest for better than 10 effective bits on the T4.0 ADC is probably doomed to failure with the setup you have. There are a number of reasons for this pessimistic view:

1. You will never get low noise values with that proto board setup and wires that long. The sharp edges on the SPI signals generate a lot of RF noise that can be picked up by the other long wires. For good analog results, you need a soldered prototype board with the shortest possible connections. You might even need analog low-pass filters at your inputs.
2. The T4.0 ADCs use the 3.3V supply as the analog reference. Intermittent loads on that supply inject noise into the ADC results. You may need separate power supplies for the display and for the external DAC.

Since you are using the ADC values for control inputs and do not require very fast results, your scheme of massive oversampling and averaging is a good approach. Your next step should be to clean up the wiring and try to keep the ADC inputs as far as possible from the SPI signals and devices.

You may also find that certain ADC inputs have more noise simply because they are routed closer to the SPI signals on the T4.0 board.
 
Another possibility is to find a 'quiet spot' in your processing scheme and do your ADC sampling at that time. One way to do this might be to take the ADC samples just before you start your SPI transactions. This can complicate the logic of your firmware and may not help if other things are happening whose timing you cannot easily control.
 
Hi, thank you very much for your answer, it gives me precious informations. I was pretty, but not totally sure that i can't obtain this precision on breadboard. I will try to solder all this things on a proto board when i am more advanced in my project.
 
Status
Not open for further replies.
Back
Top