Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
The STM32-O-Scope Wiki.
This little project was inspired by Ray Burnette's $10 Oscilloscope… which in turn came about as a result of efforts to port the STM32F103 series microcontrollers to the Arduino IDE environment.
Don't expect a full multi-megaherz scope like the Tektronix in the background of the image above, to emerge on these pages. The STM32F103 ADC is only capable of a theoretical maximum resolution of 2 MHz and the current software using the Arduino analogRead() function on the STMF103 can only manage about 7 us conversion times due to other software overheads. However the sketch improves on this and can currently manage sub 2 microsecond conversions
It would be possible to get 2 MHz from the ADC, but that would require a little more effort. Furthermore, if we can manage 2 MHz (or even 1 MHz) we can observe i2c and similar serial protocols.
Mainly though, this project aims to show off what is possible with the STM32F103C8T6; a chip that is available for a just a few dollars in a number of PCB formats.
What the scope can do so far? Trigger (sort of). Scale the input. Change timebase. Sample 6K+ analog samples per event. Hold the image of the samples, and spit out the samples on the USB serial port. This last feature is probably the most interesting.
What can't it do? Well, the triggering requires more work, the sampling should be changed to use DMA and its speed increased to the maximum rate possible, and as it stands, it is limited to relatively low signal levels as the attenuator is a simple 1 MΩ resistor. However, considering the pocket money price, it's a pretty useful educational and practical tool.
How do I make one? Follow the instructions > https://github.com/pingumacpenguin/STM32-O-Scope/wiki/Construction