Products > Test Equipment

Siglent SDS1104X-E and SDS1204X-E: Bode plot with a non-Siglent AWG

<< < (32/35) > >>

Reemuson:
Hey, first time post and I thought it was important.

If you're using any version of ESPBode, please note that for the ESP-01 non S the inbuilt LED is sharing the pin with TX. So you'll need to comment out any LED related code in order to get serial communication.

I unfortunately didn't realise this :palm: and spent a long time re-writing code trying to figure out why nothing was communicating thinking it was a driver issue. (At least I have some tidier code and have a deeper understanding of what's going on in the code base)

awakephd:
Reemuson,

Many thanks for this information! I do have the S version, and was not aware of the potential problem. I'll add that to my code so that people can leave out the LED if they have the -S version.

Meanwhile, if anyone is interested in seeing where I am taking the espBode project, I'd welcome comments and suggestions. My repo is here: https://github.com/awakephd/espBode/tree/version-2.0

Note that this is the version-2.0 branch, not the master. The master branch in the repo is only slightly edited from the hamhackin fork, enough to try to consolidate the changes that were made by Knutselaar and to rig up a rudimentary test of UDP binding.

The version-2.0 branch is essentially a rewrite from the ground up. It draws on the previous espBode versions and on the insights provided by bateau020 in his sds1004x_bode python version, but very, very little of the original code will make it into this new version. This version attempts to take advantage of C++, but without incurring significant overhead. An example of the latter is that I am avoiding the use of C++ strings, except where required by a couple of libraries - though the Arduino libraries have worked hard to reduce overhead in their String implementation, I am trying to avoid it altogether.

The current (and only) commit to the version-2.0 branch contains the overall structure up to the point of successfully communicating with the oscilloscope. I'm now working on parsing the SCPI commands and translating them for the non-Siglent AWGs. Thus, still a ways from a fully working product, but more than enough to see where I am going with it. Again, should anyone be interested in taking a look, I welcome suggestions, corrections, gentle ridicule, or other helpful comments! :)

awakephd:
More progress on espBode version 2 - I have just committed changes that implement parsing of the SCPI commands from the oscilloscope. The "only" thing left is to set up the AWG base class, then create the specific implementations for the various AWG versions.

awakephd:
I am pleased to announce that espBode 2.0 is now working! This represents a complete rewrite from the ground up. While it definitely owes a debt to the earlier espBode versions, this is not simply an edit of those; it is an entirely new program, written to take advantage of C++, and hopefully much more robust.

So far, I only have the code for the FY6900 with recent firmware, but the way I have implemented the code, it should be trivial to add any other FY models.

The key difference among these models seems to be the format and magnitude of the value they send and receive for the various parameters. For the FY6900 that I have, with firmware 1.5, it takes a floating point value to set frequency (in Hz), amplitude (Vpp), offset (V), and phase (°). For example, to set the frequency on channel 1 to 103.27 Hz, one sends the command "WMF103.27".

It would make way too much sense for it to return the same sort of value when reading parameters. And indeed, it does return the frequency as a floating point number (in Hz): Send the command "RMF" to the FY6900 (read main-channel frequency), and it returns 00000103.270000 - zero-filled before and after, but as noted above, the zero-fill is not required when setting the value.

Unfortunately, reading amplitude, phase, and degrees does not return the value in a floating-point format, but rather as an integer ... and the magnitude is not consistent. it returns amplitude as an integer that equals the Vpp * 1000, but it returns both offset and phase as integers that equal the value * 1000. Go figure! (I have not looked to see what duty cycle or other such commands do, since those are not used in the Bode plot, but I am guessing there are other delightful inconsistencies there.)

My implementation uses a "translation table" that tells the software what sort of value to send and to receive, and how it needs to be adjusted for magnitude. Thus, changing from the current FY6900 to, say, a FY6600 requires only determining the format of the send and receive values, and filling in the table accordingly.

I should add that, while I have tested this version (and gotten a beautiful Bode plot of a single-transistor Class A amplifier, attached below), I have not yet tested this exhaustively. Moreover, bateau020 has been giving extraordinarily helpful feedback, particularly with respect to things that are going on at the network level (e.g., responses that might "work" but are ultimately in danger of crashing the wifi); there may be more tweaks needed in response to that feedback. And beyond all of that, there is still work to be done to document everything - I have included a lot of comments, but there is some code that still needs comments, and I need to revise all of the comments to be a more standard format.

Still ... I am beyond delighted to have a working version, and I would very much welcome any input, suggestions, questions, etc. Github repository is here: https://github.com/awakephd/espBode/tree/version-2.0.

sp9bsl:
Thank you Andy and the rest for your work and sharing it here!
I'd like to inform you that it worked for me. My SDS1204X HD works now with FY6900 without problems. One minor issue is the include file for credentials.

You should change in main .ino file in the 6th line:

--- Code: ---#include "credentials.h"
--- End code ---
to

--- Code: ---#include "credentials_format.h"
--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod