MKS 901p

Every fusor and fusion system seems to need a vacuum. This area is for detailed discussion of vacuum systems, materials, gauging, etc. related to fusor or fusion research.
Jerry Biehler
Posts: 975
Joined: Tue Nov 24, 2009 3:08 am
Real name:
Location: Beaverton, OR

Re: MKS 901p

Post by Jerry Biehler »

Ah, ok, it looked like you soldered onto the pins.

The reason it bounces between 750/760 is probably just because of the resolution of the ADC inside the unit. Don't worry about it.

Code: Select all

#include <PID_v1.h>
#define ENCODER_DO_NOT_USE_INTERRUPTS
#include <Encoder.h>
#include <LiquidCrystalFast.h>

// initialize the library with the numbers of the interface pins
LiquidCrystalFast lcd(33, 32, 31, 30, 29, 28, 27);
         // LCD pins: RS  RW  EN  D4  D5  D6  D7
//Pressure Gauge Variables
const int numReadings = 10;
int readings[numReadings];      // the readings from the analog input
int indexr = 0;                  // the index of the current reading
int total = 0;                  // the running total
int average = 0;                // the average
int decade;
int exponent;
double torr;
float pa;
float volts;
float pressure;
float significand;
float x;
int error;
//Evap Controller Variables
const int chanA =  3;
const int chanB =  4;
const int chanC =  5;
const int chanD =  6;
const int buttonRight =  9;
const int buttonMid =  12;
const int ButtonLeft =  15;
Encoder knobLeft(13, 14);
Encoder knobMid(10, 11);
Encoder knobRight(7, 8);
int chanAvolt = A12;
int chanCvolt = A11;
int chanDvolt = A10;
int pressVolt = A8;
int pressIdent = A9;
int chanArem = A7;
int chanCrem = A6;
int chanDrem = A5;
int chanAfb = A4;
int chanCfb = A3;
int chanDfb = A2;
double SetpointA, InputA, OutputA;
double SetpointC, InputC, OutputC;
double SetpointD, InputD, OutputD;
PID PIDchanA(&InputA, &OutputA, &SetpointA,2,5,1, DIRECT);
PID PIDchanC(&InputC, &OutputC, &SetpointC,2,5,1, DIRECT);
PID PIDchanD(&InputD, &OutputD, &SetpointD,2,5,1, DIRECT);

void setup() {
    Serial.begin(9600);   
  // set up the LCD's number of rows and columns: 
  lcd.begin(24, 2);
  // Print a message to the LCD.
  lcd.print("hello, world!");
  analogWriteFrequency(3,40000);
  analogWriteFrequency(4,40000);
  analogWriteFrequency(5,40000);
  analogWriteFrequency(6,40000);
  pinMode(chanA, OUTPUT);
  pinMode(chanB, OUTPUT);
  pinMode(chanC, OUTPUT);
  pinMode(chanD, OUTPUT);
  pinMode(7, INPUT_PULLUP);
  pinMode(8, INPUT_PULLUP);
  pinMode(9, INPUT_PULLUP);
  pinMode(10, INPUT_PULLUP);
  pinMode(11, INPUT_PULLUP);
  pinMode(12, INPUT_PULLUP);
  pinMode(13, INPUT_PULLUP);
  pinMode(14, INPUT_PULLUP);
  pinMode(15, INPUT_PULLUP);
    //initialize the variables we're linked to
  InputA = analogRead(chanAfb);
  InputC = analogRead(chanCfb);
  InputD = analogRead(chanDfb);
  SetpointA = 100;
  SetpointC = 100;
  SetpointD = 100;

  //turn the PID on
  PIDchanA.SetMode(AUTOMATIC);
  PIDchanC.SetMode(AUTOMATIC);
  PIDchanD.SetMode(AUTOMATIC);
}

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:

  analogWrite(chanA, 51);
  analogWrite(chanB, 102);
  analogWrite(chanC, 153);
  analogWrite(chanD, 204);
  //Gauge loop
    // subtract the last reading:
  total= total - readings[indexr];         
  // read from the sensor:  
  readings[indexr] = analogRead(pressVolt); 
  // add the reading to the total:
  total= total + readings[indexr];       
  // advance to the next position in the array:  
  indexr = indexr + 1;                    

  // if we're at the end of the array...
  if (indexr >= numReadings)              
    // ...wrap around to the beginning: 
    indexr = 0;                           

  // calculate the average:
  average = total / numReadings;
  volts = average * .0097;   
  torr = pow(10,(1.667 * volts - 11.46));
  if torr 
  decade = floor(x);
  exponent = decade - 7;
  significand = pow(10,(x - decade));


  //Serial.println(x);  
  Serial.println(volts); 
  Serial.println(torr);
  //Serial.println(pressVolt);
  //Serial.println(decade); 
  //Serial.println(significand);
  if (volts >= 1.8 && volts <= 8.61) {
    lcd.setCursor(4, 1);
    // Print a message to the LCD.
    lcd.print("e");
    lcd.setCursor(0, 1);
    lcd.print(significand); 
    lcd.setCursor(5, 1);
    lcd.print(exponent);
    error = 0;
   lcd.setCursor(7, 1);
    lcd.print(" Torr");
  }
  
  
  else {
    if (volts > 8.61) {
      lcd.setCursor(0, 1);
      lcd.print(" Overrange     ");
      error = 1;
    }
    if (volts < 1.8 && volts > 0.5) {
      lcd.setCursor(0, 1);
      lcd.print(" Underrange     ");
      error = 0;
    }
    if (volts < 0.5) {
      lcd.setCursor(0, 1);
      lcd.print("Sensor Error   ");
      error = 1;
    }
  }
}
There is also this mess:

