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

70,890

619

87

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

About: Awesome Electronics Tutorials, Projects and How To´s

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.

Attachments

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-...

Arduino Contest 2020

Participated in the
Arduino Contest 2020

Be the First to Share

    Recommendations

    • Pets Challenge

      Pets Challenge
    • Stone, Concrete, Cement Challenge

      Stone, Concrete, Cement Challenge
    • Fandom Contest

      Fandom Contest

    87 Comments

    1
    Raphango
    Raphango

    6 months ago

    Great!! Congratulations!!!

    0
    Albertv3
    Albertv3

    10 months ago

    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.

    0
    av.bemmelen
    av.bemmelen

    Reply 9 months ago

    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!?

    0
    Albertv3
    Albertv3

    Reply 6 months ago

    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!

    0
    luklev
    luklev

    1 year ago

    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 :)

    0
    av.bemmelen
    av.bemmelen

    Reply 8 months ago

    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)

    0
    CreativeLau
    CreativeLau

    Reply 1 year ago

    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.

    0
    Slack Babboth
    Slack Babboth

    Reply 1 year ago

    Thank you. Looking forward to the update and some useful links to components.

    0
    CreativeLau
    CreativeLau

    Reply 1 year ago

    I have found all components from Aliexpress. Please refer the links in step 2.

    0
    Slack Babboth
    Slack Babboth

    Reply 1 year ago

    Mate perfect thanks so much.buying now. Should be here in about a month.

    0
    Slack Babboth
    Slack Babboth

    Reply 1 year ago

    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.

    3
    c14nz
    c14nz

    Question 1 year ago

    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.

    2
    GustavoL30
    GustavoL30

    Answer 1 year ago

    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

    0
    c14nz
    c14nz

    Reply 1 year ago

    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.

    0
    GustavoL30
    GustavoL30

    Reply 1 year ago

    I am uploading the video right now. You can check the link in about 15min on the github page.

    2
    c14nz
    c14nz

    Reply 1 year ago

    Great tool and the fact that is running on an ESP32 that is such a powerful and cheap microcontroller and the plus is on an TTGO that is almost plug and play, just upload the code and you are good to go. What I don't like on that TTGO is the display, I really love the OLED ones, nevertheless grate oscilloscope.

    0
    GustavoL30
    GustavoL30

    Reply 1 year ago

    Thanks! The colors are reeeeeally better on an OLED, but unfortunately, I don't have one to go with it.