|
NEW! Visit our Ham Radio pages to know about our 10GHz activity |
||||||||||||||||||||||
|
Pic-plot now goes to USB! A perfect low cost solution to quickly get screen plots of your GPIB instrument on your laptop PC without complex software. It emulates the HP7470A operation on the GPIB side, and outputs the HP-GL data at the USB port to be read and stored on the PC by any capturing software. GPIB addresses and other set-and-forget parameters can be configured by a simple Setup menu, then no Dip-switches are used. Power is taken from the USB port to simplify cabling and get rid of a DC adaptor. The operation of this interface is not just limited to digital plotter emulation: any data intended to be received by a GPIB Device (addressable or listener only) can be captured from the instrument and brought out to the USB port, including raw measurement arrays or rasterized data for a graphic printer. It is based on a PIC16F628 microcontroller and an FT232R chip. PCB size is just 57x64mm. SCHEMATIC AND DETAILSSOFTWAREUSE AND OPERATIONVERIFIED GPIB INSTRUMENTS
The hardware of Pic-Plot2 interface is quite simple: the active components are a Microchip PIC16F628 microcontroller and an FT232 chip from FTDI. The microcontroller manages the GPIB protocol and signals, while the FT232 does the bridging between the USB and the microcontroller UART. No oscillator crystal is needed because the FT232 provides the 12 MHz clock for the microcontroller, and the 5V needed to supply the whole circuit are taken from the USB host PC.
The microcontroller does all the necessary jobs to emulate GPIB Device functionality, in both Listener and Talker mode, by recognizing addressing, commands and managing the Handshake lines. Controller mode is not needed for the intended functionality, and therefore is not supported. Once the device is addressed and it receives data from the Talker, the same data are forwarded from microcontroller UART to the FT232 at 38400 baud. Then the FT232 manages the USB communication to the host PC where a Virtual COM Port (VCP) has been created by installing the proper drivers. A standard A-B USB cable is needed for data and power connection. There is no power switch: the interface is ON whenever plugged to the host PC. Two LEDs (LD1-green, LD2-red) respectively indicate: - Data traffic (RX or TX) over USB bus A small pushbutton switch is provided to enter Setup mode. In this mode the PC is used to read/change a few set-and-forget parameters that are stored in the non-volatile memory of the microcontroller. Even if the GPIB cable can be left connected to the instrument, in Setup mode the GPIB port is not monitored by the Pic-Plot2. Normal operation is restored at the end of Setup procedure, or unplugging-replugging the interface from the host PC. More details about Setup mode can be found in the USE AND OPERATION section.Herebelow the drawing of the PCB layout and the close-up pictures of a mounted unit:
For this project we can supply mounted and tested units: check here for prices and drop an e-mail to us.A quick reference manual in Italian and in English is available in the downloads section.
Once a Virtual COM Port is created at the USB host PC port, the Pic-plot2 will communicate through it. Similarly to its RS232 predecessor, the data it sends can be either:
Apart of USB connectivity and the higher data rate, the Pic-plot2 maintains the same functionality of the previous RS232 version, therefore all considerations about capturing software and GPIB instruments remain valid.
There are also good commercial solutions that can be found online, like Plottergeist and PrintCapture. We have tested PrintCapture during the 30-days trial period, mostly verifying the print-through-GPIB capabilities of some oscilloscopes using our Pic-Plot with excellent results.
We have also received some plot examples from Pic-plot users who have given their preference to other rendering softwares:
And, finally, one example sent to us by F4EXB who has setup a scalar bench by sweeping a PLL YIG oscillator and getting through a Pic-plot the relative-power readings of an HP436 (with GPIB option). He has written the Matplotlib scripts for the graphic display:
Connecting the Pic-Plot2: Connect the Pic-Plot2 to the PC using a standard A-B USB cable (it is the same cable to connect a PC to most USB printers). Connection to the GPIB instrument must be done with a standard GPIB cable. Because of limited I/O capabilities of the microcontroller used, it is recommended to limit the cable length to max 2meters and to disconnect all other instruments or controllers from the GBIP bus. After checking operation with a simple point-to-point configuration, you may try loading the bus with more instruments. Pic-plot2 takes the necessary power to work from the USB bus, so no AC adaptor is needed. Maximum current drain from the bus is 50mA. Before starting, install the VCP drivers: Pic-Plot2 operates by exchanging data with the PC through a Virtual COM Port (VCP). Then, if you have not already installed in your PC the appropriate drivers for the FT232R chip, you must go through this first-installation procedure before connecting the Pic-plot2 to the PC. The drivers are royalty-free and are downloadable at the FTDI website. 1. Go to FTDI website http://www.ftdichip.com/Drivers/VCP.htm
5.Follow the guided installation and, if drivers are
properly installed, the Pic-plot2 will be enumerated and its green LED
will turn ON. Setting the Pic-Plot2: At the first installation or at any time the GPIB settings must be changed, you may need to configure some basic parameters of the Pic-Plot2, even though most of the times the pre-programmed values will work for you. To do this the Pic-Plot2 must be connected to a PC and put in Setup mode. Setup procedure may also be useful to test the USB link between Pic-Plot2 and the PC during first installation or when troubleshooting. Setup parameters are stored in the EEPROM area of the microcontroller, therefore they remain unchanged with power cycling, but they can be reprogrammed at will by redoing the setup procedure.
Setup procedure:
Plot and print capturing with Pic-Plot2: Apart of USB connectivity and the higher data rate, the Pic-plot2 maintains the same functionality of the previous RS232 version, therefore all considerations about capturing software and GPIB functionality remain valid. Then, Pic-Plot2 has no practical use where the PC is the System Controller of the GPIB bus because instrument screen dumps can be directly captured by the PC through its GPIB add-on card . Its application field, instead, is when your instrument has Controller capability or is a Talk-only GPIB device. Typical configuration is the following:
Be sure that Pic-Plot2 is correctly connected to the host PC and the green LED is ON. If you have been able to complete the Setup procedure, then you are sure that Pic-Plot2 at least correctly communicates with the PC and is ready to work. To connect the instrument to the Pic-Plot2 you need a standard GPIB cable, and the instrument has to be configured exactly as it should be when connected to a real GPIB plotter or printer: refer to instrument manuals for proper settings. The choice whether to plot or to print is related to the application you have chosen in your PC but also to the actual capability of your instrument: for example there are instruments not designed to provide rasterized data to a GPIB graphic printer. On the other hand, many instruments are capable to print the raw measurement data in ASCII form, and the Pic-Plot2 is able to capture also this kind of data arrays that can be easily analyzed or post-processed with a Spreadsheet. As a general reference, if the instrument has Controller capability, it should be set as System Controller. Set the Plot Address (or Printer Address) to the same value you have set on the Pic-Plot2: default values are respectively 5 and 1. Normally you can do all these settings from the instrument front panel in the GPIB settings menu. In some case you have also to specify the type of peripheral and which port you want to use for screen-dump: choose a plotter (7470 works for all), or a printer if you want to print; output port must be "GPIB". If your instrument cannot act as a System Controller, then it acts as a Talk-only Device when it outputs the screen-dumps on the GPIB: most oscilloscopes, many SA and (we believe) all curve tracers work that way. No matter if you choose to plot or to print, for this kind of instruments the Pic-Plot2 has to be first configured with 'y' in the Listen On Reset option of its Setup menu (see Setup procedure). The same setting works also for some "screenless" instruments like the microwattmeter HP436 with GPIB card installed, that keeps generating data points once it has been manually switched to talk mode.The Virtual COM# in use should be identified: use the Control Panel/System/Hardware/Device Manager/Ports(COM&LPT). The software of your choice should be installed on your PC (see SOFTWARE section) or, alternatively, you can just see the raw data output from Pic-Plot2 using HyperTerminal, keeping the same settings used in the Setup procedure. In the next sections we give you directions about how
to use the Pic-Plot2 with the 7470.exe, but our interface will work with
other similar capturing softwares for which we recommend to read the
relevant supporting documentation. How to configure 7470.exe ver.1.67:
How to use 7470.exe: Launch 7470.exe and select 'Wait for device initiated plot' in the 'Acquire' menu. Start the plot from the instrument, and see the progress of received data bytes. At the end, you should see the copy of instrument screen on your PC: if this doesn't happen, there could be an error in the GPIB communication (normally a mismatched GPIB address) or a wrong configuration of the 7470.exe. The latter often happens if you have not correctly specified the COM port# in the connect.ini file. In case of doubt, verify in the Control Panel/System/Hardware/Device Manager/Ports(COM&LPT), or specify the same COM# you have set in HyperTerminal for the Setup procedure. If you want to save the plot, don't forget to press the spacebar to exit the acquisition mode first. Again, refer to John Miles' KE5FX website to get the most from his nice software.You can see some example results in the SOFTWARE section. And below a photo of a typical setup in which the Pic-Plot2 is capturing a return-loss plot of a 144MHz loop antenna taken with a VNA.
VERIFIED GPIB INSTRUMENTSBasically, any GPIB instrument having System Controller capability, or Direct-plot function, or Talk-only plot/print function will work with the Pic-plot2. Apart of USB connectivity and the higher VCP data rate, the Pic-plot2 maintains the same functionality of the previous RS232 version, therefore the compatibility with capturing software and GPIB instruments remain valid. So far, we have direct evidence that the Pic-plot interface has been successfully working with the following instruments:
The list gets longer and longer thanks to the contribution of the many Pic-plot users who kindly have given us a feedback.
|
||||||||||||||||||||||
| The projects presented in these pages are our own design and have been tested and verified by ourselves at the best we can. However, they might be inspired by concepts, ideas, solutions coming from known-art or free resources on the Web. We provide them as reference designs to skilled hobbyists and technicians who are willing to reproduce them for non-commercial use. Your results might be different from ours and we cannot be considered responsible for that. Similarly, we are not responsible for any damage or injury you might incur while building, assembling or using the equipments, projects or ideas presented in these pages. The firmware embedded in our projects is our property unless differently stated and, when available in the Download Area, it is license-free only for non-commercial purposes. | ||||||||||||||||||||||
|
© Hotwater 2007-2011 |
||||||||||||||||||||||