GNU General Public License v3.0

项目介绍

mmahdim/STM32F4-Scope 是一个托管在 GitHub 上的开源项目,主要使用 C 编写,采用 GNU General Public License v3.0 许可证,目前获得 64 个 Star、6 次 Fork。

仓库全名
mmahdim/STM32F4-Scope
开源许可证
GNU General Public License v3.0
Star 数
64
Fork 数
6

README 摘要

STM32F4-Scope 7.2 MSa/s Digital Oscilloscope Using the STM32F429 Triple Interleaved ADCs Table of Contents Specifications Hardware Pins Buttons Analog Frontend Software Buffer Interface To Do Installation Demo Touchscreen Interface Demo PC Interface Demo How you can support this project Specifications Specs | Description | Sample Rate | 7.2 MSa/s | Resolution | 12 bits | Input Range (Without analog frontend) |…

完整内容见 GitHub 原始 README 或本页 。

常见问题

STM32F4-Scope 用什么语言开发?

主要使用 C 编写,采用 GNU General Public License v3.0 许可证,目前有 64 个 Star。

STM32F4-Scope 可以免费商用吗?

仓库标注的许可证为 GNU General Public License v3.0,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 STM32F4-Scope 的源码?

可以直接克隆仓库:git clone https://github.com/mmahdim/STM32F4-Scope.git,默认分支为 main;安装与运行步骤见仓库 README。

STM32F4-Scope 最近还在维护吗?

仓库最近一次更新为 3月12日,当前没有未关闭的 Issue;Star 数为 64,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

7.2 MSa/s Digital Oscilloscope Using the STM32F429

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
81
价值分
40
活跃状态
活跃

语言占比

Assembly
Batchfile
C
C++
HTML
Linker Script
Makefile
Python
Ruby

Release

贡献者

README

STM32F4-Scope

7.2 MSa/s Digital Oscilloscope Using the STM32F429 Triple Interleaved ADCs

DOI

Table of Contents

Specifications

Specs Description
Sample Rate 7.2 MSa/s
Resolution 12 bits
Input Range (Without analog frontend) 0-3.3v
Channel Count 1
Buffer Size 6000 samples
UI Touchscreen, PC(through VCP)

Hardware

I used the STM32F429 discovery board.

Pins

PC3 is used as the analog input, and PE2 is used as the trigger input. (in the demo they are both connected to the same input.)

Buttons

The green button on the discovery board acts as stop/start button. You would need to stop the oscilloscope in order for the touchscreen to become responsive.

Analog Frontend

The microcontroller ADC input can only handle 0-3.3v. Therefore, there’s a need for a circuit to amplify/attenuate the incoming analog signal without distorting it. Furthermore, the trigger signal needs to be generated by an external circuitry.
Because of that, I designed an analog circuit in order to condition the signal and also generate the trigger signal. The circuit that I designed is based on the DS203 oscilloscope schematic, which you can find online.
I have to note that I did not have the time to properly test this circuit and build it, and it might not be functional. Therefore, use it at your own risk.
Below you can see the schematic drawn in LTspice. The circuit uses two OPA356 as amplifier, and a ADG658 as an analog switch to switch the gain setting.
The 9Meg resistor at the input is the probe’s internal resistance in 10x mode. To generate the trigger signal, my original plan was to use an analog comparator which would compare the Aout signal with a voltage generated by the MCU’s DAC as a reference voltage for trigger. The comparator has to be fast enough. In my original plan I ordered a LT1016 and a AD8561ARZ but did not have the time to test them.

image
Spice models for the OPA356 and ADG658 are available in their manufacturor websites.
The 0.2pF capacitors are there to model parasitic capacitance of resistors.

Software

CubeIDE & TouchGFX have made this project available.

Buffer

Just as a normal DSO, this project also utilizes circular buffers, which enables it to capture the waveform even before the trigger event. Half of the DSO buffer is dedicated to the pre-trigger and the other half to the post-trigger data samples.
The total circular buffer implemented has capacity for 6000 samples.

Interface

When the oscilloscope is stopped, you can press the arrow button to send the captured waveform through the COM port into the PC.
You can also use the zoom in and zoom out buttons by pressing the magnifier icon, and use the scroll bar to navigate through the waveform.

To Do

Needs some cleanup, and also some features like Volts/Div and Time/Div are not fully implemented yet. Sample rate is fixed to 7.2 Msps. Might do the cleanup and the complete the project if it received enough attention.
I also have written a Python application which receives the waveform from the USB VCP and displays the waveform on PC.

Installation

You need to open the .project file in the stm32cubeIDE and then program it to your chip.
In order to use the PC interface python program, change the COM port in the python source code to your desired COM port.

Demo

Here’s a youtube Demo:
https://www.youtube.com/watch?v=pv_ZHL44sbU
(in the video the wires are loose and the distortion is due to that.)

Touchscreen Interface Demo

image

PC Interface Demo

image

How you can support this project

Donations are welcomed.
BTC:
3BLXniEthLFhRLVYFCvtcK91qJPbp14w3J

ETH (ERC20):
0x43EC1F539E34809645A6ae6eC9D3ca8Cf19b666E

PayPal:
paypal.me/MMahdiMohammadi

评论

暂无评论