Close
0%
0%

Raspberry Pi Pico Super Simple Oscilloscope

Raspberry PI and ADC10080, works decently for a 24 Mbps signal and has 100 k input impedance

Similar projects worth following
I wanted to try my hand at a raspberry pi pico based oscilloscope. I wanted it to be very simple - kind of a "is there a signal there" kind of oscilloscope...

I wanted to build a very simple oscilloscope using the raspberry pi pico.  The input stage is very simple - no changing scaling, no trigger, just grabs the samples from the ADC10080 and saves them.  Then, you can post process.

Here is the circuit board.  First thing - I treated the raspberry pico W as a surface mount component, so it is mounted directly on the pcb I made.  Second thing - there is only one high speed op-amp.  The input resistor was set to 100 k, and I wanted about ~300 LSB when the input voltage was 3.3 V.

Here is the schematic for the op-amp lifted from the LMH6552 datasheet:

In this case, RS is 100k, RT is 20k, RG is 15 k, RF is 20k, and RM comes out as 16.666 k (16 k is what I had on-hand), so the circuit is a touch imbalanced.  The value of RF is a touch high, so it probably hurts the noise and bandwidth a bit.  For the datasheet, please see LMH6552 datasheet.  I had originally placed a first opamp in the input path, but realized it wasn't needed.

The opamp needs +/- 6 V, so I used a +/- 9 V supply (the large black brick at the bottom), and then used linear regulators to get +/- 6 V.  The ADC10080 has a common mode voltage source, so that is connected to the LMH6552.

I ran the statemachine for the ADC10080 at 192 MHz (i.e., 12 MHz x 16).  Integer clock rates seem to give better jitter out of the raspberry pi pico.  Since the code generates the clock with the "sideset", and then samples on the low part of the clock, this gives 96 MSps (yes, a touch fast for the ADC10080).

  • 1 × Raspberry Pi Pico
  • 1 × ADC10080 Data Converters / Analog to Digital Converter ICs (ADCs)
  • 1 × LMH6552 Amplifier and Linear ICs / Operational Amplifiers
  • 1 × A0509S-2WR3
  • 1 × MC79L06F-TP Power Management ICs / Linear Voltage Regulators and LDOs

View all 6 components

  • Toggle pattern for frequency response

    sciencedude199006/17/2023 at 03:29 0 comments

    Next, I changed the PIO from bit pattern, to toggle.  So, a 2 MHz toggle gives a 1 MHz signal.  Here is the response that I measured.  So, a 3 dB frequency response of roughly 10 MHz.

    So, for ~$50 CDN in parts, you can have a 96 MSps, 10 MHz scope with 100 k input impedance.

  • Code - main ideas

    sciencedude199006/17/2023 at 03:17 0 comments

    Please see the github site for the code.

    The main idea is to use the PIO to clock the ADC10080, and grab data from it.  So, you use the "sideset" to set the clock line to 1, then set it to 0 as you grab the values on the 10 pins.  Do this three times, and push the data out on the FIFO.

    @asm_pio(in_shiftdir=PIO.SHIFT_LEFT, autopush=True, push_thresh=30, sideset_init=(PIO.OUT_LOW))
    def sideset_test():
        nop()          .side(1)    
        in_(pins, 10)  .side(0)
        
        nop()          .side(1)
        in_(pins, 10)  .side(0)
        
        nop()          .side(1)
        in_(pins, 10)  .side(0)

    The data from the FIFO goes to the DMA.  The DMA saves the data into an array, and just loops around and around.  Then, you carefully stop the DMA, and then read out the array and process it in your favorite program.

  • Eye diagram for 24 Mbps bit pattern

    sciencedude199006/17/2023 at 03:09 0 comments

    Since the ADC10080 was run at 96 MSps, the view of the 24 Mbps pattern lends itself to an eye diagram.  Here it is!

  • First Measurements

    sciencedude199006/17/2023 at 02:59 0 comments

    The first measurement I took was connecting the op-amp input to GND.

    Using the 16 k resistor instead of an ideal 16.666 k resistor gives an offset of ~59 LSB (I built another version with lower input impedance, i.e., RS 3k, RM 750, RT 1k, RF 430 and RG 270, and the offset is not there).  There is also some ~21 MHz noise.

    Next measurement was the 3.3V supply.

    Next, I made a PIO state machine that would output a simple 16 bit pattern: 1011 0111 0100 0100.  Then, I set the PIO to run at different frequencies.  Here is the view of an 8 Mbps signal:

    Here is a view of a 24 Mbps signal:

    Here is a view of a 32 Mbps signal (getting a little dicey!):

View all 4 project logs

  • 1
    External clocking of the raspberry pi pico

    If you lift the crystal below the pico, then you can blast in an external 12 MHz clock.  I placed an ECS-2333-120-BN-TR, and soldered a wire from the oscillator output to the top right pad of where the crystal used to be.  In theory, you could distribute the 12 MHz clock around and use it for synchronous sampling.

View all instructions

Enjoy this project?

Share

Discussions

sciencedude1990 wrote 06/19/2023 at 13:24 point

You are welcome.  All of the code is on github.  If you need anything, please let me know.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates