Author Topic: FeelTech FY6600 60MHz 2-Ch VCO Function Arbitrary Waveform Signal Generator  (Read 579713 times)

0 Members and 1 Guest are viewing this topic.

Offline jdmoranii

  • Newbie
  • Posts: 1
  • Country: us
Re: FeelTech FY6600 60MHz 2-Ch VCO Function Arbitrary Waveform Signal Generator
« Reply #2225 on: August 16, 2022, 08:23:03 pm »
Hi, Dave. Sorry to resurface a long-dead thread, but…

I recently discovered that my FY6600 was dead. The -12V DC supply was being loaded down. I connected a (-) dc supply to that rail, limited current to 1A and cranked up the voltage until 750mA flowed. C81 got toasty hot. So I removed it. Searching this thread for “C81” and “C82”, I found your comment that C81/C82 were 100nf. But they look physically too big, the smaller caps in parallel with them are 100nf. So I removed C82 and measured it. It was 10u. I replaced C81 with a 10u.
 
The following users thanked this post: Johnny B Good

Offline DaveR

  • Regular Contributor
  • *
  • Posts: 165
  • Country: gb
Re: FeelTech FY6600 60MHz 2-Ch VCO Function Arbitrary Waveform Signal Generator
« Reply #2226 on: September 02, 2022, 09:46:30 pm »
By chance, I just happened to look in on this thread for the first time in several months!

I remember the C82 incident, and have to say that I had no idea what its value was at the time (it blew on 10 Aug 2018, according to my notes!), but 100nF has done the job for the last four years, so it can't be too critical.  Physical size is, of course, no indication of value, and C53, 54, 56 and 57, which are all supposed to be 10uF, are massive in comparison to the original C81 and C82 on my PCB (as per some photos I took when did the 3095 opamps upgrade).  However, looking again at the photos, it would appear that C81 and C82 were actually different beasts (at least in colour and shape - although you couldn't tell that from the frazzled remains of C82 I removed), so my original assumption that they were the same value may have been incorrect - although why the capacitors on the 4558 VCC+ and VCC- should be different, I have no idea.  Thanks for your message, though: if C82 ever blows again I'll consider replacing it with a 10uF (if I can find one with a small enough footprint to fit in its place on the board).

Regards,
Dave
« Last Edit: September 02, 2022, 10:14:06 pm by DaveR »
 

Offline Johnny B Good

  • Frequent Contributor
  • **
  • Posts: 822
  • Country: gb
Re: FeelTech FY6600 60MHz 2-Ch VCO Function Arbitrary Waveform Signal Generator
« Reply #2227 on: September 03, 2022, 04:57:46 am »
 Hi Dave  :)

 If you don't want to clutter your web browser with a tabbed link to a moribund topic thread or have to check your bookmarks' folder every so often just to take look for fresh postings, why not click on the "Notify" button?  :)

==============================================================================================
[EDIT 2022-09-03]

 To add to the above advice, that the key benefit to clicking the "Notify" button is that you can delete the tab any time thereafter and de-clutter the web browser. I usually wait a day or three to see how many times the attached images have been viewed before doing that, even longer if I think I may have more to add. If the viewed count rate drops right off after a week or three and I'm still planning on adding another post, I really aught to add it to my bookmarks folder and close the tab but I'm not that organised so just tend to leave the tab open. ::)
==============================================================================================

 Another trick you can use when trying to resurrect a thread that hasn't seen a new post in several months (or even a year or three!) is to attach an image or three to your post. That way, you can gauge the level of passive interest from the number of views they get even if no one bothers to post a reply.

 Here's an example of the effectiveness of that trick where the latest post had been two and a half years prior to my own contribution. >:D Sadly, no actual replies but the view count against each attached image does at least reveal a level of interest (the initial 4 views in the space of only 5 minutes strongly hinting at the use of the notification button).

https://www.eevblog.com/forum/metrology/i-just-bought-an-efratom-100318/msg4176703/#msg4176703

 By way of an on topic update, I'm pleased to able to report that my much modded FY6600-60M is still going strong. Indeed, its upgrade replacement, a Siglent SDG2042X (120MHz version ;)), has effectively been relegated to acting as a support plinth for the 6600, mainly it has to be said, for its inability to offer the advertised 1 microHertz tuning resolution 'feature' beyond 100KHz for an insufficiency of digits in the frequency display :o :( >:(

 I've attached an image which I think might be of some interest (after all, this is the latest round in my search for a better frequency reference than the 6600 had originally been cursed with). >:D

 BTW, the gps disciplining wobble accounts for some 6 or 7 ns of the band of persistence recorded in that screen grab. The remaining 29 ns comes from what appears to be a diurnal temperature influence on the ruby's frequency stability (along with a tiny calibration error and a smidgen of ageing drift).
