This guide is written on behalf of the Scoppy developers team. Follow us on Twitter at @ScoppyScope.
IntroductionIn this guide will cover how to create a basic oscilloscope using a Raspberry Pi Pico W, an Android phone (or tablet), the Scoppy Android app and Scoppy Pico W firmware.
The devices communicate over Wi-Fi and so your precious phone (or tablet) never needs to be physically connected to the Pico W or the circuit under test. Whew!
Assuming you already have a Pico W and Android device the extra cost is approximately USD$2.
The scope will have a sample rate of 500kS/s, an input impedance of around 100k but is limited to signals with a voltage range of 0V to 3.3V. In later articles we will describe how to increase the input impedance and extend the range to include negative (and larger) voltages.
The scope will also do FFT, has an X-Y Mode and as a bonus you can also use your scope as a 24MHz logic analyzer.
1. Install the Scoppy Android appOpen the Play Store on your Android device and search for scoppy
The Play Store app will probably return results for scoopy and not scoppy
eg.
If this happens, tap on Search instead for scoppy
The app you want is this:
Install the app
2. Install the Scoppy Pico W firmwareVisit the Scoppy Getting Started page and download the firmware for the Pico W. The file will be named scoppy-pico-wireless-v12.uf2.
Press the BOOTSEL button on your Pico W and attach the Pico W to your computer with a USB cable. The Pico W should appear on your computer as a USB mass storage device. You can now drag-and-drop the firmware file onto the Pico W.
The Pico W will restart and after a few seconds its onboard LED should start blinking.
The Pico W can now be powered by a 5V USB wall plug or a battery bank. Or you can just keep it plugged into your computer.
3. Establish communication between the Android device and the Pico WThis guide will explain how to establish a connection between the Scoppy app and firmware over Wi-Fi using the Pico W's Access Point mode. To connect over Wi-Fi using Station/Client mode or to connect using USB see the Scoppy Getting started with Scoppy and the Pico W documentation.
Pico W startup sequence
When the Pico W is powered on, the Scoppy firmware first checks if the data lines on the USB cable are active (this will be the case when connected to an Android device or computer). If so, the firmware will try to establish a connection with the Scoppy app over USB. The status LED will repeatedly blink twice followed by a pause. If your Android device prompts you to allow Scoppy access to USB just ignore it because we will be connecting via Wi-Fi. If no connection is established after 10 seconds then the Pico W will enter Wi-Fi Access Point mode.
If the Pico W is powered by wall plug or battery bank then it will immediately enter Wi-Fi Access Point mode when the power is connected.
Establishing the connection
Once the Pico W is in Wi-Fi access point mode, the onboard LED will repeatedly blink four times followed by a pause. This is what we want.
Now go to the Android settings app and tap Connections and then Wi-Fi. A network named SCOPPY should appear in the list of available networks. Select this network.
Your Android device may warn you that the network does not have an internet connection. Tap this notification and select the option to remain connected to the network. If you don't tap the notification, the Android device might disconnect from the SCOPPY network.
We now need to tell the Scoppy app to connect via Wi-Fi (the default is to use USB). Tap the badge at the lower left of the app (it will probably be red and display USB: Not Connected). Tap this badge and the connection menu will be displayed. Tap Change connection type and then select Wi-Fi.
Once you have changed the connection type to Wi-Fi the connection should be established after a few seconds and the connection badge will display Wi-Fi: OK.
If the badge remains red, check that the Android device is still connected to the SCOPPY network (access point). You may also need to tap the RUN button to establish communication between the app and firmware.
If you are having connection problems then please see the Scoppy Wi-Fi troubleshooting guide.
Testing the connection
The connection can now be tested using the test signal generated by the Scoppy firmware. Connect GPIO 22 of the Pico W to ADC0 (GPIO26). In the Scoppy app you should now see a square wave for channel 1.
Repeat for channel 2. This time connect GPIO 22 to ADC1 (GPIO27). Enable channel 2 in the app by long-pressing the CH2 badge at the bottom of the screen (or tap to get the CH2 menu and then tap Switch on). Disable channel 1 by long-pressing the CH1 badge.
4. Build the oscilloscopeThe analog front end
Oscilloscopes will perform various forms of signal conditioning between the signal source and the ADC. This can among other things include attenuation, amplification, filtering and under/over voltage protection.
For this project our signal conditioning will just consist of series resistors between the signal source (ie. our probes) and the ADC pins of the Pico W. This will help protect the ADC pins in case we accidentally apply a voltage outside of the 0V-3.3V range of the Pico W ADCs.
Even with the series resistors in place, the ADCs can be damaged by voltages outside of the 0V-3.3V range so please make sure you are only measuring signals within this range.
Status LEDS (optional)
Connect an LED to GPIO 14 (with a currently limiting resistor). This will blink when the Scoppy firmware is attempting to connect via Wi-Fi. Once the connection is established the LED will remain on.
Connect an LED to GPIO15 (with a currently limiting resistor). This will blink whenever the oscilloscope's trigger is fired.
Connect GND of the circuit under test (signal source) to the Pico W's GND. Connect the signal source to either the CH1 or CH2 input.
In the image below the CH1 and CH2 inputs are connected to an external signal generator (not shown).
If nothing happens you might have to press the RUN button in the app.
6. Example. Using both channels with a 555 timer circuitConnecting using Wi-Fi Station (client) Mode
In this article we described how to connect the Scoppy Android app to the Scoppy firmware on the Pico W in Wi-Fi access point mode. If you would prefer to connect via your local network's access point (and so not have to change the selected network on your Android device) then see Getting started with Scoppy and the Pico W.
What can this oscilloscope be used for?
This particular oscilloscope configuration can be used to measure signals in the 0V to 3.3V range. 50kHz is about the maximum frequency that it's useful for.
In a future article we will describe how to extend the input voltage range, increase the input impedance and add some over-voltage protection. Stay tuned.
Comments