Using the FY6900 with an external USB to serial bridge

30 Dec 2022 - tsp
Last update 30 Dec 2022
Reading time 6 mins

The following article will be a really short one. It’s about using the FY6900 function generator with an external CMOS 3.3V USB to TTL adapter to circumvent the embedded CH340.

TL;DR: Simply use the RX/TX pins on the back.

Disclaimer: All Amazon links in this blog article are affiliate links. This pages author profits from qualified purchases.

The problem

So what’s the problem and what’s the FY6900 anyways? The FY6900 is a cheap function generator - or was rather cheap for about 1/4 of the price of a solid more professional device like the SDG1032X that I’d choose as of today when I’d buy a cheaper function generator. The FY6900 offers two channels, a whole bunch of waveforms - which is of no surprise since it’s an arbitrary waveform generator that one can also load with one’s own custom waveforms that are then outputted via direct digital synthesis (DDS) based on two 14 bit 250 Msps digital to analog converters. Basically it’s an FPGA (in case of the FY6900 it seems to be a Cyclone 4) that samples through a buffer that contains the waveforms for both channels with a static offset and variable step width like any DDS. It offers a small local display and in theory allows to provide signals up to 60 MHz with 1 $\mu Hz$ resolution and a amplitude of up to $\pm 20V$. To be more precise:

The FY6900 function generator

The reality looks somewhat different but as long as one requires a reasonable hobbyist function generator with any high impedance load - you really see clipping at $50 \Omega$ termination at amplitudes larger than $17 V$ as well as some distortion where negative edges are longer than positive ones which is most likely caused by providing just not enough power to the output amplifier - it’s an acceptable choice to save money. Just don’t expect to reach all of the “specified” properties. It’s also manufactured way cheaper than the above mentioned SDG1032X - so if you want something that also feels more solid but still is an entry level device - take the SDG1032X or a similar device.

Some of the more promising features of the function generator include:

All of the features work reasonable well - especially for a cheaper device. There have also been plenty of hacks done by the community with this device like for example:

One can basically play and tune the device to one’s own desire.

Now all of that sounds nice as long as one doesn’t look too close at the USB port. The USB port is realized with a CH340 USB to serial bridge internally so basically the function generator is a serial device that’s talked to with 115200 baud like many other devices. The problem is the CH340 bridge - this is one of the worst to encounter since there are massive driver issues with different revisions that are all advertised with the same device IDs to the host system - so depending on your operating system you will not be able to use the USB port in any way.

The solution

Luckily the FY6900 is built like a hobbyist device - and so the engineers have just routed the 3.3V RX and TX pins that are usually directed at the CH340 also to the pin header on the back of the function generator - together with 4 TTLs ports.

The FY6900 function generator

The four TTL ports are documented in the manual:

The other 4 pins are:

So to circumvent the CH340 one can simply attach any other USB to serial interface like a CP2102 based adapter to the RX/TX pair as well as to GND. Just connect RX of the CP2102 to TX of the FY6900, TX of the CP2102 to RX of the FY6900 and connect both GND pins to provide the same reference potential. There comes one caveat with this setup: You cannot use the USB interface as long as something is attached to the RX pin of the FY6900 due to drivers to the internal CH340 and the external logic are driving against each other. But on the other hand it solves the problem of the FY6900 not powering down when switching off the mains switch as long as USB is connected in case it’s delivering enough power.

One can of course also use the TTL port to control the FY6900 from any microcontroller or an Ethernet to serial bridge to give the FY6900 some Ethernet control - though in case one needs that I still think a device like the SDG1032X would be a better choice that’s not too expensive anyways.

Software to use

As one would expect software supplied by the manufacturer exposes only the same functionality as the device itself, is limited to one operating system that one usually doesn’t have installed on ones workstation and is of limited use for automation. Luckily there are many implementations of the protocol or at least of subsets.

To mention some of them:

This article is tagged: Measurement, Electronics


Data protection policy

Dipl.-Ing. Thomas Spielauer, Wien (webcomplains389t48957@tspi.at)

This webpage is also available via TOR at http://rh6v563nt2dnxd5h2vhhqkudmyvjaevgiv77c62xflas52d5omtkxuid.onion/

Valid HTML 4.01 Strict Powered by FreeBSD IPv6 support