Code: Select all


#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(PIN_D0, PIN_B7, PIN_B3, PIN_B2, PIN_B0, PIN_B1);
const int numReadings = 10;
int readings[numReadings];      // the readings from the analog input
int index = 0;                  // the index of the current reading
int total = 0;                  // the running total
int average = 0;                // the average
int decade;
int inputPin = 9;
int exponent;
float torr;
float pa;
float volts;
float pressure;
float significand;
float x;
int error;
int state = HIGH;      // the current state of the output pin
int reading;           // the current reading from the input pin
int previous = LOW;    // the previous reading from the input pin
int state1 = HIGH;      // the current state of the output pin
int reading1;           // the current reading from the input pin
int previous1 = LOW;    // the previous reading from the input pin
// the follow variables are long's because the time, measured in miliseconds,
// will quickly become a bigger number than can be stored in an int.
long time = 0;         // the last time the output pin was toggled
long time1 = 0;         // the last time the output pin was toggled
long debounce = 200;   // the debounce time, increase if the output flickers
int state2 = HIGH;      // the current state of the output pin
int reading2;           // the current reading from the input pin
int previous2 = LOW;    // the previous reading from the input pin
long time2 = 0;         // the last time the output pin was toggled
int state3 = HIGH;      // the current state of the output pin
int reading3;           // the current reading from the input pin
int previous3 = LOW;    // the previous reading from the input pin
long time3 = 0;         // the last time the output pin was toggled
int state4 = HIGH;      // the current state of the output pin
int reading4;           // the current reading from the input pin
int previous4 = LOW;    // the previous reading from the input pin
long time4 = 0;         // the last time the output pin was toggled
int stateo = HIGH;      // the current state of the output pin
int readingo;           // the current reading from the input pin
int previouso = LOW;    // the previous reading from the input pin
long timeo = 0; 
int mvenab;
int pvenab;
int override = LOW;
int overridden = LOW;
void setup()
{
  // initialize serial communication with computer:
  Serial.begin(9600);   

  // initialize all the readings to 0: 
  for (int thisReading = 0; thisReading < numReadings; thisReading++)
    readings[thisReading] = 0;
  pinMode (PIN_F4, OUTPUT);  //Turbo Pump
  pinMode (PIN_F5, OUTPUT);  //Fore Pump
  pinMode (PIN_F0, OUTPUT);  //Main Valve
  pinMode (PIN_F1, OUTPUT);  //Probe Valve
  pinMode (PIN_D2, INPUT_PULLUP);  //Override Input
  pinMode (PIN_C7, INPUT_PULLUP);  //Main Valve Input
  pinMode (PIN_C6, INPUT_PULLUP);  //Probe Valve Input
  pinMode (PIN_D3, INPUT_PULLUP);  //Turbo In
  pinMode (PIN_D6, INPUT_PULLUP);  //Fore In
  pinMode (PIN_D1, INPUT_PULLUP);  //Mode Switch
  lcd.begin(24, 2);
  lcd.clear();
  lcd.setCursor(0, 0);
  // Print a message to the LCD.
  lcd.print("FP:   TP:   MV:   PV:");    

}

