Introduction


In the past, I have undertaken projects involving portable oscilloscopes with high-speed ADCs (as seen in RPScope). However, in this endeavor, I am committed to streamlining the electronics to the utmost extent and utilizing only the capabilities inherent in the STM32 platform.

The STM32G4 family features a multitude of analog peripherals that prove instrumental in minimizing the Bill of Materials (BOM), encompassing 4 ADCs, 2 DACs, integrated OPAMPs, and more. The only external used parts are two OPAMP ICs mainly to protect the MCU from overvoltages from input channels. The power supply aspect has also undergone simplification; departing from the conventional symmetric power supply configuration often employed in such projects, I have exclusively employed a single-ended power supply, further enhancing electronic simplicity. Despite this departure, it remains possible to capture negative voltages by introducing an offset at the input stage.

The oscilloscope boasts a 480x320 resolution display, from BuyDisplay, interfaced via a 16-bit bus and mapped to the STM32's memory, affording rapid data transfer and achieving an impressive frame rate exceeding 50 FPS, though tactically limited to 20 FPS to ensure CPU availability for other concurrent tasks. The graphical user interface is materialized through the port of Nuklear libraries – originally intended for PC gaming – written in ANSI-C, with a modular design, and seamlessly executable within the microcontroller's.

The hardware fabrication was entrusted to JLCPCB, a 4 layer PCB following their stipulated minium design constraints of 0.1mm trace separation and width, along with 0.35mm via diameter. While not strictly necessary for this design, I was intrigued to assess the outcomes, which proved impeccable. A touch of Artificial Intelligence was also interwoven into the project (Midjourney), albeit indirectly, manifesting in the incorporation of "Mechwarrior" robot drawings within the PCB silkscreen layer, imparting a distinctive visual flair.

With regard to software, my original intent was to integrate MicroPython, an ambition that prompted a Nuklear port to the MicroPython ecosystem. However, due to constrained RAM resources, I have chosen to forge ahead in the development process using the C programming language, complemented by the FreeRTOS operating system framework.

Hardware

The hardware design is characterized by its simplicity, primarily comprising the STM32 microcontroller, two operational amplifiers (OPAMPs), a battery charger, and a TFT display.

Power

The power subsystem revolves around a 3.3V regulator and a LiPo battery charging module. With the USB connection established, the entire system is powered via USB while simultaneously charging the LiPo battery. When USB power is absent, current is channeled to the voltage regulator through a Schottky diode.

The analog voltage is derived directly from the digital realm and is subject to minimal filtration through inductors. Although the prospect of integrating a dedicated regulator has been contemplated, current circumstances have not warranted its implementation. An intrinsic advantage of this design lies in its obviation of the need for symmetric power supply, significantly streamlining the Bill of Materials (BOM).

In this iteration, the analog and digital ground planes are interconnected, rendering the presence of separate ground planes unnecessary. Subsequent iterations will explore designs featuring isolated ground planes to assess their impact on noise mitigation, particularly when measuring low-amplitude voltages.


The battery charging module is embodied by a straightforward SOT23-6 IC, proficiently facilitating the charging of a 130mAh LiPo battery. An LED indicator illuminates during the charging process, extinguishing upon completion. The charging cycle is approximately one hour, affording an operational span of roughly two hours. While this duration may seem limited,...

Read more »