LCSC Liangshanpai - Oscilloscope Expansion Board
Buy LCSC Liangshanpai Development Board Now >>>
Visit LCSC Development Board Official Website for Information >>>
Gitee Data Disk Link
https://gitee.com/lcsc/scope-ex-code
Oscilloscope Expansion Module Overview
1. Application Scenarios of Oscilloscopes
An oscilloscope is an instrument for observing electrical signals. It can display electronic signals that are invisible to the naked eye on a screen, allowing us to intuitively understand and analyze the current circuit's operating status. Currently, mainstream oscilloscopes are mainly divided into analog oscilloscopes and digital oscilloscopes. Analog oscilloscopes mainly output the input electronic signal directly to the upper and lower bias voltages of the electron tube after processing by operational amplifiers, and form a waveform display by refreshing in the left and right directions.
Figure 1-1 Analog Oscilloscope Digital oscilloscopes mainly acquire the processed analog signal through ADC, and after the controller's calculation, output it to the screen for display. To facilitate analysis and recording, digital oscilloscopes account for a relatively large proportion.

Figure 1-1 Digital Oscilloscope
2. The Value of DIY Digital Oscilloscopes
Compared to traditional control circuits, DIY digital oscilloscopes are more difficult to build, involving analog signal processing (operational amplifier circuits), analog signal acquisition (ADC), digital signal processing (DSP), screen interface design, waveform generator (DAC), and button function control. DIY oscilloscopes provide a good understanding of analog signal scaling and amplifier usage, digital signal processing capabilities, and microcontroller ADC, DAC, and screen UI design skills. Furthermore, the completed DIY project can be applied to real-world scenarios, which may explain the proliferation of homemade oscilloscopes.
3. Major DIY Oscilloscope Solutions
Currently, the author mainly categorizes existing DIY oscilloscopes on the internet into three main types: (This classification may be somewhat biased and should be based on individual interpretations.)
The first type is professional oscilloscopes: These primarily use RAM as the main controller, FPGA + high-speed ADC chip for analog signal acquisition, high-speed DAC as the waveform generator, and high-precision operational amplifier preamplifier circuitry.

The second type is the practical oscilloscope: mainly using a microcontroller as the main controller, a high-speed ADC for analog signal acquisition, a high-speed DAC as the waveform generator, and operational amplifiers to control the pre-amplifier circuit.
The third type is the learning oscilloscope: mainly using a microcontroller as the main controller, a built-in ADC for analog signal acquisition, and a simple operational amplifier pre-amplifier circuit.

4. Several highlights of the Liangshanpai development board oscilloscope module:
4.1 Compact and convenient, putting the tool in your pocket.

4.2 Highly developed software framework, learning advanced development skills.


4.3 Simple circuit design, quick start-up for oscilloscope DIY:
Adopting a learning-level oscilloscope design scheme, combined with the built-in ADC and DAC of the Liangshanpai GD32F450, this DIY oscilloscope is made. (The analog circuit design section deeply studies and references the open-source oscilloscope module circuit of Anfulai, and a usage license has been obtained from Anfulai.)
5. The Liangshanpai development board oscilloscope module's implemented functions are
fully open source in both hardware and software, allowing for free definition of more interesting functions.
Sampling start/stop: Starts and stops the ADC trigger timer; when pausing to view, detailed information such as maximum and minimum values can be seen.
Buffer Scroll Bar: Displays the acquisition status by calculating the waveform trigger position; displays the pause status by adjusting the offset position.
Rising/Falling Edge: Determines and displays the position when the sampled value and trigger condition are met through software comparison.
AC/DC: Controls the on/off state of the oscilloscope's pre-amplifier coupling relay via I/O.
Voltage Scale: Assigns voltage values per 1/2V/div increment; controls the operational amplifier multiplier via I/O using an analog switch.
Time Scale: Changes the sampling time scale by controlling the ADC trigger timer cycle.
Trigger Amplitude: Sets the trigger value and draws the horizontal bar position using software; indicated by a blue dashed line.
Waveform Offset: The display position is offset vertically by software processing; indicated by a white dashed line.
Waveform Display: No longer uses the traditional two-point slope calculation (neither X nor Y coordinates are used); instead, only vertical lines are drawn between adjacent points, reducing code computation.
Waveform Generator Type: Automatically generates the corresponding waveform output by changing the single-cycle data in the DAC's buffer.
Waveform Generator Frequency: Automatically generates the corresponding waveform cycle by changing the DAC's time trigger period.
FFT Measurement Switch: Software controls the display of the FFT spectrum waveform.
FFT Frequency Measurement: Calculates the frequency using the maximum frequency percentage point, which may differ slightly from the actual frequency.
FFT Spectrum Scaling Factor: Scaling by the maximum value based on the required display height of 150 pixels.
Display Coordinate Offset: Displays the triggered position value in sampling mode and the manual offset position in pause mode.
6. Advanced oscilloscope module on the Liangshanpai development board:
Since the software framework uses Time+DMA for both ADC and DAC processing, if using external ADC and DAC, the Time+DMA data interaction needs to be switched to the corresponding GPIO.
When using DMA+GPIO, ensure continuous GPIO connections are used and prevent accidental operation of GPIOs on the same bus (8/16-bit).
More oscilloscope expansion board information can be found here >>>>>