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

0 Members and 1 Guest are viewing this topic.

Offline UniSoft

  • Frequent Contributor
  • **
  • Posts: 279
  • Country: kz
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #75 on: May 31, 2021, 06:20:30 pm »
But the 6900 does not respond to the message stream when it's connected to the Rx pin on the 8 pin connector on the back panel.

The circuit diagram appears to show a CH340G with its RxD and TxD lines simply wire-OR'ed with the back panel connections (using limiting resistors) but does not show any connection between this circuit element and the FY6900's "processor" FPGA. Since the USB is working, I guess the CH340 is OK, and beyond that it's just a couple of resistors.
I had the similar problem...
RxD and TxD goes to MCU (4pin cable)
Now they use CH340N  >:(, it looks like this shit IC makes LOW level (i.e. ground) on signal pins (when USB not connected)...
so you just simple get resistor divider by 2!!!
So instead of 3.3V signals there was less than 1.6V, what was not enough for MCU and therefore it not respond.



 
The following users thanked this post: Roman oh

Offline Roman oh

  • Regular Contributor
  • *
  • Posts: 50
  • Country: au
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #76 on: June 01, 2021, 12:26:38 am »
Thanks, unisoft. I didn’t get that the MCU was actually on the front panel pcb. That helps a lot. I know what to do now, I think. Did you find a fix?
 

Offline UniSoft

  • Frequent Contributor
  • **
  • Posts: 279
  • Country: kz
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #77 on: June 02, 2021, 07:34:12 pm »
Did you find a fix?
I just reduced the resistance of the resistors coming from the TTL connector ...
 

Offline Roman oh

  • Regular Contributor
  • *
  • Posts: 50
  • Country: au
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #78 on: June 03, 2021, 12:02:24 pm »
Yes, it’s clearly a (nother!) design fault. They have a 2K2 resistor at R20 (unnecessarily) isolating the CH340 Tx pin instead of at R19 isolating the Rx pin, so the input on the TTL connector sees a 300 ohm to 300 ohm divider, instead of a 300 into 2200, which would have worked. The simplest “fix” would be to swap R19 and R20. However,  their design also feeds nominal 5V to the 3.3v MCU and appears to rely on the resistors to limit the current into the MCU pin. The MCU has had its ID ground off, so I can’t know whether the inputs are 5V tolerant; the voltage at the pin is about 3.9v which is one diode drop above the 3.3V rail. Don’t know if this is good or bad.

I went a bit more complex and made up a simple 4-transistor 3-input gate/level-shifter (I want a 3rd input because I envisage putting the 8266 inside the box, and may want to also “play” with the TTL inputs some time.

All working now.
 

Offline Geeboh

  • Newbie
  • Posts: 7
  • Country: 00
  • Audio Enthuthiast - EE Noobs
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #79 on: October 13, 2021, 09:08:05 pm »
Hi guys, After following this thread including Mr. tick's esp01 bode plot github code.

Problem :
When trying to hook up my 1104x-e to fy6900 via ESP01s, my scope will gone completely freeze while attempt connect with the ESP01 and in the same time the ESP01 also will restart in this process.

Until now i try so many things get it work even personally pm mr tick through youtube and yet seems that i cant find the solution.

Anyone here can guide me on how to connect esp01 with 1104x-e.

Thank you in advance
Just started get into Electronic engineering as a hobbyist. I'm just a noobs. Any tips or test gear donation will accept at open heart ... Just kidding
 

Offline duckman

  • Newbie
  • Posts: 2
  • Country: pl
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #80 on: January 11, 2022, 08:16:12 pm »
I found the cause and solution to the problem.
You have to downgrade esp8266 boards library to 2.7.4.
I had installed the 3.0.1 library which caused erroneous writing to the esp8266 memory. Now everything works as it should😁
 
The following users thanked this post: ceut

Offline cncjerry

  • Supporter
  • ****
  • Posts: 1283
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #81 on: January 14, 2022, 05:55:12 pm »
If I understand the architecture of the code correctly, if I wanted to add an HP GPIB device to the drivers, I would copy one of your drivers, change the serial interface (to the signal generator) to for instance, PYGPIB or VISAPY (can't remember what it is called) and then translate the commands in the class to the correct output over GPIB?

I was thinking of just coding the VXI using VISA in VB.net but this would be easier.

Thanks

Jerry
 

Offline cncjerry

  • Supporter
  • ****
  • Posts: 1283
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #82 on: January 15, 2022, 09:09:25 am »
I read thru the code and it looks like I can use PYGPIB and/or PYVISA in the awg driver but I can't get either working on this one machine.  I have another exactly like it, in fact I cloned this one to make the other, both are dual socket with 32GB of memory, etc, and it works fine, go figure, this one wont open GPIB devices no matter how many time I reinstall, etc.  Looking at the awg driver, I wrote a function in vb.net that sends commands to the HP8904 generator through a console application.  So the awg driver will call the console app until I get PYVISA working on this machine.

I'd like to note for those following this project that the author wrote a ton of code for this application.  The OP did a very complete job, all the class functions seem clean and simple and adding the driver concept so that you can call a specific driver for each external generator makes it expandable.

Thanks!

Jerry
 

Offline cncjerry

  • Supporter
  • ****
  • Posts: 1283
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #83 on: January 16, 2022, 01:07:40 am »
I wrote the basic driver for the hp8904.  I have a few errors, one I bypassed having to do with checking the class of the driver. I thought I set that up correctly in awg_factory.py having followed the example.

The code then sits waiting for a bind request from the scope.  When I hit run/stop or connection test, the PC code gets the request but then fails:

Code: [Select]
Incoming connection from 192.168.165.128:43969.
Traceback (most recent call last):
  File "C:\Users\user-1\Downloads\sds1004x_bode-master\sds1004x_bode-master\sds1004x_bode\bode.py", line 50, in <module>
    server.start()
  File "C:\Users\user-1\Downloads\sds1004x_bode-master\sds1004x_bode-master\sds1004x_bode\awg_server.py", line 104, in start
    self.main_loop()
  File "C:\Users\user-1\Downloads\sds1004x_bode-master\sds1004x_bode-master\sds1004x_bode\awg_server.py", line 115, in main_loop
    res = self.process_rpcbind_request()
  File "C:\Users\user-1\Downloads\sds1004x_bode-master\sds1004x_bode-master\sds1004x_bode\awg_server.py", line 135, in process_rpcbind_request
    procedure = self.bytes_to_uint(rx_data[0x18:0x1c])
  File "C:\Users\user-1\Downloads\sds1004x_bode-master\sds1004x_bode-master\sds1004x_bode\awg_server.py", line 353, in bytes_to_uint
    num = ord(bytes_seq[0])
TypeError: ord() expected string of length 1, but int found

The code looks like it is expecting a port address there.  I dumped the rx_data and it is port 3 (00000003) as expected.  I have a feeling the bytes_to_uint function might be working differently under windows.  I also looked at the next statement where it checks if the data is coming from VXI-11 Core (395183) and that data looks correct 0607af.  I changed the function instead of (ord( to ord(chr(
as in num = ord(chr(bytes_seq[0])) and got past that error and it is now trying to send the bind response and having the inverse of that problem building the reply into bytes.

I could recode it but I don't know python all that well and would hate to have to change everything when one simple config change is all it needs.

  If there is an interest in fixing this, I'll get the code running for the HP8904 and a few other HP generators that I have.  I ordered a 1032x but it would be nice to have the HP8904 running as it is a decent, multichannel generator with a relatively clean output. 

I think getting past the bind is pretty key.  This is running under windows, by the way.  I communicate to the 8904 with gpib using a console application that just funnels the translated commands to it.

Thanks

Jerry
« Last Edit: January 16, 2022, 02:35:02 am by cncjerry »
 

Offline cncjerry

  • Supporter
  • ****
  • Posts: 1283
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #84 on: January 16, 2022, 10:08:18 am »
For those, if any, who :=\ are interested, this is a great foundation for using non Siglent generators.  The primary issue though, is using it on windows and specifically, using python3.  Python3 has a number of explicit changes, and in addition to having to change all the print statements, byte arrays and strings that were somewhat the same prior to python3 now throw errors when they are concatenated using the "+" sign.  Again, python isnt my first language, but I got it working to the point where it has to reply to the ID request. This is one of the responses that has a string embedded in byte arrays (e.g. the ID of the siglent generator it spoofs) so I have to look at it more closely or just hard code all the responses since after that they are just null.

Bottom line is that I havent given up.  I figure once i get this HP8904 working it will be a nice setup for audio work.  I've used it in the past with my distortion analyzer as they are compatible. I have 4 or 5 HP generators for which I can write gpib drivers.

But since the scope is just measuring the voltage during a sweep, one could just as easily send gpib commands to the generator, query the scope and just dump the data into excel.  I was impressed with RF-loop's bode dissertation though, enough to order a sdg1032x.

More to come.

Jerry
 

Offline 2N3055

  • Super Contributor
  • ***
  • Posts: 6661
  • Country: hr
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #85 on: January 16, 2022, 10:46:43 am »
For those, if any, who :=\ are interested, this is a great foundation for using non Siglent generators.  The primary issue though, is using it on windows and specifically, using python3.  Python3 has a number of explicit changes, and in addition to having to change all the print statements, byte arrays and strings that were somewhat the same prior to python3 now throw errors when they are concatenated using the "+" sign.  Again, python isnt my first language, but I got it working to the point where it has to reply to the ID request. This is one of the responses that has a string embedded in byte arrays (e.g. the ID of the siglent generator it spoofs) so I have to look at it more closely or just hard code all the responses since after that they are just null.

Bottom line is that I havent given up.  I figure once i get this HP8904 working it will be a nice setup for audio work.  I've used it in the past with my distortion analyzer as they are compatible. I have 4 or 5 HP generators for which I can write gpib drivers.

But since the scope is just measuring the voltage during a sweep, one could just as easily send gpib commands to the generator, query the scope and just dump the data into excel.  I was impressed with RF-loop's bode dissertation though, enough to order a sdg1032x.

More to come.

Jerry

Yeah, FRA from Siglent (the one in the scope that you use with Siglent AWG) is not only measuring voltage.
It's a hell of a lot more complicated than that.
So if you can make a gateway device that will make 3rd party gen properly respond to commands from scope and make it properly emulate Siglent AWG then you're good.
Otherwise it will be easier just to buy cheapest Siglent  AWG than to write proper FRA application..
 

Offline cncjerry

  • Supporter
  • ****
  • Posts: 1283
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #86 on: January 16, 2022, 11:38:41 pm »
so I went back and installed python2.7.18 on my windows machine after playing with linux all day.

Test connection is successful and the commands come over when I press run.  I just have to clean-up some of the HP8904 command conversions to set the amplitude and frequency.

Pretty cool.  I wish I would have just install python 2.7 prior to ordering the SDG1032x, ha!

I'll post the HP8904 code after I clean it up.  Then I am going to do my 8648D, 8350, and a couple others I have as they all use the same gpib format and the commands are close.

Jerry
 

Offline cncjerry

  • Supporter
  • ****
  • Posts: 1283
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #87 on: January 20, 2022, 05:23:48 am »
update:

I have both the HP8648 and HP8904 working thru gpib.  It's a little tricky because I had to use a VP.Net console program to drive the GPIB until I get PYGPIB or PYVISA working on this stupid machine that just refuses to work...

I then started thinking about this little AD9910 generator I have that sits on an Arduino Mega2560 as a shield.  There are a bunch out there made by "GRA&AFCH" originally. The AD9910 is very clean for a DDS with ≤ −125 dBc/Hz @ 1 kHz offset (400 MHz carrier) and 80dB SFDR.  The nice thing about it is that it is small and can run off USB. It only has +4dBm output so it needs an amp on it.  I also had to change the code so that it took a 10Mhz reference as an input.

I have a 1032x coming and I am going to try to trace the USB setup and commands, most likely it presents as an HID compliant device and I've coded that before. But in the meantime, the AD9910 board I have can connect to the OP's code as a serial device using a VCP.  The AD9910 board didn't have serial commands until I just added them.  I only added Frequency and Amplitude, On and Off as I think that is pretty much all the scope sends of importance.

If anyone is interested in any of this, drop me a PM.

Jerry
 

Offline tautech

  • Super Contributor
  • ***
  • Posts: 28380
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #88 on: January 20, 2022, 06:38:42 am »
update:

I have both the HP8648 and HP8904 working thru gpib.  It's a little tricky because I had to use a VP.Net console program to drive the GPIB until I get PYGPIB or PYVISA working on this stupid machine that just refuses to work...

I then started thinking about this little AD9910 generator I have that sits on an Arduino Mega2560 as a shield.  There are a bunch out there made by "GRA&AFCH" originally. The AD9910 is very clean for a DDS with ≤ −125 dBc/Hz @ 1 kHz offset (400 MHz carrier) and 80dB SFDR.  The nice thing about it is that it is small and can run off USB. It only has +4dBm output so it needs an amp on it.  I also had to change the code so that it took a 10Mhz reference as an input.

I have a 1032x coming and I am going to try to trace the USB setup and commands, most likely it presents as an HID compliant device and I've coded that before. But in the meantime, the AD9910 board I have can connect to the OP's code as a serial device using a VCP.  The AD9910 board didn't have serial commands until I just added them.  I only added Frequency and Amplitude, On and Off as I think that is pretty much all the scope sends of importance.

If anyone is interested in any of this, drop me a PM.

Jerry
Looking forward to the comparison Bode plot screenshots from your 4 signal sources.  :popcorn:
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 

Offline cncjerry

  • Supporter
  • ****
  • Posts: 1283
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #89 on: January 20, 2022, 08:20:38 am »
It will be interesting to see how the much source impacts the plot.  I didnt think of running a comparison.

The source I`m excited about is that little DDS board.  It generates clean signals up to at least  1Gig.   I have a few broadband amps I can use after it and then I can make the power adjustment in the driver ( for the amp).  I plan to make a box with a splitter in it to have the dual outputs for phase.  Sort of like the external box they sell.  I'm not suggesting this board as an alternative, but if you have it, I think it will, work great as a source.

Jerry
 

Offline cncjerry

  • Supporter
  • ****
  • Posts: 1283
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #90 on: January 21, 2022, 06:28:27 pm »
Here's some interesting findings, at least to me :-DD.  I was measuring a Microchip SLP-27+ DC low pass filter used on the references for my phase noise measuring system.

The AD9910 seems to have a level issue below 10Mhz.  I have to look into that.  I know it is transformer coupled.  So in order to use it for this application it would need to have an amp and lookup table that would be written into the driver.  Then again, it only costs around $110, but it is a very clean DDS.

I also had to add a 1 second delay between frequency changes, maybe it can be reduced with faster serial settings, I was using 115200.

I then ran it using and HP8648C.  You can see the output on the low end of the amplitude scale is pretty flat.  I tried it with and without a delay in the code, without much change, if any:

And with a delay.

Sorry, the images are sequentially listed below.  Don't know why they didn't insert.


My SDS1032x comes tomorrow and I'll try that out as well.
« Last Edit: January 21, 2022, 06:31:03 pm by cncjerry »
 

Offline cncjerry

  • Supporter
  • ****
  • Posts: 1283
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #91 on: January 21, 2022, 06:45:31 pm »
Here's something I don't understand.  If you check above, the image from the 8648c is pretty flat across, slightly above 29dB.

I ran it again and now it is displaying as slightly above 26dB yet the voltage, as displayed on the line above the buttons, is roughly the same as the previous run, ~735mv.
Any idea what would be causing this?  Nothing changed, just went out and back into the Bode plot function.

 

Offline SMB784

  • Frequent Contributor
  • **
  • Posts: 421
  • Country: us
    • Tequity Surplus
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #92 on: January 21, 2022, 06:54:42 pm »
Has anyone tried to do Bode plotting with a Rigol DG811/DG992?  Is it feasible?
 
The following users thanked this post: arvidb

Offline puterboy

  • Regular Contributor
  • *
  • Posts: 55
  • Country: us
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #93 on: February 21, 2022, 02:38:19 pm »
Wondering whether it would be possible to rewrite the code in say bash script and then run the code directly on a rooted Siglent 1104.
The reason I say bash is so as not to have to load python and all its libraries and dependencies in the Siglent flash -- and while kludgy, bash is pretty powerful as a scripting language.
If so, then presumably the code could be written to Siglent flash, triggered from a web page and then you would just need a USB cable from the Siglent to the external signal generator.

This would make it as good (presumably) as the native version that controls a Siglent AWG.
 

Offline 2N3055

  • Super Contributor
  • ***
  • Posts: 6661
  • Country: hr
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #94 on: February 21, 2022, 04:27:35 pm »
Wondering whether it would be possible to rewrite the code in say bash script and then run the code directly on a rooted Siglent 1104.
The reason I say bash is so as not to have to load python and all its libraries and dependencies in the Siglent flash -- and while kludgy, bash is pretty powerful as a scripting language.
If so, then presumably the code could be written to Siglent flash, triggered from a web page and then you would just need a USB cable from the Siglent to the external signal generator.

This would make it as good (presumably) as the native version that controls a Siglent AWG.

Sounds cool but:
how do you connect from scope to that internal service? TCP/IP ?
Over loopback?  On same 111 and 5024 and 5025 ports scope is already using for itself?

Why do all that crap to the scope when RaspberyPi is so cheap? It makes no sense to me...
 

Offline puterboy

  • Regular Contributor
  • *
  • Posts: 55
  • Country: us
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #95 on: February 22, 2022, 05:33:15 pm »
Wondering whether it would be possible to rewrite the code in say bash script and then run the code directly on a rooted Siglent 1104.
The reason I say bash is so as not to have to load python and all its libraries and dependencies in the Siglent flash -- and while kludgy, bash is pretty powerful as a scripting language.
If so, then presumably the code could be written to Siglent flash, triggered from a web page and then you would just need a USB cable from the Siglent to the external signal generator.

This would make it as good (presumably) as the native version that controls a Siglent AWG.

Sounds cool but:
how do you connect from scope to that internal service? TCP/IP ?
Over loopback?  On same 111 and 5024 and 5025 ports scope is already using for itself?

Why do all that crap to the scope when RaspberyPi is so cheap? It makes no sense to me...

I already have a Raspberry Pi Zero connected (and I power it from the my FY6900 signal generator using the pins on the back that give 5v & ground output).

Why? Because it would be a cool hack and would eliminate the need for another piece of hardware and cables.
 

Offline masterx81

  • Frequent Contributor
  • **
  • Posts: 481
  • Country: it
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #96 on: February 22, 2022, 05:48:38 pm »
I'm doing it with an esp01 module placed on the back of the FY6900, powered from the AWG. I think that a Rasp.Pi is a bit an overkill for that task.
 

Offline 2N3055

  • Super Contributor
  • ***
  • Posts: 6661
  • Country: hr
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #97 on: February 22, 2022, 05:58:17 pm »
Wondering whether it would be possible to rewrite the code in say bash script and then run the code directly on a rooted Siglent 1104.
The reason I say bash is so as not to have to load python and all its libraries and dependencies in the Siglent flash -- and while kludgy, bash is pretty powerful as a scripting language.
If so, then presumably the code could be written to Siglent flash, triggered from a web page and then you would just need a USB cable from the Siglent to the external signal generator.

This would make it as good (presumably) as the native version that controls a Siglent AWG.

Sounds cool but:
how do you connect from scope to that internal service? TCP/IP ?
Over loopback?  On same 111 and 5024 and 5025 ports scope is already using for itself?

Why do all that crap to the scope when RaspberyPi is so cheap? It makes no sense to me...

I already have a Raspberry Pi Zero connected (and I power it from the my FY6900 signal generator using the pins on the back that give 5v & ground output).

Why? Because it would be a cool hack and would eliminate the need for another piece of hardware and cables.

Your scope is already using same TCP ports for scope remote control...
 

Offline puterboy

  • Regular Contributor
  • *
  • Posts: 55
  • Country: us
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #98 on: February 23, 2022, 10:52:50 pm »
I'm doing it with an esp01 module placed on the back of the FY6900, powered from the AWG. I think that a Rasp.Pi is a bit an overkill for that task.

Well I already have a (small) RPI Zero powered off the back of my FY9600 that I use to create a USB over Ethernet -- which allows me to remote control from a distance. So I could use the same RPI to also do Bode plots...
 

Online ceut

  • Regular Contributor
  • *
  • Posts: 126
  • Country: fr
Re: Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG
« Reply #99 on: April 22, 2022, 03:18:54 pm »
Hello everyone  :)

After having bought a SDS1104X-E (with some advices from Tautech I thanks  ;) )  I found this topic.
So I have bought an EPS8266 with an USB programmer.
I have never used this little card, even never heard of it  :(  (in France, I find that we are a little too late with technology, and it is getting worse :-[ )

So after flashing the ESP Bode, my ESP8266 is connected successfully  to my Asus router (merlin fw 8) ) in client mode, I have put it in DHCP and get the IP in the Asus  :-+

But I was having freezes with my brand new DSO many times, until I saw @duckman post, so I downgrade the library to 2.7.4 and no freeze at all now , thanks ! :D

The only problem is that I have a JDS6600, and I think the command translation is not for this AWG..Because my Siglent tries to do some graphics but the JDS doesn't change its output  :-\
So I would like to know if someone has modded the ESPBode to be compatible with the JDS command ?

Thanks !  :)
« Last Edit: April 22, 2022, 03:38:39 pm by ceut »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf