From 8b6c570a9f6a1befbf38b18e11ce055a4562e591 Mon Sep 17 00:00:00 2001 From: BasedOnTechnology Date: Wed, 27 Oct 2021 11:16:02 -0400 Subject: [PATCH] Moved again --- BOM/66558432.csv | 9 + .gitignore => FPGA_firmware/.gitignore | 0 FPGA_firmware/IQviewer.tcl | 81 + FPGA_firmware/clocks.sdc | 9 + FPGA_firmware/fluorescence_FPGA.qsf | 76 + FPGA_firmware/fluorescence_FPGA.v | 362 + FPGA_firmware/monitor.py | 3 + FPGA_firmware/probe_dump.tcl | 114 + FPGA_firmware/waveformviewer.tcl | 90 + generate.sh | 2 + optical_diagram.dia | Bin 0 -> 921 bytes optical_diagram.svg | 34707 +++++++++++++++++++++++ paper.md | 600 + 13 files changed, 36053 insertions(+) create mode 100644 BOM/66558432.csv rename .gitignore => FPGA_firmware/.gitignore (100%) create mode 100644 FPGA_firmware/IQviewer.tcl create mode 100644 FPGA_firmware/clocks.sdc create mode 100644 FPGA_firmware/fluorescence_FPGA.qsf create mode 100644 FPGA_firmware/fluorescence_FPGA.v create mode 100644 FPGA_firmware/monitor.py create mode 100644 FPGA_firmware/probe_dump.tcl create mode 100644 FPGA_firmware/waveformviewer.tcl create mode 100644 generate.sh create mode 100644 optical_diagram.dia create mode 100644 optical_diagram.svg create mode 100644 paper.md diff --git a/BOM/66558432.csv b/BOM/66558432.csv new file mode 100644 index 0000000..b7e6645 --- /dev/null +++ b/BOM/66558432.csv @@ -0,0 +1,9 @@ +"Index","Quantity","Part Number","Manufacturer Part Number","Description","Customer Reference","Backorder","Unit Price","Extended Price" +"1","1","296-50636-ND","OPA354AIDDAG3","IC OPAMP VFB 1 CIRCUIT 8SOPWRPAD","","0","3.31000","$3.31" +"2","2","3296W-103LF-ND","3296W-1-103LF","TRIMMER 10K OHM 0.5W PC PIN TOP","","0","3.65000","$7.30" +"3","1","296-32292-1-ND","SN74LVC1G123DCTT","IC MULTIVIBRATOR 18.5NS SM8","","0","1.58000","$1.58" +"4","2","296-43611-1-ND","TLV3501AIDR","IC COMP 4.5NS R-R HS 8-SOIC","","0","4.09000","$8.18" +"5","1","LTC6228HS8#PBF-ND","LTC6228HS8#PBF","IC OPAMP GP 1 CIRCUIT 8SO","","0","7.13000","$7.13" +"6","1","1568-1123-ND","BOB-13655","SOIC TO DIP ADAPTER 8PIN 1=4 PCS","","0","4.20000","$4.20" +"7","2","CT94EY104-ND","CT94EY104","TRIMMER 100K OHM 0.5W PC PIN TOP","","0","2.35000","$4.70" +"","","","","","","","Subtotal","$36.40" \ No newline at end of file diff --git a/.gitignore b/FPGA_firmware/.gitignore similarity index 100% rename from .gitignore rename to FPGA_firmware/.gitignore diff --git a/FPGA_firmware/IQviewer.tcl b/FPGA_firmware/IQviewer.tcl new file mode 100644 index 0000000..69180ce --- /dev/null +++ b/FPGA_firmware/IQviewer.tcl @@ -0,0 +1,81 @@ +#See https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/qts/qts_qii53021.pdf +#and https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/qts/qts_qii52003.pdf + +# run with ~/NAS/primary_a/Projects/fpga/prime/quartus/bin/quartus_stp_tcl +# not quartus_sh + +# ~/NAS/primary_a/Projects/fpga/prime/quartus/bin/quartus_stp_tcl -t IQviewer.tcl + +proc pause {{message "Hit Enter to continue ==> "}} { + puts -nonewline $message + flush stdout + gets stdin +} + +proc hex_to_signed {value} { + set sign [expr {($value & 0b10000000000000000000000000000000)}] + set mag [expr {($value & 0b01111111111111111111111111111111)}] + if {$sign==0} { + set exp 0 + } else { + set exp [expr -2**31] + } + set value [expr {$exp + $mag}] + return $value +} +#thanks Quantum0xE7 on SO! + + + + +set usb [lindex [get_hardware_names] 0] +set device_name [lindex [get_device_names -hardware_name $usb] 0] + +start_insystem_source_probe -device_name $device_name -hardware_name $usb + +set output_filename "../eppenwolf/runs/phage_experiment_6/fluorescence_slide_1.csv" + +array set waveform {} + + +while {1} { + + set previous_count_binary [read_probe_data -instance_index 0]; + set I_count_binary [read_probe_data -instance_index 0]; + + while {$I_count_binary == $previous_count_binary} { + puts "Integrating..." + after 1000; + set I_count_binary [read_probe_data -instance_index 0]; + set Q_count_binary [read_probe_data -instance_index 1]; + + } + + binary scan [binary format B64 [format "%064s" $I_count_binary]] W I_count_binary_scanned + binary scan [binary format B64 [format "%064s" $Q_count_binary]] W Q_count_binary_scanned + + set I_count [hex_to_signed $I_count_binary_scanned]; + set Q_count [hex_to_signed $Q_count_binary_scanned]; + + puts $I_count; + puts $Q_count; + + puts [expr { sqrt((double($I_count)*double($I_count)) + (double($Q_count)*double($Q_count))) } ]; + puts [expr { atan( $Q_count / double($I_count)) }]; + + #set addc_bin [read_probe_data -instance_index 1]; + #binary scan [binary format B64 [format "%064s" $addc_bin]] W addc + + pause; + + + +} + + +#set value "11111111111111111111111111111111"; + + + + +#end_interactive_probe; diff --git a/FPGA_firmware/clocks.sdc b/FPGA_firmware/clocks.sdc new file mode 100644 index 0000000..dbeaf3c --- /dev/null +++ b/FPGA_firmware/clocks.sdc @@ -0,0 +1,9 @@ +create_clock -name "clock_50_mhz" -period 20.0ns [get_ports {clock_50_mhz}] +create_clock -name "main_clock" -period 5.0ns [get_ports {main_clock}] + +create_clock -name "PMT_in" -period 5.0ns [get_ports {PMT_in}] +create_clock -name "light_source_pin" -period 300ns [get_ports {light_source_pin}] + + +derive_pll_clocks +derive_clock_uncertainty \ No newline at end of file diff --git a/FPGA_firmware/fluorescence_FPGA.qsf b/FPGA_firmware/fluorescence_FPGA.qsf new file mode 100644 index 0000000..d106f4d --- /dev/null +++ b/FPGA_firmware/fluorescence_FPGA.qsf @@ -0,0 +1,76 @@ +# -------------------------------------------------------------------------- # +# +# Copyright (C) 2018 Intel Corporation. All rights reserved. +# Your use of Intel Corporation's design tools, logic functions +# and other software and tools, and its AMPP partner logic +# functions, and any output files from any of the foregoing +# (including device programming or simulation files), and any +# associated documentation or information are expressly subject +# to the terms and conditions of the Intel Program License +# Subscription Agreement, the Intel Quartus Prime License Agreement, +# the Intel FPGA IP License Agreement, or other applicable license +# agreement, including, without limitation, that your use is for +# the sole purpose of programming logic devices manufactured by +# Intel and sold by Intel or its authorized distributors. Please +# refer to the applicable agreement for further details. +# +# -------------------------------------------------------------------------- # +# +# Quartus Prime +# Version 18.1.0 Build 625 09/12/2018 SJ Lite Edition +# Date created = 00:35:40 November 05, 2020 +# +# -------------------------------------------------------------------------- # +# +# Notes: +# +# 1) The default values for assignments are stored in the file: +# fluorescence_FPGA_assignment_defaults.qdf +# If this file doesn't exist, see file: +# assignment_defaults.qdf +# +# 2) Altera recommends that you do not modify this file. This +# file is updated automatically by the Quartus Prime software +# and any changes you make may be lost or overwritten. +# +# -------------------------------------------------------------------------- # + + +set_global_assignment -name FAMILY "Cyclone IV E" +set_global_assignment -name DEVICE EP4CE22F17C6 +set_global_assignment -name TOP_LEVEL_ENTITY fluorescence_FPGA +set_global_assignment -name ORIGINAL_QUARTUS_VERSION 18.1.0 +set_global_assignment -name PROJECT_CREATION_TIME_DATE "00:35:40 NOVEMBER 05, 2020" +set_global_assignment -name LAST_QUARTUS_VERSION "18.1.0 Lite Edition" +set_global_assignment -name PROJECT_OUTPUT_DIRECTORY output_files +set_global_assignment -name EDA_SIMULATION_TOOL "ModelSim-Altera (Verilog)" +set_global_assignment -name EDA_TIME_SCALE "1 ps" -section_id eda_simulation +set_global_assignment -name EDA_OUTPUT_DATA_FORMAT "VERILOG HDL" -section_id eda_simulation +set_location_assignment PIN_D3 -to light_source_pin +set_location_assignment PIN_R8 -to clock_50_mhz +set_location_assignment PIN_C3 -to PMT_in +set_location_assignment PIN_A3 -to pulse_out_pin +set_location_assignment PIN_A15 -to LEDs[0] +set_location_assignment PIN_A13 -to LEDs[1] +set_location_assignment PIN_B13 -to LEDs[2] +set_location_assignment PIN_A11 -to LEDs[3] +set_location_assignment PIN_D1 -to LEDs[4] +set_location_assignment PIN_F3 -to LEDs[5] +set_location_assignment PIN_B1 -to LEDs[6] +set_location_assignment PIN_L3 -to LEDs[7] +set_global_assignment -name MIN_CORE_JUNCTION_TEMP 0 +set_global_assignment -name MAX_CORE_JUNCTION_TEMP 85 +set_global_assignment -name PARTITION_NETLIST_TYPE SOURCE -section_id Top +set_global_assignment -name PARTITION_FITTER_PRESERVATION_LEVEL PLACEMENT_AND_ROUTING -section_id Top +set_global_assignment -name PARTITION_COLOR 16764057 -section_id Top + +set_global_assignment -name POWER_PRESET_COOLING_SOLUTION "23 MM HEAT SINK WITH 200 LFPM AIRFLOW" +set_global_assignment -name POWER_BOARD_THERMAL_MODEL "NONE (CONSERVATIVE)" +set_global_assignment -name QIP_FILE altsource_probe/synthesis/altsource_probe.qip +set_global_assignment -name VERILOG_FILE fluorescence_FPGA.v +set_global_assignment -name SDC_FILE clocks.sdc +set_global_assignment -name SOURCE_FILE source.spf +set_global_assignment -name VERILOG_FILE readout.v +set_global_assignment -name QIP_FILE clkgen.qip +set_global_assignment -name QIP_FILE ram.qip +set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top \ No newline at end of file diff --git a/FPGA_firmware/fluorescence_FPGA.v b/FPGA_firmware/fluorescence_FPGA.v new file mode 100644 index 0000000..41cea7c --- /dev/null +++ b/FPGA_firmware/fluorescence_FPGA.v @@ -0,0 +1,362 @@ + + +module fluorescence_FPGA(PMT_in, light_source_pin, clock_50_mhz, pulse_out_pin, LEDs); + + + reg [63:0] integration_timer= 0; + +// + reg [31:0] in_phase_add_count = 0; + reg [31:0] in_phase_subtract_count = 0; + + reg [31:0] quadrature_add_count = 0; + reg [31:0] quadrature_subtract_count = 0; + + reg [31:0] pulse_out_accumulator= 0; + + reg signed [31:0] in_phase_subtracted_signed_value= 0; + reg signed [31:0] quadrature_subtracted_signed_value= 0; + + reg [31:0] in_phase_count = 0; + reg [31:0] quadrature_count = 0; + + output [7:0] LEDs; + + + localparam [31:0] num_waveform_samples = 40; + + reg [7:0] waveform [(num_waveform_samples-1):0]; + reg [31:0] readout_waveform_index; + wire [31:0] current_waveform_value; + + assign current_waveform_value = waveform[readout_waveform_index]; + + + + wire main_clock; +// wire locked; + assign main_clock = clock_50_mhz; +// +// clkgen clock_generator(clock_50_mhz, main_clock); + + reg [31:0] blank2 = 0; + reg [31:0] blank = 0; + reg s_ena = 0; + reg s_clk = 0; + altsource_probe_top #( + .sld_auto_instance_index ("YES"), + .sld_instance_index (0), + .instance_id ("inpc"), + .probe_width (32), + .source_width (32), + .source_initial_value ("0"), + .enable_metastability ("YES") + ) in_system_sources_probes_0 ( + .source (blank2), // sources.source + .source_ena (s_clk), // .source_ena + .source_clk (s_ena), // source_clk.clk + .probe (in_phase_subtracted_signed_value) // probes.probe + ); + + altsource_probe_top #( + .sld_auto_instance_index ("YES"), + .sld_instance_index (1), + .instance_id ("qadc"), + .probe_width (32), + .source_width (32), + .source_initial_value ("0"), + .enable_metastability ("YES") + ) in_system_sources_probes_1 ( + .source (blank2), // sources.source + .source_ena (s_clk), // .source_ena + .source_clk (s_ena), // source_clk.clk + .probe (quadrature_subtracted_signed_value) // probes.probe + ); + altsource_probe_top #( + .sld_auto_instance_index ("YES"), + .sld_instance_index (2), + .instance_id ("ipcn"), + .probe_width (32), + .source_width (32), + .source_initial_value ("0"), + .enable_metastability ("YES") + ) in_system_sources_probes_2 ( + .source (blank2), // sources.source + .source_ena (s_clk), // .source_ena + .source_clk (s_ena), // source_clk.clk + .probe (in_phase_count) // probes.probe + ); + altsource_probe_top #( + .sld_auto_instance_index ("YES"), + .sld_instance_index (3), + .instance_id ("qacn"), + .probe_width (32), + .source_width (32), + .source_initial_value ("0"), + .enable_metastability ("YES") + ) in_system_sources_probes_3 ( + .source (blank2), // sources.source + .source_ena (s_clk), // .source_ena + .source_clk (s_ena), // source_clk.clk + .probe (quadrature_count) // probes.probe + ); + altsource_probe_top #( + .sld_auto_instance_index ("YES"), + .sld_instance_index (4), + .instance_id ("wfvl"), + .probe_width (32), + .source_width (32), + .source_initial_value ("0"), + .enable_metastability ("YES") + ) in_system_sources_probes_4 ( + .source (blank2), // sources.source + .source_ena (s_clk), // .source_ena + .source_clk (s_ena), // source_clk.clk + .probe (current_waveform_value) // probes.probe + ); + altsource_probe_top #( + .sld_auto_instance_index ("YES"), + .sld_instance_index (5), + .instance_id ("wfix"), + .probe_width (32), + .source_width (32), + .source_initial_value ("0"), + .enable_metastability ("YES") + ) in_system_sources_probes_5 ( + .source (blank2), // sources.source + .source_ena (s_clk), // .source_ena + .source_clk (s_ena), // source_clk.clk + .probe (readout_waveform_index) // probes.probe + ); + + + + + + + + input PMT_in; //GPIO_01 PIN_C3 + input clock_50_mhz; //CLOCK_50 PIN_R8 + output light_source_pin; //GPIO_00 PIN_D3 + output pulse_out_pin; + + reg pulse_out = 0; + + localparam [63:0] main_clock_frequency = 32'd50000000; + + localparam [63:0] integration_time = main_clock_frequency * 10; + + localparam [31:0] light_frequency = 100000; + localparam [31:0] light_modulation_period = ((main_clock_frequency)/(light_frequency)); // * 4 +// assign LEDs = add_count; + assign LEDs = 0; + + + assign pulse_out_pin = pulse_out; + + reg previous_clear_flag = 0; + + reg pulse_captured = 0; + reg prev_pulse_captured = 0; + reg [31:0] light_timer_flag = 0; + + + + always @(posedge PMT_in) + begin + if(PMT_in) + begin + pulse_captured <= !pulse_captured; + in_phase_flag <= in_phase; + quadrature_flag <= quadrature; + light_timer_flag <= light_timer; + + temp <= waveform[pulse_timer_flag_idx] + 1; + + end + + end + + wire [31:0] pulse_timer_flag_idx ; + + assign pulse_timer_flag_idx = light_timer_flag - gate_begin; + + reg in_phase = 0; + reg quadrature = 0; + + reg in_phase_flag = 0; + reg quadrature_flag = 0; + +// assign LEDs[0] = in_phase; +// assign LEDs[1] = quadrature; + + reg double_light_clock = 0; + reg [31:0] double_light_timer = 0; + reg [31:0] light_timer = 0; + + always @(posedge main_clock) + begin + + + double_light_timer <= double_light_timer + 32'd1; + light_timer <= light_timer + 32'd1; + + if(double_light_timer >= (light_modulation_period/2)-1) + //div 2 because the I/Q divides + begin + double_light_timer <= 32'd0; + double_light_clock <= !double_light_clock; + end + + if(light_timer >= (light_modulation_period*2)-1) + begin + light_timer <= 32'd0; + end + + end + + always @(posedge double_light_clock) + begin + in_phase <= !in_phase; + end + + always @(negedge double_light_clock) + begin + quadrature <= !quadrature; + end + + + assign light_source_pin = in_phase; + + + localparam [31:0] gate_begin = light_modulation_period+(light_modulation_period/2); + localparam [31:0] gate_end = (light_modulation_period+(light_modulation_period/2)+num_waveform_samples)-1; + + reg [31:0] temp = 0; + + + always @(posedge main_clock) + begin + + pulse_out <= (light_timer >= gate_begin) && (light_timer < gate_end); + + + integration_timer <= integration_timer + 64'd1; + + if(integration_timer >= integration_time-1) + begin + integration_timer <= 64'd0; + in_phase_subtracted_signed_value <= $signed(in_phase_add_count) - $signed(in_phase_subtract_count); + quadrature_subtracted_signed_value <= $signed(quadrature_add_count) - $signed(quadrature_subtract_count); + + in_phase_count <= in_phase_add_count; + quadrature_count <= quadrature_add_count; + + + in_phase_add_count <= 0; + in_phase_subtract_count <= 0; + quadrature_add_count <= 0; + quadrature_subtract_count <= 0; + + begin_readout_flag <= !begin_readout_flag; + + end + else + begin + /* might drop a pulse or mis-phase once per integration time. not a huge deal I don't think. */ + if(pulse_captured != prev_pulse_captured) + begin + prev_pulse_captured <= pulse_captured; + + if(in_phase_flag) + begin + if(in_phase_add_count < {32{1'b1}}) + begin + in_phase_add_count <= in_phase_add_count + 1; + end + end + else + begin + if(in_phase_subtract_count < {32{1'b1}}) + begin + in_phase_subtract_count <= in_phase_subtract_count + 1; + end + end + + + if(quadrature_flag) + begin + if(quadrature_add_count < {32{1'b1}}) + begin + quadrature_add_count <= quadrature_add_count + 1; + end + end + else + begin + if(quadrature_subtract_count < {32{1'b1}}) + begin + quadrature_subtract_count <= quadrature_subtract_count + 1; + end + end + + + + + if((light_timer_flag >= gate_begin) && (light_timer_flag < gate_end) && !reading_out) + begin + //waveform is captured in the second quadrant. + waveform[pulse_timer_flag_idx] <= temp; + end + + + end + end + + if(reading_out && readout_waveform_index > 0) + begin + waveform[readout_waveform_index - 1] = 32'd0; + end + + end + + + + localparam [31:0] readout_frequency = 100; + localparam [31:0] readout_clock_period = ((main_clock_frequency)/(readout_frequency)); // * 4 + reg [31:0] readout_timer = 0; + + reg begin_readout_flag = 0; + + reg prev_readout_flag = 0; + + reg reading_out = 0; + + always @(posedge main_clock) + begin + + + readout_timer <= readout_timer + 32'd1; + + if(readout_timer >= (readout_clock_period)-1 && readout_waveform_index < num_waveform_samples-2) + begin + readout_timer <= 32'd0; + readout_waveform_index <= readout_waveform_index + 1; + end + + reading_out <= (readout_waveform_index < num_waveform_samples-2); + + if(prev_readout_flag != begin_readout_flag) //reset, begin counting again. + begin + readout_waveform_index <= 0; + prev_readout_flag <= begin_readout_flag; + end + + end + + + +endmodule + + + + diff --git a/FPGA_firmware/monitor.py b/FPGA_firmware/monitor.py new file mode 100644 index 0000000..efc3851 --- /dev/null +++ b/FPGA_firmware/monitor.py @@ -0,0 +1,3 @@ +ftdi://ftdi:ft232h/1 + +open_from_url() diff --git a/FPGA_firmware/probe_dump.tcl b/FPGA_firmware/probe_dump.tcl new file mode 100644 index 0000000..ff9806b --- /dev/null +++ b/FPGA_firmware/probe_dump.tcl @@ -0,0 +1,114 @@ +#See https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/qts/qts_qii53021.pdf +#and https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/qts/qts_qii52003.pdf + +# run with ~/NAS/primary_a/Projects/fpga/prime/quartus/bin/quartus_stp_tcl -t probe_dump.tcl +# not quartus_sh + +proc pause {{message "Hit Enter to continue ==> "}} { + puts -nonewline $message + flush stdout + gets stdin +} + +proc hex_to_signed {value} { + set sign [expr {($value & 0b10000000000000000000000000000000)}] + set mag [expr {($value & 0b01111111111111111111111111111111)}] + if {$sign==0} { + set exp 0 + } else { + set exp [expr -2**31] + } + set value [expr {$exp + $mag}] + return $value +} +#thanks Quantum0xE7 on SO! + + + + +set usb [lindex [get_hardware_names] 0] +set device_name [lindex [get_device_names -hardware_name $usb] 0] + +start_insystem_source_probe -device_name $device_name -hardware_name $usb + +set output_filename "../eppenwolf/runs/phage_experiment_7/fluorescence_slide_1.csv" + + +set cuvette 0 + +while {$cuvette < 8} { + pause "move to cuvette $cuvette and hit enter"; + + set previous_count_binary [read_probe_data -instance_index 0]; + set count_binary [read_probe_data -instance_index 0]; + + while {$count_binary == $previous_count_binary} { + #wait for a fresh integration time + after 1000; + set count_binary [read_probe_data -instance_index 0]; + } + + set iter 0; + while {$iter < 5} { + + + set previous_count_binary [read_probe_data -instance_index 0]; + while {$count_binary == $previous_count_binary} { + puts "Integrating..." + after 1000; + set count_binary [read_probe_data -instance_index 0]; + } + + set I_count_binary [read_probe_data -instance_index 0]; + set Q_count_binary [read_probe_data -instance_index 1]; + set ipcn_binary [read_probe_data -instance_index 2]; + set qacn_binary [read_probe_data -instance_index 3]; + + binary scan [binary format B64 [format "%064s" $I_count_binary]] W I_count_binary_scanned + binary scan [binary format B64 [format "%064s" $Q_count_binary]] W Q_count_binary_scanned + binary scan [binary format B64 [format "%064s" $ipcn_binary]] W ipcn + binary scan [binary format B64 [format "%064s" $qacn_binary]] W qacn + + set I_count [hex_to_signed $I_count_binary_scanned]; + set Q_count [hex_to_signed $Q_count_binary_scanned]; + + set mag [expr { sqrt((double($I_count)*double($I_count)) + (double($Q_count)*double($Q_count))) } ]; + set phase [expr { atan( $Q_count / double($I_count)) }]; + + + set outfile [open $output_filename a] + + puts -nonewline $outfile $cuvette; + puts -nonewline $outfile ","; + puts -nonewline $outfile $I_count; + puts -nonewline $outfile ","; + puts -nonewline $outfile $Q_count; + puts -nonewline $outfile ","; + puts -nonewline $outfile $ipcn; + puts -nonewline $outfile ","; + puts -nonewline $outfile $qacn; + puts -nonewline $outfile ","; + puts -nonewline $outfile $mag; + #puts -nonewline $outfile ","; + #puts -nonewline $outfile $phase; + puts -nonewline $outfile "\n"; + + close $outfile; # no buffering + + puts $I_count; + + incr iter; + + } + + + incr cuvette; +} + + +#set value "11111111111111111111111111111111"; + + + + +#end_interactive_probe; diff --git a/FPGA_firmware/waveformviewer.tcl b/FPGA_firmware/waveformviewer.tcl new file mode 100644 index 0000000..66cdf21 --- /dev/null +++ b/FPGA_firmware/waveformviewer.tcl @@ -0,0 +1,90 @@ +#See https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/qts/qts_qii53021.pdf +#and https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/qts/qts_qii52003.pdf + +# run with ~/NAS/primary_a/Projects/fpga/prime/quartus/bin/quartus_stp_tcl +# not quartus_sh + +proc no-op {args} {} +proc pause {{message "Hit Enter to continue ==> "}} { + puts -nonewline $message + flush stdout + gets stdin +} + +proc hex_to_signed {value} { + set sign [expr {($value & 0b10000000000000000000000000000000)}] + set mag [expr {($value & 0b01111111111111111111111111111111)}] + if {$sign==0} { + set exp 0 + } else { + set exp [expr -2**31] + } + set value [expr {$exp + $mag}] + return $value +} +#thanks Quantum0xE7 on SO! + + + + +set usb [lindex [get_hardware_names] 0] +set device_name [lindex [get_device_names -hardware_name $usb] 0] + +start_insystem_source_probe -device_name $device_name -hardware_name $usb + +set output_filename "../eppenwolf/runs/phage_experiment_7/fluorescence_slide_1.csv" + + +set num_waveform_samples 38 + + + +while {1} { + + set waveform [list ] + + set binary_index [read_probe_data -instance_index 5]; + set binary_waveform_count [read_probe_data -instance_index 4]; + binary scan [binary format B64 [format "%064s" $binary_index]] W waveform_index + binary scan [binary format B64 [format "%064s" $binary_waveform_count]] W waveform_count + + while {$waveform_index >= $num_waveform_samples-1} { + set binary_index [read_probe_data -instance_index 5]; + binary scan [binary format B64 [format "%064s" $binary_index]] W waveform_index + } + set prev_index 0; + while {$waveform_index < $num_waveform_samples-1} { + # unsigned + + if { $waveform_index != $prev_index } { + set prev_index $waveform_index; + lappend waveform $waveform_count; + puts $waveform_index; + } + + #lset waveform $waveform_index $waveform_count */ + set binary_index [read_probe_data -instance_index 5]; + after 1; + set binary_waveform_count [read_probe_data -instance_index 4]; + binary scan [binary format B64 [format "%064s" $binary_index]] W waveform_index + binary scan [binary format B64 [format "%064s" $binary_waveform_count]] W waveform_count + } + + puts $waveform; +} + + +#set value "11111111111111111111111111111111"; +while {1} { + set binary_index [read_probe_data -instance_index 5]; + set binary_waveform_count [read_probe_data -instance_index 4]; + binary scan [binary format B64 [format "%064s" $binary_index]] W waveform_index + binary scan [binary format B64 [format "%064s" $binary_waveform_count]] W waveform_count + puts $waveform_index; + puts $waveform_count; +} + + + + +#end_interactive_probe; diff --git a/generate.sh b/generate.sh new file mode 100644 index 0000000..1852e9a --- /dev/null +++ b/generate.sh @@ -0,0 +1,2 @@ +#pandoc ../../documents/fluroescence.md -o fluorescence.html +pandoc --filter pandoc-citeproc --bibliography=../../documents/references.bib -s ../../documents/fluorescence.tex -o paper.md \ No newline at end of file diff --git a/optical_diagram.dia b/optical_diagram.dia new file mode 100644 index 0000000000000000000000000000000000000000..06f12b5017a2fc08562941c555f4208b6b785681 GIT binary patch literal 921 zcmV;K17`dmiwFP!000021MOH#kJ>O0zVj=h>=p7d0kXTW(n?+RP^pJ*&&WwkaM!UT z$2@ZBZ?E&%B@edzLs)DG;d`yF>`t$W= zFj1doy+A3?jnk{Cx)dV1*Y(Y2qmd+rf^m)Dl@=rYHzWk=(nwclJw+)4 z_)x%fuh@k`aO|!GQYZ}3RCS^E7I3zrzM5MVb{->)D{Dxm>fNGPs$Kx;6{G{`5e$&a z5qxV0H{^1hZr~B(b>J{!F_tDGi5ey?IO%uErm%{o5e;T{-;fZ9-{o!)OH&bAVX z5b^-iCYOv5$-`l3HgM84GAA}LtTA|x%lUNf=hBhSrQ@GVhvRv~xZn_rCZ)?5L6GLG zg0E0_p4fv#rr4olncdMBSO|8+{{J2#d4;OF6q6NiIQn6koAe(?H6WTj@H_U{0Xv=-K7x)E9|5A zNHSM#T9B57nSLzpb-N2g_(Nntb)Y*5pQ8!|EX z7xHeb|4X(xzVDQ!(GFO{p2HOftj^PoH=5sZyv-;fYfC z4@+B69%uc2Rm%7L!4-M@LqO_7?kfZ36>WuD8pu@z`&0G1Q7wde^dy=b1{%ej1u+j5 z0NThLI(^I1EMPeGI&H?RjmCBBEId6j4G8*RvYip=Tc%_jgNG9H(41J^m_-_vBidZE zX-l+hV6NEJ=IfTp`anjv%{GjReMITLvXD~(Nu)oJ#;OvFB+VK5_LblI6_GU(*n{Qt zKHq~S!ohN{54&D&XcMElhL@366Y;EM>_S&3t<~?3AvE+^vt#;butQdGA~spYoq}ijQfse z+rYk|IHg2JPGkW40azLsjjXo5y@FXIpbd*3j9l zOSl^P(RiO7SEZw)yrC4u`0;WTfvcRPMpP>K! v>T3PUax?(!zG-TPGqL}*c4gk6UDf+aew~fcvtDJ+p7s6!TOF#_gcbk*T~*9i literal 0 HcmV?d00001 diff --git a/optical_diagram.svg b/optical_diagram.svg new file mode 100644 index 0000000..a69e003 --- /dev/null +++ b/optical_diagram.svg @@ -0,0 +1,34707 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + generic amplifier + HV amplifier + servo + lowpass filter + highpass filter + mixer + signal generator + sum + difference + sum/difference + electrical wires + Laser + modecleaner + crystals + Laser crystal + spectrum analyzer + PC + photodetector + photodetector green + quadrant photodetector + lenses + beamsplitters + dicroic beamsplitter + mirrors + dicroic mirrors + flip mirror + grating + retardation plates + phase shifter + faraday isolators + faraday rortator + beam dumps + EOM's + AOM + Laser beams + diverse nonlinear cavities + fiber stuff + greek symbols + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Phaseplate + Wincam D + + diff --git a/paper.md b/paper.md new file mode 100644 index 0000000..b2e620d --- /dev/null +++ b/paper.md @@ -0,0 +1,600 @@ +--- +bibliography: ../../documents/references.bib +--- + +Amplification-free fluorescent viral quantification via synchronous photon counting +=================================================================================== + +![](fluorescence/fluro_1){width="\\textwidth"} + +![Pardon the mess.](fluorescence/fluro_2){width="\\textwidth"} + +Executive summary +----------------- + +Cuvette should be opaque or white to avoid autofluro; + +Initial state +------------- + +real-time + +After the dismal failure of luminescent infectivity quantification, and +the lack of success in infecting phage due to the small sample volumes +in use and the wrong phage type. The plaque assay took too long. + +4-methylumbelliferone ß-D-galactopyranoside fluor substrate + +As with many other projects, many negative results reported were tainted +by the use of such a low sample volume. + +Factors that led the development + +The typical method to detect. A quantitative PCR + +Such a device is known in biology as a plate reader. + +Nanodrop, using 280 nm absorbance. They're also \$10,000. + +Contrary to luminescence, you have control over when the excitation and +emission light turns on, so you can do a lock-in. This doesn't subtract +the excitation bleed-through, but it + +Review +====== + +() quantifies adenovirus titer with a ssDNA 4.7 kbase genome. + +With a GelRed dye and 528/20 (note: BioTek filters are specified as +center wavelength / FWHM). + +() () offer excellent + +We show that both fluorescence and the excited state lifetime of SG +dramatically increase in viscous solvents, demonstrating an approximate +200-fold enhancement in 100 % glycerol, compared to water, which also +makes SG a prospective fluorescent viscosity probe. + +Conveniently, T4r has genome of approximately 172 kBp dsDNA(); each +virion therefore For comparison, a fingerprint has between 0.042 and +0.14 ng of DNA (). + +While these quantities are small, it is not particularly challenging, +and it is not our intention to suggest that this is a good design; we +are simply reporting on Designs for systems with comparable performance +are . The similar performance despite extremely high detector +sensitivity is probably due to the small light-collecting area due to +the objective, and + +Biotium GelGreen has a very specific advantage: to increase the safety +of the dye, the flurophore is tied to some huge proprietary molecule, +preventing it from diffusing through membranes or capsids. This has the +side effect of making the fluorescence intensity strictly related to the +quantity of genomic material dispersed in the solvent, rather than + +Luckily, a recent paper has the answer: direct fluorescent detection of +DNA in solution, outside using dyes that bind to (intercalate into) DNA. +GelGreen doesn't penetrate. + +A similar method (using fluroescence microscopy rather than photon +counting) was also used by, and is generally a common practice in the +bioeffects field. + +Somewhat more challenging than viewing PCR output on a gel, since the +total quantity of DNA involved is quite low + +extra credit: how many photons are released? + +Unlike luminescence techniques, lock-in is possible + +Xu et al use + +Gel-Doc + +Flurophore +---------- + +the prototypical stain is Ethidium Bromide, but is challenging to obtain +outside certain laboratories. GelGreen is safe, very stable against +photobleaching and long-term storage, inexpensive, and readily +available. GelGreen is an Acridine orange (N-alkylacridinium) dye with a +similar spectra to green fluorescent protein. + +the base had integral overcurrent protection, which was triggered a few +times during development - a very useful + +For one thing, GelGreen appears to be eminiently stable - samples can be +stored for long periods of time, pre-mixed batches. + +bleaching was not obviously an issue. A calibration sample was stored in +a dark area with the dye bound to DNA for several months with less than +4% decay observed[^1]. + +tom Lexan cuvettes unexpectedly overwhelmed the DNA signal A surplus +Hammamatsu R4220 with HC123 current-limiting base at maximum sensitivity +was used. A low-voltage silicon photomultiplier like ON Semi's C-Series +SiPMs will probably be sufficient in most cases. + +(Phi6 uses an RNA - many dyes have different responses to +single-stranded (ss)DNA, dsDNA, or + +As noted by \[xi?\], this is a saturating effect; if too many +flurophores intercalate into the DNA the fluorescence is weaker. + +GelGreen is also sensitive to ssDNA and ssRNA but with 5 times lower +efficiency. GelGreen absorbs maximally at 272 nm and 507 nm and emits +maximally at 528 nm.() + +![Biotium GelRed/GelGreen fluorescence spectra. Credit Biotium Inc, +reproduced without permission.](gelred_gelgreen){width="50%"} + +Simple CMOS image stacking detection +------------------------------------ + +makes it easy to diagnose issues with the light path + +Lesson learned: color feedback + +a 30-s exposure on a cheap camera also almost got there. + +An ELP-brand camera USB100W05MT (a common choice in industrial systems) +with an OV9712 sensor was used. guvcview to capture. + +From luminescent techniques reported previously, DSLR sensors with long +exposure times are sensitive + +from \[\], using ImageJ to stack. works great on cheap cmos cameras - +interestingly doesn't work at all on more expensive cameras. - almost +good enough - great for diagnostics + +interestingly, the fact that the camera has color is quite valuable; +filtering the green out can increase sensitivity a lot + +Anyone familiar with photomultiplier tube use with + +lest you think I know what I'm talking about, I laboured under the +assumption that the pulse height somehwo + +\"Does anyone know of a circuit that can discriminate color PMT\"? () + +only works if scintillator + +THE pulse height is equal to the input energy! The PMT can be made +color-sensitive; just subtract + +I thought the pulse height + +three counters? one above, one at? a lock-in amp would be better\... + +fast diode thresholding might work + +use one of the stm32f0 boards with comparators + +Possible artifacts and deficiencies in +-------------------------------------- + +This arrangement is patently unsuitable for producing scientific +results, as it has not even been calibrated against a DNA ladder. +Positive control samples were generated by cracking phage capsids of a +known titer in an autoclave and then mixing 1:1 with 1/4000 GelGreen. If +some other process + +The sample passed through a microfludic channel.[^2] Adsorption + +Instruments should not produce a continuous stream of results. + +### Preparation and use + +Undiluted GelGreen fluorophore (delivered at 10,000x concentration in a +neat little screw-cap) was kept at room temperature as advised (to +prevent crystallization or precipitation)[^3]. The fluorophore stock +solution was prepared by diluting 2.5 microliters of GelGreen in 10 mL +distilled water in a 15 mL screw-cap Falcon tube (McMaster-Carr +\#7979T33) producing a weakly orange solution of \"1/4000\" dilution and +stored at room temperature. Both were kept in light-tight metallized +bags when not in use. + +solution of GG in distilled water mixed 50/50 with the sample ("1/8000") +worked great in our case. + +The autosampler withdrew approximately 50 microliters of mixed solution +from the 0.4 mL stock tube (referred to as PG1), which was then injected +into an empty 1.5 mL empty sample tube. quantified. + +Cuvette +------- + +The custom 1 microliter slide cuvette used for initial testing was CNC +machined from 3 mm transparent Lexan-brand polycarbonate[^4]. After much +mystified head-scratching, it was found that the Lexan substrate was +very highly auto-fluorescent and completely overwhelmed the meagre DNA +signal. This occurred with a separate coupon of Lexan, but was not +observed with clear acrylic or polycarbonate. . That said, it has been +reported that polycarbonate does not auto-fluoresce significantly more +than acrylic (), so it is possible that some other effect led to this +result. + +1.5 mL Eppendorf-type clear polypropylene microcentrifuge tubes +(Carolina Premium Sterile Centrifuge tubes, 215245, believed to be MTC +Biotech SureSeal S). + +Lesson learned: beware autofluresecncee + +Light source +------------ + +Argon-gas lasers emit several closely-spaced lines in the visible +spectrum, the most prominent of which is at 488 nm. + +Cyan diode lasers emitting at 488 nm are SHARP GH04850B2G appears to be +obsolete. + +Due to their coherent emission, eye protection or suitable interlocks +are important when working with lasers. (Are tightly filtered LEDs +coherent?) + +lasers are available. + +() recommends + +### Diode laser tests + +Various impromptu tests were made with a 2.5W 445 nm laser cutter. +Commodity blue 445 nm emitters only barely clip the absorption spectrum +of GelGreen, leading to a poor fluorescence yield. Combined with the +very high intensity, an unusably high background was found even with the +large 0.4 mL test sample. This observation were tainted by a very poor +optical arrangement and may well be false. + +(Note that inexpensive laser cutter modules are often intensity +modulated via PWM rather than via analog current; this can cause great +confusion if not accounted for). + +gel doc papers use leds without filters, and paper says narrow leds +exist, talk about results with leds + +note LTOF converter + +Blue LEDs \[Cree XLamp XP-E2 Blue Starboard\] are then sufficient for +excitation (though high CRI white LEDs emit more 480 nm blue, green +leakage is too high). + +Cree recommends staying below 300% of the continuous power when +modulating an LED. + +A white LED with a high color-rendering index (DK) seemed to have more +power in the blue passband; however, green leakage around the filter was +too strong. + +Arranging the light source physically at right angles can be +challenging. Using a plastic fiber optic assists in positioning +\"because of the small numerical aperture\". The fiber optic () + +Even a blue LED is visibly green through a + +Arranging the light source and detector optical paths at right angles is +the first line of defense against excitation light bleed-through. In +testing, is echoed by () + +> Finally, it is possible to excite a sample from one side and collect +> the fluorescence from the opposite side (Fig. 2.4.3D). While some +> instruments, such as microplate readers, use this approach, it is rare +> because it is difficult to completely prevent scattered excitation +> light from reaching the detector. +> +> Even when thin-film filters with extremely high blocking are used, +> high-angle scattered light can make it through the emission filter, +> since, as shown below, the spectrum of the filter shifts to shorter +> wavelengths for light at higher angles of incidence, thus causing the +> shifted emitter band to overlap with the excitation wavelength band. + +Filters +------- + +Certainly the most critical aspect of any fluorescence technique is the +filter set used. + +Important characteristics include transmission % inside the passband, +optical density outside the passband, and sharp edges without long tails +crossing the so-called Stokes shift() between absorption and emission. +Some filters have ripple far from the edge of interest which must be +taken into account when assessing the overall filtering performance. + +() + +() contributes additional information + +Half-inch diameter laser line filters were used here for reasons of +cost. As of this writing, a set of quality GFP filters costs about 4 +times as much as a laser line set. Due to narrower pass-bands, perhaps +1/8 optical performance can be expected; in a photon-counting mode, +however, there appears to be ample sensitivity remaining. + +Superior filters can almost certainly be found; these were chosen for +convenience. + +Gel-docs , with spectra specified using the Wratten scale. These filters +alone do not seem to have optical density values sufficient for +amplification-free quantitation at these levels. + +Most commercial microscopes use dichroic beamsplitters, allowing the +excitation and emission beam to go through the same objective, a +technique known as epifluorescence (epi- means same-side). The dichroic +only removes the excitation to the 1% level - you still need the +dielectric filters, and they're really expensive. With fiber optic +excitation at right angles to the objective, excitation scattering was +low enough that the dichroic was unnecessary. + +The microscope itself was largely incidental, providing only a base. The +small focal length and aperture of the + +A 10/0.25 (10x magnification, 0.25 numerical aperture) objective was +used. + +Units reported as AU + +### Excitation filter used + +One filter, an + +(486 nm is the $n=4$ Balmer line for hydrogen). + +(note; this was a limited-stock clearance item that has since been +discontinued. Equivalent filters are readily available from other +suppliers, such as the ThorLabs FL05488-10 or Newport 05LF10-488). + +### Emission filters used + +Two filters in series, one: + +Note the confusion that can occur when specifying passband width as +$\pm$ versus FWHM. + +This is a long-pass edgepass filter. This is known as a Wratten or Gel +filter; the \#16 is known as the Wratten number. () has a table of +Wratten filter spectra; the cut-on wavelength (wavelength of 50% +transmission) is 530 nm for the \#15 and 540 nm for the \#16 ($\pm$ +circa 3 nm), with 90% maximum transmission. One layer of Kapton tape was +wrapped around the filter to protect other optics from the sharp edges. + +Tiffen-brand filters consist of two glass panes sandwiching a plastic +membrane that contains the dye proper. They can be cut to size + +The 10 nm FWHM emission filter is much narrower than professional GFP +filters, especially the super-wide edge-pass ones; a lot of photons are +lost that way, decreasing efficiency. However, it still appears to be +more than sufficient. + +manuals for gel-docs typically suggest \#16 or \#15. SYBR recommends +\#15. + +For an even lower-cost system, orange or amber acrylic sheets (typically +used for UV filtering) with similar filtering spectra (e.g. Acrylite +408-5) also exist; such a filter is used on the Carolina gel-doc, for +instance. + +This does mean is filtered before entering the fiber optic. + +in series with + +In general, gel filters appear to have a softer taper + +ThorLabs has series of colored glass (\"schott glass\") filters + +### Gel filter + +### Gel filter + +Unlike gels or plastic-glass sandwiches, thin-film filters have the +property that the pass-band depends greatly on the angle of incidence as +$$\lambda_{shifted} = \lambda \sqrt{1-sin(\theta)^2}$$ + +The wavelength shifts shorter (bluer) as $\theta$ increases. This can be +a helpful property for creating tunable filters, but is a nuisance here. +This isn't an issue for the excitation filter, but is an issue for the. + +Thin-film dielectric filters also age; ThorLabs considers filters to +have a lifetime of 2 years. + +Since the LEDs and flurophore emissions are not naturally collimated, +this poses a little bit of an issue. The microscope objective seems to +provide sufficient collimation for the emission filter. + +The Edmund filter was unmounted glass. Also, these thin-film filters do +not extend to the edge of the glass. Edge-blackening (\"inked\") filters + +The wavelength can also be shifted by a few nm over the temperature +range 0 to 50 + +The LED was about 3 cm away, and put through a  3 mm aperture in a piece +of PVC pipe. The output from the filter was directly into the 1 mm +fiber, itself improving the bandpass. + +Time-domain or time-correlated photon counting +---------------------------------------------- + +An even better Phase-shift time domain fluorimetry. Iwata use a 20 MHz +DSO to measure a 5 ns $\tau$ fluorophore. However, this involves a light +source with a fast modulation bandwidth; and in the implementation they +describe, the PMT must be in the voltage mode. + +Called time-correlated photon counting. + +Another neat technique is to add I/Q + +Then your + +While there are ways to deconvolve a slow falling edge, there's another +problem: per time interval, the time spent in the excitation-off, +flurophore exponential decay time is proportional to the frequency of +the excitation light. If you're only getting 1000 photons from the +sample per second, the dye lifetime is 5 ns, and you're turning the +light on and off at 1 MHz, you're only getting a \[\] photons from the +exponential decay region. Even with a long exposure, that doesn't seem +to be enough to pick up the decay. + +It is also possible to perform flashbulb. () abuse of pmts. Note that as +long as average current limits are obeyed, PMTs are happy to endure very +high pulse currents, like flashbulbs for exciting; no shutters or +anything required. Gating the photomultiplier HV is another technique. +Figure out the average current limit for your PMT, the expected voltage +based on your load resistor value and watch that it never exceeds it. + +Another way to pick up this phase shift is to make your lock-in +amplifier phase-sensitive - very simple (a 2x clock put into a flip-flop +divider, then the middle). This also wasn't nearly good enough, +completely useless. + +quadrature input + +Electronics +----------- + +(take pictures of light source and electronics) + +Monitoring the output with a,[^5] a 100 ns switching time was typical. A +modulation frequency of 1 MHz was achievable, but no + +While drift in the power supply does not affect the background lock-in, +it can affect run-to-run repeatability. + +Running FPGA designs at varying speeds helps to debug race-condition +related bugs.[^6] + +() () + +take note of potentiometer positions + +sketches of light source in inkscape + +Atmospheric pressure glow discharge (APGD) plasma generation and surface +modification of aluminum and silicon si (100) + +huh! basic Argon discharge emits sharply at 488 nm - with a good fiter, +might work out! + +man, most white LEDs just have a notch taken out at 488! That's so +strange! + +The problem with lasers is that the only ones with power in the right +spectrum are from china or really expensive. + +Noncollimated light, the the band of a dielectric interference bandpass +filter shifts = $488 * (sqrt(1-(sin(45 deg)/2.08)^2)) = 458$; it only +shortens in wavelength. This would be a problem for the emission filter, +except we're using a colored-glass filter for that side. + +In fact, if we use a bunch of LEDs, this'll help to + +the CRI of the LED determines the amount of cyan light + +Clearance section at Edmund Optics is pretty great + +dichroic not needed - only does a first order-of-magnitude cut, mainly +important + +custom acrylic lightpipe? + +gel tampering + +() + +One might expect, given that white noise has an expectation value of +zero, that this technique would average out to 0, and the signal would +be linearly proportional to time. However, a 1-dimensional random walk +with a uniform step size of 1 is expected to end up $\sqrt{N}$ units +away from the origin after N steps. In the same time, a fluorophore +emitting at a rate of $r=1$ counts per step has an expected value of N +counts (a Poisson distribution has a mean equal to its parameter). +Therefore, $\text{SNR} = \frac{N}{\sqrt{N}} = \sqrt{N}$. Longer exposure +times would therefore provide better precision, but with diminishing +returns. + +A more comprehensive consideration () + +However, + +it has been noted that water is a good fluorescence quencher and that +this might be how + +If time-domain filtering is sufficient, + +Low background is required. + +Performance and characteristics +------------------------------- + +Performance of this arrangement was very satisfactory. A 10-second +integration time, with, produced a background fluorescence signal of + 1500 counts, with per-sample stability of approximately $\pm 1500$ +counts. The + +Contrary to standard microscopy, you want as little excitation light to +enter the objective as possible. Using the existing + +the input edge is considered a clock; the minimum pulse width limits +apply, but are not clearly specified in the datasheet. In this case +(1/155 mhz) = 6 ns. + +However, we had no luck with precipitation. + +With the setup we're using and the small quantities, the excitation +light is somewhere around  $10^5$ times as powerful as the emission. +This doesn't seem to be a big issue gel-docs, picking out bands on gels +- they don't usually seem to use excitation filters; however, to get the +excitation bleed-through low enough to do this quantitative assay, the +bleed-through must be really low, and in our testing proper dielectric +filters are required on both the excitation and emission sides. + +There are a few sources of noise: + +PMT dark counts Some be filtered out by judicious use of comparator +pulse height threshold, the lock-in takes care of it. A non-issue in our +case. Ambient light leakage It'll be fine. Even with the room lights +Using microscope optics and the lock-in, essentially a non-issue for +use, surprisingly. Some fluorescence microscopes use micron-size +apertures to limit the depth of field to avoid Putting + +make Dia diagram of system + +The PMT was at maximum sensitivity (in fact, slightly above max voltage) + +You might be wondering why the filters are even required - why not just +subtract the excitation bleed-through with a control? Unfortunately, any +miniscule variation in the scattering of the excitation will be orders +of magnitude larger than the fluorescence signal you're looking for. + +Some papers discuss adding a third chopper or gate period or +photomultiplier or to measure the drift of the excitation light source. +Putting some feedback in the loop would probably + +PCR is another method + +Silicon photomultipliers like ON's C-Series are almost certainly +sufficient for this application, eliminating the HV requirements of PMTs +at the cost of a smaller active area, requiring a larger lens to collect + +half-life is 0.693 times the average lifetime. + +Simple spectrally-filtered intensity is good enough. + +Polarization is a neat way to filter; linearly polarize the excitation, +the emission comes out whatever orientation the DNA happens to be, which +is usually random. Apparently + +Literature review +----------------- + +### () + +[^1]: pulse\_1.pnw line 2567 + +[^2]: pulse\_1.pnw lines 2517 + +[^3]: pulse\_1.pnw line 1367 + +[^4]: pulse\_1.pnw line 1719, 1755 + +[^5]: pulse\_1.pnw line 1879 + +[^6]: pulse\_1.pnw line 1879