TDSO112A

TDSO112A is a program written in Tcl/Tk to control the oscilloscope DSO112A. Although still a work in progress, it is fully functional and extends the functionality of this small oscilloscope by adding:

  • Different spectrograms
  • High-frequency trigger (not available via hardware: see oscilloscope documentation User Manual: Setup Trigger)
  • Protocol reading: UART, DHT11… WIP
  • Waveform saving via CSV

Here you can see the general operation of the oscilloscope.

Reading the humidity and temperature sensor protocol DHT11 Reading UART NOTE: not yet available in the exe version.

The source code and a book on how I created this software will be available before the end of the year (if you know how Tcl/Tk works, you already have the source code…).

Operation

The architecture is client/server, where the server (the main program) is responsible for communicating with the oscilloscope and sending the data to the clients (which are the plugins). Basically, the data is that received from the ADC and the sampling frequency being used.

The file tdso112a.bat is responsible for starting the server and the various clients. After startup, two windows will appear:

  • The oscilloscope window
  • run-clients

Why two windows and the tdso112a.bat file?

The main development is done using the interpreter itself: tclsh dso112a.tcl. The main program creates a server that sends/receives data from the different clients (Discrete Hartley Transform, DHT, along with simple calculations of: RMS, Vmax, Vmin, etc.; DHT11 humidity and temperature sensor protocol, UART protocol, and anything else we can think of). These clients perform the complex calculations and notify the main program when they are ready to display the results. This allows for complete independence between the GUI and the calculations, and it’s as simple as running *exec tclsh client-measures.tcl &* for, say, the DHT and the usual measurements.

When using freewrap to create the executable, this isn’t possible in the same way, and two executables are needed (which is also good, since both are independent).

Since the intention was never to create a single executable, none of this has been taken into account, but it’s true that having an executable makes the program easier to use.

When will the source code be available?

In principle, before the end of the year, although as I said, if you know anything about Tcl/Tk, it’s already available. Although there will obviously be changes with each new version

Updates

I will update the software and this help page when I have time, but I can already tell you that the next updates are:

Version 1.1

  • DHT11 protocol

Version 1.0

  • Initial version. Contains all the oscilloscope’s functionalities without plugins:
    • Absolute (or almost absolute) control of the DSO112A
    • Software fixes for firmware errors such as the inability to trigger at high frequencies (mentioned in the documentation) or inconsistencies in control via commands (reported by other programmers).
    • Automatic measurements: VM, Vm, Vpp, Vavg, Fre
    • Time and voltage measurements using cursors
    • Waveform saving via CSV
    • Different spectrograms using the Hartley Transform (DHT)

Road Map

  • UART protocol (executable)

Currently, in the interpreter version, I have a preliminary version that runs at 9600bps 8N1 and works very well. Now I need to add flexibility and support for options. One limitation I’ll have in this regard is that the oscilloscope only has a 1024-point buffer, and this time I can’t avoid it with the software, as some port events would be lost. However, this is normal because an oscilloscope is designed to sample periodic signals.

As you can see, the road map is small, but I don’t want to include things I won’t be able to achieve (mainly due to lack of time). It’s true that the intention is to expand the number of supported protocols, but instead of continuing to implement them myself, it seems that an almost exponential improvement would be to integrate it with sigrok-cli. In any case, my personal goal was to implement the DHT11 humidity and temperature sensor protocol (achieved) and UART (currently partially achieved).

I also want to experiment with the graphical environment and give the interface a more attractive look, simply for enjoyment (and to learn), because obviously, as an engineer, functionality is all that matters to me, although it’s true that a pleasing appearance improves things. With this, I DON’T MEAN that I don’t like what Tk offers by default.