Techo

Techo is a program written in Tcl / Tk to simulate an oscilloscope using the CH32V003EVT evaluation board from WCH on Aliexpress. You can find documentation, code, etc. for the microcontroller on WCH’s official page: CH32V003.

CH32V003EVT CH32V003EVT

It is not a full oscilloscope since you cannot: change the AC/DC coupling, work with AC signals, exceed 0–5V, etc… but it can still be used as a tool to: visualize DC signals, view their spectrogram, calculate their frequency, measure amplitude, Vpp, Vrms, save data to CSV, and more.

Here you can watch the general operation.

CH32V003

You will need to compile the control program using MounRiver to operate the controller. The MounRiver directory contains the files that will go in the User directory:

  • main.c
  • parser.c
  • parser.h

The main file configures the USART, DMA, and ADC.

The key part for Techo to understand the ADC data is:

...
printf ("%04d ", TxBuf[i]);

It is essential to send the data as a 4-digit number separated by a space.

The other critical part is the handling of the DMA and how the data is sent to the computer. This is actually Techo’s weak point, as its handling is not optimal and can lead to completely distorted waveforms. If you have experience programming the CH32V003 and can improve the code to deliver a clean waveform to the ceiling, please contact me. I will upload the code to GitHub in the coming weeks.

The parser simply allows you to send commands to the board and control it. It’s very rudimentary, but more than sufficient.

Project page

Techo

Updates

I will update the software and this help page whenever I have time.

Version 0.2

Code:

  • Added code for MounRiver

Version 0.1

Features:

  • Time base adjustment (1µs – 0.5ms)
  • Trigger (rising/falling)
  • Zoom
    • time
    • voltage
  • Cursors for manual time and voltage measurements
  • Spectrogram (512 or 1024 points)
  • Saving data in CSV format

Road Map

To add:

  • UART and DHT11 protocols
  • Experiment with DMA to try to improve Techo’s readings

About the name

It is a Tcl/Tk development running on a CH… TeCHo.

Contact

If you have any suggestions or questions, I am available at: tdso112a at hykrion com