void loop() {
  reading = digitalRead(PIN_D3); // Turbo Control
  if (reading == HIGH && previous == LOW && millis() - time > debounce) {
    if (state == HIGH)
      state = LOW;
    else
      state = HIGH;
    time = millis();    
  }
  digitalWrite(PIN_F5, state); 
  previous = reading;
  reading1 = digitalRead(PIN_D6); // Fore Control
  if (reading1 == HIGH && previous1 == LOW && millis() - time1 > debounce) {
    if (state1 == HIGH)
      state1 = LOW;
    else
      state1 = HIGH;
    time1 = millis();    
  }
  previous1 = reading1; 
  digitalWrite(PIN_F4, state1);
  if (state == 0) {
    lcd.setCursor(10, 0);
    lcd.print(byte(0x95));
  }
  else {
    lcd.setCursor(10, 0);
    lcd.print(byte(0x94));
  }
  if (state1 == 0) {
    lcd.setCursor(4, 0);
    lcd.print(byte(0x95));
  }
  else {
    lcd.setCursor(4, 0);
    lcd.print(byte(0x94));
  }
  reading2 = digitalRead(PIN_D1); // Pressure Mode Switch
  if (reading2 == HIGH && previous2 == LOW && millis() - time2 > debounce) {
    if (state2 == HIGH) 
      state2 = LOW;

    else 
      state2 = HIGH;

    time2 = millis();    
  }
  previous2 = reading2; 
  

  // subtract the last reading:
  total= total - readings[index];         
  // read from the sensor:  
  readings[index] = analogRead(inputPin); 
  // add the reading to the total:
  total= total + readings[index];       
  // advance to the next position in the array:  
  index = index + 1;                    

  // if we're at the end of the array...
  if (index >= numReadings)              
    // ...wrap around to the beginning: 
    index = 0;                           

  // calculate the average:
  average = total / numReadings;
  volts = average * .0097;   
  if (state2 == 0)  torr = volts - 2.1249;
  else torr = volts - 2;
  x = torr - 1.5;
  decade = floor(x);
  exponent = decade - 7;
  significand = pow(10,(x - decade));


  //Serial.println(x);  
  Serial.println(volts); 
  Serial.println(average);
  //Serial.println(decade); 
  //Serial.println(significand);
  if (volts >= 1.8 && volts <= 8.5) {
    lcd.setCursor(4, 1);
    // Print a message to the LCD.
    lcd.print("e");
    lcd.setCursor(0, 1);
    lcd.print(significand); 
    lcd.setCursor(5, 1);
    lcd.print(exponent);
    error = 0;
    if (state2 == 0) {

    lcd.setCursor(7, 1);
    lcd.print(" Torr");
  }
  else {
    lcd.setCursor(7, 1);
    lcd.print(" mBar");
  }
  }
  else {
    if (volts > 8.5) {
      lcd.setCursor(0, 1);
      lcd.print(" Overrange     ");
      error = 1;
    }
    if (volts < 1.8 && volts > 0.5) {
      lcd.setCursor(0, 1);
      lcd.print(" Underrange     ");
      error = 0;
    }
    if (volts < 0.5) {
      lcd.setCursor(0, 1);
      lcd.print("Sensor Error   ");
      error = 1;
    }
  }

  if (volts < 6.5 && error == 0) pvenab = 1;
  else pvenab = 0;  
  if (volts < 6.5 && error == 0) mvenab = 1;
  else mvenab = 0;
  readingo = digitalRead(PIN_D2); // Overridee Switch
  if (readingo == HIGH && previouso == LOW && millis() - timeo > debounce) {
    if (stateo == HIGH) 
      stateo = LOW;   
    else 
      stateo = HIGH;    
    timeo = millis();    
  }
  previouso = readingo; 
  stateo = override;
  reading3 = digitalRead(PIN_C7); // Main Valve Switch
  if (reading3 == HIGH && previous3 == LOW && millis() - time3 > debounce) {
    if (state3 == HIGH) 
      state3 = LOW;   
    else 
      state3 = HIGH;    
    time3 = millis();    
  }
  previous3 = reading3; 
  //if (mvenab == 0 && override == 1) overridden = 1;
  if (override == HIGH || mvenab == 1) digitalWrite(PIN_F0, state3);
  else {
    digitalWrite(PIN_F0, LOW);
    state3 = 0;
  }
  reading4 = digitalRead(PIN_C6); // Probe Valve Switch
  if (reading4 == HIGH && previous4 == LOW && millis() - time4 > debounce) {
    if (state4 == HIGH) 
      state4 = LOW;   
    else 
      state4 = HIGH;     
    time4 = millis();    
  }
  previous4 = reading4; 
  if (pvenab == 1) digitalWrite(PIN_F1, state4);
  else {
    digitalWrite(PIN_F1, LOW);
    state4 = 0;
  }
  if ( state3 == HIGH && override == LOW) {
    lcd.setCursor(16,0);
    lcd.print(byte(0x3D));
  }
  else {
    if (state3 == HIGH && mvenab == 1) {
      lcd.setCursor(16,0);
      lcd.print(byte(0x88));
    }
    else {
      lcd.setCursor(16,0);
      lcd.print(byte(0x8D));
    }
  }
  if (state4 == HIGH) {
    lcd.setCursor(22,0);
    lcd.print(byte(0x3D));
  }
  else {
    lcd.setCursor(22,0);
    lcd.print(byte(0x8D));
  }


  delay(50);
}



Bruce Meagher
Posts: 148
Joined: Thu May 12, 2011 11:25 pm
Real name: Bruce Meagher
Location: San Diego

Re: MKS 901p

Post by Bruce Meagher »

Pablo,

Like Richard mentioned above just start with a cheap voltmeter (like the free ones we get at Harbor Freight). Nothing fancy required. What voltage do you measure on the analog output at atmosphere? One thing to note is that these gauges often read high (inaccurate) at atmosphere (close to 9V). I’d then recommend connecting the gauge to your chamber and pumping on it. Just watching the voltage will give you a reasonable idea if the gauge’s analog output has been set to emulate a different type of gauge by the previous owner (explained in the manual).

If you’ve been able to create a nice plasma ball then I’d expect the gauge’s analog output to be approximately 4V - 5V if it’s set to the factory default curve.

