Esp32 40Msps oscilloscope project is closed and here is why.

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:

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

3 Replies to “Esp32 40Msps oscilloscope project is closed and here is why.”

  1. Hi,
    so you went through the same kind of failure I experienced. I once ventured into this field at the time when the Arduino Due, clocked at 84MHz was the fasted MCU board I could afford. My primary target was to build a 8bit 200Msps board with FIFO and dual external clock, having immediately found the analog front-end required microwave-class design and components, I did set for a more reasonable 40Msps, which was defeating already my target of sampling fast signals. At that point, I found out there were development boards for certain 8bit parallel ADCs that were doing a proper job of measuring the signal. Then a FIFO board was in order, since there was no way to do it in the Arduino board itself because the underlying interrupts would be feating the effort. At that point the available open source DSOs with USB out were already affordable and sampling at higher frequencies than this so I certified this failure.

    Like

    1. That’s true. Front-end is an important part of such a project and it is very complicated if you want to get a good but still cheap solution, but I have some new ideas how to make it good and cheap, hopefully, I’ll finish the oscilloscope project based of esp8266 and stm32 combination during this year.

      Like

  2. I did manage to debug the ESP32 with J-Link by doing a merge of the Espressif OpenOCD branch into the OpenOCD trunk, on a local Linux VM. It took about 1-2h of fiddling around, but I never pushed my changes upstream. However, after this change, debugging worked with J-Link, FT232R and the Bus Pirate.

    This was more than one year ago so I don’t remember exactly the changes that were required but it was pretty straightforward, coming from a guy with almost zero C/C++ experience. I would have expected after one year that OpenOCD debugging would work out-of-the-box with common hardware.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s