Quantum Cryptography and Laser Range Detector - Lecture Notes | ECE 445, Study Guides, Projects, Research of Electrical and Electronics Engineering

Material Type: Project; Class: Senior Design Project Lab; Subject: Electrical and Computer Engr; University: University of Illinois - Urbana-Champaign; Term: Fall 2006;

Typology: Study Guides, Projects, Research

Pre 2010

Uploaded on 03/16/2009

koofers-user-hir
koofers-user-hir 🇺🇸

10 documents

1 / 32

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
HIGH SPEED DATA MEASURER:
QUANTUM CRYPTOGRAPHY AND LASER RANGE DETECTOR
By
Mike Noone
KanKan Yu
Charles Ruiz
ECE 445: SENIOR DESIGN PROJECT
FALL 2006
TA : Myra Nam
04 December 2006
Project No. 19
ABSTRACT
i
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20

Partial preview of the text

Download Quantum Cryptography and Laser Range Detector - Lecture Notes | ECE 445 and more Study Guides, Projects, Research Electrical and Electronics Engineering in PDF only on Docsity!

HIGH SPEED DATA MEASURER:

QUANTUM CRYPTOGRAPHY AND LASER RANGE DETECTOR

By Mike Noone KanKan Yu Charles Ruiz ECE 445: SENIOR DESIGN PROJECT FALL 2006 TA : Myra Nam 04 December 2006 Project No. 19 ABSTRACT i

For our senior project, we designed two different but related devices. First, we wanted to build a device that could measure the amount of time that passed between rising edges of pulses. These pulses are coming from a photodetector that is watching for single photons being sent from an LED. These photons are coming at purely random intervals. By measuring the time passed between these pulses purely random data that can be used in conjunction with quantum cryptography can be generated. The driving force behind the data measurer is the Acam TDC-GPX chip which we chose for its high speed and precision. We designed this device at the request of Prof. Kwiat from the physics department who will use it for continuing his research in quantum cryptography. Secondly, we designed a scanning laser range finder, a seemingly completely unrelated project. This laser range finder relies on the timing circuit to measure the time between the transmission of a laser pulse and the return of that pulse. The range from the range finder to the object reflecting the pulse can be extrapolated from the time measured by making the assumptions that both the range finder and the object are not moving, and that the speed of light is constant. The range finder can then be attached to a scanning gimbal mount, so that a 3D image of an area can be constructed. Such a device could be used in the computer vision systems field as a low cost but competitive rival to current products. Our current design is theoretical in nature, and prototypes are still being tested and improved. We have discovered inconsistencies between advertised and functional ratings that require major changes to our prototypes. With the testing and debugging of our prototype, we continuously build our knowledge of the chip set we use and of the construction of small high speed circuits. Detailed notes regarding our thoughts and information extracted from our prototype are found in the conclusion. We used two different estimation models to calculate the project cost. For software estimates, we used the COCOMO II estimation model. For the hardware portion, we used Professor Makela’s 2.5 estimation model. The two totals combined is the amount we used for total project cost. TABLE OF CONTENTS ii

1. INTRODUCTION

We have designed a high speed data measurer that measures the time between a single crisp laser pulse and its reflected signal. The data measurer is the core piece of technology that is to be used in conjunction with a random number generator for quantum cryptography and a scanning laser range detector. The random number generator, as requested by Professor Kwiat, requires the technology of the high speed data measurer to calculate the time between the rising edge of the pulse sent and its received reflection. The driving force behind the data measurer is the ACAM TDC-GPX chip chosen for its high speed and precision. The scanning laser range detector demonstrates the further extensibility of the high speed data measurer. The data collected by the data measurer can be calculated into distance using the speed of light and the time between sent and received laser pulses. This specific application is useful in the computer vision system market with an equal-quality, low-cost appeal in comparison to competitor products.

1.1 Purpose

