Make Your Own Oscilloscope(Mini DSO) With STC MCU Easily
Intro: Make Your Own Oscilloscope(Mini DSO) With STC MCU Easily
This is a simple oscilloscope made with STC MCU.
You can use this Mini DSO to observe waveform.
Time Interval: 100us-500ms
Voltage Range: 0-30V
Draw Mode: Vector or Dots.
STEP 1: Watch the Video!
In this video, I will show you how to assembly this Mini DSO step by step.
STEP 2: Prepare Your Parts!
Material List:
- MCU: STC8A8K64S4A12 x 1 Get it from AliExpress
- Display: SSD1306 OLED(5V with 7-Pin SPI Interface) x 1 Get it from AliExpress | Get it from Amazon
- Resistor:
- 1W 10k x 1 Get it from AliExpress
- 1/4W 2k x 2 Get it from AliExpress | Get it from Amazon
- 1/4W 10k x 1
- Capacitor:
- 47uF x 1 Get it from AliExpress | Get it from Amazon
- 0.01uF x 1 Get it from AliExpress
- EC11 Encoder x 1 Get it from AliExpress | Get it from Amazon
- Toggle Switch x 1 Get it from AliExpress
- 2-Pin Terminal x 1 Get it from AliExpress
- IC Socket 40-Pin x 1 Get it from AliExpress
- Row Pin Female: Get it from AliExpress
- 7-Pin x 1
- 2-Pin x 1
- 3.7V Li-ion Battery x 1 Get it from AliExpress
- 5V Booster Module x 1 Get it from AliExpress
- USB-TTL Downloader x 1 Get it from AliExpress
- Circuit Board x 1 Get it from AliExpress
STEP 3: Scheme and Circuit!
The circuit is very simple.
The final circuit is a little different from the video.
I add two capacitors as MCU power filter. Add a resistor as voltage dividing for voltage sampling of battery.
Move the switch to Battery+ and power module to avoid the drain current during stand by.
STEP 4: Download the Code!
Use a USB to TTL downloader to download the code to MCU
Connect TXD, RXD and GND to the Mini DSO.
Download STC-ISP software here: http://www.stcmicro.com/rjxz.html
If the interface of STC-ISP is Chinese, you could click upper left icon to change language to English.
The detail configuration of STC-ISP please refer my video above.
The code was written in C. Use Keil software to edit and compile.
STEP 5: Success!
Here you could observe waveform easily with this Mini DSO.
It also could be used to measure voltage.
Add a probe to the terminal, it could be easily working in hand.
STEP 6: Issue
Since this Mini DSO could not measure negative voltage, the waveform will stop at 0V.
STEP 7: Related Topic
I also made a Function Generator with STC MCU. The waveform shown on the Mini DSO is just generated by my DIY Function Generator. If you are interested in it, you could watch my video now. I will create the instruction later.
STEP 8: Update in the Future
The new functions for the Mini DSO is being developed. They are Normal Sweep and Single Sweep. With these functions you could observe the waveform mutation. In the picture, it is the waveform mutation of the switching power supply during power on. We catch the wave rising just same as the oscilloscope DS1052E.
I will share this update when I finished it.
Hope you like it.
I am appreciate your support.
Feel free to check out my YouTube Channel: https://www.youtube.com/c/CreativeLau
STEP 9: New Version Released!
Since many people are interested in this project, I spent some time upgrading it overall. There are changes in interface, operation logic and circuit. After upgrading, the Mini DSO is more powerful.
Please refer to the instructable for the new version:
89 Comments
Isuru udara 10 months ago
farshadn44 2 years ago
Raphango 3 years ago
Albertv3 3 years ago
av.bemmelen 3 years ago
But first trying to program the new Aliexpress ordered processor with STC-ICP v.6.86U on Windows 7 with two tested USB to serial adapters failed to recognize the processor.
The program only sees both my AMenTechnologies adapter on COM2 and my other COM23 connected USB2serial adapter (not at the same time of course!) but never the STC8A8K64S4A12 processor.
I used TXD pin 22, RXD pin 21 and GND pin 20. Plus connected pins 15,16 and 18 to Vcc 5V but the processor is not recognized whatever I do?
What can be causing this problem being unable to program the code and the eprom files to the microcontroller? (I didn't connect the other parts yet, only the mentioned lines, So no resistors and capacitors yet).
I also noticed that the pinnumbering in your schematic was wrong compared to the placement of the board.
I hope that they didn't send me a defect processor!
In the upgrade part of the next article it is clear that you not just connected TxD and RxD to the USBtoSerial adapter, because you used a diode and a resistor in serie with the wireconnections. They must play a very important role that wasn't mentioned in the article! Without those components programming the STC processor obviously is never going to work!?
Albertv3 3 years ago
If it just was mentioned it would have made solving the before not programming and recognizing the MCU issue so much easier!
Still after completing this mini scope it doesn't work as nice as yours probably does? Too much fluctuations in the screen that doesn't make sence and the battery voltage doesn't show correct either. Even if the input is shorted the signals shown are unexpected! Apart from the known issue only showing the positive signals above ground the result is quite useless, and also the improved version doesn't make it anything better. And adjusting the scope by using the EC11 digital potmeter does not work as good as hoped either!
Akiyama 3 years ago
av.bemmelen 3 years ago
CreativeLau 4 years ago
Please refer to the new instructable for new version:
https://www.instructables.com/id/Upgrade-DIY-Mini-DSO-to-a-Real-Oscilloscope-With-A/
Slack Babboth 4 years ago
https://www.jaycar.com.au/ic-atmega162-16pi-mcu-pdip-40/p/ZZ8772
and this for the display?
https://www.jaycar.com.au/arduino-compatible-monochrome-oled-display-module/p/XC4384
I am a novice so any help would be very much appreciated thankyou.
CreativeLau 4 years ago
Slack Babboth 4 years ago
CreativeLau 4 years ago
Slack Babboth 4 years ago
CreativeLau 4 years ago
https://www.instructables.com/id/Upgrade-DIY-Mini-DSO-to-a-Real-Oscilloscope-With-A/
Slack Babboth 4 years ago
c14nz 4 years ago
This is a really useful thing to have around but if you can please make this code to work on an Arduino or ESP32 (this will be better as is more powerful, can go up to 240mhz and maybe will be possible to increase the sample rate having higher CPU clock speed) and also to have the option in the code to choose between ISP and I2C OLED displays to make it even easier to do it with what you have in your home.
STC8A8K64S4A12 DIP40 is discontinued and really hard to find. The STC8A8K64S4A12 in the LQFP-44/48 and 64 packages are widely available but they will need a PCB to be designed to be able to use them I think an ESP32 will be a lot easier and a lot of us have already some around.
Thank you.
GustavoL30 4 years ago
At the end of the quarantine, I hope to make an instructable with some external protection circuit/probes and a rotational encoder for menu operation, which I can't get for now.
https://github.com/gustavollps/esp32TTGO_i2s_scope
c14nz 4 years ago
GustavoL30 4 years ago