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.
User avatar
Finn Hammer
Posts: 77
Joined: Sat Mar 05, 2016 12:21 pm
Real name: Finn Hammer
Contact:

Re: MKS 901p

Post by Finn Hammer » Sat Sep 09, 2017 9:50 am

All,
The 901P transducers are plentiful and cheap on Ebay right now, and I have been working with them the last month or so.
Bruce Meager's post on interfacing with RS232 was most helpful to me, since this is the first time I have used that interface.

I am using an Arduino to query the 901P about the present pressure, a small Oled to display the answer, and the code is very simple.
I am a hardware guy, not a programmer, so it can probably be made a lot fancier, but it seems to work so far, so what.....
Code at the end of this post.
IMG_20170909_105239.jpg
Arduino breadboard with MAX3232 and MKS901P. Also the small A Nano which will be the final target for the code.
A couble of warnings:
The TTL signal from the Arduino needs to be translated to RS232, and this is done by a MAX3232 chip. I did not know this at first and it cost me the RS232 functionality of a 901P, which stopped responding after it was connected to TTL RX/TX.
(Why a +-10V interface caves in @0-5V is beyond me)
Another thing, the Arduino becomes unresponsive to program upload when the MAX3232 is connected to the RX/TX ports, so you should disconnect it when you upload the code to the Arduino.

I intend to wrap the Oled, the Arduino into a small enclosure with the connector at the bottom, and a Lipo battery with associated charger/booster to form a compact transportable unit.
This is the pressure gauge to bring with you, when you go out to buy a new foreline pump.
Mounted in a fusor, the 3 built in relays with programmeable trip points could come in handy, for example, disable/enable power to diff/turbo pump at say 35 Microns. Operate the foreline vent to atmosphere valve and foreline valve, in the case of a power failure.
I have tested the code with a 999 Quattro and it works there as well.

The code:
-------------------------------------------------
//This program queries MKS 901P and 999 series pressure transducers about pressure, and displays the result on small Oled display.
// 09-09-2017 Finn Hammer


#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);

String sensorValue;

void setup()
{
Wire.begin();

display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // initialize with the I2C addr 0x3C (for the 128x32)(initializing the display)
Serial.begin(9600);

}
void displayPressure() {

Serial.print ("@254PR3?;FF");
sensorValue = Serial.readString();
sensorValue.remove(0, 7); //Remove the forst 7 caracters from @253ACK7.39E+2;FF to get 7.39E+2;FF
sensorValue.remove(7); //Remove caracters from the 7th, to get 7.39E+2

display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(1);
display.setCursor(0, 0);
display.print("Foreline Pressure");
display.setTextSize(2);
display.setCursor(0, 12);
display.print(sensorValue);
display.setTextSize(1);
display.setCursor(98, 25);
display.print("Torr");

}
void loop()
{
displayPressure();
display.display();
}

User avatar
Richard Hull
Site Admin
Posts: 10510
Joined: Fri Jun 15, 2001 1:44 pm
Real name: Richard Hull

Re: MKS 901p

Post by Richard Hull » Sat Sep 09, 2017 5:59 pm

Great work Finn! This will help a number of folks here provided they have soldering skills and are willing to work with the Arduino.

I have been doing this for a few years now. (Arduino inclusion in projects)

I develop with the UNO as you did here, using a breadboard and wires all over the bench to finalize and de-bug a proposed design. In the final iteration I tend to use the Arduino Pro-Mini as it is half the price of the Nano which has the USB port on it. To program and re-program the Mini you need an FDTI dongle. The Pro-Mini is better if you are making a distributed product as folks are not tempted to plug a USB cable into your distributed device. However, I agree that for a personal, portable item, the Nano is a better choice since you, as the originator, can re-program with no hassles.

