newrudeman

[Spark Project] STM32 Oscilloscope Pen 2.0

 
Overview

Commercial use is prohibited without the author's permission! ! !
The upgraded version based on [STM32G0 oscilloscope pen]
uses the STM32G431 microcontroller, which should be the strongest analog performance under QFN32. It supports dual-channel adjustable frequency and adjustable duty cycle PWM output, ADC dual-pass input, and single-channel adjustable waveform. DAC output, and as always, the main frequency
board that has overclocked the microcontroller to 200M can also be integrated into other modules for collection
code. See [Github].
The current functions are:
ADC:
input voltage 0-3.3V, sampling rate 12bits @ 5Mhz
1- 2-5 time base step from 200ns to 500us, and software can amplify the time base to 20ns.
Software vertical amplification of 1-2-5-10 times
three triggering methods, 0-90% of 10 trigger level
waveform measurement functions
PWM :
1-2-5 time base switching PWM output frequency from 20MHz to 500Hz
10% step switching PWM output duty cycle from 0% to 100%
DAC:
DAC output up to 10Mhz@12bit
adjustable output peak-to-peak value and DC bias , up to 0-3.3V, with an adjustment step of 10%,
it can output six waveforms, including sine wave, triangle wave, sawtooth wave, square wave, impulse and DC,
adjustable output frequency and waveform horizontal resolution, of which the frequency is still 1-2-5 steps from 10M to 500hz, while the horizontal resolution can be stepped from 10 points to 500 points
3 independent buttons multi-level menu switching
1 programmable LED light
reserved for serial communication
------ --- The BOM is not trustworthy
, please go to Chuangyuan/b station private message/comment area or email, I will modify the program and update it in time. If you need more cooperation, please specify the only email: Defenver@foxmail.com ------------Explanation session---------- It is basically the same as the STM32G0 oscilloscope, but it is more troublesome. There is less information on G4, and I am a serious fan of registers. It took a lot of time to adjust this aspect. The ADC sampling is similar to that of G0. I won’t talk about the DAC here, but it is different. The DAC of STM32G4 is divided into low-speed DAC and high-speed DAC. The frequency of low-speed DAC is only 1M, while the frequency of high-speed one can reach 15M. However, the high-speed DAC can only be connected to on-chip peripherals and cannot be directly output to the IO port. Do you think this is the end? You are wrong. ST generously added an OPAMP peripheral to the G4 series. OPAMP is a programmable operational amplifier peripheral. Its function is the same as an off-chip operational amplifier, but the bandwidth is cheaper than an off-chip operational amplifier. The bandwidth has also been improved a lot (GBW=13M), and it supports connecting to a DAC to directly output the DAC waveform in follow mode. This not only solves the problem of high-speed DAC being unable to output, but also buffers the DAC through the op amp. Used to drive a little load, why not? The next step is simple. It is similar to the ADC. It also uses TIM to trigger the DAC, and then DMA transmits data, so that the waveform can be output. Finally, there is the software part. The software part is the same as the previous three. There is not much difference between the oscilloscopes. Basically, everything is thrown into while(1) for processing. This version of the oscilloscope has a lot more things, so it uses a three-level page to display functions, etc., or uses the classic key value judgment. Switch the page and look at the source code to understand.jpeg Since the Flash size of the selected microcontroller is insufficient (STMM32G431K6), USB and other peripherals cannot be implemented. I will wait until I have more meters and replace it with a better microcontroller and see if I can use this function.







 

 



 



参考设计图片
×
Design Files
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-24 11:40:01

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号