Synchronization of HF2LI/UHFLI with External Scan Engines for Image Acquisition

Since a lock-in amplifier is most of all used for synchronous measurements, it comes at no surprise that many HF2 or UHF users want to synchronize saved demodulated sample with their scan generator either for mapping, scanning or imaging in general.

Auxiliary outputs – some limitations

Every Zurich Instruments lock-in amplifier has 4 Auxiliary Output DACs available through BNC connectors on the front panel, with a maximum rate of 1MS/s (filtered at 200kHz) in case of the HF2LI or 28MS/s (filtered at 7MHz) in case of the UHFLI. This will insure the fastest data transfer but with no adjustable rate and in a continuous manner.

Connextion diagram Aux output

Even though this is the most straightforward method for data acquisition, it rapidly hits its limits when more than 4 channels need to be recorded, and sometime even less when available ADCs on the other side are limited to 2 or 3 (e.g. Bruker Nanoscope V Controller). In particular, for SPM applications where multimodal detection schemes and PID feedback loops are used, many more Auxiliary Outputs would be needed in order to capture the information from all channels.

Streaming demodulated data directly to PC

When more than 4 channels need to be saved, typically when using PID loops and/or multiple demodulators, the best practice is to save these channels directly to the PC either via the USB connection (or the Ethernet port in the case of the UHF), which also replaces the need for an external acquisition card. This can be done either:

  1. from the ‘Save tab‘ at the transfer rate specified in the Lock-in tab (at up to several 100kSa/s)
  2. Using the Pull or Get Data command from the API (Application Programming Interface)

This, however, can lead to massive (and not always relevant) data generation because the data is continuously saved at the desired rate until paused or stopped.

TTL sync between the Scan Engine and the HF2LI

For image acquisition, data synchronization is key and needs to be saved in a file that corresponds exactly to the right amount of pixels and lines per image, let say a 256 x 256  image size,  making post-processing and image visualization straightforward. All the information stored in the saved file corresponds to a single image with no redundancy: 1 demodulated sample = 1 pixel in the image. Below is an example showing the connection from a scan generator, which outputs a TTL pulse at the beginning of every line, to the DIO trigger input of the HF2LI  (via BNC) or UHFLI (via SMA).  In this particular example a screen shot from the Nanonis STM Simulator is displayed, showing the Scan Options window (accessible from the Tools menu of the Scan Control module), but most scan generators provide a TTL output for every line or pixel, to be defined by the user.

Connextion diagram TTL sync 2

Now from the lock-in side, this TTL input needs to be synchronized to the actual transfer rate at which the data is saved. The user can select in the Lock-in tab the trigger level as either Rising or Falling Edge (for single pixel) or as High level or Low level gate (for single line), and for which the proper transfer rate needs to be defined. The rule of thumb is that for slow scan images, let’s say for a pixel dwell time of the order of 10ms (256 pixels in 2.56s), a TTL trigger for every pixel is more appropriate whilst for fast scan acquisition, a Gating Time, T_G with a predefined transfer rate will ease the communication between the 2 instruments. Within the ziControl User Internface, the key parameters for the Readout rate are displayed on the screenshot below (click to enlarge):

ziControl overview for TTL readout

The actual transfer rate is equal to the Number of Pixels/T_G, in Sample per second (Sa/s). The Gating Time (T_G) corresponds to the pixel dwell time multiplied by the number of pixels per line. As an example, for the acquisition of 512 pixels in 0.1s, the transfer rate should be 5.12kSa/s. Please note, that since not all arbitrary transfer rate are available, the user can adjust either the number of pixel per line or the exact time per line to match the proper transfer rate.

Make sure to also save the DIO channel and the relevant demodulators from the Save tab; each Demod channel will generate its own file. In this way, the binary or ASCII file generated by the Zurich Instruments Lock-in will contain only the relevant information either for every pixel of the image, or for every line, until the end of the image acquisition (press again the Save button to stop the acquisition at the end of the image). As a side note for those enjoying the Mutlifrequency option (either for HF2LI-MF or UHFLI-MF), you can choose different readout rate for every demodulator, using one for continuous display (at a higher rate) and an another one for saving at the synchronized rate.

 Conclusion

This blog illustrated the various ways to save demodulated samples and data from the HF2 without necessarily going via the Auxiliary Outputs. Streaming data to PC helps reduce set-up complexity by removing the need for an external ADC acquisition card and additional AD/DA conversion stage. As an example, we showed that using the trigger readout for synchronization of a scan engine with demodulated samples is an efficient way of saving only the exact amount of sample data per image. The visualization of the image then needs a third party program, which can be done in either LabVIEW, Matlab or Python from the choice of the APIs.