| 1 | Back to main [[BioCompoundSensor]] |
| 2 | |
| 3 | This page provides implementation details for Prototype II for the designers. |
| 4 | |
| 5 | A sine wave with 16-bit precision will be pre-loaded in a 512-word block RAM on the FPGA. |
| 6 | A programmable ''''phase increment''' register controls the stimulus frequency. |
| 7 | At the maximum 100Hz frequency, the waveform DAC will be updated from the RAM |
| 8 | at 51.2kHz. An ADC will measure the current from the reference and active devices |
| 9 | alternately at 51.2kHz, providing a new measurement of each at 25.6kHz. |
| 10 | This will be accomplished by operating the AD7682 ADC in a mode where it takes |
| 11 | samples alternately on two inputs. |
| 12 | |
| 13 | As each sample is acquired, it will be multiplied by both the in-phase (sin) |
| 14 | and quadrature (cos) values retrieved from the RAM, and the results added to a 24-bit |
| 15 | accumulator. Four accumulators are required (reference sin, reference cos, active sin, |
| 16 | active cos). Once per stimulus cycle (maximum 100Hz) the four accumulators are zeroed |
| 17 | and the four 32-bit values transferred to the microcontroller. |
| 18 | |
| 19 | In addition, the raw samples are stored in an additional block ram which may be read |
| 20 | by the microcontroller for diagnostic purposes. |
| 21 | |
| 22 | = PCB Documentation = |
| 23 | * [http://ohm.bu.edu/~pbohn/Bio_Compound_Sensor/Documentation/ Design Documentation] |
| 24 | * [http://ohm.bu.edu/~pbohn/Bio_Compound_Sensor/Design_Files/Gerber/ Gerber Files] |
| 25 | * Schematic: [http://ohm.bu.edu/~hazen/BioSensor/Proto2/bill_sch.pdf bill_sch.pdf] |
| 26 | • [http://ohm.bu.edu/~hazen/BioSensor/Proto2/schematic.txt Notes] • [[SchematicRevisions]] |
| 27 | |
| 28 | = Firmware = |
| 29 | |
| 30 | == Documentation == |
| 31 | |
| 32 | * Interface Protocol Specification: [http://ohm.bu.edu/~hazen/BioSensor/Proto2/PicoBlazeRequirements_App_6Feb.pdf PicoBlazeRequirements_App_6Feb.pdf] |
| 33 | * List of signals: [http://ohm.bu.edu/~hazen/BioSensor/FPGA_signals.txt FPGA_signals.txt] |
| 34 | * BioSensor How to Guide: [http://ohm.bu.edu/~pbohn/Bio_Compound_Sensor/Documentation/bio_howto_2009-04-01.pdf bio_howto_2009-04-01.pdf] |
| 35 | * List of registers: [http://ohm.bu.edu/~pbohn/Bio_Compound_Sensor/Documentation/bio_regs_Apr08.pdf bio_regs_Apr08.pdf] |
| 36 | |
| 37 | == Source Code == |
| 38 | |
| 39 | === Working Code === |
| 40 | |
| 41 | * [http://ohm.bu.edu/~hazen/BioSensor/SourceCode/PicoBlaze_2009-05-01.zip PicoBlaze_2009-05-01.zip] |
| 42 | Working version with one significant known bug in "AC" command (repeats measurements) |
| 43 | |
| 44 | === Test Versions === |
| 45 | |
| 46 | * ** [http://ohm.bu.edu/~pbohn/Bio_Compound_Sensor/Design_Files/backup_xilinix/ BioSensor Firmware] |
| 47 | * Firmware for testing the PicoBlaze software |
| 48 | * BioSensor_pcbv1 [http://ohm.bu.edu/~hazen/BioSensor/SourceCode/BioSensor_pcbv1.psm .psm] [http://ohm.bu.edu/~hazen/BioSensor/SourceCode/BioSensor_pcbv1.vhd .vhd] |
| 49 | * [http://ohm.bu.edu/~hazen/BioSensor/SourceCode/SoftwareTest_2009-03-11.tar.gz SoftwareTest_2009-03-11.tar.gz] |
| 50 | * [http://ohm.bu.edu/~hazen/BioSensor/SourceCode/SoftwareTest_2009-02-11.zip SoftwareTest_2009-02-11.zip] |
| 51 | * [http://ohm.bu.edu/~hazen/BioSensor/SourceCode/SoftwareTest_2009-02-11.tar.gz SoftwareTest_2009-02-11.tar.gz] |
| 52 | |
| 53 | The FPGA logic (designed by Bill) will provide the following: |
| 54 | |
| 55 | * Interface to 4-output DC bias DAC |
| 56 | * Interface to 2-output offset cancel DAC (may be combined with above) |
| 57 | * Waveform BRAM to hold 256-sample 16-bit sinusoidal waveform |
| 58 | * Logic to drive an AC DAC from above at a programmable rate (1-100Hz waveform rate, |
| 59 | 256Hz-25.6kHz sample rate) |
| 60 | * Logic to read out at the same sample rate one multiplexed ADC reading |
| 61 | the AC current waveform(s) measured on the samples. The ADC will provide |
| 62 | one or two 16-bit samples (reference and active separately, or the difference). |
| 63 | The ADC outputs will go to two destinations: |
| 64 | * 1. Multiply/accumulate logic which will multiply the samples by the sin and cos |
| 65 | outputs from the waveform generator and accumulate a 24-bit sum. There will |
| 66 | be a total of 4 such sums (Active sin, active cos, reference sin, reference cos) |
| 67 | produced once per cycle and made available to the PicoBlaze |
| 68 | * 2. A block ram which can hold one complete waveform (256 samples) of 2x16 bits each. |
| 69 | * A control register with bits for gain select, multiplexer settings and mode selects |
| 70 | * A status register of some sort |
| 71 | |
| 72 | The PicoBlaze interface will be bus-oriented, as described here: [[BioDelayGenerator]] |
| 73 | except that the address will be expanded to 7 bits. |
| 74 | |
| 75 | = PCB Components = |
| 76 | |
| 77 | * [http://focus.ti.com/lit/ds/symlink/dac7564.pdf DAC7564] |
| 78 | * [http://focus.ti.com/lit/ds/symlink/dac7551.pdf DAC7551] |
| 79 | * [http://focus.ti.com/lit/ds/symlink/tlv5638.pdf TLV5638] |
| 80 | * [http://ohm.bu.edu/~hazen/DataSheets/AD/AD7682_7689.pdf AD7682] |
| 81 | * 8 current-sensitive amplifiers with switchable 10x gain (wired to 4 inputs each on the ADCs) |
| 82 | * 8 100x gain voltage amplifiers with offset cancel input from DAC |
| 83 | * A Spartan-3AN FPGA (probably an XC3S50AN-TQ144). |
| 84 | * An RS-232 interface |
| 85 | * A crystal oscillator (50MHz?) |
| 86 | * Voltage regulators to power everything from +4.5, -4.5V from batteries or external power |
| 87 | * LEDs / buttons |
| 88 | * Connectors: |
| 89 | * Carrier PCB (two 12-pin headers) |
| 90 | * DB-9 for RS-232 |
| 91 | * 2mm round coax jack (or similar) for external power |
| 92 | * 4-pin Molex for battery power |
| 93 | * Auxiliary connector (for i.e. LCD character display) |
| 94 | |
| 95 | = LCD Display = |
| 96 | |
| 97 | An LCD display may be added. We have a Digilent PMOD-CLP [http://www.digilentinc.com/Data/Products/PMOD-CLP/PmodCLP_rm_RevA.pdf (data sheet)]. This uses the KS0066 controller from Samsung [http://ohm.bu.edu/~hazen/DataSheets/Samsung/KS0066_datasheet.pdf (data sheet)] |
| 98 | operating in 4-bit mode is available |
| 99 | [http://www.aut.bme.hu/VillamosSzakiranyBSc/files/EUKs0066.pdf here] |
| 100 | |
| 101 | |