« Last Edit: September 03, 2022, 04:55:34 pm by Johnny B Good »
John
 

Offline DaveR

  • Regular Contributor
  • *
  • Posts: 165
  • Country: gb
Re: FeelTech FY6600 60MHz 2-Ch VCO Function Arbitrary Waveform Signal Generator
« Reply #2228 on: September 03, 2022, 03:57:25 pm »
Hi John,

Nice to see you're still active!

Thanks for the tips, but, as someone who keeps the most cluttered browser in the universe (three of them, in fact, all multi-windowed and multi-tabbed), I don't intend to spend half of what's left of my life resorting tabs or converting them into bookmarks just to save a few seconds every six months or so :).  Some of them are several years old, but I know where they are and I can easily find them thanks to the ColorfulTabs addon.  A number are linked to topics on here that I've participated in over the years, and I keep them open because it's an amusing diversion to look in occasionally to see how many more times the wheel has been reinvented since I became a lapsed member of the thread.

The FY6600 was a nice project to be involved in, and it eventually evolved to a level of sophistication which more than met my user needs (and many others', it would appear), and your efforts to squeeze even more performance from it have taken it to another level again.  It's amazing what can done with a bit of cheap kit and some ingenuity, isn't it?

Regards,
Dave
 

Offline Johnny B Good

  • Frequent Contributor
  • **
  • Posts: 822
  • Country: gb
Re: FeelTech FY6600 60MHz 2-Ch VCO Function Arbitrary Waveform Signal Generator
« Reply #2229 on: September 04, 2022, 01:13:27 am »
 Hi Dave,

 I've just edited that post to clarify the benefit of clicking the notify button as per the following.

 To add to the above advice, that the key benefit to clicking the "Notify" button is that you can delete the tab any time thereafter and de-clutter the web browser. I usually wait a day or three to see how many times the attached images have been viewed before doing that, even longer if I think I may have more to add. If the viewed count rate drops right off after a week or three and I'm still planning on adding another post, I really aught to add it to my bookmarks folder and close the tab but I'm not that organised so just tend to leave the tab open. ::)

 As for the venerable FY6600, that proved to be a surprisingly excellent performer once you'd voided its warranty with several relatively trivial modifications to fix its seemingly beancounteritus inspired penny pinching induced shortcomings. Sure, the penny pinching did save a few cents on the dollar in production costs but I think the motivation to even risk such a ludicrously foolish penny pinching strategy was more to do with reducing their costs on handling warranty returns down to a nice fat zero by taunting their target market demographic into turning this Sow's Ear into a silken purse at the expense of a voided warranty.

 I think Feeltech knew their target demographic far better than it knew itself and were maximising the PRC's government subsidies on export shipping costs to make any warranty return attempts a high risk exercise if the AWG had been 'fiddled with' in any way since the return shipping charges would be an upfront cost to the customer, only refunded if Feeltech deemed the warranty hadn't been voided.

 When I'd offered this hypothesis to the group two or three years ago, it was discounted as just another "conspiracy theory" but the fact that their latest 6900 version has an unpopulated fan cooler aperture moulded into its back panel only lends further credence to this hypothesis imho.

 The original motivation for such nonsensical penny pinching may well have been simply that of reducing production costs which, after monitoring this topic thread, would have revealed the warranty voiding efforts of its target demographic soon enough that it seems they'd decided to pretend ignorance of the more egregious defects, electing to apply a cack handed half live mains leakage fix in the 6800 (and the 6900!) models and leave the remaining defects unaddressed to ensure a minimum of valid warranty returns where they would not only have had to deal with the expense of any repair (in reality more likely just take another unit from their stock of spares set aside for such warranty replacements) but also that of the customer's warranty return shipping costs.

 Looking at the way FeelTech have failed to respond to their customers' requests to fix blatant shortcomings, looks very much like a strategy to cut overheads by taking advantage of their customers' propensity to void their warranties (deemed worthless by most anyway) by having a go at fixing the issues for themselves, and thereby reduce the number of warranty returns they would otherwise be obliged to deal with.

 However, despite what I think of the situation, I'd still be inclined to replace the 6600 with a 6900 should it ever develop an irreparable fault. After all, for the money, it still represents an excellent bargain in AWG technology for what most of us would consider "chump change".

 It's certainly cheap enough to risk improving to a higher standard with an OCXO lockable to an external 10MHz reference and an upgrade of the 85 ohm attenuator to a real 50 ohm 20 dB resistor network plus replacing the earthing wire link to the PE pin of the C14 socket with a 4.7K resistor to eliminate random dc offsets and noise coming in from the mains earth wiring and, of course, fitting a fan into the case for a modicum of active cooling.

 Incidentally, the abysmal lack of passive convective cooling airflow proved inspirational in the ventilation arrangements I'd used in my rubidium frequency standard. I needed the cooling fan to be the sole arbiter over the LPRO's base plate temperature so any natural convective flow would have been counterproductive, so it's hats off to FeelTech for a real tour de force lesson on how to achieve virtually zero convective cooling.  >:D  :-DD :-DD
