Wednesday, May 2, 2007

Hacking Old 97, Part 3: USB to UART conversion and software


When we last left this discussion, I had just finished building an optical head for the serial port on my old Fluke 97 Scopemeter using a matched optoelectronic pair consisting of a 3mm IR LED and phototransistor. The project’s overall goal is to get the Fluke Scopemeter interfaced to a PC for screen captures. Fluke built a screen-printing ability into this instrument and it’s capable of driving specific Epson dot-matrix and HP ThinkJet printers through its optical serial interface. Fluke also sells optical-to-RS-232C and optical-to-USB conversion cables and sold a compatible version of its FlukeView software, since obsoleted. All this stuff regularly shows up on eBay.

Spark Fun CP2103 Breakout BoardI could have bought one of Fluke’s cables and the software (the obsoleted version supposed still resides on the CD along with newer versions), but took the task as a learning opportunity, and am glad I did. It’s made me acquainted with a vendor in Boulder, Colorado named Spark Fun, which offers inexpensive breakout boards based on Silicon Labs CP2102 and CP2103 USB-to-UART converter chips. For about $20 plus shipping, Spark Fun will put an operational converter on a board into your hands.

I ordered Spark Fun’s CP2103-based BOB-00199 breakout board and it arrived in a few days. It’s fully assembled and it’s tiny. The biggest component on the board, by far, is the USB connector. I pulled the board from the package and plugged it into a PC. The PC’s Plug-n-Pray USB driver recognized the CP2103 on the board, went out onto the Internet, pulled in the appropriate driver, and installed the driver. I now had a new COM port. That’s about as easy as it gets to add a new device, especially an instrument controller.

The only hardware task remaining was to house the board, add a couple of resistors in the process, and attach a DB-25 connector to mate to the 99-cent serial I/O PC ribbon cable I had adapted to my DIY optical head. The configuration suggested that a plastic DB-25 backshell might serve to house the breakout board, resistors, and connector. So, it was off to the two local parts suppliers near work: Anchor Electronics and HSC Electronic Supply.

ADVERTISEMENT
97 Schematic ThumbnailProject Schematic (click on thumbnail for bigger image)

At HSC, I found an old AMP plastic backshell that’s been around at least as long as I’ve been designing products, and that’s really a long, long time. I’d brought the Spark Fun breakout board with me and dropped it into the AMP backshell. It fit exactly! The backshell held the board securely and the USB connector poked out of the backshell’s extra-large cable port. What a find! I took the parts home, soldered up the resistors, added an inch of ribbon cable to make the four connections from the breakout board to the DB-25 connector, and buttoned up the assembly. Then I plugged the ribbon cable’s DB-25 connector into the assembly and the other end onto the optical head.

 


Spark Fun breakout board fits perfectly in an AMP backshell
 

Spark Fun breakout board assembly detail


Spark Fun breakout board assembly detail

Ready for the smoke test.

I’d already downloaded Jan Wagner’s ScopeGrab32 software for the Fluke 97. Starting it up, I waited for it to find the COM port and the Scopemeter at the other end of the cable. Nothing happened. It took a bit of fiddling to discover that I had to leave the Scopemeter set to 1200 baud (!) until the ScopeGrab32 software finds it. Then I can jump to the speedy 9600-baud setting for the image transfers. Success at last! Hack finished.

 

 Final ScopeGrab32 screen capture



<< Back | Print
© Reed Business Information, a division of Reed Elsevier Inc. All rights reserved.