Strob-O-scope: Fast ADC_SAR scope using Equivalent Time Sampling

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

Here is an example of the ADC_SAR operating in stroboscope mode. Using this mode of operation it is possible to acquire a waveform with resolution ~50ns, which is about 20x times faster than ADC_SAR can provide in continuous sampling mode.

       The drawback of that technique is that the incoming signal has to be periodic and stable over the time of acquisition. With conditions fulfilled, a single ADC snapshot is made per each period, and offset delay is slowly incremented for each next snapshot. The PSoC5 SAR_ADC sampling time is 4 clocks, which can be as high as 18 MHz, which should define the resolution of this approach. Surprisingly, the observed resolution is higher (~1 clock), which needs further research. I suspect that in 8-bit mode the majority of the charge is collected during the first ADC sampling clock.

 

      The project uses KIT-059 onboard 22pf capacitor (C41) as device under test. A short PWM pulse (~500ns) is charging this capacitor, producing short ramp waveform. PWM_1 period is set to 32 clocks. PWM_2_tc serves as a strobe signal, and its period is set to 33 clocks. The ADC is preset into the ready state by API, waiting for a hardware trigger, which is fired every 32 periods of PWM_1. A simplified diagram is shown below.

Stroboscope_8bit_01a_strobe.png

Project shows that using SAR_ADC (PSoC5) it is possible to resolve signals with time step of about 50ns, which should be sufficient for sampling <10MHz signal. To drive the ADC the input signal should be of low-impedance and sufficient amplitude (~1V), so some wide-band  (>20MHz) external Opamp may be needed as ADC front end.

 

The project uses community libraries:

SerialPlot: interface to real-time data charts

PSoC Annotation Library v1.0 (optional)

 

/odissey1

 

Figure 1. ADC is in externally strobed mode. DMA is gated by software and hardware. The gate is hardware triggered. DMA transfers ADC data into RAM buffer for later processing and visualization.

Stroboscope_8bit_01a_A.png

 

Figure 2. Pulse train generator. PWM_1 produces 8 clocks wide pulse, with period 32 clocks. PWM_2 generates a strobe pulse, with period of 33 clocks. Device under test is KIT-059 onboard capacitor (22pF), producing short ramp test signal. Note that o-scope probe capacitance (~20pf) also affects signal shape and amplitude.

Stroboscope_8bit_01a_PWM.png

 

Figure 3. Acquired data is visualized using SerialPlot charting tool and corresponding interface component. Communication with computer is performed through UART.

Stroboscope_8bit_01a_UART.png

 

Figure 4. Project annotation using PSoC Annotation Library. Note that the o-scope probe capacitance affects signal shape. The signal amplitude almost doubles with probe disconnected. A low capacitance (~1.5pF) active probe is recommended.

Stroboscope_8bit_01a_C.png

 

Figure 5. Yellow trace - ramp signal from DUT, Cyan - PWM_1 sync (tc) signal, Fuchsia - ADC strobe, Blue - DMA trigger. Ramp's risetime is approx. 500ns.

Stroboscope_8bit_01a_D1.png

 

Figure 6. Acquired waveform visualized using SerialPlot charting software. Two full periods of 32 points each, acquired with interval 1sec, are displayed. Estimated ADC resolution is approx. 50 ns.

Stroboscope_8bit_01a_E.png

1 Reply
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hi Odissey1,

Thanks for sharing your code example with the community.

Best Regards,
Vasanth

0 Likes