Pingumacpenguin edited this page Dec 8, 2016 · 22 revisions

The STM32-O-Scope Wiki.

Big mess o' wires and a real oscilloscope.

In the re-purposed chocolate box in this picture is .. a generic STM32F103RC and ILI9341 display, some wires, and a 1 MΩ resistor… and that's it.

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 >

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.