Author Topic: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG  (Read 11019 times)

0 Members and 1 Guest are viewing this topic.

Offline Old Printer

  • Frequent Contributor
  • **
  • Posts: 574
  • Country: us
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #25 on: April 24, 2019, 03:57:28 pm »
I have only had my 1104x-e a week now so still feeling my way along. Right now my best AWG is my Analog Discovery 2. While limited in frequency, it's other controls are pretty versatile. This has me wondering about the possibility to interface these two...
 

Offline 4x1md

  • Regular Contributor
  • *
  • Posts: 61
  • Country: il
    • 4X1MD on Github
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #26 on: April 24, 2019, 06:39:47 pm »
I have only had my 1104x-e a week now so still feeling my way along. Right now my best AWG is my Analog Discovery 2. While limited in frequency, it's other controls are pretty versatile. This has me wondering about the possibility to interface these two...
It may be possible but I'm not familiar with this device so I can't tell you more.
 
The following users thanked this post: commongrounder

Offline MikeLud

  • Regular Contributor
  • *
  • Posts: 210
  • Country: us
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #27 on: April 27, 2019, 04:18:32 am »
I modified an ESP-01 Adapter as shown in photos below and I am having issues with communication. It work for about 30 seconds to a minute then I get the error shown in photo below. I tried several delay settings but had no luck. Does anyone know how to get it to work.

Thanks in Advance,

Mike
 

Offline MikeLud

  • Regular Contributor
  • *
  • Posts: 210
  • Country: us
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #28 on: April 27, 2019, 04:28:07 am »
MrTick

I added a Pull Request to fix a compile issue I had.
« Last Edit: April 27, 2019, 04:58:08 am by MikeLud »
 
The following users thanked this post: MrTick

Offline MikeLud

  • Regular Contributor
  • *
  • Posts: 210
  • Country: us
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #29 on: April 28, 2019, 01:48:20 am »
I figured out what was causing my communication issues. It was having the scope set to DHCP, once I set the scope to a static IP it works like a charm. Below are some photos of the final setup.

4x1md & MrTick,

Thanks for all of your hard work on this great non-Siglent AWG hack. :-+

Mike
« Last Edit: April 28, 2019, 03:15:20 am by MikeLud »
 
The following users thanked this post: 4x1md, aimc

Offline 4x1md

  • Regular Contributor
  • *
  • Posts: 61
  • Country: il
    • 4X1MD on Github
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #30 on: June 01, 2019, 05:01:03 pm »
Has anybody tried my code with Bode Plot II from the new FW 6.1.33?
« Last Edit: June 01, 2019, 05:03:33 pm by 4x1md »
 

Offline MrTick

  • Contributor
  • Posts: 5
  • Country: pl
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #31 on: June 02, 2019, 09:43:25 am »
Has anybody tried my code with Bode Plot II from the new FW 6.1.33?

Hi, thanks for the heads up, I've just upgraded my SDS.
I've tested only my ESP SW, though it communicates exactly same like your implementation.
It still works without any problems, no additional AWG verifications were introduced :)

I'm attaching sample sweep output from a diy 40db attenuator.
 

Offline rf-loop

  • Super Contributor
  • ***
  • Posts: 3251
  • Country: cn
  • Born with DLL21 in hand
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #32 on: June 02, 2019, 04:07:03 pm »


Hi, thanks for the heads up, I've just upgraded my SDS.
I've tested only my ESP SW, though it communicates exactly same like your implementation.
It still works without any problems, no additional AWG verifications were introduced :)

I'm attaching sample sweep output from a diy 40db attenuator.



If look your image it looks weird. Exept it tell your AWG is working with Siglent what was perhaps main thing.

But then, your setup and settings are possible totally mess.

What signal goes to reference channel (Ch1)

