2.2.2 Electronic controller

The electronic boards are the elements that communicate the head of the instrument with the host computer. They perform two main tasks. The first one is the acquisition and conditioning of the signal coming from the photodetectors that measure the force and the position of the optical trap. The second one is the processing of orders given by the host computer to the wigglers and the motorized stage. Additionally, the feedback algorithms that perform the constant force or position protocols are also run in the microprocessors of the electronic boards. The stack of boards is powered by power supplies that provide +5 V tension for the digital electronics, $ \pm$15 V for the analog electronics, $ \pm$12 V for the motors and +150 V for the piezoelectric crystals.

The boards combine analog and digital signal processing and each of them is devoted to a specific function. The electronic boards are set on a stack and they follow a hierarchical structure based on the head. There are 5 intercommunicated boards but 2 of them are identical (see Fig. 2.12). Following there is a description of each of them.

Figure 2.12: Electronics schematics (see text).

Main board.
The main board is devoted to communication and data processing. It contains one USB transceiver and 3 microprocessors (Microchip PIC18F6520). The first microprocessor called ComPic controls the communication between the USB and the other pics. The other two microprocessors called TrapPics (A and B) control the two optical traps of the head. They read the data from the ADC board, send orders to the DCA board and perform the feedback algorithms. The three pics are intercommunicated with parallel buses and the ComPic is also connected with the MotorPic, located at the motor board.

Analog to Digital Converter (ADC) board.
There are two identical and independent ADC boards, one for each optical trap (A and B). The ADC board receives the analog data from the PSDs (position and force) and converts them into a digital signal. The ADC board has a sub-board called Pre-amplification (or Preamp) board that receives the 4 analog current signals (the 4 electrodes) from one PSD and converts them into 3 voltage signals: the $ x$ and $ y$ position and the total intensity (or PSDSum) of the beam. These 3 signals are converted into digital units by an AD converter. The ADC board is connected to its corresponding TrapPic in the Main board by a Serial Peripheral Interface (SPI) bus.

Digital to Analog Converter (DAC) board.
This board receives the orders from the TrapPics in the main board and sends a voltage to the piezoelectric crystals of the wigglers to position the optical trap. It has a DA converter that communicates with the TrapPics via SPI. The DA converter outputs a voltage that is stabilized by 4 Operational Amplifiers (op-amps) that keep the 4 piezos ($ x$ and $ y$ for traps A and B) at the desired voltage.

Motor board.
The motor board controls the motorized stage. It has a microprocessor (MotorPic) that communicates with the ComPic in the main board via SPI. The MotorPic has two main functions. The first one consists in moving the 3 motors of the $ xyz$ stage using 3 independent H-bridges. These are chips that allow to invert the direction of movement of the motor. The velocity of the motor is controlled by the Pulse Width Modulation (PWM) module of the MotorPic, which sends pulses of voltage of different frequencies to the motor. This allows to accurately control the amount of power given to the motor. The second function of the MotorPic is to measure the position of the motors. Each motor (Thorlabs Z606) has a shaft encoder that turns with the screw and sends pulses to a 24-bit counter. The counter reads the pulses and indicates the relative rotation of the motor, which is given in a 24 bit binary number. So the MotorPic reads this number to measure the position of the motor. It allows the MotorPic to perform feedback protocols such as Goto functions, in which the motor is running until a certain position is reached. Finally, the MotorPic also controls the blue LED that illuminates the optical system.

The digital processing of data is mainly performed by the 4 microcontrollers (ComPic, 2 TrapPics and MotorPic). A microcontroller (PIC) is a small processor capable of performing multiple tasks, including mathematical operations, time management, analog to digital conversions, parallel and serial communication and data storage. The list of operations that a PIC has to perform is known as firmware and it is written in standard C or assembly coding languages. The firmware is compiled and burn into the internal memory of the PIC. Appendix C.5 contains an expanded description of the firmware and connections of the PICs in each electronic board.

Table 2.1 summarizes the most relevant characteristics of the electronic controller.

Table 2.1: Specifications of the electronic controller.
Parameter Value
Analog data bandwidth $ \sim$1 MHz
PIC internal clock 10 MHz
Sampling rate 4 kHz
Feedback running frequency 4 kHz
Digital data bandwidth 1 kHz
16-bit data channels psdX, psdY, psdSUM, iris
  leverX, leverY, leverSUM
32-bit data channels motorX, motorY, motorZ
ADC force resolution $ >$ 0.01 pN
Maximum detectable force $ <$ 400 pN
ADC distance resolution $ >$ 0.1 nm
Maximum detectable distance $ <$ 12 $ \mu $m
Piezo update frequency 4 kHz
Wiggler relaxation time $ <$1 ms

JM Huguet 2014-02-12