Design and assembly of a DIY oscilloscope with added functionality through an Octopus Circuit Tester.
Tech Stack : STM32-F411CEU6 · ESP32-WROOM-32D · STM32 Cube IDE · PlatformIO
About this Project
Step-by-step Build
Coming-Next
An oscilloscope is the Swiss Army knife of any electronics, R&D, or embedded systems engineer. As part of my learning journey, I built my own DIY oscilloscope based on Martin Loren’s design, along with a few additional units for experimentation.
This project went far beyond simple assembly: it deepened my understanding of analog and digital electronics, challenged my ability to interpret complex schematics, and significantly improved my soldering and debugging skills.
Along the way, I also discovered and implemented a powerful extension to the oscilloscope’s capabilities—commonly known as an Octopus Circuit Tester. This tool enables quick, visual comparison and analysis of electronic components. On this page, I document how I built it, how it integrates with the oscilloscope, and the goals behind extending the instrument’s functionality.
As with any open-source hardware project, the first step was to become familiar with the overall structure and navigation of the project files. Understanding how the documentation, hardware revisions, firmware, and supporting resources are organized is essential before starting any build.
For the HS402 DIY Oscilloscope, there are two primary entry points that serve as the foundation for the entire project:
Martin Loren’s official website, which provides a high-level overview of the oscilloscope, including technical specifications, supported features, usage examples, and background on the design philosophy.
The GitHub repository, which contains the complete open-source material required to build the device, PCB files, schematics, firmware, datasheets, hardware revisions, and change logs.
By reviewing both sources, you will gain a clear understanding of the oscilloscope architecture, available hardware versions, and the recommended build paths. This initial exploration helped me selecting the correct PCB revision (rev 3.1), firmware, and additional modules before moving on to component sourcing and assembly.
After reviewing the available hardware options, the next step was selecting the most suitable microcontroller board and PCB revision for the build.
For this project, I chose the STM32F411CEU6 Black Pill development board over the STM32F401-based Blue Pill alternative. The main reason for this choice was performance: the STM32F411 offers higher achievable sampling rates and better overall headroom for signal acquisition.
In comparison:
STM32F411 (Black Pill)
Sampling range: 2 kSa/s up to ~1.6 MSa/s, with non-linear higher rates up to ~4.2 MSa/s
STM32F401 (Blue Pill)
Sampling range: 2 kSa/s up to ~1.4 MSa/s, with non-linear higher rates up to ~3.8 MSa/s
Although the higher sampling modes are non-linear in both cases, the STM32F411 provides improved performance and flexibility, making it the better choice for this oscilloscope design.
I selected PCB revision v3.1, the latest version provided by Martin Loren at the time of the build. According to the PCB changelog, version 3.x introduces several meaningful improvements over earlier revisions:
Multiple hardware configuration options for the main HS402 board, including a low-noise variant
Support for a Wi-Fi extension board with alternative hardware options
Refinements and optimizations compared to earlier PCB versions (v2.0 and below)
Earlier revisions (v1.4–v1.7) are still available for reference in the repository but are considered legacy designs.
It is important to note that firmware versioning is independent of the PCB version. Any PCB revision can run the latest STM32 firmware, which simplifies long-term maintenance and upgrades. The more recent firmware releases improve stability and add features such as Wi-Fi support, automatic interface switching between USB and Wi-Fi, and I²C input handling fixes.
All required components are documented in the Bill of Materials (BOM) provided in the GitHub repository. For PCB v3.x, three hardware variants are available. I chose the highest-performance, lowest-noise configuration, as the price difference compared to the lower-cost options was minimal and well justified for improved signal quality.
Below, I include the BOM used for version 3 of the board. The original BOM files remain available in the repository for reference if alternative configurations are required and you can find it here.
Once the board revision was selected, the next step was manufacturing the PCB. The complete Gerber files are provided directly in Martin Loren’s GitHub repository, already prepared for upload to any standard PCB fabrication service.
The process itself is straightforward:
Create an account on the manufacturer’s platform.
Start a new PCB order.
Upload the Gerber files by simply dragging and dropping the zip file.
Review the automatically detected board parameters and proceed with the order.
No manual modification of the Gerber files was required, as they are already configured according to the design specifications. This allowed the PCB manufacturing step to be completed quickly and reliably, enabling me to move on to component assembly as soon as the boards arrived.
Before assembling the hardware, I spent time carefully studying the provided schematics to fully understand the internal structure and signal flow of the HS402 oscilloscope. Even though the design is relatively compact, it is clearly divided into well-defined functional blocks, which makes analysis and debugging much easier.
At a high level, the oscilloscope consists of five main subcircuits:
Channel 1 (CH1) analog front-end
Channel 2 (CH2) analog front-end
Power regulation and power supply circuitry
Main microcontroller board (STM32F411 Black Pill)
Optional wireless module based on the ESP32-WROOM-32D
The schematics provide a clear view of how each block interacts, from input signal conditioning and protection, through amplification and ADC interfacing, all the way to power distribution and optional Wi-Fi communication. This understanding is particularly important for later stages such as in-circuit testing (ICT), initial power-up checks, and systematic debugging if unexpected behavior appears.
Studying the schematics also helped me become familiar with the key components used in the design, programmable gain amplifiers, PhotoMOS relays, reference voltage generation, and low-noise power regulation, which is essential not only for assembly but also for diagnosing signal integrity or noise-related issues.
Beyond the immediate build, the schematics serve as a long-term technical reference. They are especially valuable for future firmware development, as they define pin mappings, peripheral usage, voltage references, and hardware limitations that must be respected in custom STM32 firmware modifications or feature extensions.
The PCB layout is clearly labeled with reference designators that match the Bill of Materials (BOM), which makes the soldering process straightforward and well structured. By following the BOM component by component, using checkboxes to track progress it is easy to avoid missing parts or placing components incorrectly.
I approached the soldering process methodically, starting with smaller passive components and gradually moving to larger or more sensitive IC's. This sequence helps maintain good access to pads and reduces the risk of disturbing previously soldered parts.
For this step, using the right tools and setup is essential. I recommend:
Good-quality flux and lead-free solder wire
A fume extractor, or alternatively working in a well-ventilated area
Adequate lighting, which is critical for inspecting solder joints
A digital microscope (optional but highly recommended), as it helps identify solder bridges or cold joints that are difficult to detect with the naked eye.
Regarding the soldering iron, a 2–3 mm tip is generally ideal for this type of PCB, depending on individual skill level and comfort. In my case, I did not have a smaller tip available and successfully completed the assembly using a 4 mm tip, taking extra care with pad heating and solder control.
Kapton tape proved very useful when applying hot air, particularly to protect nearby components. I used a hot-air gun to preheat sections of the board, especially around larger components, to improve solder flow and reduce thermal stress.
To avoid damaging pads or components, I recommend keeping the soldering iron temperature in the 250–300 °C range. Staying within this window helps preserve PCB integrity while still achieving reliable solder joints. Once you are done soldering all components it is obligatory to give a final cleaning to the PCB with Isopropyl Alcohol (IPA), to remove any flux and solder residues that might cause corrosion or shorts.
To verify that the assembled board is functioning correctly before full operation, Martin Loren included dedicated test points throughout the schematics. These test points are intentionally placed to simplify early validation of the power rails and key reference voltages.
For this step, the board must be powered using either 3.3 V or 5 V, depending on the selected power configuration. With the board powered on, a digital multimeter is used to probe the designated test points and measure the expected voltages.
The reference values and exact measurement locations are documented in the schematics discussed in Step 4. By comparing the measured voltages against the expected ones, it is possible to quickly confirm:
Proper power distribution
Correct operation of voltage regulators
Stability of reference voltages (such as the virtual ground)
This step is crucial before connecting sensitive components or flashing firmware, as it helps detect issues such as incorrect component placement, solder bridges, or faulty power paths early in the build process. Performing ICT at this stage significantly reduces debugging time later and increases overall confidence in the hardware before moving on to functional testing and firmware integration.
Once the hardware passed in-circuit testing, the next step was flashing the firmware onto the STM32F4 microcontroller. There are several methods available for programming STM32 devices, the main one using Martin Loren's STM32 Utils app ; however, in this case, the most straightforward approach, especially after the microcontroller board was already soldered onto the main PCB, was using the built-in USB-C port and flashing the firmware in DFU (Device Firmware Upgrade) mode.
To enter DFU mode, either of the following methods can be used:
Connect the board to USB while holding the BOOT button
While connected, hold the BOOT button and then briefly press the RESET button
For flashing, I downloaded the precompiled firmware (HS402_V1.8_F411.bin) along with the STMDfuUsb application on an Android device. Within the app, the firmware file is selected (...) and flashed by using the Load File to flash option. Once the process completes successfully, the application displays an “Operation Success” confirmation.
After flashing, the microcontroller is reset to exit DFU mode. At this point, the firmware is fully loaded and the oscilloscope is ready for the next stage: establishing communication with the control application.
Once the firmware is flashed, the oscilloscope can be connected to the control application. Using the button below, you can download the HScope app for Android. The application is free to use, but it offers optional in-app licenses that unlock additional features depending on the intended use of the oscilloscope.
For this project, I strongly recommend acquiring the HS402 scope license, as it enables simultaneous dual-channel operation, allowing both CH1 and CH2 to be used at the same time.
After installing the app, the oscilloscope is connected to the Android device (via USB or Wi-Fi, depending on the hardware configuration). Once communication is established, the device is ready for calibration.
Calibration is a critical step to ensure accurate measurements:
Connect an oscilloscope probe to Channel 1.
Short the probe tip to GND.
In the app, navigate to Settings → Calibration.
Select “Calib Zero Lvl” to calibrate the ground offset.
This step ensures that the input reads zero volts when the probe is grounded.
After the zero-level calibration, the voltage scaling must be calibrated:
Connect the probe to a reliable and accurately known power supply.
In the calibration menu, select “Calib Multiplier”.
Enter the exact voltage provided by the power supply.
Connect the probe across VCC and GND of the supply.
Start the calibration process.
Once completed, repeat the procedure with CH2. Now the oscilloscope is fully calibrated and ready for accurate signal measurements. Proper calibration ensures correct voltage scaling, minimal offset error, and reliable results during normal operation.
After calibration, the final step is to verify that the oscilloscope operates correctly under real signal conditions. These functional tests validate the complete signal chain, from analog input, through sampling and processing, to visualization in the HScope application, using simple but effective test scenarios.
The tests below are based on the recommended USB-connection test procedures and focus on confirming signal acquisition accuracy, stability, and responsiveness.
One of the simplest sanity check and functional tests that can be performed is the so-called “Human Antenna” test. By leaving the probe input floating and lightly touching the probe tip with your finger, a sinusoidal-like waveform immediately appears on the screen.
This effect occurs because the human body acts as an antenna, coupling ambient electromagnetic fields into the oscilloscope input. These fields are primarily generated by the AC mains wiring inside building walls, resulting in a signal at:
50 Hz in Europe
60 Hz in America
Although this is not a precision measurement, it is an excellent first check to confirm that:
The analog front-end is working
The ADC is sampling correctly
The signal path from input to display is functional
To further validate measurement accuracy, a known and stable voltage source can be connected to the oscilloscope input. Using a laboratory power supply or reference source, the measured voltage displayed in the app should closely match the applied value.
This test confirms:
Correct calibration of the voltage multiplier
Proper gain handling, especially at different vertical scales
Stable readings without unexpected offset or drift
Applying a low-frequency signal (for example from a signal generator or microcontroller PWM output) allows verification of:
Correct waveform shape (sine, square, or triangle)
Frequency measurement accuracy
Trigger functionality and waveform stability
At this stage, both channels can also be tested independently or simultaneously if the HS402 license is enabled, to ensure consistent behavior across CH1 and CH2.
Successfully completing these functional tests confirms that the oscilloscope is fully operational and ready for practical use. From simple signal probing to more advanced dual-channel measurements, the device demonstrates reliable acquisition, stable visualization, and predictable behavior, meeting the expectations for an educational and hobbyist-grade digital oscilloscope.
One of the strengths of this open-source project is its active and creative community. Engineers and makers from around the world have developed their own variants of the HS402 oscilloscope, along with complementary accessories and, most importantly, protective enclosures to improve usability and extend the lifespan of the PCB.
For this build, I selected a 3D-printed housing shared by the community on Thingiverse. The enclosure is compact, well-designed, and easy to assemble, while still providing adequate protection for the oscilloscope during everyday use. Its thoughtful layout allows straightforward access to connectors and controls without compromising structural integrity.
Because of its simplicity, robustness, and clean design, this enclosure is my personal recommendation for anyone building the HS402 DIY oscilloscope.
Behind, you can find:
A link to the community-built HS402 oscilloscope variants, showcasing different design approaches and extensions
A link to the STL files for this housing, allowing it to be 3D printed and assembled easily
A link to Additional Modules you may find useful.
This final mechanical step completes the project, transforming the bare PCB into a portable and durable measurement instrument suitable for regular use.
During my MSc degree in Electronics Engineering, I had the opportunity to perform a formal reliability analysis of the HS402 DIY oscilloscope as part of my academic coursework. The goal of this study was to estimate the expected operational lifetime of the device under different usage conditions.
Using component-level reliability prediction methods, the analysis evaluated the oscilloscope’s behavior in both handheld (mobile) and workbench (stationary) environments. The results showed that:
When used as a handheld device, the oscilloscope is expected to operate reliably for approximately 11 years
When used in a bench-top environment, with reduced mechanical stress, the expected lifetime increases to approximately 45 years
This analysis provided valuable insight into how operating conditions, mechanical stress, and component selection influence long-term reliability in electronic measurement equipment.
By clicking the button below, you can access the full reliability study, which includes the methodology, assumptions, detailed calculations, and recommendations for reliability improvements.
One of the aspects I value most about this project is the openness and accessibility of the person behind it. Throughout my work on the HS402 oscilloscope, I had direct contact with Martin Loren, who is highly engaged with the community and very approachable for discussion, feedback, and collaboration particularly through the Telegram HScope channel.
Our conversation provided valuable insight into the future direction of the project. Beyond the open-source DIY designs, Martin is actively developing commercial oscilloscope products, backed by his own laboratory facilities and direct access to electronic component supply chains. This allows him to prototype, test, and produce hardware efficiently while maintaining competitive performance and pricing.
A particularly interesting evolution of the project is the transition from STM32-based designs to AT32 microcontrollers, which offer higher ADC sampling rates and significantly more RAM at similar cost. Martin has also developed PlatformIO support for AT32 devices, lowering the barrier for developers who want to experiment with or contribute to this ecosystem.
In addition to oscilloscopes, Martin’s website features other measurement tools and related products, further extending the scope of the platform. The openness to community-built variants, multilingual documentation, and external contributions highlights a healthy and growing ecosystem rather than a closed product.
This level of accessibility and community-driven development is a major reason why the HS402 project continues to evolve and remains valuable to both hobbyists and engineers.