If you’re determined to start with the Arduino then having your program calculate and display the pressure will just make it harder to determine if the gauge is working properly. I would think the 750 Torr vs 760 Torr you're currently seeing ’s just your program reading between two ADC values. Printing the raw ADC values and hand calculating the voltages might be instructive. Measuring the voltage with a voltmeter at the divider should also be instructive. What you do not want to do is set constants in your code to match what you believe the pressure should be at atmosphere.

You can also use an inexpensive serial to USB adaptor to connect the serial link on the gauge to your Mac’s USB port (you could even jumper between the gauge and USB/Serial adaptor cable to test it without making a proper cable). This is assuming you have the RS-232 version. With OSX's Terminal app and the “screen" command you should be able to directly connect to the gauge and issue commands digitally over the serial port. Or just use one of the Arduino’s serial ports.

Bruce
Jerry Biehler
Posts: 975
Joined: Tue Nov 24, 2009 3:08 am
Real name:
Location: Beaverton, OR

Re: MKS 901p

Post by Jerry Biehler »

The arduino's serial is ttl level so you will have to add in a MAX3232 (assuming 3.3v). You will need one of these: https://www.sparkfun.com/products/11189
User avatar
Richard Hull
Moderator
Posts: 14975
Joined: Fri Jun 15, 2001 9:44 am
Real name: Richard Hull

Re: MKS 901p

Post by Richard Hull »

Your oscillation between 750 and 760 could be the Arduino's 10 bit resolution limit over the 0-9v range of the sensor. I would check it with a voltmeter and see what the wiggle is on voltage at atmosphere. If it is a resolution problem, then once in the low range of fusor pressures, you might have accuracy issues. You could get better resolution if you limit the Arduino to the voltage from a much narrower span of the decade voltages from 9 volts to say 2 or 3 volts in the 0-9v range of interest for fusor work.

Finally, 1% resistors are very common and inexpensive now. However, why fiddle with such a divider? Use two 1% resistors where the division point is say 4.8 volts and then insert a modern 10 turn pot in the middle of an appropriate ohmic span and put 9.000 volts on the divider and turn the pot until its wiper reads 5.000 volts. This should eliminate any error to the limit of the sensor and your ability to supply and read accurately 9.000 and 5.000 volts in the adjustment phase. Heck, you could probably just get a 10 or 20 turn pot of about 10k and ground one end and put 9.000 v on the other and tune it to 5.000 on the wiper. The elegance of the two resistor one pot solution offered up first is to be preferred.

Richard Hull

P.S. I posted late on this and others hit on the 10 bit resolution limit of the arduino. I did not see their posts. The updated divider idea and narrower reporting span is still a good one
Progress may have been a good thing once, but it just went on too long. - Yogi Berra
Fusion is the energy of the future....and it always will be
The more complex the idea put forward by the poor amateur, the more likely it will never see embodiment
Pablo Llaguno
Posts: 104
Joined: Sun Feb 05, 2017 6:00 pm
Real name: Pablo Llaguno

Re: MKS 901p

Post by Pablo Llaguno »

Thanks for all the help, it is a lot to process, but I think that I will understand it one day.

My multimeter doesn't even read decimals, but connected to my gauge it displays 8volts. Tomorrow I'll go with a friend that has a nice digital voltmeter and test the gauge output Sadly we don't have harbor freight here, so I would prefer to order one from amazon (does someone has any recommendations for one?).

Bruce I totally agree that I should not set constants in my code to match what I believe is the pressure, that is why I am trying to fix the thing with my voltage divider. Also I didn't fully understand this part
You can also use an inexpensive serial to USB adaptor to connect the serial link on the gauge to your Mac’s USB port (you could even jumper between the gauge and USB/Serial adaptor cable to test it without making a proper cable). This is assuming you have the RS-232 version. With OSX's Terminal app and the “screen" command you should be able to directly connect to the gauge and issue commands digitally over the serial port. Or just use one of the Arduino’s serial ports.
I haven't read anything about the serial user interface, would you mind PM me about this? Thanks

Richard so you are saying that I might get better resolution if I set the voltage divider to a narrower span of voltage, instead of 0-5, something like 0-3? Also your solution for the voltage divider using a potentiometer is very clever, I never thought of that. I've never used turn potentiometers, just normal 10k potentiometers, could I use a 10k potentiometer and adjust it while reading the voltage with a voltmeter until I get 5.000 V?
User avatar
Richard Hull
Moderator
Posts: 14975
Joined: Fri Jun 15, 2001 9:44 am
Real name: Richard Hull

Re: MKS 901p

Post by Richard Hull »

You seem to insist on using the Arduino with 10 bit resolution. Within the prgramming language, you can instruct the full 10 bits to examine only a much narrower range of voltages (span). this span might be where the gauge is looking at ouputing voltages far less than 9 volts or 7 volts, where the pressure is in the lower ranges within the fusor's operational range.

Thus, your Arduino would not even report a pressure until you were under 1 torr or even under 100 microns. Why do you need to accurately display 123 torr of 396 microns? They are without any value to you. It isn't until you hit 100 microns that you might really be interested in what pressure to have in the chamber. All of that upper end pressure is a waste of bits.

