Arduino Inverted Magnetron Transducer Readout
by SpecturaLabs in Circuits > Electronics
3226 Views, 8 Favorites, 0 Comments
Arduino Inverted Magnetron Transducer Readout
As part of an ongoing project of mine here, documenting the ongoing progress of my foray into the world of Ultra High Vacuum particle physics, it came to the part of the project that required some electronics and coding.
I purchased a surplus MKS series 903 IMT cold cathode vacuum gauge, with no controller or readout. For some background, ultra high vacuum systems need various sensor stages to properly measure the lack of gases in a chamber. As you get a stronger and stronger vacuum, the more complicated this measurement ends up.
At low vacuum, or rough vacuum, simple thermocouple gauges can do the job, but as you remove more and more from the chamber, you need something akin to an gas ionization gauge. The two most common methods are hot cathode and cold cathode gauges. Hot cathode gauges function like many vacuum tubes, in which they have a filament that boils off free electrons, which are accelerated towards a grid. Any gas molecules in the way will ionize and trip the sensor. Cold cathode gauges use a high voltage with no filament inside a magnetron to produce an electron path that also ionizes local gas molecules and trips the sensor.
My gauge is known as an inverted magnetron transducer gauge, made by MKS, which integrated the control electronics in with the gauge hardware itself. However, the output is a linear voltage that coincides with a logarithmic scale used for measuring vacuum. This is what we will be programming our arduino to do.
What Is Needed?
If you are like me, trying to build a vacuum system on the cheap, getting whatever gauge you can is what you will settle for. Fortunately, many gauge manufactures build gauges this way, where the gauge outputs a voltage that can be used in your own measurement system. For this instructable specifically however, you will need:
- 1 MKS HPS series 903 AP IMT cold cathode vacuum sensor
- 1 arduino uno
- 1 standard 2x16 LCD character display
- 10k ohm potentiometer
- female DSUB-9 connector
- serial DB-9 cable
- voltage divider
Code!
So, I have some experience with arduino, like messing with my 3d printers' RAMPS config, but I didn't have experience writing code from the ground up, so this was my first real project. I studied a lot of sensor guides and modified them to understand how I could use them with my sensor. At first, the idea was to go with a lookup table as I have seen other sensors, but I ended up using the arduino's floating point capability to perform an log/linear equation based on the conversion table provided by MKS in the manual.
The code below simply sets A0 as a floating point unit for voltage, which is 0-5v from the voltage divider. Then it is calculated back up to a 10v scale and interpolated using the equation P=10^(v-k) where p is pressure, v is voltage on a 10v scale and k is the unit, in this case torr, represented by 11.000. It calculates that in floating point, then displays it on an LCD screen in scientific notation using dtostre.
#include <br> #include // initialize the library with the numbers of the interface pins LiquidCrystal lcd(12, 11, 5, 4, 3, 2);// the setup routine runs once when you press reset: void setup() { // initialize serial communication at 9600 bits per second: Serial.begin(9600); pinMode(A0, INPUT); //A0 is set as input #define PRESSURE_SENSOR A0; lcd.begin(16, 2); lcd.print("MKS Instruments"); lcd.setCursor(0, 1); lcd.print("IMT Cold Cathode"); delay(6500); lcd.clear(); lcd.print("Gauge Pressure:"); }// the loop routine runs over and over again forever: void loop() { float v = analogRead(A0); //v is input voltage set as floating point unit on analogRead v = v * 10.0 / 1024; //v is 0-5v divider voltage measured from 0 to 1024 calculated to 0v to 10v scale float p = pow(10, v - 11.000); //p is pressure in torr, which is represented by k in the equation [P=10^(v-k)] which is- // -11.000 (K = 11.000 for Torr, 10.875 for mbar, 8.000 for microns, 8.875 for Pascal) Serial.print(v); char pressureE[8]; dtostre(p, pressureE, 1, 0); // scientific format with 1 decimal places lcd.setCursor(0, 1); lcd.print(pressureE); lcd.print(" Torr"); }
Testing
I performed the tests using an external power supply, in increments form 0-5v. I then performed the calculations manually and made sure they agreed with the displayed value. It seems to read slightly off by a very small amount, however this isn't really important, as it is within my needed spec.
This project was a huge first code project for me, and I wouldn't have finished it if it were not for the fantastic arduino community :3
The countless guides and sensor projects really helped with figuring out how to do this. There was a lot of trial and error, and a lot of getting stuck. But in the end, I'm extremely happy with how this came out, and honestly, the experience of seeing code you made do what it is supposed to for the first time is pretty awesome.