First make sure your signal source (AWG) output go  to your DUT (in your case your selfmade attenuator) input and exactly same signal goes to Ch1 (as long as you have not defined other channel for reference).
Then your DUT (device under test - your attenuator) output goes to Ch2 (because in your image you have selected it (or it is just as scope default).

First it need be sure these signal connections are ok.

Then need look about your BodePlot II settings are right if need.

Basic signal connections (user can free select channels including what is ref channel)

You have measured attenuator but your display show "40 - 60dB" amplifier.


In attached image Ch4 is selected for DUT out but scope factory default is Ch2
(Ch4 is selected for main DUT out in image related to other things = with 1 in 1 out system can keep 1GHz samplerate but also Ch4 is far from Ch1 so it may crosstalk with strong reference signal bit less than Ch2 if need get all out from dynamic range = in basic works just forget this and happy use Ch1 Ch2 pair)
« Last Edit: June 02, 2019, 04:14:14 pm by rf-loop »
If practice and theory is not equal it tells that used application of theory is wrong or the theory itself is wrong.
-
Harmony OS
 

Offline MrTick

  • Contributor
  • Posts: 5
  • Country: pl
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #33 on: June 02, 2019, 06:20:20 pm »
If look your image it looks weird. Exept it tell your AWG is working with Siglent what was perhaps main thing.

But then, your setup and settings are possible totally mess.

You are totally right.

First I've swapped CH1 and CH2, so the reference was connected wrongly to a CH2 instead of CH1.
That's why all results should be basically multiplied by -1 (or - better, the connection should be fixed and measurements done again).

Second: calling my device a 40dB attenuator is an insult for attenuators :)
It's just bunch metalized resistors soldered together and clamped into a BNC connector, it behaves correctly up till ~10MHz, then it's good only for testing Bode plots :)
 

Offline aimc

  • Contributor
  • Posts: 21
  • Country: ca
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #34 on: September 03, 2019, 12:51:39 am »
This looks very interesting. I am wondering though if the scopes communication protocol is the same for serial USB? Did you try to communicate with the Arduino? I am thinking along the line of using one USB (to the scope) and the simple serial connection to the FY6800. The Leonardo (32U4) would be suitable as it has 4 UART's that can be used with the serial(1...n) library. Do you think that is a doable approach? I have worked successfully with asynchronous handshakes between a Leonardo and an ESP, so it would require some changes to your code and of course hardware. Even with USB to the FY6800 (in which case you may need a second MCU for the USB chip) I think this could be a better solution since you don't need to depend on a WiFi connection in your local network. The extra cable and PSU plug pack should not be a problem.

Let me know what you think.
cheers
 

Offline 4x1md

  • Regular Contributor
  • *
  • Posts: 61
  • Country: il
    • 4X1MD on Github
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #35 on: September 03, 2019, 05:59:12 am »
This looks very interesting. I am wondering though if the scopes communication protocol is the same for serial USB? Did you try to communicate with the Arduino? I am thinking along the line of using one USB (to the scope) and the simple serial connection to the FY6800. The Leonardo (32U4) would be suitable as it has 4 UART's that can be used with the serial(1...n) library. Do you think that is a doable approach? I have worked successfully with asynchronous handshakes between a Leonardo and an ESP, so it would require some changes to your code and of course hardware. Even with USB to the FY6800 (in which case you may need a second MCU for the USB chip) I think this could be a better solution since you don't need to depend on a WiFi connection in your local network. The extra cable and PSU plug pack should not be a problem.
Is may be a good idea. As far, as I know, these Chinese AWGs can provide 5V on their rear header connector. It means that you'll not need an additional PSU for the external USB-AWG connection board. It will be interesting to try but the problem is that I'm not familiar with USB protocols. I'd be happy to work together with somebody on this.

Offline MrTick

  • Contributor
  • Posts: 5
  • Country: pl
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #36 on: September 03, 2019, 09:47:03 am »
Handling the USB using AVR devices was always a tricky issue.
USB signals can reach dozens of Mbps that frequently is hard to handle for 16MHz CPUs.
https://www.obdev.at/products/vusb/index.html is a good place to start.
Another thing would be to connect Siglent AWG to PCs USB and see what kind of device shows up. It's possible that it's just another serial-usb COM port, then the direct USB-AWG interface should be doable on a AVR.