Professor Kwiat sought a device that can calculate times between small interval laser pulses so it may be used with his random number generator for his quantum cryptography research. Our team found Professor Kwiat’s quantum cryptography research to be interesting and accepted his proposal both as a group and as personal engineering challenges. We expanded the proposed project to demonstrate the value in designing such a circuit by featuring its extensibility for other applications such as a laser range detector. Current commercial range detectors have extremely high costs for their accuracy and high resolution imaging in robotic systems. Our high speed data measurer is intended to have both quality and accurate readings, and low production cost.

1.2 Specifications

The project consists of six different modules as seen in Diagram A. (all diagrams and figures appear in the appendices). Section 1.3 has detailed descriptions of each of the modules. The laser diode driver and optics combined needed to produce a crisp rising edge to minimize error. The laser diode needed a culminated

beam and a fast rise time. Similarly, the laser diode driver circuit also required a fast rise time to match the laser diode to produce the fast rising edge. In addition, the laser unit (consisting of optics and laser driver) needed to match the wavelength specified by the receiver circuit. For the timing circuit, Professor Kwiat desires that the timing circuit is ready for a new sample within 20ns of receiving the previous sample (as stated by Professor Kwiat). As for the resolution, the limiting application is actually the laser range detector. Equation 1.1 shows the time required for one-centimeter resolution. t = d / v (from v = d / t) (1.1) c = Speed of light = 299792458 [m/s] t = (0.01 [m] * 2) / 299792458 [m/s] t = 67 picoseconds 67 picoseconds gives us the resolution we desire assuming ideal conditions. As long as we are above 67 picoseconds, the timing circuit will operate for both Professor Kwiat’s random number generator and the laser range detector.

1.3 Subprojects

The modules were designed in the following order organized from highest to lowest priority.

1.3.1 Timing Circuit

The Timing circuit analyzes the data from the Laser Driver circuit and the Detector circuit to calculate the time between two rising edges of the laser pulse.

1.3.2 Laser Optics

The laser optics portion of the design will consist of optical filtering tools to provide a sharp narrow bandwidth laser.

1.3.3 Laser Driver Circuit

The laser driver circuit will take in a differential signal and translate the signal into a sharp pulse of current to drive the selected laser diode.

1.3.4 Control Module

This unit synchronizes all components and processes the received data from the timing circuit and transmits processed data to a computer. The control module tells the scanning mechanism which angle to turn

2. DESIGN PROCEDURE

2.1 Timing Circuit

The timing circuit needs to be able to measure the distance between the rising edges of two pulses. These pulses come in on separate “start” and “stop” signals. They are TTL pulses, are active high, and are guaranteed high for at least 20ns. The timing circuit needs to send measured times to the control module within about 1 microsecond. Accuracy of these measured times needs to be about 50 picoseconds, but preferably much better than this.

2.2 Laser Optics

The laser optics were needed to produce a collimated beam of light that would allow high precision for the targeting of objects, and a powerful enough beam that the scattered signal would be able to be picked up by the photodiode along with the detector circuit. The initial design task we faced for the laser optics was in what wavelength we wanted to work at. We could work in the visible light range (400nm- 750nm) or work in the infrared light range (750nm – 1000 nm). The visible light range had the advantage of being easy to work with due to the fact that the signals were visible, while the infrared light range had the advantage of being commonly used for high speed data transmission. We finally chose the HL6724MG Laser Diode which is a visible laser diode that operates at 670 nm [3]. The choice of the laser diode also had to fall within a reasonable range of the photo detector range of detectable frequencies. However, our main concerns with the laser diode were to collimate the beam and provide maximum power to the scattering.

2.3 Laser Driver Circuit

The laser driver circuit must be able to produce a quick rising edge for the modulations current and be able to drive the selected laser diode. The laser diode we selected needed a relatively large operating current. Most laser driver chips we had found could output a modulation current of around 25 mA. However, the laser diodes that met our specific requirements needed an input current beyond 25 mA. We had to look for another laser driver chip that could output up to 90 mA but still maintain a relatively fast rise time. In the end, we decided upon the ADN2870 chip which satisfied both of these requirements.

The ADN2870 requires a 3.3V DC power source and about 30 mA to be operational [1]. Bias and differential modulation currents are mirrored so that they can be easily monitored using pinsetters. The chip comes with an automatic laser shutdown which should be triggered when the ADN2870 turns on FAIL when it has detected irregular or invalid operational settings. Due to the chip’s sensitive nature, we had to make sure that all Vcc had decoupling capacitors so we avoid unexpected behaviors to properly test and debug the circuit when necessary. In addition, we chose to use a potentiometer for varying resistance to accommodate whichever laser diode was selected.

2.4 Control Module

The control module was needed to communicate the TDC-GPX, ADN2870, and computer so everything worked cohesively. The TDC- GPX was to go through a series of steps to put the chip in M-Mode, which allows the chip to perform in maximum resolution. The ADN was to be triggered when the TDC-GPX was set, at which point the laser diode would be pulsed. After the TDC-GPX communicated to the control module that a start and stop time had been received, the time sent to the control module was to be sent serially to the computer for processing. The control module was implemented using a Spartan 3 board. The three expansion connectors, RS-232 serial port, and availability of switches and LEDs led itself as an easy to use control module. The Spartan 3 board was programmed using the VHDL programming language. The three expansion connectors represented up to 120 pins that could be used for sending and receiving information [5]. These 120 pins were more than enough for the number of signals needed to interface with the TDC-GPX and ADN2870. The RS-232 serial port provided an easy means of connecting with a computer. Serial communication consisted of using a start bit, data bits, and stop bit to successfully transmit data to the computer. The Spartan3 did not receive any information from the computer. Lastly, the LEDs and switches on the Spartan 3 provided a quick and easy means of debugging the board.

2.5 Detector Circuit

The task for the detector circuit was initially identified as filtering the wavelength of the laser diode used. However, the real problem faced was to provide a fast and reliable signal to the timing circuit. The optics portion of the problem was identified and addressed, as well as the components necessary to build a detector circuit. The PNZ300ND provided a suitable match for the HL6724MG. Even though the peak

a flip flop. The start pulse would latch the flip flop, while the stop pulse would reset it. The non-inverted output of the flip flop would drive the gate of a mosfet, which would power a circuit consisting of a resistor and a capacitor. When the latch output went high the mosfet would turn on, and thus start charging the capacitor. When the latch output was reset by the stop pulse, the capacitor would stop charging. We could then measure the voltage across the capacitor with an analog to digital converter, and by knowing that the voltage was equal to Vcc * (1-e^t/(RC)^ ), we could extrapolate the amount of time that passed between the start and stop pulses. You can see what this design looks like in Diagram B.3. Though this design initially seemed to be the most simple and logical – it was severely limited by the propagation delays of the flip flop, as well as the capacitances of the flip flop inputs and the mosfet gate. Though we never tested the circuit, calculations showed that it might, at best, be accurate into the nano second range, three orders of magnitude to inaccurate for our needs. Thus we looked at the special purpose TDC (Time to Digital Converter) chips made by Acam. First we looked at the fairly low cost ($28/chip in single quantities) TDC-GP2. It has a resolution of 50 picoseconds, which as previous calculations showed is enough for our needs. It comes in a QFN (Quad Flat pack No leads) 32 package, which is straight forward enough to solder. External components necessary for the chip are fairly simple, so it looked to be a very easy to use device. Unfortunately, it uses SPI (Serial Peripheral Interface) with a top speed of 25 MHz. We found that it would take approximately 1μs to read out a time measurement from the chip. Though this is easily fast enough for the laser range finder – it is too slow for Prof. Kwiat’s random number generator, so we had to continue our search. [9] Next we looked at another TDC made by Acam, the TDC-GPX. The flagship TDC device of Acam, it costs a hefty $187 in single quantities. It has a minimum resolution of 10 picoseconds, which is more than enough for our needs. It comes in a TQFP (Thin Quad Flat Pack) 100 package which is a .5mm leaded package which is easy to solder. It requires very complicated external components to maintain its high accuracy. It has a 28 bit parallel interface that can run at up to 40 Mhz. Thus it meets all the necessary specs for both the laser range finder and the random number generator, and so we chose it for our final design. [6] Choosing the TDC-GPX was merely the first salvo fired in a long uphill battle to get the timing circuit finished. Next we had to design all of the accompanying parts to power and control the TDC-GPX. All power