I have been building a number of Geiger counters since 2014 with the Arduino pro-mini as the core item. The kits I made just did not sell well, even among the the ham radio enthusiasts! A lot of these folks don't do any electronic work, (soldering, construction, etc.) A constant complaint is "I don't have time to build a kit"....."If you had one assembled, I might be interested." I now only offer assembled items at 3X the price and they sell OK now.

There are still electronic builders and enthusiasts out there, but the old original, "hands-on" cadre of ham radio folks are no longer major electronics "doers" due to modern ready to run ham gear.

Richard Hul
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
Retired now...Doing only what I want and not what I should...every day is a saturday.

Silviu Tamasdan
Posts: 135
Joined: Wed Jun 28, 2006 11:17 pm
Real name: Silviu Tamasdan

Re: MKS 901p

Post by Silviu Tamasdan » Sun Sep 10, 2017 11:05 pm

Actually I am still building my radio gear - I have to admit it, sometimes from kits. :)

Silviu
-KC1BJW
There _is_ madness to my method.

John Futter
Posts: 1214
Joined: Thu Apr 22, 2004 2:29 am
Real name:
Contact:

Re: MKS 901p

Post by John Futter » Mon Sep 11, 2017 7:11 am

Silviu
Yes some of us still put stuff together
see my QRZ.com page (ZL2TUD).
And yes it is in operation for the last three weeks.

Jerry Biehler
Posts: 727
Joined: Tue Nov 24, 2009 8:08 am
Real name:
Location: Beaverton, OR

Re: MKS 901p

Post by Jerry Biehler » Mon Sep 11, 2017 7:44 pm

I think the basic arduino uses a usb-serial chip on the same serial port as what you are tying to use. I dont know if there are any other serial ports on that arduino but the higher end ones have multiple serial ports and real usb so you dont have to worry about this problem.

Silviu Tamasdan
Posts: 135
Joined: Wed Jun 28, 2006 11:17 pm
Real name: Silviu Tamasdan

Re: MKS 901p

Post by Silviu Tamasdan » Mon Sep 11, 2017 11:58 pm

