A Pocket-Sized, Reduced BOM Oscilloscope
Utilizing an STM32G4 MCU a minimal hardware oscilloscope about the size of a wallet was designed.
Oscilloscopes are an invaluable tool when it comes to electronics design and debug. Apart from the trusty multimeter and solder iron, an oscilloscope will probably be the next tool on many designers, engineers, and electronic enthusiast’s bench. However, professional grade oscilloscopes can cost upwards of thousands of dollars and even lower end ones will run in the hundreds of dollars range. For those of us on a budget and in need of an oscilloscope, the next best option is to make your own! That is exactly what jgpeiro has done more than once now. His first build utilized an RP2040 and could operate up to 100MSPS with two channels. On the other hand, his most recent project showcases a minimal hardware design utilizing an STM32G4 microcontroller.
The STM32G4 family of microcontrollers offers a plethora of features for designers to use. It includes a 32-bit Arm Cortex-M4 along with 128KB of RAM, up to 512KB of flash, ADCs, DACs, and integrated analog circuitry such as comparators and op-amps. As a result, the only additional circuitry needed for the oscilloscope is the display, power supply circuitry, PSRAM, and additional op-amps mainly to protect the MCU from over voltage conditions. The project employs a 480x320 resolution display that interfaces to the MCU through a 16-bit bus. For power, the device can operate off a 3.7V LiPo battery or through a USB connection. While USB power is present a regulator will provide 3.3V to the PCB while also charging the battery. On the other hand, two Schottky diodes are implemented to source current from the 130mAh battery when USB power is not provided.
Pseudo static RAM (PSRAM) was included in the design to allow for added flexibility in data handling capabilities. It offers the advantage of a large amount of off chip memory that can be quickly accessed using a minimal amount of CPU pins. In this instance, 8MB of PSRAM is used that can read and write at speeds of up to 10 megabytes per second. The PCB created for the oscilloscope project was designed in KiCAD and fabricated on a 4 layer board from JLCPCB. Due to the minimum amount of components used in the design, the final PCB has dimensions of only 90x60mm.
To put a final professional touch on the design, a 3D-printed enclosure was created to hold the battery, PCB, and display. The software developed to control the display and hardware is based off FreeRTOS, the Nuklear library for GUI development, and custom C modules. The end result is a fully functional oscilloscope that is not much bigger than a wallet. Overall, an impressive build using such a small amount of components and resources.