So I bought a high vacuum gauge (finally) and I have been working on getting it to work. I bought it from eBay http://www.ebay.com/itm/MKS-901P-11040- ... SwTA9X7FWb and I think the transducer they sold me does work, but I've had bad luck lately with getting correct readings, so I want to ask for help in case I got a malfunctioning gauge and have to return it.
Here is the setup
As you can see I am not using the d-sub 15 connector I should be using, I stripped an old female VGA I had, only to find that pin 4 does not have a cable. Why does pin 4 matter, well here is the 4 pins I need from the gauge and what they do.
Pin 3: Power + (9-30 VDC)
Pin 4: Power return -
Pin 5: Analog Output +
Pin 6: Analog Output -
So I already have that problem, any idea on how could I get pin 4 in the VGA cable to work? As you can see at the moment I am using jumper wires, which isn't that much of a problem.
My main problem is with the readings, so a little info on the output setup.
I bought an Arduino UNO in hope to use it as an A/D converter so I can have the data displayed in a LCD, at the moment I just have it connected to my computer and use the serial monitor which works fine. As you know the A/D converter only works from 0 to 5 volts, and my gauge output anywhere from 0 to 9volts, so I am using a voltage divider that consists of a 3.9 and a 4.7 kilohm resistor, this way my voltage is scaled down to approximately 0 to 4.91 volts. I have it connected so the positive output goes to the 3.9 resistor and the negative to the 4.7, also in the breadboard I connected a ground to the Arduino from the 4.7 resistor rail. So anyway, here is the Arduino software code:
Code: Select all
/*
MKS901p Vacuum Transducer 0-9VDC, 1VDC per Decade. Using a voltage divider of 4.7kΩ and 3.9kΩ to get the analog signal down to 0-5VDC.
*/
//the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}
// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
float voltage = sensorValue * (5.0 / 1023);
//Convert to scale of 0-9 volts
float realvoltage = ((voltage / 0.53472184347873) - 6);
//Convert the voltage signal to presure
float pressure = pow(10, realvoltage);
//We print accordingly to the range of the pressure
//First we define Torr above 0.99
if (pressure > 0.99) {
Serial.print(pressure, 2);
Serial.println(" Torr"); }
//In the latter we print only milliTorr (also known as microns)
else if (pressure > 0.00099) {
Serial.print(pressure * (pow(10, 3)), 2);
Serial.println(" milliTorr");
}
//For smaller than microns we preffer to use exponents in Torr (e.g 1.2EE-6 Torr)
else if (pressure > 0.000099) {
Serial.print(pressure * (pow(10, 4)), 2);
Serial.println("e-04 Torr");
}
else if (pressure > 0.0000099) {
Serial.print(pressure * (pow(10, 5)), 2);
Serial.println("e-05 Torr");
}
else {
Serial.print(pressure * (pow(10, 6)), 2);
Serial.println("e-06 Torr");
}
}
So I said I used formulas to convert the "divided voltage" to the real voltage, and while I did, I also used some trial and error until I got the Serial Monitor to display around 760 Torr. What worries me is how accurate will this be? If it is missing by a few Torr, then it will not serve its purpose, which is being a precision high vacuum gauge.
Any tips or critics would be appreciated.
Thanks!
PS. What is your favorite photo uploader, I am using photo bucket and it is slow and laggy, so I want to change.