Author Topic: SainSmart DDS120 & DDS140 USB Oscilloscope  (Read 238393 times)

0 Members and 7 Guests are viewing this topic.

Offline doctormord

  • Regular Contributor
  • *
  • Posts: 190
  • Country: cx
  • !nop
    • #fine_arts & #electronics - 360customs.de
Re: SainSmart DDS120 & DDS140 USB Oscilloscope
« Reply #325 on: March 26, 2016, 05:00:34 pm »
Nice, keep it up. :)
#fine_arts & #electronics  - www.360customs.de
 

Offline merbanan

  • Contributor
  • Posts: 26
  • Country: se
Re: SainSmart DDS120 & DDS140 USB Oscilloscope
« Reply #326 on: March 26, 2016, 05:09:22 pm »
I took a picture of a 1kHz triangle wave. And it is easy to see here that I am missing every other buffer.
 

Offline doctormord

  • Regular Contributor
  • *
  • Posts: 190
  • Country: cx
  • !nop
    • #fine_arts & #electronics - 360customs.de
SainSmart DDS120 & DDS140 USB Oscilloscope
« Reply #327 on: March 26, 2016, 05:50:24 pm »
Hmm, isn't it async as well?

Nice one anyway. I wonder if "readbulkdata" is caring for the buffers itself. And what will happen, if you sample both channels, available buffer would half for each channel I guess.
« Last Edit: March 26, 2016, 05:53:04 pm by doctormord »
#fine_arts & #electronics  - www.360customs.de
 

Offline merbanan

  • Contributor
  • Posts: 26
  • Country: se
Re: SainSmart DDS120 & DDS140 USB Oscilloscope
« Reply #328 on: March 27, 2016, 09:25:04 pm »
I have now tested the sainsmarts bulk endpoint 0x86 and I could not get it working. I did get a sane transfer count when running the test120 application and using it in 2.4MHz and 2.4kHz mode. In both cases I got close to double Ms rate. But when choosing "50" MHz mode I max out at ca 7.5Ms/s.  Either the interrupt read is not working correctly with regards to some buffer handling or bulk reads are needed to be able to get more data. I am more and more convinced that a custom firmware is needed to get reliable data from the hardware.
 

Offline doctormord

  • Regular Contributor
  • *
  • Posts: 190
  • Country: cx
  • !nop
    • #fine_arts & #electronics - 360customs.de
Re: SainSmart DDS120 & DDS140 USB Oscilloscope
« Reply #329 on: March 28, 2016, 12:06:59 am »
Maybe it's a setup issue. Have you checked the other .dll functions? I'm not sure if they share the dll code for both the DDS120/140.

Have you had a look into the source of "leidioskop", it should be available here in the thread.
#fine_arts & #electronics  - www.360customs.de
 

Offline merbanan

  • Contributor
  • Posts: 26
  • Country: se
Re: SainSmart DDS120 & DDS140 USB Oscilloscope
« Reply #330 on: March 28, 2016, 12:52:46 pm »
Ok, I got it all explained now. At 48MHz ("50Ms") sample rate the scope gets one frame of 1024 samples. That should be enough to capture most periodic signals. As you/others wrote before the scope is blind most of the time. The waveform update rate on this scope is low.

But the hardware can deliver more then it does with the vendor software/firmware. For example the fx2lafw firmware is able to sample at a rate of 24MHz with a logic analyzer with 8 pins. So it should be possible to get one channel with a continuous sample rate of 24MHz and 12MHz with two channels. So I just need a firmware implementing that. And yesterday I was able to get the custom Hantek 6022 firmware working. So now I need to get the gain stage working and get proper samples out of the scope.
 

Offline doctormord

  • Regular Contributor
  • *
  • Posts: 190
  • Country: cx
  • !nop
    • #fine_arts & #electronics - 360customs.de
Re: SainSmart DDS120 & DDS140 USB Oscilloscope
« Reply #331 on: March 28, 2016, 01:03:24 pm »
Nice, please check your private messages.  :-DMM
#fine_arts & #electronics  - www.360customs.de
 

Offline andrej

  • Newbie
  • Posts: 1
  • Country: hr
Re: SainSmart DDS120 & DDS140 USB Oscilloscope
« Reply #332 on: March 28, 2016, 07:56:58 pm »
Hi!

I  wanted to buy DDS140, and did a little research on the product. In that process I came across this thread. I haven't read it thoroghly, but I see that on many places, one of the major problems with DDS140 is triggering. I also came across this product on ebay http://www.ebay.com/itm/SainSmart-Hardware-Trigger-Module-for-DDS-140-Oscilloscope-/301789209154?hash=item464409e242:g:ILgAAOSwd0BVp1yg
Does this make things better? Has anyone tried it?

