Hi everyone,
I am using D34 and multiple HC4067 MUX to read about 180 analog signals with ~500k~1M ohm input impedance. I need to keep reading them with as little delay in between as possible. How can I reduce the delay required to get the correct reading?
procedure: Switch mux->adding delay->perform analog read->repeat
Without a delay, I would get a lower reading than the reading with a delay of 2ms. I tried to obtain the minimum delay with this setup and turned out I need at least 250us to get the correct reading.
I tried to add a voltage follower as a buffer using an LM358 op-amp(I will use an RRIO opamp in my final design if there is an improvement) and it didn't improve the speed at all. It kind of makes sense because the input impedance of an ESP32 ADC is quite high.
ESP32 ADC delay
-
- Posts: 9749
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32 ADC delay
Smells like it may be the parasitic capacitance of the output of the mux + any lines you have messing with your signal... the mux specifies a common capacitance of 50pF; I'm not entirely sure if that goes for the output as well but it's a good indicator for the order of magnitude you can have. Combine that with an 1MOhm output impedance, and you'll gonna have a RC-time of 50uS, which is the time that is required for a recently-switched signal to settle at 63% of its eventual value. Given that, 250uS may be the max you can generally get without putting amplifiers (one per input) before the mux. You can perhaps try adding one voltage follower on one input: if that input reads correct while all other inputs are off at high speed, this is your issue.
An option may be to interleave the muxes: have a bank of n muxes that you independently control that muxes your 8*n inputs into n outputs. Then add a voltage follower to each of those muxes. Finally use another mux (or multiple ADC inputs on the ESP32) to the ADC. Now you can switch one mux to read a signal, then switch that mux over to the next signal, then while waiting for that mux to settle you can read out the other muxes. (read A1, switch A to 2, read B1, switch B to 2, read C1, switch C to 2, read A2, switch A to 3 etc. Notice the delay between switching A to 2 and actually reading A2.)
An option may be to interleave the muxes: have a bank of n muxes that you independently control that muxes your 8*n inputs into n outputs. Then add a voltage follower to each of those muxes. Finally use another mux (or multiple ADC inputs on the ESP32) to the ADC. Now you can switch one mux to read a signal, then switch that mux over to the next signal, then while waiting for that mux to settle you can read out the other muxes. (read A1, switch A to 2, read B1, switch B to 2, read C1, switch C to 2, read A2, switch A to 3 etc. Notice the delay between switching A to 2 and actually reading A2.)
Who is online
Users browsing this forum: Bing [Bot] and 79 guests