John Futter wrote:Silviu
Yes some of us still put stuff together
see my QRZ.com page (ZL2TUD).
And yes it is in operation for the last three weeks.
(nice - I'm at the opposite end of the power spectrum; mostly QRSS, my most powerful transmitter is 200mW)

I also like the Arduino Pro Minis - especially the 3V versions. You can embed them in very small projects and power from a tiny LiPO battery - for instance in the payload of a model rocket.
There _is_ madness to my method.

User avatar
Finn Hammer
Posts: 77
Joined: Sat Mar 05, 2016 12:21 pm
Real name: Finn Hammer
Contact:

Re: MKS 901p

Post by Finn Hammer » Wed Sep 27, 2017 7:44 pm

All,

The first version of my code had a couple of shortcomings, which has now been ironed out.
Firstly, it did not comply with the fu-speak pressure unit system. fu-speak?? Confused?, well so was I.
Pressure units were never easy, and the world has odd preferences when it comes to expressing the value of a pressure. In Asia they favour the Pascal (or so I read), and so does the scientific community. Europeans are fond of the Millibar. Yankees swear by the torr.
And then there is that weird little group of fanatics "The Fusioneers" (and the associated group of wannabees), they have their own silly system. A system based on torr, which is the unit down to 1.0E-00, where it changes to the micron, which must be religiously adhered to all the way to 1.0 E-03 torr (0 Microns) where the unit changes again, this time to millitorr.
In appreciation of the immense work given here by mr. Hull, (who is a stern advocate of the micron), and with a nod to a certain mr. Orwell, I call this system for fu-speak, short for fusor-speak.
It only took 25 extra lines of code to comply with fu-speak, it was a fun coding exercise, and besides, I have pledged to use the micron around fusion pressures and generally gotten used to it, so here you have it.
However, it would also be nice to be able to display the pressure in Pascal, since it is so highly touted in the scientific community, and in all the books. And as an educational feature, switch back and forth, to perhaps gain a working ability to switch between units without having to grab a calculator, and/or swear in dispair.
Of course, you could go with HectoPascal and learn to multiply with 1.33 but.....
Anyway, I needed an excuse to learn how to implement the Interrupt routine in programs, so I took this opportunity do use the response to the activation of two switches, to toggle betweeen two branches of the program.
One where the transducer is first prompted to answer in Pascal, the other to report back with the pressure in torr.
This works nicely, and I am satisfied, (as in proud), of my acheivement.
The outputs looke like this now, just a push of a button apart:
IMG_20170927_200211.jpg
Pressure displayed in fu-speak
IMG_20170927_200200.jpg
Pressure in proper Pascal
The can of worms approach has to stop, and I have already ordered d-sub receptacles to solder to a motherboard which will form a mechanical backbone for, and harness the arduino nano, the battery charger/boost converter and the MAX232 RS232 to TTL converter, the two switches, a power switch, the battery and the display.
I will also try to find a suitable (as in available) box to wrap up the whole caboodle.
The code needs small adjustments to the placing of the units, for example, millitorr should start further to the left, when this is done and has been tested with a diff-pump, the code will get it's V.1.00 stamp, and I will write a nice little post, with all details needed to replicate the work, in the case that you should want to.

Meanwhile, you can grab the code here:


//VacuuMeter V.0.9
//This program queries MKS 901P and 999 series pressure transducers about pressure,
//either in torr or pascal, and displays the result on small Oled display.
// 27-09-2017 Finn Hammer


#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);
String sensorValue;
String pressureUnit;
String unitBuffer;
String unit;
const byte ledPin = 13;
const byte interruptPin3 = 3;
const byte interruptPin2 = 2;


void setup() {
display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // initialize with the I2C addr 0x3C (initializing the display)
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
pinMode(interruptPin3, INPUT_PULLUP);
pinMode(interruptPin2, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(interruptPin3), pascalISP, FALLING);
attachInterrupt(digitalPinToInterrupt(interruptPin2), fuspeakISP, FALLING);
}


void loop() {
if (unit == "Pascal") {
pascal();
}

else if (unit == "Fuspeak") {
fuspeak();
}

display.display();
}


void pascalISP() {
unit = "Pascal";
Serial.print ("@253U!PASCAL;FF");
}


void fuspeakISP() {
unit = "Fuspeak";
Serial.print ("@253U!TORR;FF");
}


void pascal () {
Serial.print ("@254PR3?;FF");
sensorValue = Serial.readString();
sensorValue.remove(0, 7); //Remove the first 7 caracters from @253ACK7.61E+2;FF to get 7.39E+2;FF
sensorValue.remove(7); //Remove caracters from the 7th, to get 7.61E+2}
pressureUnit = "Pascal";
display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(1);
display.setCursor(0, 0);
display.print("Foreline Pressure");
display.setTextSize(2);
display.setCursor(0, 9);
display.print(sensorValue);
display.setTextSize(1);
display.setCursor(85, 25);
display.print(pressureUnit);
}


void fuspeak () {
Serial.print ("@254PR3?;FF");
sensorValue = Serial.readString();
sensorValue.remove(0, 7); //Remove the first 7 caracters from @253ACK7.61E+2;FF to get 7.39E+2;FF
sensorValue.remove(7); //Remove caracters from the 7th, to get 7.61E+2

unitBuffer = sensorValue;
unitBuffer.remove (0, 5);
if (unitBuffer == "+2") {
pressureUnit = "torr";
}
else if (unitBuffer == "+1") {
pressureUnit = "torr";
}
else if (unitBuffer == "+0") {
pressureUnit = "torr";
}
else if (unitBuffer == "-1") {
pressureUnit = "micron";
sensorValue.remove (1, 1);
sensorValue.remove (3);
}
else if (unitBuffer == "-2") {
pressureUnit = "micron";
sensorValue.remove (1, 1);
sensorValue.remove (2);
}

else if (unitBuffer == "-3") {
pressureUnit = "micron";
sensorValue.remove (1, 1);
sensorValue.remove (1);
}
else if (unitBuffer == "-4") {
pressureUnit = "millitorr";
}
else if (unitBuffer == "-5") {
pressureUnit = "millitorr";
}
else if (unitBuffer == "-6") {
pressureUnit = "millitorr";

}
else pressureUnit = "endelse";


display.clearDisplay();
display.setTextColor(WHITE);
display.setTextSize(1);
display.setCursor(0, 0);
display.print("Foreline Pressure");
display.setTextSize(2);
display.setCursor(0, 9);
display.print(sensorValue);
display.setTextSize(1);
display.setCursor(85, 25);
display.print(pressureUnit);
}

Cheers, Finn Hammer

User avatar
Richard Hull
Site Admin
Posts: 10510
Joined: Fri Jun 15, 2001 1:44 pm
Real name: Richard Hull

Re: MKS 901p

Post by Richard Hull » Wed Sep 27, 2017 10:49 pm

Finn,

You have every right to be very proud of your work. What ever unit works for any particular person is fine, of course. The units I use are still used by amateur and many professional vacuum heads here in the U.S. As noted before, why I use the micron at all is that virtually 100% of all surplus TC gauges are in microns. All working fusor pressures are in microns, as you note. However for the "deep pumpers", (folks who go sub-micron), they have gauges pretty much set up in Scientific notation Torr units. (again surplus gauges). Naturally if you purchase a current $1500.00 sub-micron baratron and its extra $500.00 controller you can digitally select your favorite unit as all are included, much as you have done in your arduino software.

100% of all scientifc literature is in S.I. by codified law within the properly annointed in academia.

Great work with the arduino. I have yet to apply it to the fusor as I, currently, have all older stock electronic instrumentation that already reads out digitally using old school electronics. I assembled my system before there was a workable arduino and from older gear I have hand on hand since the 70's. (nim counters, digital counters, digital pressure gauges, etc. Virtually all use TTL or older MSI logic chips and nothing uses a microprocessor or micro-controller in the fusor IV system.

If some key chunk of fusor IV digital apparatus dies, I'll probably do up an Arduino kluge as a new replacement.

Again, great effort and work.

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
Retired now...Doing only what I want and not what I should...every day is a saturday.

Pablo Llaguno
Posts: 47
Joined: Sun Feb 05, 2017 11:00 pm
Real name: Pablo Llaguno

Re: MKS 901p

Post by Pablo Llaguno » Fri Sep 29, 2017 2:49 am

Finn,

Great and impressive work! What you are doing was the exact same plan I had from the beggining, minus the Pascal conversion which is a nice feature. However school hasn’t given me the time to work with the arduino serial communication, I actually bought a rs232-TTL converter that already has the dsub-9 head, but I couldn’t get the arduino to transmit/receive anything from it. When I get it working I’ll post my results, and maybe I will borrow some of your code :)

Thanks for the post,
Pablo

User avatar
Finn Hammer
Posts: 77
Joined: Sat Mar 05, 2016 12:21 pm
Real name: Finn Hammer
Contact:

Re: MKS 901p

Post by Finn Hammer » Fri Sep 29, 2017 4:15 am

Pablo, Richard

Thank you for your kind words.
I am using this little rs232/ttl converter board:

https://m.ebay.com/itm/5PCS-Mini-RS232- ... Ciid%253A1

It is a bit finnicky to work with, due to the size, but otherwise it is fine. It has to be unplugged from the Arduino while you upload code.
Also notice that the code does not do a Pascal _conversion_, rather it instructs the 901p to respond in Pascal, as you can see in the Pascal ISP:

void pascalISP() {
unit = "Pascal";
Serial.print ("@253U!PASCAL;FF");
}

Cheers, Finn Hammer

Post Reply