I am aware of the limitations of this kind of product, but I am going to buy either hantek 6022B or DDS140,or DDS 120. I am aware of tehnical specifications (by wich dds140 is the best from these 3 Products), but what do you think would be a better choice, when you consider downsides discovered in this thread, and when you consider available software?

P.s. Sorry for my bad english
 

Offline bianchifan

  • Regular Contributor
  • *
  • Posts: 94
  • Country: de
Re: SainSmart DDS120 & DDS140 USB Oscilloscope
« Reply #333 on: March 29, 2016, 12:20:19 pm »
I am aware of the limitations of this kind of product, but I am going to buy either hantek 6022B or DDS140,or DDS 120. I am aware of tehnical specifications (by wich dds140 is the best from these 3 Products)
A couple of months ago I thought exactly the same direction  8)
Some words to the trigger.
Sadly it's not very stable as I'm used in former times with my old analog Hameg.
Nevertheless it's usable for timebase > 1 us, on shorter base the signal is runnin' thru..
CH2 can only be triggered together with CH1, a lonely CH2 is running to Mars.
I do not think, the external trigger will change anything, it's just another base.
I guess that the module s only an enclosure for the two lines.
Have a look on my oics above, they are connected to pins 1 and 4 on the bottom row.
You can stick to with a Dupont jumper.

Sometimes CH2 is very noisy, until now I couldn't evaluate the reasons.

The greatest disadvantages IMHO are the input dividers.. :-- :--
The max. possible positive voltage is ~6V, the max neg. voltage (DC) sometimes 1.6 V, sometimes 3.6 V, max possible neg. voltage AC ~5V.

Result: At logic level you need an external 1/10 divider.  :palm:

My reason for buying were the 200MSa, 'cause I wanted a "real" 20 MHz scope.
If you can live with an absolutely shitty software you can work with.

 

Offline merbanan

  • Contributor
  • Posts: 26
  • Country: se
Re: SainSmart DDS120 & DDS140 USB Oscilloscope
« Reply #334 on: April 01, 2016, 10:10:40 pm »
Ok, I have now sent a pull request for support in Sigrok. I added a new firmware based on the Hantek 6022BE firmware. Coupling support is missing in the firmware but other then that it should be feature complete. To maybe be added is the possibility to change the frequency of the 1kHz pulse and to add a few more sampling frequencies.

What more is missing is a good oscilloscope application that can use the driver. But pulseview should be quite capable for the time being.

And last but not least writing the firmware had not been possible without all the info in this thread. Especially the layout picture by doctormord.
 

Offline doctormord

  • Regular Contributor
  • *
  • Posts: 190
  • Country: cx
  • !nop
    • #fine_arts & #electronics - 360customs.de
Re: SainSmart DDS120 & DDS140 USB Oscilloscope
« Reply #335 on: April 01, 2016, 11:58:15 pm »
Great news mate! How can the coupling problem be fixed, so what's needed?
#fine_arts & #electronics  - www.360customs.de
 

Offline merbanan

  • Contributor
  • Posts: 26
  • Country: se
Re: SainSmart DDS120 & DDS140 USB Oscilloscope
« Reply #336 on: April 02, 2016, 11:38:29 am »
How can the coupling problem be fixed, so what's needed?

Just the time to add the support to the firmware and the driver. The Hantek driver didn't support coupling, that is the main reason for current lack of support.


Now to an analogue signal question. I have enabled the 1kHz pulse, is there a possibility that this pulse causes noise in the signal sampling? Or is the pcb signal path properly shielded ?
 

Offline doctormord

  • Regular Contributor
  • *
  • Posts: 190
  • Country: cx
  • !nop
    • #fine_arts & #electronics - 360customs.de
Re: SainSmart DDS120 & DDS140 USB Oscilloscope
« Reply #337 on: April 02, 2016, 11:53:36 am »
Nothing is shielded on the pcb, it's just 2 layers. From the board picture it can be seen that the top ground is opened over the 1kHz trace (which is on the bottom). The analog signals are "embedded" in the top analog ground section, so they did a bit of isolation.

If you can't see any 1kHz artefacts at highest gain, i wouldn't call this an issue.

Any chance to get the actual firmware?
« Last Edit: April 02, 2016, 12:05:14 pm by doctormord »
#fine_arts & #electronics  - www.360customs.de
 

Offline merbanan

  • Contributor
  • Posts: 26
  • Country: se
 
