Skip to main content

Analog System Response Time

Overview

The analog response time is the time it takes from when an analog input changes to when a responding analog output changes. This total response time can be broken down into several parts as an analog input goes into the Quarto and makes it way to an analog output:

  1. DAC Update Time
  2. Analog Output Filter
  3. Analog Input Filter
  4. ADC Measurement Time
  5. Interrupt Latency
  6. MCU Processing Time

DAC Update Time

The DAC Measurement Time is 1µs2.

Analog Output Filter

The output filter between the DAC and the Quarto's Analog Output has a bandwidth of 180 kHz2. While this filter isn't a simple delay circuit, as the delay varies for different frequency components, for frequencies at 100 kHz or below, the delay is 1.2µs.

Analog Input Filter

The input filter in front of the Analog Input has a bandwidth of 400 kHz. While this filter isn't a simple delay circuit, as the delay varies for different frequency components, for frequencies at 100 kHz or below, the delay is 550ns.

ADC Measurement Time

The ADC Measurement Time is 800ns1.

Interrupt Latency

Please see Measuring Interrupt Latency App Note note for details, but the worst-case interrupt latency is 210ns.

MCU Processing Time

Clearly this depends on the function that that is executing. In the Measuring Interrupt Latency App Note the processing time was only 160ns. More complex functions will take longer to run. If unsure how long something takes to execute, as done in the app note, can you use a trigger line to measure the execution time with an O-scope. The code would be:

triggerWrite(1,HIGH); // Set Trigger 1 high at start on function
functiontoTime();
triggerWrite(1,LOW); // Set Trigger 1 low after function completes

But for straight-forward arithmetic functions (no loops), 500ns is a safe estimate.

Entire Loop Delay

In the case of a servo where the Quarto's analog output is connected to its analog input, then we can measure the delay through the entire closed loop. If at t=0, we look at a signal at the Quarto's analog input, then that signal gets to the ADC at time 800ns. The interrupt latency adds 210ns, so the MCU gets the data at time 1.21µs. Assuming conservatively the MCU takes 490ns to execute, then at t=1.6µs the MCU updates the DAC. That update hits the DAC output at t=2.6µs and gets through the output filter at 3.8µs. This means that the closed-loop signal delay is 3.8µs. However, this ignores the sampling time of the ADC. If the ADC is sampling every µs, then some information is delayed by nearly 1µs before the ADC samples it and other information is barely delayed at all. A reasonable approximation is to assume that all signals are delayed by the average delay which is half the sampling time. When sampling every µs, this adds an additional delay of 500ns. If sampling at 2µs, then the extra delay would be 1µs.

Putting this all together, for servo loop sampling every 1µs, we have a total delay of 3.8µs + 500ns = 4.3µs. We would expect this setup to oscillate at 115 kHz, which is very close to the measured oscillation frequency of 110 kHz.

In the case of a two channel servo where the sampling rate is every 2µs, then the total delay is 4.8µs, which should oscillate at 104kHz, which is very close to the measured 100 kHz.


  1. See DAC section of Specifications Page.
  2. See ADC section of Specifications Page.