John
 
The following users thanked this post: vehiculeselectriques

Offline DaveR

  • Regular Contributor
  • *
  • Posts: 165
  • Country: gb
Re: FeelTech FY6600 60MHz 2-Ch VCO Function Arbitrary Waveform Signal Generator
« Reply #2230 on: September 05, 2022, 12:21:36 am »
Hi John,

I think the warranty thing is a bit of overthinking by you.  Like all Chinese companies at the lower end of the market, warranty doesn't enter their minds: they just know that they can build something for x dollars and sell it for y dollars, and if (y-x)*n sales is enough to set them on the road to riches then they are happy.  No need to follow international safety standards or awkward things like that, and they write the specs themselves and sometimes even manage to meet them: if they don't, so what?  Caveat emptor!  If they've done a bit of research, they'll know that there's absolutely no chance of getting a faulty item returned to them, because sending it back is likely to cost more than the item is worth, and if, by chance, something is sent back, they can just throw it in the skip and say they never received it!  It's all in the Chinese Business Manual.  That's not to say that they all follow the Manual to the letter, because I've dealt with some really good sellers in the past, who went way beyond expectations to provide a good service, but you just have to weigh the chances of buying a pig in a poke before you part with your money, and be prepared to write it off if the item turns out to be porcine.

As for the actual AWG itself, I knew what I was getting after the FY6600 and bought a 6800 because I saw a good deal from some seller, knowing I could easily upgrade it in a couple of hours - although I stopped after the earthing correction and the TCXO change because the newer firmware meant that I didn't see the need to do anything else to it - and even went on to buy a 6900 a couple of years ago just because curiosity got the better of me.  (I'm actually not that keen on the 6900 because the keypad buttons are too firm, and are a definite downgrade from the 6800.)  Having just looked at the 6900 case, I find that I did actually fit the "missing" fan (I can't remember doing it, but I'll have had one or two suitable ones lying around, no doubt), but that's probably all I've done to it, apart from the obligatory earthing fix.

Out of interest, do you actually NEED a rubidium standard, or is that just another obsession?  (Says I, with two Thunderbolts next to the PC keeping my feet warm, four more GPSDOs in various places, and half a dozen home-made 10MHz OCXOs sitting in a box upstairs!)  :)

Regards,
Dave
 

Offline Johnny B Good

  • Frequent Contributor
  • **
  • Posts: 822
  • Country: gb
Re: FeelTech FY6600 60MHz 2-Ch VCO Function Arbitrary Waveform Signal Generator
« Reply #2231 on: September 05, 2022, 08:56:32 pm »
Hi Dave.

 Very nicely put. :) That's a less contentious version than mine but the conclusions reached are the same. I knew I was buying a "Pig in a poke" (more accurately, a "Sow's Ear") when I bought mine from a UK based Ebay seller as I mentioned in my very first eevblog post way back mid November 2018 to which my first reply had come from your good self!  :)

https://www.eevblog.com/forum/testgear/feeltech-fy6600-60mhz-2-ch-vco-function-arbitrary-waveform-signal-generator/msg1973777/#msg1973777

 I was interested to note your comments on the 6900's overly stiff buttons. Obviously stiff compared to the 6800 but surely an improvement over those bumps used on the 6600 front panel? These operate actual momentary push switches soldered onto the PCB. Those bumps are the one remaining annoyance only tempered by the fact that it's at least possible to replace any switches that may fail or start behaving erratically.

 Answering your question over my need of a rubidium standard, I have to offer an unqualified yes. I had been tempted to claim you'd answered your own question but although there is an element of want over need, in this case it's a vital tool in assessing other frequency standards (tcxo, ocxo, docxo, gpsdo and so on). In any case, I'll eventually be converting it into a GPSDRO to get rid of its ageing drift.
John
 

Offline DaveR

  • Regular Contributor
  • *
  • Posts: 165
  • Country: gb
Re: FeelTech FY6600 60MHz 2-Ch VCO Function Arbitrary Waveform Signal Generator
« Reply #2232 on: September 06, 2022, 12:05:05 am »
Hi John,

