diff --git a/README.md b/README.md index 3daea41..0c0faa9 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ionpak A modern, low-cost universal controller for hot-cathode ionization vacuum gauges. -![Prototype picture](https://raw.githubusercontent.com/m-labs/ionpak/master/proto_rev1_small.jpg) +![Test setup](https://raw.githubusercontent.com/m-labs/ionpak/master/pictures/setup1_small.jpg) Why? ---- @@ -71,3 +71,5 @@ License Copyright 2017 M-Labs Limited. License TBD, probably will be CERN OHL and GPL. + +Pictures in the ``pictures`` folder, except ``proto_rev1.jpg``, are copyright Michelle Poon and not free. diff --git a/firmware/src/electrometer.rs b/firmware/src/electrometer.rs index b26b1b2..eefbfa0 100644 --- a/firmware/src/electrometer.rs +++ b/firmware/src/electrometer.rs @@ -36,7 +36,7 @@ impl Electrometer { board::ElectrometerRange::Med => Some(board::ElectrometerRange::High), board::ElectrometerRange::High => None } - } else if ic_sample < 200 { + } else if ic_sample < 100 { match self.range { board::ElectrometerRange::Low => None, board::ElectrometerRange::Med => Some(board::ElectrometerRange::Low), diff --git a/firmware/src/loop_cathode.rs b/firmware/src/loop_cathode.rs index a11a89f..2109e53 100644 --- a/firmware/src/loop_cathode.rs +++ b/firmware/src/loop_cathode.rs @@ -4,21 +4,21 @@ use board; use pid; const FBI_PID_PARAMETERS: pid::Parameters = pid::Parameters { - kp: 310.0, - ki: 50.0, + kp: 350.0, + ki: 70.0, kd: 10.0, output_min: 0.5, - output_max: 3.0, + output_max: 3.1, integral_min: -0.05, integral_max: 0.05 }; const FV_PID_PARAMETERS: pid::Parameters = pid::Parameters { - kp: 1.80, - ki: 0.3, + kp: 1.90, + ki: 0.35, kd: 0.0, output_min: 0.0, - output_max: 30.0, + output_max: 20.0, integral_min: -50.0, integral_max: 50.0 }; diff --git a/firmware/src/main.rs b/firmware/src/main.rs index 1b0988b..b52c8d9 100644 --- a/firmware/src/main.rs +++ b/firmware/src/main.rs @@ -92,8 +92,11 @@ fn main() { let emission = 1.0e-3; */ // ZJ-12 - let anode = 200.0; + /*let anode = 200.0; let cathode_bias = 50.0; + let emission = 4.0e-3;*/ + let anode = 180.0; + let cathode_bias = 30.0; let emission = 4.0e-3; loop_anode.set_target(anode); loop_cathode.set_emission_target(emission); @@ -185,9 +188,17 @@ extern fn adc0_ss0(_ctxt: ADC0SS0) { if time.get() % 300 == 0 { println!(""); - loop_anode.get_status().debug_print(); + /*loop_anode.get_status().debug_print(); loop_cathode.get_status().debug_print(); - electrometer.get_status().debug_print(); + electrometer.get_status().debug_print();*/ + let cathode_status = loop_cathode.get_status(); + let electrometer_status = electrometer.get_status(); + if cathode_status.fbi.is_some() && electrometer_status.ic.is_some() { + let fbi = cathode_status.fbi.unwrap(); + let ic = electrometer_status.ic.unwrap(); + let pressure = ic/fbi/18.75154; + println!("{:.1e} mbar", pressure); + } } }); } diff --git a/pictures/pcb_1.jpg b/pictures/pcb_1.jpg new file mode 100644 index 0000000..418fc56 Binary files /dev/null and b/pictures/pcb_1.jpg differ diff --git a/pictures/pcb_2.jpg b/pictures/pcb_2.jpg new file mode 100644 index 0000000..525c279 Binary files /dev/null and b/pictures/pcb_2.jpg differ diff --git a/pictures/pcb_unassembled.jpg b/pictures/pcb_unassembled.jpg new file mode 100644 index 0000000..a2f1c51 Binary files /dev/null and b/pictures/pcb_unassembled.jpg differ diff --git a/proto_rev1.jpg b/pictures/proto_rev1.jpg similarity index 100% rename from proto_rev1.jpg rename to pictures/proto_rev1.jpg diff --git a/pictures/setup1.jpg b/pictures/setup1.jpg new file mode 100644 index 0000000..60710f8 Binary files /dev/null and b/pictures/setup1.jpg differ diff --git a/pictures/setup1_small.jpg b/pictures/setup1_small.jpg new file mode 100644 index 0000000..62949aa Binary files /dev/null and b/pictures/setup1_small.jpg differ diff --git a/pictures/setup2.jpg b/pictures/setup2.jpg new file mode 100644 index 0000000..b589000 Binary files /dev/null and b/pictures/setup2.jpg differ diff --git a/pictures/zj10.jpg b/pictures/zj10.jpg new file mode 100644 index 0000000..3c27c5b Binary files /dev/null and b/pictures/zj10.jpg differ diff --git a/proto_rev1_small.jpg b/proto_rev1_small.jpg deleted file mode 100644 index 3d9db7d..0000000 Binary files a/proto_rev1_small.jpg and /dev/null differ