supply lines had to be kept incredibly clean, parts count needed to be kept low and parts needed to be kept small (so as to keep the final board as small as possible, with traces as short as possible). For the main 3.3V power supply, we chose to use Texas Instrument’s TPS79330 due to its ultra low noise (32μVRMS) and low drop-out voltage (112mV). For the other power supplies, we decided to use the Acam recommended design which is a feedback based linear regulation circuit which is partially integrated into the TDC-GPX itself and relies on external LM1117 adjustable linear regulators. For all supplies extensive decoupling was used. We used the Acam recommended 47 microfarad ceramic capacitors in 1210 surface mount packages. You can see the final schematic in Diagram B.4. Next we had to make a layout for the board. Where as it is fairly common to first prototype a board on a breadboard before making a PCB, we decided to skip over this phase due to the incredible high speed and sensitivity of the chip. We felt that the capacitance of a breadboard would render the TDC-GPX nearly useless. We designed the layout so that the ground plane on the bottom layer was as large and solid as possible, so that the signal traces had as little noise around them as possible, so that all trace lengths (especially the supply and signal traces) were as short as possible, so that all traces that had to cross each other were at right angles to each other, and so that all differential traces were matched in length and shape to give them identical transmission line characteristics. You can see the final layout in Diagram E.2 as well as the final printed circuit board in Diagram E.3.

3.2 Laser Optics

The HL6724MG was to be collimated using a the equation relating the distance of an object (d 1 ), the distance of its image (d 2 ) and its focal length (f): 1/d 1 + 1/d 2 = 1/f (3.1) Using this equation, by placing the laser diode at the focal length, the image is seen at ∞. More importantly to us, placing the laser at a distance equal to the focal length of the lens, a collimated beam is produced. The first setup used was with a larger lens with a focal length of about 10 cm. This provided an easy means to practice collimating the beam, and once this was accomplished with satisfactory results, the laser diode was collimated with a laser pointer lens with a focal length of approximately 4 mm. The final two characteristics tested were the beam divergence and the detection vs. distance of the HL6724MG.

We restricted the size of the circuit board to be as small as possible so that we avoid the possibility of reflection. Trace lengths were kept to a minimum and the very few traces were put on the ground plane of the PCB board. Diagram B.2 shows the final draft of the board layout.

3.4 Control Module

The control module was set out to be the piece of hardware that connected and drove the timing circuit, laser driver circuit, and computer. The control flow diagram (Diagram C.2), indicates the many reads and writes needed from the TDC-GPX. Each read and write command consisted of multiple steps as illustrated in the TDC-GPX datasheet [6]. The general step for a read/write was: -pulse CSN low, define Addr, and define Data (Write Only) -pulse WRN or RDN low -send or receive Data -pulse CSN high -pulse WRN/RDN high -receive Empty Flag = high (Read Only) Since Data was to be coming both in and out of the control module, this bidirectional signal was implemented using a tri-state buffer. All other signals were either inputs or outputs, so their implementation was much simpler and were defined as either in or out lines in Xilinx. The Laser Trigger state seen in Diagram C.2 goes through the process of interacting with the ADN2870 and is shown in greater detail in Diagram C.1. The laser driver state machine tells the ADN2870 when to pulse the laser high, and for our implementation we were to pulse the laser ten times, and hold each pulse for a total of 75 clock cycles (1/50MHz *75 = 1.5 μs), because the laser diode chosen needed to be s), because the laser diode chosen needed to be held on for at least 1 μs), because the laser diode chosen needed to be s [3]. If the laser driver circuit were to fail at any time, the state machine will go to a laser shutdown state where it will stay until the ADN2870 tells the control module that the chip is no longer failing. However, if no fail is encountered then the data is processed. The time is encoded in a 23 bit binary number. It is an integer with a LSB width defined by the setting of the resolution adjust unit, divided by MSet: BIN = Tref x 2refclkdiv^ / [216 x hsdiv x 3 x (MSet +1) ] (3.4)

