This page is part of the [[optical:spy1|Spy1 construction tutorial]]. ====== Control of acousto-optic deflection using Direct Digital Synthesis ====== Contributed by [[dejan@salk.edu|Dejan Vučinić]] [[http://www.analog.com|Analog Devices]] sell a wide variety of chips for [[http://www.analog.com/en/subCat/0,2879,770%255F843%255F0%255F%255F0%255F,00.html|Direct Digital Synthesis (DDS)]] of radio-frequency signals. Two-dimensional acousto-optic deflection requires at least two independent signal sources, but having more than two synchronized generators greatly simplifies the synchronization with the data acquisition system since an additional output can be used to independently trigger the start of acquisition with deflector-specific latencies. The [[http://www.analog.com/en/prod/0%2C2877%2CAD9959%2C00.html|AD9959]] device has four independent outputs that can generate frequencies between zero and 250 MHz. This frequency range is well matched to the bandwidths of slow-shear TeO2 deflectors, which typically operate under 100 MHz. [[http://www.analog.com|Analog]] sells a USB-based evaluation board with this chip, AD9959/PCBZ, that can be used to build a scan controller in a hurry. {{front_before.jpg?100}}{{back_before.jpg?100}} The board, as shipped, requires several modifications before it can be used. Described here is one way to do it, which requires basic tools and skill with rework of surface-mounted electronic components. (An alternative way that wouldn't require soldering might be to use an external clock source and a lab power supply; if you try this route please report your experience here.) 1. Power supply The AD9959/PCBZ board provides two 3.3 V inputs and one 1.8 V input. One 3.3 V input is for the USB controller, the other is for the AD9959 chip core, while the final 1.8 V input is used to power the DAC. A lab power supply with two or three outputs can be used for this task, but is clearly an overkill. [[http://www.ti.com|Texas Instruments]] make a small power regulator meant for FPGAs that has three independent outputs which can be set between 1.2 V and the input voltage. This chip is sold on an evaluation board [[http://focus.ti.com/docs/toolsw/folders/print/tps75003evm-092.html|TPS75003EVM]] which you can buy [[http://www.ti-estore.com/Merchant2/merchant.mvc?Screen=PROD&Product_Code=TPS75003EVM-092|here]]. This power supply can be powered by a small wall wart that puts out anywhere between 3.3 V and 6 V of DC at half an amp or so. (Note: USB bus doesn't have enough juice for this, been tried.) The TPS75003EVM evaluation board ships with the outputs set to 1.2 V, 2.5 V and 3.3 V. To set the correct voltages for the DDS card replace the resistors in the voltage dividers for outputs 1 and 3. Output 1 is controlled by resistors R10 (33 kΩ) and R11 (68 kΩ) and the capacitor C11 (10 pF). Output 3 is controlled by resistors R6 (68 kΩ) and R7 (12 kΩ). Consult the schematic on page 11 of the user's guide that arrives with the module. With a new board: solder a power supply to the VIN and GND leads on the board; orienting the board with the power source to your left set jmp1 to "after vo2", or, the left position, set jmp2 to "after vo3", down position, and set jmp3 with a 5 V power supply, Vout1, Vout2 and Vout 3 should be 1.2, 3.3 and 2.5 respectively; Vout2 is already the right voltage for both the VCC_USB(3.3V) and the DVDD_IO(3.3V) prongs on the AD9959 2. Clock The AD9959/PCBZ arrives configured for use with an external clock source, such as an [[http://www.analog.com/en/prod/0,2877,AD9540,00.html|AD9540]]. Traces are provided on the board for a crystal to use with the built-in oscillator, but several modifications must be made for the chip to clock itself. Consult the schematic on page 24 of the [[http://www.analog.com/UploadedFiles/Evaluation_Boards_Tools/57418637811849AD9959_pcb_0.pdf|evaluation board datasheet]]. * remove the capacitors C21 and C22; * solder jumper wires across resistor locations R52 and R53; * add the crystal X2 (25 MHz) and capacitors C66 and C67 (39 pF); * supply power to the CLK_VDD pin, for instance by wiring the center pin of the connector J10 to the 1.8 V power supply pin; * move the jumper W11 from the REF_CLK default to the CRYSTAL position; 3. Test Here is what a finished scan controller could look like: {{front_after.jpg?100}}{{back_after.jpg?100}} In this example the power supply board is glued to the empty area of the DDS board. Before testing the setup make sure jumper W7 is in the "PC" position, jumpers W1, W2, W3 and W10 are shorted and jumpers W4, W5 and W6 are open. There are two ways to test the board: you can use the device drivers and the software supplied with the AD9959/PCBZ kit, or you can download the ''neurospy'' software and the device drivers from [[http://neurospy.org]] and run a test protocol, as shown here: {{patient_survived.jpg?100}}