Some rather fancy preconditioning of the 9 v to 0 v signal may be required.

i am working on this.

Richard Hull
Progress may have been a good thing once, but it just went on too long. - Yogi Berra
Fusion is the energy of the future....and it always will be
The more complex the idea put forward by the poor amateur, the more likely it will never see embodiment
Rex Allers
Posts: 570
Joined: Sun Dec 30, 2012 3:39 am
Real name:
Location: San Jose CA

Re: MKS 901p

Post by Rex Allers »

Using the ADC on an Arduino to read the pressure from these 901P sensors seems like a pain unless you enjoy the project. If you learn how to talk to the serial interface of the 901P, it will send back the pressure. I'm sure they spent a lot of time getting that result, that they send back, as accurate as possible.

If you have a good DVM then measuring the analog signal to see how things are working is an easy way to start.

If you want to talk serial, first check your part number to be sure it has an RS232 interface, not RS485. (It probably does.) Talking serial from the Arduino pins, the signals are inverted TTL so you need to get a little converter board. There are many on eBay. Try searching for 'rs232 to ttl board'. Some of these little boards come with a DB-9 connector mounted on them, but that would just complicate things for this application. There are also boards with just solder tabs that probably would be easier for this. Just now, I saw one listing from china with 5 boards for $1.15.

You will have to learn to use the serial drivers for the arduino and write some code to send commands and process the results. To start, you can print to the debug port and see that on a PC attached through the USB cable. Actually, for 1st pass learning you could probably wire a DB-9 connector and talk to the sensor with a PC or Mac, no Arduino. You may need a USB to Serial adapter to get a serial port on the PC. Then just use some kind of serial terminal program. On a PC, XP and below gave you Hyper Terminal. Win 7 and newer dropped Hyper Terminal but there are ways to get it back or use a different program. I'm not a Mac guy but there must be something similar.

I gave a 901 manual link earlier. That manual describes using the serial port on pages 9-11. Then pages 15 & 16 talk about reading the pressure with commands. Simplifying out possible complications you would do something like this:
Send: @253PR4?;FF
Receive: @253ACK1.230E-3;FF

It's probably good to learn to talk on the serial interface to the 901P in case you need to change some nonstandard configuration that it may have or to program something that might be useful like relay outputs.

So that's what I think I will do when I have time to try the 901P sensor that I bought but haven't tried yet.
Rex Allers
Pablo Llaguno
Posts: 104
Joined: Sun Feb 05, 2017 6:00 pm
Real name: Pablo Llaguno

Re: MKS 901p

Post by Pablo Llaguno »

Richard Hull wrote:You seem to insist on using the Arduino with 10 bit resolution. Within the prgramming language, you can instruct the full 10 bits to examine only a much narrower range of voltages (span). this span might be where the gauge is looking at ouputing voltages far less than 9 volts or 7 volts, where the pressure is in the lower ranges within the fusor's operational range.

Thus, your Arduino would not even report a pressure until you were under 1 torr or even under 100 microns. Why do you need to accurately display 123 torr of 396 microns? They are without any value to you. It isn't until you hit 100 microns that you might really be interested in what pressure to have in the chamber. All of that upper end pressure is a waste of bits.

Some rather fancy preconditioning of the 9 v to 0 v signal may be required.

i am working on this.

Richard Hull
Thanks Richard for the clarification, I didn't understand you at first. You are right, I don't need to accurately display 120 Torr, the best range for me would be from the lower micron end to 1 Torr, if possible, but the most important pressure range is when I hit 100 microns as you say. So let me ask once again, because I am not sure I understand you correctly, but what you are telling me is that I will be better with the Arduino reading a shorter span of voltage, instead of reading 0-9, I would be better by reading 0 - 6 volts, or even smaller spans?

Rex, my part number does indicate I have a RS232 interface. I just started learning Arduino this week, so if I want to go serial the best option would be to get that USB to RS232 adapter, page 9 on the manual shows how it should be wired. In Mac it is literally called terminal.
Jerry Biehler
Posts: 975
Joined: Tue Nov 24, 2009 3:08 am
Real name:
Location: Beaverton, OR

Re: MKS 901p

Post by Jerry Biehler »

The terminal app is a terminal for the OS, it is not a serial terminal. Download Zterm, that will talk to a serial port. You can set up macros with it to send the serial strings with a key combo, some devices will ignore manual typed in commands because it will time out if the time period between characters is too long.
Pablo Llaguno
Posts: 104
Joined: Sun Feb 05, 2017 6:00 pm
Real name: Pablo Llaguno

Re: MKS 901p

Post by Pablo Llaguno »

Jerry Biehler wrote:The terminal app is a terminal for the OS, it is not a serial terminal. Download Zterm, that will talk to a serial port. You can set up macros with it to send the serial strings with a key combo, some devices will ignore manual typed in commands because it will time out if the time period between characters is too long.
Thanks for the correction.