The time data was sent serially to the computer. This was implemented by using a shift register that would take the time bits and shift through them to send them one at a time through the serial port. The serial output was set as 8N1 or 8 data bits, no parity, and 1 stop bit. This is the most common usage of the serial port on microcomputers.

3.5 Detector Circuit

The detector circuit, excluding the optics, consists of a current to voltage converter circuit as well as a signal pulse generator. The purpose of the current to voltage converter circuit is to convert the current output from the photo diode to a voltage to be sent to the TDC- GPX. The design criteria of this circuit is to convert a 3-5mA current to a 3.3V output. Research went into different types of current to voltage converter circuits, such as the transimpedance amplifier detector circuit or high impedance detector circuit. The purpose of the signal pulse generator is to lifted from any background noise. The most common method to separate the signal from noise is with a voltage comparator. Again with dealing with such a high speed design, the functionality of the components must be kept with speed in mind, thus the component used for the voltage comparator was assigned to be ADCMP582. This device meets the requirements by adding a 0.15 ns propagation delay to the signal sent to the timing circuit [4]. The detector circuit was left incomplete as it is still in the design phase. The allotted time to be spent on it had started to conflict with the time needed to be spent on the control module, which was needed to successfully demo the timing circuit and the laser driver circuit.

3.6 Scanning Mechanism

For the hardware of the scanning mechanism, we chose to use servo motors that are designed for use with hobbyist’s radio control models (such as cars, airplanes, helicopters, and boats). These devices have a single input – a PWM signal. The duty cycle of this PWM signal sets the angle of the output shaft of the servo motor. Thus, we felt this would be a very straightforward way to implement a scanning mechanism. For our scanning control software, we first had to find a way to make a GUI on a Windows XP system. We wanted our software to be compile

4.1.1 Timing Circuit

Testing for the timing circuit did not get as far as we had hoped. The most basic test – to show that nothing burnt up when powered and that all supply lines were correct, was a failure. We initially slowly connected a 5V supply to the 5V input of the timing circuit while placing a 100ma current limit on it (as current should be in the tens of milliamps). The board immediately hit the 100ma cap when powered, with most all of the power being dissipated across one of the LM adjustable linear regulators. All supply lines were well under the voltage that we expected them to be. The primary 3.3V supply was about 1V, while the secondary LM1117 controlled 3.3V supply was about 2V. We slowly ramped up the current, watching to make sure that no supply line ever went to high. None ever did. Eventually we powered the board with no current limit. Current went to 1.5A immediately, but exponentially decreased for a couple minutes before settling at about 500mA. We found that almost all of this power was dissipated across one of the LM1117 regulators. The primary 3.3V supply was stable at about 1.42V and the secondary 3.3V supply was stable at 2.86V. We checked all soldering and found it to be OK. We checked all pin outs and reference designs, and our board matched them perfectly. At the time of this writing, we have yet to figure out what is wrong with our power supply.

4.1.2 Laser Optics

Test 1 The first test conducted was to measure the beam divergence at different distances to gauge whether the beam was collimated. This was done by measuring the diameter of the laser on a piece of paper vs the distance of the paper to the collimation lens. The test results can be seen in Diagram D.4, and provide a beam divergence of 0.0438o. This is a huge improvement over the 10o and 30o horizontal and vertical beam divergences for the laser diode without collimation as stated in the data sheet for the HL6724MG [3]. Test 2 The second test conducted was to measure the current produced on a photo detector. The final photo diode used was the PNZ300-ND. The original tests conducted were using back scattered light from the laser diode and trying to detect a signal. However, the signal was too weak to be detected, whether it was in the light or dark. This final set of results was produced by using a mirror to reflect the signal back to the photo diode in the dark. This required exact

precision as too much of a degree of error led to no signal received on the photo diode. The results from this test can be seen in Diagram D.5. A best fit line shows a quadratic decrease in the mA produced on the photo diode as a function of distance. These results proved that the collimated beam contained most of the initial signal energy.

4.1.3 Laser Driver Circuit