The following users thanked this post: mmark

Offline doctormord

  • Regular Contributor
  • *
  • Posts: 190
  • Country: cx
  • !nop
    • #fine_arts & #electronics - 360customs.de
Re: SainSmart DDS120 & DDS140 USB Oscilloscope
« Reply #339 on: April 02, 2016, 12:44:32 pm »
Thanks,

a working blob would be nice, as i actually wont setup the build environment.

Please check your mails.  :popcorn:
#fine_arts & #electronics  - www.360customs.de
 

Offline merbanan

  • Contributor
  • Posts: 26
  • Country: se
Re: SainSmart DDS120 & DDS140 USB Oscilloscope
« Reply #340 on: April 02, 2016, 06:59:33 pm »

a working blob would be nice, as i actually wont setup the build environment.


Here it is. This firmware might be compatible with the Hantek 6022BE software.
 

Offline doctormord

  • Regular Contributor
  • *
  • Posts: 190
  • Country: cx
  • !nop
    • #fine_arts & #electronics - 360customs.de
Re: SainSmart DDS120 & DDS140 USB Oscilloscope
« Reply #341 on: April 03, 2016, 05:08:31 am »
Thanks,

i spend the last couple of hours to fix the "OpenHantek-Mod" aka "Ledioskope" from this thread. Codebase is from "mmark".

The bufferproblem is somehow fixed (glitch after 1k of data), timebase is working up to 200ms/DIV, "correct" buffersize is selected by timebase-value. Trigger is still not working but with the trigger-sliders, you can adjust possible glitch-position aka bufferposition.

 :-/O
EDIT: Obsolete
Download: https://dl.dropboxusercontent.com/u/5641160/DDS120_OpenHantek_GlitchFix.zip

See: https://www.eevblog.com/forum/testgear/sainsmart-dds120-usb-oscilloscope-(buudai-bm102)/msg911658/#msg911658
for actual code.
« Last Edit: April 05, 2016, 12:42:03 am by doctormord »
#fine_arts & #electronics  - www.360customs.de
 
The following users thanked this post: mmark

Offline mmark

  • Contributor
  • Posts: 28
Re: SainSmart DDS120 & DDS140 USB Oscilloscope
« Reply #342 on: April 03, 2016, 01:26:41 pm »
Great progress!

@DrMord: could you share your src code changes? I have some time during the next two weeks and could try to get the triggering working.

Thanks,

M.
 

Offline doctormord

  • Regular Contributor
  • *
  • Posts: 190
  • Country: cx
  • !nop
    • #fine_arts & #electronics - 360customs.de
Re: SainSmart DDS120 & DDS140 USB Oscilloscope
« Reply #343 on: April 03, 2016, 01:48:57 pm »
Sure,

i actually try so get the trigger working. It actually does for buffersizes <= 2048 for both channels on rising edge at sine/triangle but still at bad hack. I know that the original DDS120 firmware have a "pretrigger-rolling" implemented, but i do not have the control code.

Will share the code then.
#fine_arts & #electronics  - www.360customs.de
 

Offline mmark

  • Contributor
  • Posts: 28
Re: SainSmart DDS120 & DDS140 USB Oscilloscope
« Reply #344 on: April 03, 2016, 02:49:15 pm »
Follow-up:

I had to install http://download.qt.io/archive/qt/5.3/5.3.2/qt-opensource-windows-x86-mingw482_opengl-5.3.2.exe AND set the following environment variable  QT_QPA_PLATFORM_PLUGIN_PATH to c:\Qt\Qt5.3.2\5.3\mingw482_32\plugins\platforms\ to get DrMord's latest binary to run in my Windows XP VM...

The buffersize is now set correctly automatically, nice! But the 1k buffer glitch / restart / discontinuity still seems to be there, see attached screen shot. I believe that we need an updated firmware on the DDS120/140 to fix this issue correctly, so I'll try to get merbanan's firmware running with openhantek or pulseview.

M.
 
The following users thanked this post: doctormord

Offline mmark

  • Contributor
  • Posts: 28
Re: SainSmart DDS120 & DDS140 USB Oscilloscope
« Reply #345 on: April 03, 2016, 02:56:21 pm »
Here it is. This firmware might be compatible with the Hantek 6022BE software.

Merbanan,
how do you get the firmware into the DDS120? Does sigrok/pulseview download it automatically when you start or do you have to download it manually? If so, could you tell us how to do this? I am still trying to get pulseview compiled on my macbook...

Thanks a lot,

M.
 

