OS X Client Software for Owon SDS7102 Digital Storage Oscilloscope

Ever since using my first Oscilloscope in the ’80s, I’ve wanted one. Though I’m a software person by trade, my hobbies have long included electronics in many forms. Heck, I’ll take a well tuned, clean, pinball game over a video game any day (and if it isn’t well tuned and clean, I’ll do that, too). An oscilloscope has long been the ultra-expensive super tool that my hobbyist pursuits just couldn’t justify the expense.

Not any more.

Recently, I picked up a cheap treadmill to turn into a “walking desk”. It works fine, save for the annoyance that it turns off ever 30 minutes and the control box is this big, ugly, clunky thing that clearly is a whole lot dumber than the LED display indicates. In adding some extra length to the control box’s cable, I noted there were only three wires; power, ground, and a signal wire.

Clearly, given price point and lack of real communication between control box and treadmill, the “protocol” between the two is likely nothing more than a PWM signal.

Which, given that the treadmill (Confidence Treadmill) is for my health, health is vital, and the best way to explore that signal deeper, I investigated picking up an oscilloscope for the first time in 15 years.

Boy howdy. What a difference those 15 years made! I was used to seeing depressing 4 digit numbers on scopes that were somewhat slow, very bulky and had little to no means of exporting data save for snapping a picture. Now? Less than $500 gets you a multi-input ‘scope capable of handling up to 100MHz signals with lots of analysis features and the ability to dump it all to USB or, in some cases, the network.

A bit of research revealed that the Rigol DS1102E is the most popular of the sort of entry level digital scopes.

However, the Owon scope pictured at left was only $50 more, has a much larger screen, and a LAN port. Rigol’s ds2072 is similar, but nearly $400 more and is backordered pretty much everywhere. While the Owon has had some negative reviews, the latest version seems to have addressed almost all of the criticisms. That, combined with the realization that I’m not exactly going to be pushing it (and a bit of a desire for immediate gratification) and I went with the Owon.

Couldn’t be happier. The Owon SDS7102 seems to work just fine; more than enough for my needs. The user interface is pretty mediocre, but passable.

I’ll let people far more competent than me properly review the scope.


1khz5vCalibration

While saving data to a USB stick was straightforward, the LAN port is pretty much completely undocumented. The Owon site provides documentation for communicating with the Owon Oscilloscope via USB, but nothing about the LAN. I did find one cryptic message that said “The LAN port works just like USB”. Mmmmm…. k.

Turns out that it sorta-kinda-does. Whereas the USB port requires all the various USB shenanigans to set up a connection and communicate, the LAN port simply listens on a particular IP and port until something connects. In both cases, you send “STARTBMP” or “STARTBIN” to start the download of a screenshot or binary data dump respectively.

Clearly, this called for a little bit of software. I wrote a command line tool named ow that has subcommands (bin and net) for analyzing Owon binary files or grabbing screenshots/data off an Owon oscilloscope on the LAN.

The code has been pushed to github. Hopefully, someone else will find it useful enough to fill in some of the todo list!

The screenshot at right was captured over the LAN using the command ow net screen /tmp/screen.bmp. The signal was from the scope itself as it includes a built in 1KHz 5v peak-to-peak square wave generator that can be used for calibration and practice purposes. Quite handy.

ow --help
ow: Usage [OPTIONS]  [...]

--verbose       Turn on verbose logging.
--help          Show this help message.

Subcommands:
... bin [options] file1 [file2 ...]
	Parses and summarizes Owon bin files.
     --csv      Convert file to CSV (writes new in same directory as .bin)

... net {screen,data} filename
   Downloads screenshot or binary data from Owon oscilloscope over the LAN.
   Host / port can be specified with options or will be read from database ('host','port').
     defaults write com.friday.ow host 10.0.1.230
     defaults write com.friday.ow port 3000
     --host HOST   IP address of Owon oscilloscope.
     --port PORT#  Port #.
     --write       Write values to defaults database.

(The part about writing a CSV is a total lie. Doesn’t do that yet.)

I have since confirmed that the treadmill does indeed simply spew a PWM signal from the control box to the treadmill to control the speed. There is no back communications. Now I just have to figure out how to program an Arduino to spew the same PWM (easy) and add whatever discrete components are necessary to amplify the signal as needed (baffled by this part).




6 Responses to “OS X Client Software for Owon SDS7102 Digital Storage Oscilloscope”

  1. Dennis Gentry says:

    Here’s an example of a working MOSFET drive with motor kickback protection. Or just hook it up , and you won’t even need an Arduino.

  2. dB says:

    I was wondering if you have an pointers to .bin file format please?

  3. dB says:

    Looks like STARTMEMDEPTH is the 3rd command that fetches the deep store contents.

  4. bbum says:

    Thanks for the additional start command!

    The source link includes a basic BIN decoder. I just need to apply the math bits to normalize the 8 bit samples into real data.

  5. Wes Peters says:

    The Owon protocol doco is available at http://www.owon.com.hk/software/Application/SDS_Series_SCPI_Protocol_en.rar

  6. Wes Peters says:

    Follow-up to the Owon protocol doc: wow is that obtuse. You may find the owondump source code at http://sourceforge.net/projects/owondriver/ helpful in decoding the “chenglish” in the protocol document; it seems to be able to decode the bin format over USB.

Leave a Reply

Line and paragraph breaks automatic.
XHTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>