Test 1 The first test we conducted on this driver circuit is to connect a power supply to the circuit to see if the circuit would overheat or meltdown. We connected the Analog power supplies which we used to limit the voltage and current. The initial test had a limit of 3.3V with the current limit sweeping from 1mA to 30mA. In our initial sweep, we discovered that there had been a short across the Vcc and Ground since there was virtually no voltage drop. After we had fixed the short circuit, we performed the test again, and we had successfully put 30 mA and 3.3 V into the circuit without damaging the components. Test 2 The next test for the driver circuit was in response to the first test. Since we experienced a short across Vcc and Ground, we double checked all the pins and inputs on the circuit using a multimeter and a microscope to make sure the soldering did not cause short circuits on the PCB board. We are happy to report that there are no shorts on the circuit board. Test 3 The next test is the fail test (open circuit test). Without a load, the driver circuit is supposed to skip immediately to fail. Omitting the laser diode in this test, the current was swept from 1mA to 30 mA in 1mA increments. The fail light started to light up around 19 mA and was at its brightest at 25mA. We were happy with the results so far. Test 4 The final test was to connect the laser diode to see if high inputs would trigger turn the diode on. We saved this until near the end so that we could be sure that we would not immediately burn out the laser diode. We connected the laser diode to the circuit and sent a high voltage through DATAP and a low voltage through DATAN (which should turn the diode on) and ran the circuit at 3.3V and 30mA limit. Unfortunately, the laser diode failed to turn on. However, the fail light came on immediately.

evident that the control module is performing an indefinite read until the interrupt flag is triggered, which in this case is when the Datain read from the TDC-GPX is 0x0020000. Once this is done, the state machine is able to carry on with the rest of the tasks, and it can be seen that it stops performing an indefinite read loop as the interrupt flag is already triggered. Test 4 The fourth test conducted on the control module was to perform communication from the FPGA to a computer through the serial port. A simple way to test this was to use the program Terminal v1.9b, and send over a known byte and to see whether or not this information was picked up by the Terminal program on the computer. The two known bytes sent were 0x4B and 0x37. From Diagram D.6 it is shown that these were the bytes in fact detected by the computer through the serial port. The values were just sent repeatedly when the user pushed down a button on the FPGA board. While this is not exactly how the control module will perform, the purpose of the test was to determine whether correct information was sent from the FPGA to the computer through the serial port. This was done successfully, and the serial port code was modified to work within the constraints of sending over the time data to the computer. However, the final control module was not able to by connected to the TDC-GPX or ADN2870 because neither were fully functional by the time of the demo.

4.1.5 Detector Circuit

The optics portion of the detector circuit was verified to work well with the laser diode chosen as shown in the verification of the laser optics. However, the detector circuit design was not finished as time constraints led the group’s concentration to interfacing the timing circuit and laser driver circuit with the control module.

4.1.6 Scanning Mechanism

We did not have enough time to build the scanning mechanism hardware, so that device was never tested. We tested the software for the device by first sending and receiving data at the same time and verifying that no bytes were missed. This verified that our serial code was working properly. We also made sure that communication with the control board was working properly by having it interpret commands we sent it through the GUI.

4.2 Conclusion

For the Laser Driver Circuit, tests indicate that the circuit seems to be stuck in the fail state. One of the concerns in the design phase was an inconsistency in the datasheet where a sample circuit tied ERREF to Vcc and then mentioned the chip would be in FAIL state if ERREF was tied to Vcc [1]. We were told by an Analog representative that the sample circuits were functional and we made the design choice to follow the sample circuit’s example. Currently the driver circuit operates as designed, which is to stay in the fail state but unfortunately, it is not the intended operation. Further debugging and testing can only be done if we redesign the circuit with ERREF not tied to Vcc.

5. COST

We used two estimation models to calculate the project cost.

5.1 Software Cost Estimate using COCOMO Model

The COCOMO II model is used in current software engineering practices to estimate effort and cost for any size software project [6]. As seen in Equation 5.1, Effort can be calculated with variables ‘a’, ‘b’, a Effort Adjustment Factor Rating (EAF), and the size of the software (measured in kilo lines of code). Effort [months] = [ a (Size)b^ ] (EAF) (5.1)