Offline doctormord

  • Regular Contributor
  • *
  • Posts: 190
  • Country: cx
  • !nop
    • #fine_arts & #electronics - 360customs.de
Re: SainSmart DDS120 & DDS140 USB Oscilloscope
« Reply #346 on: April 03, 2016, 03:41:53 pm »
Here's the possible trigger approach:

EDIT: Obsolete
Compiled: https://dl.dropboxusercontent.com/u/5641160/DDS120_OpenHantek_Trigger_V1.zip
Source: https://dl.dropboxusercontent.com/u/5641160/DDS120_OpenHantek_Trigger_V1-SOURCE.zip


See: https://www.eevblog.com/forum/testgear/sainsmart-dds120-usb-oscilloscope-(buudai-bm102)/msg911658/#msg911658
for actual code

It is implemented in buudai_control.cpp

Works for rising signals.

CHANGES:
- setup highest voltage-divider on start (5V)
- implemented trigger-hack

BUGS/FIXES needed:

- Make trigger work with slope-function (QT button action)
- Make trigger work on start up (it is not working on the first start or when changing trigger source channel, you always have to click on the small trigger-level-arrow once to make it work)
- Disable/Hide Buffersize Menu (action is actually commented out), as Buffersize is set according to timebase
- Make trigger more solid to noise (dunno how)
- Make trigger work with fast risetimes/transients (triggering on square-wave is not really working well)

I added some comments to the parts i changed.

Regards,

doc
« Last Edit: April 05, 2016, 12:41:04 am by doctormord »
#fine_arts & #electronics  - www.360customs.de
 
The following users thanked this post: mmark

Offline doctormord

  • Regular Contributor
  • *
  • Posts: 190
  • Country: cx
  • !nop
    • #fine_arts & #electronics - 360customs.de
Re: SainSmart DDS120 & DDS140 USB Oscilloscope
« Reply #347 on: April 03, 2016, 04:18:57 pm »
But the 1k buffer glitch / restart / discontinuity still seems to be there, see attached screen shot. I believe that we need an updated firmware on the DDS120/140 to fix this issue correctly, so I'll try to get merbanan's firmware running with openhantek or pulseview.

M.

There isn't on mine. As far as i know, this problem is on the 6022 as well:

https://github.com/OpenHantek/openhantek/issues/7#issuecomment-168538575

The latest source/binary reintroduced some glitching, so this finally needs to be fixed. Skipping just 1024(*2) bytes from the data received did not fixed it in any way. I actually use the "readmulti" to get bigger blocks - so to have valid 1k data per channel you'll need to read 4k overall and drop the first 2k, would guess.  :-//

Edit:

I don't know how to make a proper "release" build. I did a "release" to get the .exe and then copied all missing .dll files to that folder until it started.  :-/O
« Last Edit: April 03, 2016, 04:20:56 pm by doctormord »
#fine_arts & #electronics  - www.360customs.de
 

Offline doctormord

  • Regular Contributor
  • *
  • Posts: 190
  • Country: cx
  • !nop
    • #fine_arts & #electronics - 360customs.de
Re: SainSmart DDS120 & DDS140 USB Oscilloscope
« Reply #348 on: April 03, 2016, 05:29:28 pm »
Just ran some USBPcap to see what's going with the trigger in original Buudai software, the triggering is done in their USBInterface.dll in software.  :-//

Edit:

Hooking up the scope on a dedicated USB-hub removed (nearly) all glitches, triggering on squarewave works then.  :D

Changes for next version:
- Markerslidersteps 0.2 -> 0.1 of DIV - DONE
- Move Waveform by Triggerpositionslider - DONE
- Select triggervoltage in 0.01V steps - DONE
« Last Edit: April 04, 2016, 08:56:50 pm by doctormord »
#fine_arts & #electronics  - www.360customs.de
 

Offline merbanan

  • Contributor
  • Posts: 26
  • Country: se
Re: SainSmart DDS120 & DDS140 USB Oscilloscope
« Reply #349 on: April 04, 2016, 01:55:35 pm »

how do you get the firmware into the DDS120? Does sigrok/pulseview download it automatically when you start or do you have to download it manually? If so, could you tell us how to do this? I am still trying to get pulseview compiled on my macbook...


When starting pulseview, libsigrok will scan for usb devices registered to a driver. The hantek6xxx driver will try to load the firmware and after that it is go time. So if you are compiling everything yourself you need to get my 1 patch to libsigrok and build and install my firmware package.

FX2load should be able to manually load the firmware also. I did not test it myself but it should work in theory. Upon loading the firmware the device should renumerate as a new usb device.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf