Make Your Own Oscilloscope(Mini DSO) With STC MCU Easily

81K641113

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:

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!

There is good news for this project!

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:

https://www.instructables.com/id/Upgrade-DIY-Mini-...

89 Comments

What else can be used without this ic ic number..??
Hi, were you able to replace STC MCU ?
Great!! Congratulations!!!
Sadly instructables like this one that uses a strange unknown Keil compiler without instructions on how to exactly compile your code and how to program the processor with it are just impossible for any layman to follow. I think that you first should have added instructions on how to do that. Now it for me is taking too much time to find out what it needs to build such a device. And it looses any value to me.
Hi CreativeLau, Today I've started building the pcb board and already placed the processor and the display with the RxD,TxD, Gnd and Vcc connections.
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!?

Both MCU's were okay. Turned out it just was the turn-off-the-Vcc voltage and reconnecting it to start the programming before the cpu was finally recognized.
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!
Nice work. It reminds me of synth modules with a built-in oscilloscope, where you can see different waves and their modulations. They provide a more aesthetic than a measuring function, but this project can definitely be useful for someone who does not have an oscilloscope. Thanks for sharing :)
Problem that both my MCU processors looked being defect and dead trying to program them is solved! It turned out to be something that wasn't told - we have to remove the 5V Vdd from the processor and reattach the vdd to the STC MCU again in order to start the programming. And only then the processor is recognized in the STC-ICP program! And the oscilloscope now finally works! Nice! Although my 350MHz Tektronix 2465A and my Tektronix 2440 memory scopes of course go much higher in frequency they are hardly portable. And this single scope definitely is! (And Google is always there to help when no one is there to answer. Which helped me to find this PDF that fixed my MCU not working problem: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwi0-J76lPvsAhUM36QKHUvXAg4QFjAFegQIChAC&url=https%3A%2F%2Fwww.atlantis-press.com%2Farticle%2F25862201.pdf&usg=AOvVaw36nLDR9v5XB0wFmPA7TtJf)
Hi, Slack, I have checked your link. The two components you choose are not available for this project. The STC MCU is not compatible ATMEGA and the display you should find the one with SPI bus. But don't worry, I have planned to transfer this project to STM32 and make the display driver compatible with IIC. Then you could find the components easily.
Thank you. Looking forward to the update and some useful links to components.
I have found all components from Aliexpress. Please refer the links in step 2.
Mate perfect thanks so much.buying now. Should be here in about a month.
Thank you - have just finished watching the video. My parts are now on order, may take 50 days to get here but will be exciting to make when they do.
Congratulation on the project!

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.
I made one on an ESP32 TTGO with a TFT display using DMA with i2s and achieved 1Msps. No external circuit for now, but pretty decent detection. I tested it on sine waves from 40hz to 80khz, PWM, trigger on Serial communications, and on an electric guitar (gets the string's frequency correctly). I hope you find it useful.
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
I look at the specs and is looking good, I don't see the peak voltage that can take and will be nice to see a video.
I am uploading the video right now. You can check the link in about 15min on the github page.
More Comments