Oscilloscope Training Camp
Demo Video: Handmade Oscilloscope with Microcontroller for Automated Measurement_Bilibili_bilibili (https://www.bilibili.com/video/BV1im421E7NF/)
This video adds three features to the original training camp functionality:
1. Added one DAC output, adjustable to any voltage between 0-3.3V.
2. Replaced all mechanical switches used for signal coupling and attenuation with signal relays, enabling better control and measurement on the host computer. 3.
Implemented a cross-platform oscilloscope control and display interface using a web serial port, thus achieving automated measurement (https://www.daodaoyouli.com/). The actual
device is shown in the image below:
A three-in-one waveform display combining the homemade oscilloscope, a real oscilloscope, and a web platform.
The production experience also included a pitfall:
Originally, the system was designed with three buttons, but later, while writing the code, it was discovered that buttons were unnecessary; a rotary encoder could handle all the functions. Therefore, all functions were ultimately solved using a single rotary encoder. However, because the rotary encoder lacks hardware filtering, there's a chance of significant noise appearing during a single rotation (as shown in Figure 1). This manifests as multiple triggers for each rotation. My solution in this project involved using a separate timer with a 1ms delay. This means that regardless of how many times the encoder triggers within 1ms, only the timer counter is reset. The timer interrupt then checks the phase difference to determine the encoder's rotation direction before stopping the timer. Ultimately, software implementation ensures that even with n triggers, only one operation is performed.
(Figure 1: Noise-prone situation)
(Figure 2: Normal clockwise rotation)
(Figure 3: Normal counter-clockwise rotation)
Software open-source address: Jgcoder2023/oscilloscope: Simple Oscilloscope (github.com)
Final demonstration video: Hand-made Oscilloscope with Microcontroller, Achieving Automated Measurement_Bilibili_bilibili (https://www.bilibili.com/video/BV1im421E7NF/)