The buttons on the 6900 are truly awful, at least on the model I bought, although they may have been changed again to something more acceptable on the latest 5v incarnations.  The buttons on mine are soft silicone rubber on a very stiff spring or switch; there is no tactile feedback, and it takes a lot of effort to compress the wobbly blobs enough to move the spring and activate the switches underneath - solid plastic buttons would have been far better.  The membrane buttons on the 6600 are a pleasure to use by comparison - at least you can feel the click when the switch operates.  The 6800 buttons are light touch, and feel just right: I couldn't believe how far backwards Feeltech had gone with the 6900, because you need two hands, or have it braced against something immovable, to use it!

Thanks for that link!  It's almost four years ago now, but reading a few pages from the thread brought it all back to me as if it were just last week.  I see I was stalling on the 6800 opamp upgrade even then, and never did carry it out :).

Regards,
Dave
 

Offline Johnny B Good

  • Frequent Contributor
  • **
  • Posts: 822
  • Country: gb
Re: FeelTech FY6600 60MHz 2-Ch VCO Function Arbitrary Waveform Signal Generator
« Reply #2233 on: September 06, 2022, 04:41:34 pm »
 Hi Dave,

 Thanks for giving me a "heads up" on the overly stiff buttons used by the (hopefully) early versions of the 6900. If they're so stiff as to make those used in the 6600 models a joy to use by comparison, they must be very stiff indeed (BTW "a joy to use" isn't a phrase that immediately springs to mind when using the 6600 buttons).

 If I ever need to replace the 6600 with another cheap AWG capable of 1uHz resolution from DC to 60 or 100MHz and lower sine wave jitter than that of an SDG2000X model, the latest 6900 models look (stiff button issues aside) to be an ideal replacement since most of the hard work, with the exception of replacing the resistors in the 85 ohm 20 dB attenuator, has already been done.

 They carried on using those cheap dual opamps but doubled them up to reduce sine wave distortion at the 20v pk-pk and 20MHz limits when driving 50 ohm loads. The improvement falls a little short of the opamp upgrade in the 6600 and 6800 models but still sufficient to make the expense of a pair of THS3091s or whatever, questionable so I'd be inclined not to bother.

 The current models using a single rail smpsu board makes for a simpler upgrade to a quieter 5v psu (it also simplifies the battery powered test setup somewhat to check whether such an upgrade is even worth the trouble of purchasing or making up a replacement psu).

 The change from a 50MHz XO to a 10MHz XO eliminates any need to add a 3N502 clock multiplier chip onto the OCXO upgrade's BOM list, saving both time and costs all of which make for a relatively easier DIY upgrade path. What's not to like (stiff buttons aside)? ;D

 With regard to unused component purchases (that still to be done opamp upgrade you mentioned), that's not so unusual with DIY projects. The simplified battery power test I mentioned was prompted by the fact that the two 6v lantern batteries I'd purchased almost three years ago now, are still gathering dust on a shelf. I never did get around to testing whether a psu upgrade would be worth the effort. :palm:  :)

 I think the reason for putting this "battery test" exercise off indefinitely was due to having an epiphany involving the use of an HF transceiver with a short wire aerial to monitor the quality of the AWG's output into a metre or so of wire plugged into its BNC socket and being left a little bit bemused by the apparent high levels of mains frequency sideband noise which would vary in strength depending on how I laid out the AWG's transmitting antenna.

 Suspecting that the mains wiring was re-radiating the 10MHz test signal and mains current was modulating this re-radiated signal via some non-linearity mechanism (the "rusty bolt" effect), I connected the transceiver directly to the AWG through a 2 metre BNC patch lead and an SO239(?) adaptor, having already enabled its built in 20dB front end attenuator (no pre-amp required for the HF bands - just a bandpass filter feeding the 1st mixer directly). Lo and behold! A nice clean carrier sans the mains frequency harmonics. It turns out that relying on an "over - the - air" link path with an HF receiver to monitor the signal quality is not really a good idea (it's a quick and (very) dirty test with the "quick" of that description being its only redeeming quality).

 After belatedly running a proper test, I realised that what I'd initially concluded to be a psu noise issue was in fact just the result of a badly organised test that had allowed a polluted version of the test signal to be re-radiated from the mains wiring. :palm: The "psu noise issue" had proved to be nowhere near as bad as I'd assumed and quite possibly not even an issue at all so my planned battery test lost all sense of urgency and was literally left to gather dust.

 I might eventually get round to running this battery test, most likely when I get round to adding more padding to the trimpot on the OCXO board to make it less 'touchy' to adjust. The main impediment to running the battery test had been the lack of a suitable 6 pin connector to plug into the main board power socket. However, since I'd now like to be able to switch between battery and mains power at the flick of a switch to run the comparison as a "Blink Test", I'll probably just (temporarily) solder the wires straight onto the cct board (psu or main). One additional 'complication' in my case being the need to include the OCXO's 12v rail in this scheme since it's powered independently from its own smpsu (another possible noise source) regardless of the rear panel on/off switch state.
« Last Edit: September 08, 2022, 03:10:23 pm by Johnny B Good »
John
 

Offline tzok

  • Regular Contributor
  • *
  • Posts: 53
  • Country: pl
Re: FeelTech FY6600 60MHz 2-Ch VCO Function Arbitrary Waveform Signal Generator
« Reply #2234 on: September 08, 2022, 08:29:10 pm »
Any chance that the Front Panel firmware will be finished, or at least it will reach full functionality, like ability to turn the device off ;)
 

