Published: Saturday, 24 December 2016
Written by Jon Chandler
The monitor I've mentioned will be used to monitor faults in a piece of FAA equipment. It has morphed from the initial concept of just providing some indicator lights to being a data logger to aid in determining the root cause of a failure. The original concept was to "play back" the sequence of faults recorded on the board's LEDs; this expanded to having a USB interface to read out data serially.
In the past, I have observed problems when interfacing to installed equipment - most often grounds being at different potentials. This can result in sparks, tripped circuit breakers and damaged equipment. In this case, dealing with aircraft navigational equipment, I opted for an abundance of caution. An isolated USB interface would protect both the computer connected to the data logger and the monitored equipment.
FTDI is the common choice for USB-UART chips but they have been plauged by fake chips and controversy with drivers being revised to not work with fake chips or to even destroy them. Not a good way to keep people happy.
For this design, I opted to use the Chinese CH340G USB-UART chip. It's cheap and popular (since many Arduino clones are using it) and the driver is readily available. DreamCity Innovations have worked up a data sheet for this chip since the original is in Chinese.
My isolated USB interface design is based on an example in the DreamCity data sheet, with slight changes. Their schematic shows an inverter on the microcontroller transmit line, lists the part number of a buffer with the note "... but helpful when the input pins cannot source too many current." The PIC 18Fs that I work with can source many current (25mA), so this addition was unnecessary.
The resulting circuit is pretty simple and having it optically isolated didn't add much complication. The schematic is shown below. The CH340G is in a 16 pin SOIC package so it's pretty easy to handle. I can't say the same thing about the micro-B USB connector! The pins are extremely fine-pitched but the connector I used isn't too difficult to work with - it actually fits in a cutout in the circuit board so the tends to be aelf-aligning to the pins.
Read more: Isolated USB Interface Using the CH340G UART-USB Chip
Discuss this article in the forums (0 replies).