Software to capture and plot with the new firmwares

Post Reply
robocog
Posts: 64
Joined: Tue Sep 12, 2017 10:06 am

Software to capture and plot with the new firmwares

Post by robocog »

Added a CP2102 to the DSO shell tonight
I am getting data from it

I am trying to follow http://www.rudiswiki.de/wiki9/JyeTechDS ... ualization
but the python script kindly given on that page does not work with the new firmware
(http://www.rudiswiki.de/wiki9/JyeTechDS ... 150_p23.py )
I guess because the format is not the same as the firmware it was designed to read and parse

It starts off fine and asks me to push the capture button - it does connect to the CP2102, it does start reading valid data
However I get :

C:\Documents and Settings\Rob>"C:\Documents and Settings\Rob\Desktop\dso150_p23.py" -pd
Push the DSO150 encoder button.
59
58
Traceback (most recent call last):
File "C:\Documents and Settings\Rob\Desktop\dso150_p23.py", line 119, in <module> timeRes = float(sdat)

ValueError: could not convert string to float: VSen,1V

-------------------------------

I did watch the data fly past on a serial console and could see its not gobbledygook, and it must be possible to do something nice with it
(really like the idea of "capturing and visualizing" the data the unit sends)

I did try and use Sigrok, but I simply couldn't see how to get it to capture the data from the DSO Shell
(the website above mentions it, but not enough of a recipe for me to follow as it assumed I knew what I was doing)

Tantalizingly close!

Can anyone explain what I need to do /download to get Sigrok working or what would need modifying to get the python /gnuplot script working with the new firmware?

Regards
Rob
Last edited by robocog on Sat Jan 20, 2018 12:05 pm, edited 1 time in total.
robocog
Posts: 64
Joined: Tue Sep 12, 2017 10:06 am

Re: New firmware and serial data capture to visualize and pl

Post by robocog »

JYE- are you planning on getting JYElab working with the data from the DSO Shell?
(have tried all combinations and it currently doesn't seem to work with it...yet)

Doesn't need to be fancy
Just capture and show the waveform with legends and reference points and an option to save the waveform as "data" and as a screen capture "image"

Regards
Rob
jye1
Posts: 1221
Joined: Wed Feb 20, 2013 4:58 pm

Re: New firmware and serial data capture to visualize and pl

Post by jye1 »

Unfortunately we have no plan to add this feature to jyeLab. For plotting the data from the Shell we suggest do this way:

1 ) Capture the output in plain text format.
2 ) Save the capture as a text file and remove the header (the measurements).
3 ) Save the rest as a CSV file.
4 ) Use Excel or Gunplot to plot the data.

This is a little clumsy but working.
robocog
Posts: 64
Joined: Tue Sep 12, 2017 10:06 am

Re: New firmware and serial data capture to visualize and pl

Post by robocog »

Ok Thanks :)
robocog
Posts: 64
Joined: Tue Sep 12, 2017 10:06 am

Re: New firmware and serial data capture to visualize and pl

Post by robocog »

Getting there - using the python script - I have managed to fiddle with the code a little (never used Python before and I am NOT a programmer by any standards, so you can imagine how well it has gone!) and got it so that I can grab all the serial data into a text file

Lots of work to be done - but happy to share what I have got when I have done some more tidying up and debugging
(please bear in mind my statement about be not being a programmer and I have basically fudged code that has kindly been shared!)

Regards
Rob
robocog
Posts: 64
Joined: Tue Sep 12, 2017 10:06 am

Re: New firmware and serial data capture to visualize and pl

Post by robocog »

Getting there, and for Windows at least I have a working solution
It is NOT tidy as I am not a coder and up till the last week or so the only Python I had heard of was a snake

If anyone is handy with Python I have put the code on my server
(http://www.robocog.co.uk/electronics/dso150/)

Stuff that needs looking at:
Unable to call/run gnuplot from within the python script (I am running an early version of windows so it limits me to an early version of Python and think this is part of the reason?)
I still need to call the script with '-pd' options and can't suss out how to "hard code" them without seemingly breaking the script completely
It is probably VERY inefficient and scruffy - but as I say - never used Python before and I am not a coder
I have probably broken bits from the original code to allow cross platform functionality

The only script I need to call is the one called "read serial" (with -pd) - then open gnuplot with 'dso150_gnuplot.par' and it presents me with a graph (which can be printed or saved as an image)
Much nicer than hand editing the output from a serial capture :)

The data from the scope is saved, along with the 'header' with useful info about what the scopes settings were at the time of capture - would like to try and combine it with the graph, but not got that far yet

The gnuplot output for 3.3v AC looks like
3.3v AC.png
For 3.3 DC
3.3v DC.png
For 0.1v AC
0.1v AC.png
And for 0.1v DC
0.1v DC.png
Not sure about the 0.1v graphs or data - reading a little high for both AC and DC - will try the other scope when I get another CP2102 board (and modify it if necessary!)

Regards
Rob
jye1
Posts: 1221
Joined: Wed Feb 20, 2013 4:58 pm

Re: New firmware and serial data capture to visualize and pl

Post by jye1 »

0.14V is the correct value for the "0.1V" test signal. "0.1V" is not an exact specification for the amplitude.
robocog
Posts: 64
Joined: Tue Sep 12, 2017 10:06 am

Re: New firmware and serial data capture to visualize and pl

Post by robocog »

Thanks for getting back to me and letting me know it is not a problem :)

For such an inexpensive item I am still blow away with how many features and the support you guys give
Regards
Rob
RobNL
Posts: 122
Joined: Mon Dec 25, 2017 3:11 pm
Location: The Netherlands
Contact:

Re: New firmware and serial data capture to visualize and pl

Post by RobNL »

Would it be possible to transfer data to a mobile phone with a bluetooth module?
Insert the bluetooth module into the USB2TTL module (or shell) and connect the mobile phone to the bluetooth.
Then only an APP is needed (Android ?) to make connection between the shell and the mobile phone.
The data can be stored (and watch) on the mobile phone and can be transferred to a computer (operating system does not matter).
And you have a "memory scoop".
CU, Rob
robocog
Posts: 64
Joined: Tue Sep 12, 2017 10:06 am

Re: New firmware and serial data capture to visualize and pl

Post by robocog »

I do have a pile of bluetooth<> ttl boards here, so could easily test as I do already have an Android bluetooth serial app that I /think/ is able to "capture" data and save it (will check shortly)

As far as writing an android app is concerned that will automate the process....I struggled to get the pre-written windows script functional (and that is with a pile of documentation and examples to consult :D )... so I am not the man for this job

How portable is Python...and how long you got?....rofl

Regards
Rob

Just opened up the DSO shell and played with the placement of the HC-05 bluetooth boards I have (possibly a 5v regulator will be needed as it needs 3.6v - 6v power)
I don't think I'm going to get it to fit with my lipo charger and 9v boost board
Not sure if you can't get 3v3 versions of the HC05/06 - which would save some space for the regulator
I need a smaller 9v boost board ideally - the only one I got that puts out a non interfering voltage does use up a lot of room- the smaller board I got was too noisy for the scope, but small enough not to be an issue for fitting more toys to the inside, or just use a smaller lipo...
Last edited by robocog on Sun Jan 14, 2018 7:52 pm, edited 1 time in total.
Post Reply