Offline adeuring

  • Contributor
  • Posts: 17
  • Country: de
Re: FeelTech FY6600 60MHz 2-Ch VCO Function Arbitrary Waveform Signal Generator
« Reply #2235 on: September 16, 2022, 01:33:46 am »
Got recently a second hand FY6800. One channel worked fine, the other had a terrible positive offset that made is practically unusable. (Forgot unfortunately to make a DSO screenshot before repairing the thingy...)

I suspected that the opamp driven by the DAC, an AD8009, (IC1 in DerKammi's excellent schematics, https://github.com/DerKammi/FY6600-15-30-50-60M/blob/master/Hardware/FY6600_Main_A0.pdf ) was broken and replaced it; now both channels work fine. Attached is photo of the old AD8009 (left) and the replacement (right). Note that the removed chip does not have the Analog Devices logo...



But before anybody concludes that Feeltech uses fake chips: (1) The device has an unknown history – I do not know who soldered the left opamp in the photo onto the board; (2) I am not familiar with the "pattern" used by Analog devices to label their chips – perhaps the left chip is genuine; (3) clones do not have to be worse the original…

Another oddity: The counterpart of the chip I replaced for the other channel (U10 in DerKammi's schematics) is an LMH6702MA, not another AD8009… But again: I do not know if the previous owner(s) of the device or Feeltech soldered this chip.

Thanks to DerKammi and everybody else who contributed to the schematic. Having it available made the repair really simple.

PS: I suspect that this thread and DerKammi's Github repo for the FY6600 can lead to a sort of addiction to the FX66xx. I bought it mainly for some audio measurements but after reading this thread I'm wondering if I shouldn't start too to tinker with this "sow's ear" ;).
 
The following users thanked this post: wolfy007

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3486
  • Country: us
Re: FeelTech FY6600 60MHz 2-Ch VCO Function Arbitrary Waveform Signal Generator
« Reply #2236 on: September 16, 2022, 12:57:55 pm »
Hi,guys.  I finally wandered back for a visit after a long hiatus and am happy to see my favorite energizer bunny, the F***tech thread is going strong :-)

Naturally, I had to get an eBay update on FY6900.  One seller in the US is offering a 2 year warranty and “100% satisfaction”.

Naturally, rather suspect.

Is there any hope yet of replacement FW to fix my twice self-borked 6600?

HaveFun!
Reg
 

Offline kaldach79

  • Contributor
  • Posts: 11
  • Country: pl
Re: FeelTech FY6600 60MHz 2-Ch VCO Function Arbitrary Waveform Signal Generator
« Reply #2237 on: November 06, 2022, 07:42:17 pm »
Hi,
Do you know what driver is used in the generator display?
My LCD is damaged - grey backround, or only backlight. After freeze works fine by short time.
The original display has an 18 pin, but i have problem identifying the driver ILI9341 or ST7789.
Thanks for the help! :)
 

Offline kaldach79

  • Contributor
  • Posts: 11
  • Country: pl
Re: FeelTech FY6600 60MHz 2-Ch VCO Function Arbitrary Waveform Signal Generator
« Reply #2238 on: November 26, 2022, 02:28:30 pm »
Am updating my post. Display containing ST7789 driver chip, not working properly.The image is inverted, and the blue and red color are reversed.
I will try display with driver ILI9341.
 

Offline hlj.pycad

  • Contributor
  • Posts: 23
  • Country: cn
when I try to turn on the FY-6600 , it will show the brand icon "FeelTech" for a brief moment,  then the screen turn white. The keys seem still fuction. Any clue where I should look into?
« Last Edit: March 20, 2024, 03:29:59 pm by hlj.pycad »
I am from China, so of course I speak chinglish
 