Another thing, if you don't want to use external WiFi network you may use 8266 in an access-point mode, where the scope would connect directly to the network generated by AWG and no additional routers/networks is necessary.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4643
  • Country: au
  • Question Everything... Except This Statement
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #37 on: September 03, 2019, 09:49:58 am »
The scope shows up as a test and measure device, the AWG as a class I have not seen before.
« Last Edit: September 03, 2019, 10:07:21 am by Rerouter »
 

Offline MrTick

  • Contributor
  • Posts: 5
  • Country: pl
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #38 on: September 03, 2019, 09:57:24 am »
Both the scope and the AWG show up as USB class SCPI devices.
That sounds promising. SCPI is basically a text protocol often exchanged via more or less exotic serial implementation. I'll try to connect some arduinos to the scope when I'm back at home.

Would it be possible for you to share the USB Vendor/Device IDs of the Siglent AWG? (We'll probably need that to mimic the AWG with Arduino)
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4643
  • Country: au
  • Question Everything... Except This Statement
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #39 on: September 03, 2019, 10:06:44 am »
For the scope its
USB Test and Measurement Device
VID: F4EC
PID: EE38
REV: 9999

For the AWG its
USB Serial Bus Devices
Description: SAG1021
VID: F4ED
PID: EE3A
REV: 0100
Manufacturer: Shenzhen Siglent Co., Ltd.
Device Instance Path: USB\VID_F4ED&PID_EE3A\SAG10DAQ1R0000 (zero'd out my serial number)

If you need anything else, just ask, as i would be interested in knowing how to drive the thing from windows.
« Last Edit: September 03, 2019, 10:12:48 am by Rerouter »
 

Offline aimc

  • Contributor
  • Posts: 21
  • Country: ca
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #40 on: November 04, 2019, 03:28:54 pm »
I am also thinking along using the build-in USB FTDI of any Arduino board to communicate with the scope. Especially then the simple serial RS232 library could be used. Downside is that debugging via this port is no longer available, but this could be temporarily managed by alternative means (e.g. via a I2C LCD Display). More importantly is the question if this serial <-> USB FTDI can be used on the scope at all, and what parameters (baud rate etc.) are appropriate? Did anyone here experiment with this? The scope's USB accepts any PC connection and WiFi dongle, but what does it do with the FTDI that requires a driver on a PC? Also then the USP could power the Arduino board and all levels to the FeelTech remain 5V TTL. Only concern is the connection of the scope and AWR grounds, that where we all know might be problematic with the FeelTech. But then again this will happen anyways via the grounds of the DUT. Any input is appreciated, thanks in advance :)
 

Offline aimc

  • Contributor
  • Posts: 21
  • Country: ca
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #41 on: December 07, 2019, 08:14:08 pm »
Just wanted to let you know that I opened a pull request on your GIT repo - adding the STL's for a enclosure - if you are interested that is... Otherwise the fork is available at https://github.com/AimcLsc/espBode. (sorry for the crudity, I am new to GIT...)
 

Offline BlackICE

  • Contributor
  • Posts: 45
  • Country: us
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #42 on: February 25, 2020, 07:26:49 am »
I want to thank MrTick for the ESP code he put on GitHub. I downloaded to and modified it to work with an ESP32 that I had already. I haven't fully tested it yet. But go it to communicate with the scope and it isn't complaining when I run a fake bode plot without any input or outputs.

The ESP32 has 3 serial ports so I used one for debug output and another for talking to the FY6900. I had change some code because a member function availableForWrite() doesn't exist for the ESP32 libraries.


/* availableForWrite() doesn't exist for esp32 so we do differently

        while(!client.availableForWrite());
        client.write((uint8_t*)&response, sizeof(rpcresp_getport));

*/

changed to:

        while (sizeof(rpcresp_getport) != client.write((uint8_t*)&response, sizeof(rpcresp_getport)))
   DEBUG("ERROR: client.write2");
;


#include <ESP8266WiFi.h>

changed to

#include <esp_wifi.h>

 

Offline BlackICE

  • Contributor
  • Posts: 45
  • Country: us
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #43 on: March 25, 2020, 06:11:07 am »
Just noticed the waveforms were distorted, had jitter in timing and amplitude. Turns out powering an ESP32 from the 5V output on the back is drawing too much current. After I disconnecting the 5V wire the waveforms were now as before.
« Last Edit: March 30, 2020, 11:31:41 pm by BlackICE »
 

Offline BlackICE

  • Contributor
  • Posts: 45
  • Country: us
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #44 on: March 30, 2020, 11:30:58 pm »
Using the bode II stimulus in units other than amplitude (eg. dBV, dBu) doesn't work. I looked at the code and those commands are not being handled. The FY6900 I have doesn't have those units either but it should be strait forward to convert from dB units to amplitude to get the desired results, although the FY6900 display will show volts. Any interest for me to do so and to post the code back to GitHub?
 

Offline ewaller

  • Contributor
  • Posts: 30
  • Country: us
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #45 on: May 01, 2020, 09:49:24 pm »
I have been playing with 4x1md's code and have expanded on it quite a bit. And have ported it to Python 3.

I now have a full blown CLI program that controls an FY6800 allowing control of both channels for waveform, amplitude, offset and duty cycle.  It can control modulation, VCO and counter functions, and can upload wave forms to the instrument.  I used 4x1md's code to provide the a server that emulates a Siglent generator so this can be used as an external source for Bode plots (works great, by the way).   

The major difference is that I use a Raspbery-pi running ser2py to expose the USB-serial instrument to a TCP/IP network to permit streaming via TCP socket.

And, still a bit hackish, wrote some code to covert black and white graphic images from raster to vector format, and generate waveform files that can be uploaded to the instrument as X channel and Y channel wave forms that are then displayed on an XY scope.

If there is any interest, I can clean this up and put it on Github.  I would like to give 4x1md a chance to review it first as well.   Here is a screen shot of this morning's hack session:
 
The following users thanked this post: tautech, tv84

Offline ewaller

  • Contributor
  • Posts: 30
  • Country: us
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #46 on: May 01, 2020, 09:51:21 pm »
Another example
 

Offline 4x1md

  • Regular Contributor
  • *
  • Posts: 61
  • Country: il
    • 4X1MD on Github
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #47 on: May 01, 2020, 09:55:47 pm »
Yes, I'd like to see the improvements and merge them to the master branch. I think, that now, thanks to the coronavirus, I'll have free time for code maintenance.

Offline cdc3oo

  • Newbie
  • Posts: 2
  • Country: fr
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #48 on: May 25, 2020, 07:44:06 am »
Yes, I'd like to see the improvements and merge them to the master branch. I think, that now, thanks to the coronavirus, I'll have free time for code maintenance.

Hello

First time poster.

First of all, I want to warmly thank you for sharing your code.

I tried to run master on WIN and had issues with Python 2.7 or 3.7 raising errors. Also, wireshark showed oddities in some RPC replies payload.
I decided to fix these, simplified the server code a little bit and worked on the statements giving errors at runtime.

Actually connectivity test is working like a charm with 6.1.33 while protocol is OK according to wireshark
I have to check it works well end to end with the Feeltech (no other AWG here) and also to do non-regression tests on a *nix machine.

If interested, I can send you the diff once I'm done with this.

« Last Edit: May 25, 2020, 07:49:18 am by cdc3oo »
awful newbie
 

Offline acugnini

  • Newbie
  • Posts: 2
  • Country: us
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #49 on: May 26, 2020, 05:51:34 pm »
Is it possible to upload a waveform to the SDS1202X-E?  I know downloading is possible, using either EasyScopeX or by opening an IP socket, but what about the reverse?  (I want to upload a waveform and then perform an FFT on the data.) --agc
« Last Edit: May 26, 2020, 08:37:32 pm by acugnini »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf