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.

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

  • UART protocol 9600bps 8N1. Currently very limited, but still useful.

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)

Project page

TDSO112A

Road Map

  • UART protocol: enable a certain degree of configuration.
  • Attempt to integrate the program with sigrok-cli.
  • Adapt the code to run on a modified DSO183 (use relays and transistors to control the oscilloscope via software).
  • Same for the DSO138.

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. Anyway, 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; I simply want to experiment and improve my skills. One interface that really appeals to me is that of PicoScope 7.

About the name

The spelling of the name in Spanish is suggestive… and it’s also a Tcl/Tk development on a Digital Storage Oscilloscope…

Contact

If you have any suggestions or questions, I’m available at: tdso112a at hykrion.com