Offline hlj.pycad

  • Contributor
  • Posts: 23
  • Country: cn
I fixed the last problem. It's PSU output caps' problem.

But some how my "sinewave" became 3/4 sine+1/4square.... it's there a fix for this?
I am from China, so of course I speak chinglish
 

Offline Atlan

  • Frequent Contributor
  • **
  • Posts: 362
  • Country: sk
Repair sine with program?
FNIRSI 1013D Always provide a picture or video with the problem where the parameters of the oscilloscope are visible, and a picture of the diagnostic screen with the values.
 

Offline hlj.pycad

  • Contributor
  • Posts: 23
  • Country: cn
Yes. I just found that. Thank you.
I am from China, so of course I speak chinglish
 

Offline hlj.pycad

  • Contributor
  • Posts: 23
  • Country: cn
I want to calibrate FY6600-15M with Fremen67's PC software, with no success. Can I do calibration with stock hardware or it's only for modified BluePill Front Panel?

When I switch to "Calibartion" page, it's really slow and slugish. After 1minute or 2 minute, the UI show but every input box turn to 0.000 one by one as follow:
2289455-0
And any calibartion attempt will fail as the same error:
2289459-12289463-2

I tried it in a fresh Win7 virtual machine, so what's the problem?
I am from China, so of course I speak chinglish
 

Offline tzok

  • Regular Contributor
  • *
  • Posts: 53
  • Country: pl
I want to calibrate FY6600-15M with Fremen67's PC software, with no success. Can I do calibration with stock hardware or it's only for modified BluePill Front Panel?
It is only for the modified Front Panel firmware (as mentioned in the window title).
 

Offline hlj.pycad

  • Contributor
  • Posts: 23
  • Country: cn
Ok, sorry to hear that. The control page function like seting waveform configuration work gave me false expectation. It's there any way to calibrate fy6600 other than the OCXO?The voltage is not correct.
I am from China, so of course I speak chinglish
 

Offline tzok

  • Regular Contributor
  • *
  • Posts: 53
  • Country: pl
Voltage should be measured with a 50R load...
 

Offline adeuring

  • Contributor
  • Posts: 17
  • Country: de
Gotchas of the serial interface of the FY6600 and FY6800

Three weeks ago I began to write a Python driver for the FY6600/6800. I tried a few existing ones but they did not seem to work very well, so I started my own. This turned out to become a really strange journey, due to many oddities how the firmware of the devices processes parameters sent from a host computer and of the data returned by the them.

I have an FY6600 with firmware version 3.2 and an FY6800 with firmware version 1.7.1. Both have identical quirks.

I would not feel offended if anybody would question my mental sanity while reading this post. So I invite any owner of an FY6600/FY6800 to check my observations. This is not difficult: You can easily type the commands in a termial program like minicom (Linux) or Putty (Windows). Just keep one detail in mind: Commands must end with a newline character ('\n'). Hitting the RETURN key sends a carrigae return ('\ŗ') – and that confuses the FY6x00. Type ctrl-J isnstead to send the '\n'.


Now the details:


Reading frequency values:

The FY6x00 allows to set frequencies in Hz with six decimal digits, i.e., with a resolution of Microhertz. The last five digits cannot be reliably read via the serial interface. Example: Set the frequency of channel 1 to 1234.567890 Hz.

The command "RMF\n" returns this value: 00001234.502354

Let's treat the last five digits as an integer: 67890 - 2354 -> 65536. So it seems that the last five digits are calculated modulo 2**16. Why?

This oddity is present for all frequency parameters: Output frequency of channel 1 and 2, "secondary frequency" for FSK modulation, "Bias" of FM modulation


Offset voltage part 1: Reading the offset voltage.

Positive values are properly returned as integers, giving the value in mV. Negative values are returned slightly different: For example, set an offset voltage of -3.816V, then issue the command to retrieve the offset voltage of channel 1, "RMO\n". The devices will respond with this number: 4294963480.

As you may guess, the returned value seems to come from an unsigned 32 bit integer: 2**32 - 4294963480 == 3816. Seems that the firmware is either missing a type cast somewhere or it has one type cast too many.


Offset voltage part 2: Setting the offset voltage.

This works overall fine, with some exceptions: Certain values slightly below 8.192V, 4.096V, 2.048V, 1.024V, 0.512V and 0.256V cannot be set exactly via the serial interface, only via the front panel. Some example values: 8.19, 8.176, 4.095, 2.041, 1.022, 0.506, 0.251. To reproduce, issue a command like "WMO4.095\b". The front panel display will show the value 4.094, and the command "RMO" will return the same value.