I don't even know where I got the idea of measuring the pressure with the ADC from the Arduino, I just thought it would work, I simply ignored the fact of the 10 bit resolution of the ADC and thought the voltage divider would do. So what I am going to do is check with the voltmeter, and then try to do some serial communication.

Thanks for the help,

Pablo
User avatar
Richard Hull
Moderator
Posts: 14975
Joined: Fri Jun 15, 2001 9:44 am
Real name: Richard Hull

Re: MKS 901p

Post by Richard Hull »

I bread boarded a very simple circuit to get only 5 volts into the arduino until the sensor's output voltage drops down below 5 volts.

You place a 470 ohm resistor in series with a 4.8 volt precision zener diode. Feed a variable 9 volt to 0 volt positive voltage from a supply to the open end of the 470 ohm resistor and ground or return of the supply to the open end of the diode. (make sure the diode polarity is correct). Place a voltmeter between the ground point and the junction of the diode and resistor. Set the supply to 9 volts. You will read ~4.8 volts. As you lower the voltage to 7 volts. The meter will still read 4.8 volts, safe for the arduino. As you continue to lower the voltage, below 4.8 volts, you hit the "zener knee". At this point on to zero volts, from the supply, the meter reads exactly what the supply reads.

Thus, you have had 4.8 volts out of the this circuit regardless of input voltage until you go below 4.8 volts applied, at which time any lower voltage just passes by into the Arduino, safely, until you hit zero.

Note, you have obviated and failed to register the the first four decades of the device and can read the pressure with the arduino from about 4.6 volts down to zero. This jams more bits and resolution into the range that you need at fusion pressures.

Caveat!!**** Nothing is easy....Always remember that in electronics.... There is almost always a way to skin a cat, but that doesn't mean you won't get scratched doing it.

It turns out that at the zener knee there is a small "loopy zone" (leakage region) of about .4 volts where things and the voltages monkey about a bit. But once you are well below the zener voltage the lower voltage exactly tracks the input voltage ~4.6v or so to zero. You could use a precision zener at 5 volts which the Arduino would be happy with, but I like a safety zone afforded by a 4.8 volt zener.

If you do not follow this discussion perhaps you might go with the serial suggestions. This is just how I would do this if I was pressed to use the Arduino as an experimental effort and exercise for self-satisfaction.

Richard Hull
Progress may have been a good thing once, but it just went on too long. - Yogi Berra
Fusion is the energy of the future....and it always will be
The more complex the idea put forward by the poor amateur, the more likely it will never see embodiment
Pablo Llaguno
Posts: 104
Joined: Sun Feb 05, 2017 6:00 pm
Real name: Pablo Llaguno

Re: MKS 901p

Post by Pablo Llaguno »

Checked the voltage with a voltmeter and it said 9.6Volts, that doesn't sound good to me so I think the multimeter is wrong. Now I need to do some serial communication to see what the real pressure is. Talking about serial communication, zTerm is not free, I looked for other serial apps and found some but most aren't free and only give you a free trial. Any tips on what app to get?
Jerry Biehler
Posts: 975
Joined: Tue Nov 24, 2009 3:08 am
Real name:
Location: Beaverton, OR

Re: MKS 901p

Post by Jerry Biehler »

ZTerm is shareware, pay if you want. http://www.dalverson.com/zterm/

The chances of the meter being wrong are almost zero. It just may need an atmospheric adjustment.
Pablo Llaguno
Posts: 104
Joined: Sun Feb 05, 2017 6:00 pm
Real name: Pablo Llaguno

Re: MKS 901p

Post by Pablo Llaguno »

Nice news!

Managed to do serial communication, got 720 Torr at atmospheric. Using my Robinair VacuMaster I managed to hit 150microns, problem is, I know the pump is capable of more vacuum than that. I am using refrigeration copper pipe (1/4")with flares to connect it to my chamber, my chamber has needle valves and Hysol1C in all fittings, except the NPT adapter to the KF16 flange of the transducer. I am also using the MAKE design (I know it is terrible), which means I "sandwiched" a glass jar between two plates, and to seal it I am using Nitrile gaskets.

I would think that my system is leaking because of the small diameter copper pipe, but I would like to hear your thoughts.
John Futter
Posts: 1848
Joined: Wed Apr 21, 2004 10:29 pm
Real name: John Futter
Contact:

Re: MKS 901p

Post by John Futter »

pablo
look up
vacuum conductance
Rex Allers
Posts: 570
Joined: Sun Dec 30, 2012 3:39 am
Real name:
Location: San Jose CA

Re: MKS 901p

Post by Rex Allers »

Pablo,

I was typing a message and just as I was ready to send I noticed you just replied with new status -- so here two parts.

--- My original message; may still something helpful here --
Does your 901P show a solid green light when you have it powered? If not It could have problems. Check the manual if you have different LED indications.

Looking at the alternative configurations (set to emulate a different sensor) some could have an output around 9.6 V at atmospheric pressure.

I think you should figure out how to talk to it with the serial port. In addition to reading the output in a text response you can request the status of the 901P and see if it is in some strange mode or has some kind of problem.

I think you said you had a Mac. I just looked on Sourceforge.net. You can search there just for Mac software. Here's a link that should take you there, set-up for Mac:
https://sourceforge.net/directory/os%3Amac/

On that page put 'Serial terminal' in the search term. That gave a number of results. Maybe one will work for you on the Mac. I don't have any experience to suggest one, but I'm thinking I may try one or two of the PC programs to see how they compare. I have used RealTerm on a PC but I don't think they have a Mac version. That one isn't the easiest to figure out either.

--- In response to your latest ---
If you can talk to it via serial now, check and make sure it is configured in normal mode, not some emulation.

To avoid as many plumbing issues as possible, connect the sensor to only the pump first with the most direct connection you can make. You first want to check only your pump and sensor, so exclude everything else for now.
Rex Allers
Bruce Meagher
Posts: 148
Joined: Thu May 12, 2011 11:25 pm
Real name: Bruce Meagher
Location: San Diego

Re: MKS 901p

Post by Bruce Meagher »

Pablo,

Good to see you were able to get your gauge working over the serial link. I just purchased one from eBay, and thought I’d share my results for comparison.

At atmosphere (in San Diego today) the analog out on the 901P measures 8.87V. Over the serial link the Pirani is reads 900 Torr, the Piezo reads 14.5 Torr (relative to ATM), and the combined reading (PR3) is 739 Torr.

The gauge was set to the default address (253), default baud rate (9600), and default emulation (AO1 = 30 - combine pressure value, MKS standard). Below are the command/response values from my gauge for comparison (I used the broadcast address in case the previous user had changed it from the default value).

@254PR1?;FF@253ACK9.00E+2;FF
@254PR2?;FF@253ACK1.45E+1;FF
@254PR3?;FF@253ACK7.39E+2;FF
@254PR4?;FF@253ACK7.385E+2;FF

@254BR?;FF@253ACK9600;FF
@254AD?;FF@253ACK253;FF
@254RSD?;FF@253ACKON;FF

@254MD?;FF@253ACK901P;FF
@254PN?;FF@253ACK901P-11040;FF
@254DT?;FF@253ACKLOADLOCK;FF
@254MF?;FF@253ACKMKS;FF
@254HV?;FF@253ACKB;FF
@254FV?;FF@253ACK1.33;FF
@254SN?;FF@253ACK1329664979;FF
@254SW?;FF@253ACKON;FF
@254TIM?;FF@253ACK5322;FF
@254TEM?;FF@253ACK2.20E+1;FF
@254UT?;FF@253ACKMKS;FF
@254T?;FF@253ACKO;FF
@254U?;FF@253ACKTORR;FF
@254GT?;FF@253ACKNITROGEN;FF
@254VAC?;FF@253ACK0.00E+0;FF
@254ATM?;FF@253ACK0.00E+0;FF
@254AO1?;FF@253ACK30;FF
@254AO2?;FF@253ACK215;FF

Seems like it'll be a nice little gauge. A small battery powered Arduino with display would make a nice combo.

Bruce
Attachments
IMG_8801.JPG
Last edited by Bruce Meagher on Wed May 20, 2020 6:58 pm, edited 1 time in total.
Pablo Llaguno
Posts: 104
Joined: Sun Feb 05, 2017 6:00 pm
Real name: Pablo Llaguno

Re: MKS 901p

Post by Pablo Llaguno »

Haven't measured analog with a repeatable volt meter, I think the one I used isn't working properly (because it measured 9.6volts). Today the serial (PR4) measured 711.9 Torr, but I live at about 500m altitude, that could be why. I will get that TTL serial adaptor and learn some code so I can communicate the transducer with the Arduino directly an have it displayed in a LCD. Also, I had some problems with the backlight pot of the LCD, because it interfered with the pressure when I tried to use the Arduino to read the transducer. I checked every connection and it doesn't make sense, how can the pot interfere with the analog output of the transducer.

I will upload some pics later in Images du Jour of the Star Mode I was able to get, the pressures I was receiving with the transducer seem to match the plasma I had, according to the Demo Furor Pictorial under the FAQs.

Rex my gauge is working fine, the led turns red for about 2 seconds then green and stays that way. I also sent @253T?;FF and received @253ACKO;FF which means both sensors are working properly.

Thanks for the tips on connecting the sensor directly to the pump, also I will look into vacuum conductance.

I am using the app serial at the moment to do communication, but it will expire soon, what kind of drivers will Zterm need?
John Myers
Posts: 68
Joined: Tue Mar 07, 2017 7:13 pm
Real name:
Location: SoCal

Re: MKS 901p

Post by John Myers »

How much current are you supplying to the LCD? strange things can happen when the current draw of the system is a little more then the power supply can handle. The LCD backlight can use up a good amount of current compared to the rest of the circuit.
Rex Allers
Posts: 570
Joined: Sun Dec 30, 2012 3:39 am
Real name:
Location: San Jose CA

Re: MKS 901p

Post by Rex Allers »

Pablo,

On serial terminal software. I mentioned earlier that you might try looking on SourceForge. While I was browsing there one of the programs I found was ScriptCommunicator. You might want to check it out. It looks amazingly powerful. The only tricky part might be learning to use it just as a simple terminal, it has so many features.

Here's a direct link:
https://sourceforge.net/projects/scriptcommunicator/

It has versions for Windows, Mac OS X, and Linux. Click on the files tab to see directories for downloading each version.

The description there:
------
ScriptCommunicator is a scriptable cross-platform data terminal which supports serial port (RS232, USB to serial), UDP, TCP client/server, SPI, I2C and CAN.

All sent and received data can be shown in a console and can be logged in an html, a text and a custom log.

In addition to the simple sending and receiving of data ScriptCommunicator has a QtScript (similar to JavaScript) interface.
------

It looks like it should be easy to make a list of strings to send so you can click from a list of commands you build.

Looks like it has a very powerful scripting capability and I think you can even build a GUI interface to use it from.

I haven't tried it yet but I downloaded it to use later.

There's a big PDF User Guide in the source zipfile. I think it may be in the installed versions too but I haven't installed the prog yet so I checked and found the PDF was available in the Source zip.
Rex Allers
Jerry Biehler
Posts: 975
Joined: Tue Nov 24, 2009 3:08 am
Real name:
Location: Beaverton, OR

Re: MKS 901p

Post by Jerry Biehler »

Zterm does not need drivers but your serial adapter might. But if it is already working with whatever you are using now that means the drivers are already installed. So just launch Zterm and select the right port and go.
Pablo Llaguno
Posts: 104
Joined: Sun Feb 05, 2017 6:00 pm
Real name: Pablo Llaguno

Re: MKS 901p

Post by Pablo Llaguno »

Bruce my gauge is set up exactly like yours, today I got a nicer volt meter and it reads 8.82 volts, while serial communication says I am at 705.5 Torr, which equals ~8.85 volts so I have a problem there, either my voltmeter is off by 0.03V, or maybe it could be my power supply but I don't think so since it supplies 12v and has a capacity of 3watts.
User avatar
Richard Hull
Moderator
Posts: 14975
Joined: Fri Jun 15, 2001 9:44 am
Real name: Richard Hull

Re: MKS 901p

Post by Richard Hull »

I would not fuss over 0.03 volts. It is truly a non-issue here. I would not immediately blame the voltmeter for such an error.

I have 3 "Weston standard cells" for those in the know, these are the ultimate voltage source to about .001 volt and last for many years...50++years. They must never-ever see a load of any significance and about 1 microamp is their design limit of current draw, thus, a 1 megohm load is approaching the limit.

The normal voltage of a weston standard cell is 1.019 volt +/- a few ten thousandths of a volt based on ambient temperature. All of my three cells on any given single meter read within a thousanths of a volt on the 2 volt range.

I wondered how accurate are the free give-away chi-com digital meters found at Harbor Freight. If you don't have a free coupon and are forced to pay the list price of $5.99, did you get your money's worth??

I took 10 of the meters from harbor freight that I have picked up for free and put them on their 2 volt range and then hooked them to a weston cell. (tests performed in June 2016 from my lab book)

1. 1.016
2. 1.018
3. 1.021
4. 1.023
5. 1.015
6. 1.016
7. 1.017
8. 1.020
9. 1.018
10 1.020

The average was 1.018 about the ideal 1.019 or 0.001 volt! However the extreme errors on the worst meters were .004 volts high to .004 volts low.

Thus, all of the junk Harbor Freight Chi-com meters are incapable of a .01 volt total gross error.

By the way, my $200.00 Beckman read 1.016 and my $150 Fluke read 1.020. Now, we see, only 2 of the chi-coms were as bad as the Beckman and 2 of the chi-coms were as good as the fluke. I will never pay more than $10.00 for another digital meter.

Thus, it is doubtful that any current digital meter can be off by more than 0.01 volt. more likely it is off by no more than 0.005 volts.

Richard Hull
Progress may have been a good thing once, but it just went on too long. - Yogi Berra
Fusion is the energy of the future....and it always will be
The more complex the idea put forward by the poor amateur, the more likely it will never see embodiment
Pablo Llaguno
Posts: 104
Joined: Sun Feb 05, 2017 6:00 pm
Real name: Pablo Llaguno

Re: MKS 901p

Post by Pablo Llaguno »

If I go by what the meter says, then the analog output says the sensor's pressure is 600Torr, why could it be off? Is it fine that it misses by 100Torr at atmosphere? I checked every setting of the sensor and it seems to be in the factory default version.
Bruce Meagher
Posts: 148
Joined: Thu May 12, 2011 11:25 pm
Real name: Bruce Meagher
Location: San Diego

Re: MKS 901p

Post by Bruce Meagher »

How exactly are you measuring the analog voltage? Maybe upload a picture of your current setup. The manual specifically states the analog measurement must be floating (see page 7 of the manual).

Bruce
Post Reply

Return to “Vacuum Technology (& FAQs)”