Some time ago I started a pet project DIY esp8266 oscilloscope, cheap and simple? First experiments showed that the concept is viable, but, to be honest, I didn’t expect so many troubles with my first version of analog frontend (my knowledge in high-speed analog circuits is limited, so now I understand that such result was rather expected). But thanks to free SPICE simulation software (like Tina-TI or LTspice) I was able to analyze my mistakes and fix them. Recently I had time to test the newest version of my schematic for the AFE and it seems very promising. I managed to get 2MOhm ~20pF input amplified enough to feed 2 ADCs on STM32 uC connected in parallel and running at very high speed (in this mode input impedance of the ADC is very low and requires an amplifier to create an input with high impedance). The schematic is based on a very cheap but surprisingly well-performing Chinese OPAMP Gainsil GS8052-SR which is easy to solder rait-to-rail high current output broadband operational amplifier. Here is my test setup with ADALM2000 which I used to get the Bode plot of the amplifier characteristics.
And here are the measured parameters of the AFE:
As you can see the amplification is pretty linear up to ~15Mhz which is perfectly enough for my purposes (max ADC sampling rate in my setup is 18Msps(with adc resolution 6bit), but at practically useful 8bit resolution it is ~13Msps). When I have time I’ll continue my experiments on the creation of the very cheap yet useful oscilloscope. Stay tuned!
Hi, I like the idea of simple and cheap tools for DIY community. That’s why I tried to create a simple 40Msps DIY oscilloscope based on esp32 chip. Unfortunately, the chip, in spite of all of its power, wasn’t able to handle the data flow from 40Msps ADC (it turned out that only up to 20Msps is possible for the esp32). But, in my opinion, 20Msps isn’t enough for a complicated design with an external ADC when there is an excellent stm32f303 microcontroller that can reach about the same speed with an embedded ADC + analog watchdog functionality for a hardware trigger purposes. STMicroelectronics produces very convenient development boards for its microcontrollers and I have a new idea! If we take a cheap and easy to buy dev board (for example stm32nucleo-f303k8), equip it with a bare minimum analog front end (simplest possible attenuator + amplifier to have high input impedance and suitable input signal range capabilities), add an esp8266 module for wireless communication + 18650 Li-Ion battery for power. All together will provide us with a relatively simple “stm32nucleo – hat” PCB that will turn the dev board from ST into a wireless oscilloscope. Basically, I’ve already run 2 PCB revisions and the idea looks absolutely viable. We can get up to 18Msps with 6-bit resolution and 10Msps at 12-bit, which is pretty good taking into account the simplicity and price of the device. The only problem is the proper design of the analog front end which is not that simple when you want to have both low cost and proper quality at higher frequencies at the same time. But it looks like I figured out all the needed changes and ready to prepare the next revision of the PCB to test my ideas. I’ll publish all my work as an open source design as soon as it works properly. Should you want to support this project please donate.
This post will be extended as soon as new information (schematic, pcb, firmware) is available.
Hi everybody, since my first post about the project I have made a couple video demonstrations and built several prototypes. I invested in the project a huge amount of time, but this is the time to admit that the project has failed. And I want to explain why.
The largest problem – incomplete unclear and misleading documentation of the esp32 chip. According to the specification, esp32’s I2S is able to work at 40MHz clock rate, but it’s not true (at least for parallel mode). According to my experiments and some information from other developers the maximum speed is 20MHz but even at this speed not all FIFO modes work. I have spent a couple of weeks investigating the problem and wondering why I2S at high speed puts 2 absolutely identical samples in the buffer. I found that other developers have the same problem and obviously it’s esp32 limitation.
The second problem – no JTAG debugging support. Unfortunately, I didn’t manage to make JTAG for esp32 work properly. Developers of “Sloeber IDE” did a greate job to create a fully functional IDE for Arduino platforms, but for some reasons, my j-Link doesn’t work with esp32’s OCD server from Espressif properly. When there is no proper documentation for the chip a proper debugger becomes a crucially important part of a successful development. But it’s not the case for esp32 (at least now, I hope in future it will be better).
The third problem – analog frontend of a high-speed oscilloscope is not a simple thing. Yes, my knowledge in analog electronics is relatively limited and it took me a while before I realized that I have underestimated the complexity of this part of the project. My goal was to create a very simple and cheap hardware that could be easily assembled by an amateur, but it seems to be not possible. Without shielding, bus drivers, operational amplifiers and other parts of a proper analog frontend it simply doesn’t work with proper quality. And when you put all of this in the project it becomes neither simple nor cheap.
So to summarize:
My initial goals for the project (40Msps, low-cost and simple schematic) are not reachable with esp32 and selected hardware architecture. I think that 20Msps is a too slow speed.
The development effort for esp32 is unacceptably high due to bad documentation and absence of proper debugging tools. But this statement is true only when you are doing something unusual. With typical tasks like web server hosting and wifi communication esp32 works well.
Due to some software mistakes, the signal doesn’t look really good, but I found the problem and now waiting for PCB to improve also hardware quality. Hopefully, on the next video, we will see a beautiful picture with all features of a good oscilloscope (various trigger settings and low noise). Stay tuned!