Interestingly, not all values slightly below 2**N/1000 are affected. For example, the command "WMO8.191\n" works as expected.

Negative values are affected too, BTW.

For the real usage this quirk does not matter that much: The offset voltage is generated by an MCP4822E (U113 and U114 in the schematics https://github.com/DerKammi/FY6600-15-30-50-60M/blob/master/Hardware/FY6600_Main_A0.pdf), which is a 12 bit DAC. So, setting the offset voltage in mV steps over the range -10V to +10V is anyway a bit silly, at least for larger offset and amplitude values, when the amplifiers U5/U21/U22 are activated.

Other parameters where the set value may be off by 1 in the last digit: Duty cycle, phase, phase shift in modulation mode.


Length of the "adjust pulse".

This is special, even compared with the oddities described so far.

According to Feeltech's documentation, the value returned for the command "RSS\n":

Quote
"is a positive integer number {0…?} that represents the pulse period in ns. A return value of 10000 means the CH1 pulse period is 10000 nS."

(Source: https://codeberg.org/jschwender/FY6600-15-30-50-60M/raw/branch/master/Software/FY6600%20Serial%20communication%20protocol%20v3.pdf )

If the value selected and displayed on the front panel is for example 10,000ns, the command "RSS\n" returns the string "100000", i.e. one digit too many. So what, I thought at first: Just throw that last digit away and keep the rest.

Let's try larger values, for example 100,000,000ns. The result: 1000000000. OK, again just one trailing zero too many. Same for 400,000,000ns and somewhat larger values. Now let's try 500,000,000ns. "RSS\n" returns:

705032704

Whut? 70,503,270.4 nanoseconds? If we simply ignore the last digit, we read 70503270ns, much less than what is selected and shown on the front panel. And, BTW, the signal that is generated, has indeed the timing as set on the front panel.


If an even larger value, 1,000,000,000ns, is set, "RSS\n" returns:

1410065408

If we simply throw the last digit away, we get 0.141006540 seconds. But the value shown on the display is one billion nanoseconds, or 1 second...

Now let's see what happens when we subtract the number 141006540 from the set time and select that number on the front panel:

1,000,000,000 - 141006540 == 858993460

Now the FY6x00 returns for "RSS\n" just one digit:

8

If we increment the value by 10, to 1,000,000,010 (smaller increments are not possible on the front panel), "RSS\n" returns:

108

So, the difference between the two values makes somehow sense. If we select 858993450 on the front panel, "RSS\n" returns:

4294967204

Notice already a pattern?

Let's go back to the first odd result: The selected value was 500,000,000, the returned value was 705032704. So, subtract the latter number, without the last digit, from the former:

  500,000,000 - 70503270 == 429496730

That's half of the difference 1,000,000,000 - 141006540 (or 858993460).

After some more tests with other numbers I figured out what the algorithm must be that generates the data returned for an "RSS\n" query:

- Let the selected pulse width be N
- calculate the remainder R and the quotient Q of the integer division N / 429496730.
- Calculate the remainder of 4 * Q / 10. Let this be Q2. (In other words: Take the last digit of the decimal representation of (4 * Q), and call it Q2)
- if R is zero, return the one-digit number Q2 as an ASCII digit.
- if R is non-zero, return the decimal ASCII representation of R, followed by the ASCII representation of  Q2. No separator symbol between the two numbers.

This is quite convoluted but it allows, after all, to read pulse length up to (429496730 * 5 - 1)ns, or 2,147,483,650ns (or 2**31 + 2). Problem is that the front panel allows to set values up to 4,000,000,000ns. But for pulse lengths above 429496730 * 5ns the value Q in the algorithm described above becomes 5 or larger, and the last digit of Q2 is again 0, 4, 8, 2, so the values returned for these pulse lengths are the same as for shorter pulse length.

So, while the caluculation of the quotient and remainder of the division N / 429496730 is crazy enough: If Q itself would be used in the response instead of Q2, an unambiguous "reconstruction" of the pulse length would be possible on the host side. So: Why the insane additional calculation of Q2? To me, this looks like a rase case of a weird WTF inside an big WTF.

And finally: All these crazy operations happen in an STM32, if my memory is right. I haven't worked with this type of microcontroller, but I think it is a safe bet to claim that the available C development tools provide reliably working functions like printf() or sprintf(). The pulse length can be easily represented as an unsigned 32 bit integer, so using a call like

  printf("%d\n", pulse_length);

would be much easier than to develop a strange in-house implementation to convert an integer into an ASCII string.

What might have been the reason not to use printf() or sprintf()?

The front panel also shows a decimal representation of the pulse length. And the conversion between this decimal representation and, I assume, an unsigned 32 bit integer works just fine. So: Why is there another, convoluted and buggy, implemenration that generates the ASCII digits that are sent to the serial interface?


Finally a cautionary tale about cargo cult programming,

Before I started to write my driver (https://gitlab.com/adeuring/fy6x00), I looked a bit around in other libraries. One detail caught my attention: After reading this function (https://github.com/mattwach/fygen/blob/e4822ec77939e1efd1117b722d3cfffc9b9f3e84/fygen.py#L305):

Code: [Select]
  def send(self, command, retry_count=5):
    """Sends command, then waits for a response.  Returns the response."""

    data = command + '\n'
    if self.is_serial:
      data = data.encode()
      self.port.reset_output_buffer()
      self.port.reset_input_buffer()

    self.port.write(data)
    self.port.flush()

    response = self._recv(command)

    if self.is_serial and not response and retry_count > 0:
      # sometime the siggen answers queries with nothing.  Wait a bit and try
      # again
      time.sleep(0.1)
      return self.send(command, retry_count - 1)

    return response.strip()

and reading these lines from a VB file published by Feeltech:

Code: [Select]
   Function RenYiBo_send(WData() As Double)

    Dim WAVE_buf(16390) As Byte
    [...]
    Dim n As Integer
    Dim m As Integer
    Dim delay As Long

    Dim strSend As String

    [...]

    MSComm1.OutBufferCount = 0
    MSComm1.InBufferCount = 0

    strSend = "DDS_WAVE" + Format(SAVE_SEL, "00") + Chr(&HA)

    For n = 0 To 100
       MSComm1.Output = strSend

       delay = timeGetTime
       While timeGetTime <= delay + 100
           DoEvents
       Wend

       buf = MSComm1.Input
       If Left(buf, 1) = "W" Then
         Exit For
       End If
    Next n

I concluded that the FY6x00 obviously sometimes does not properly listens to commands send via the serial interface and that it makes sense to repeat a command when the FY6x00 does not respond within a certain time (0.1 seconds in the case of the VB script; 5 seconds in the case of the Python driver)

(Note about the source of the VB code: I found a zip file containing the code cited above sometime ago on Feeltech's fownload page: http://en.feeltech.net/index.php?case=archive&act=list&catid=6 . It seems to be no longer be available.)

Repeating commands to the FY6x00 turned out to be a really bad idea, at least with a relatively short timeout. I chose 0.25 seconds after reading another function in Feeltech's VB sourcecode, which looked like it used this value. I did not notice at first that the entire repetition loop in that function was commented out... An unfortunate combination of sloppiness, bad eyesight and thus a hardly visible symbol that declares in Basic that the rest of a line is a comment (').

At first this seemed to work, though I noticed an oddity: When two different parameters were queried, the first response to second parameter query seemed to contain the value for the first query. I blamed - wrongly - the firmware and concluded that it is best to query each parameter twice and to keep only what looked like the response to the second query.

This worked more or less fine to read and change parameters like amplitude or frequency.

But I got stuck when I tried to upload a custom waveform. Whatever I tried, the first samples of the uploaded waveform were not what I intended to write. Instead I always saw an obscure glitch in the first five or six samples of the waveform.

It took me some time to remember that commands were repeated under certain circumstances – and this was indeed the cause of the problem: When the FY6x00 receives the command to upload the waveform ("DDS_WAVE07\n", for example) it responds with a "handshake" character (the symbol "W") – but only after a delay that was often longer than 0.25 seconds. So my driver repeated the command – and the FY6x00 treated this second command as the first bytes of the waveform data...

This means that Feeltech's VB code I quoted above is plain and simply wrong with its repetition of the "DDS_WAWE.." command after 0.1 seconds.

Since I finally removed the automatic repetition of issuing a command completely and set the timeout for responses to 1 second, just one oddity remained on this "low communication level": When a command to query a parameter is issued, the FY6x00 is supposed to respond with the parameter value, i.e., one or more ASCII digits, followed by an '\ņ'. But the FY6x00 sends quite often one or two '\n' symbols before the ASCII digits, so a driver should just ignore these empty lines and wait a bit for a line with "real data". A timeout of 1 second seems reasonable.

Conclusion: Don't trust source code from even from the manufacturer of a device blindly...

To be fair to the author of the Python example cited above: He uses his code with an FY2300. This device may very well need the repetition of commands. I don't own one, so I cannot tell one way or another.

Oh, if anbody is interested: My Python driver for the FY6600/FY6800 is here: https://gitlab.com/adeuring/fy6x00
 
The following users thanked this post: ledtester


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf