Latest software update for Phillipe David's MKS9xx display hardware.

Discussions and images as necessary related to microcontroller or computer instrumentation and fusor control software and hardware.
Post Reply
JoeBallantyne
Posts: 557
Joined: Tue Jul 20, 2010 4:08 pm
Real name: Joe Ballantyne
Location: Redmond, WA

Latest software update for Phillipe David's MKS9xx display hardware.

Post by JoeBallantyne »

I spent the last couple of days working on an updated version of the software that runs on the Arduino Nano that is the brains of the currently available MKS power/display board designed by Phillipe David.

I am attaching the latest code, as well as the libraries used to build it. These work with the Arduino IDE 2.3.4 that you can download from the Arduino site. https://www.arduino.cc/en/software

Anyone who purchased one of the controllers from me or from Phillipe, can use this to update their boards if they want.

MKSDisplayBoardv5.zip
(2.74 KiB) Downloaded 7 times
libraries.zip
(397.94 KiB) Downloaded 9 times

Joe.
JoeBallantyne
Posts: 557
Joined: Tue Jul 20, 2010 4:08 pm
Real name: Joe Ballantyne
Location: Redmond, WA

Re: Latest software update for Phillipe David's MKS9xx display hardware.

Post by JoeBallantyne »

Ok, seems like I am back in the saddle... I started coding this past weekend after 4 years of going cold turkey, and now I can't stop... :-)

Another update. For this one, I finally figured out how the Arduino system font worked, with its spacing, so text locations are calculated reasonably correctly, which shifts slightly where some things are displayed on the screen. (Better centering...)

I also added micron support, and made it the default. So now the display output defaults to microns of pressure, and for microns the output is not floating point. Nicer to read. I got pretty used to the floating point torr output, but I like the microns output better.

Now, you can toggle between having the pressure in microns, torr, pascal and mbar, just press one of the buttons on the top of the board.

Joe.

MKSDisplayBoardv8.zip
(3.46 KiB) Downloaded 8 times
JoeBallantyne
Posts: 557
Joined: Tue Jul 20, 2010 4:08 pm
Real name: Joe Ballantyne
Location: Redmond, WA

Re: Latest software update for Phillipe David's MKS9xx display hardware.

Post by JoeBallantyne »

And, one more...

I fixed the code that reads the replies to not wait 10ms after reading each character - since at 9600 baud, you get 960 chars/sec, or about 1 per ms. That fix made it so the controller would spin on the vacuum gauge much faster, and sometimes after switching the pressure units, get timeouts when trying to read the pressure.

This fixes that by imposing a hard upper bound of at most 4 reads per second to the gauge (not much point in going any faster than that IMO), and also waiting 250ms after switching the pressure units before trying to actually read the pressure.

That completely eliminates the occasional read timeouts that would happen after switching the units.

I'm reasonably happy with the operation of this version of the code. I suspect this will be the last update for a bit.

Joe.

MKSDisplayBoardv10.zip
(3.77 KiB) Downloaded 10 times
Last edited by JoeBallantyne on Tue Feb 04, 2025 2:10 pm, edited 1 time in total.
User avatar
Richard Hull
Moderator
Posts: 15459
Joined: Fri Jun 15, 2001 9:44 am
Real name: Richard Hull

Re: Latest software update for Phillipe David's MKS9xx display hardware.

Post by Richard Hull »

As old as the Arduino is, it still holds its own in the hands of a good coder. I wrote so many of my early work programs in 1.x code, circa 2014, many of them refuse to pass the check code or run in the newer 2.x programming.

Regardless, the Arduino is still easy to implement to become a real world controller on the cheap. I am rusty on coding now and hope to leap back in as my last heavy coding was in 2021.

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
Matt_Gibson
Posts: 515
Joined: Thu Sep 23, 2021 10:36 am
Real name: Matt Gibson

Re: Latest software update for Phillipe David's MKS9xx display hardware.

Post by Matt_Gibson »

Looks like I have a reason to redownload the Arduino programming tool. Been a long time since I played around with them, but microns as a unit is worth the effort.

Thanks for the update.

-Matt
JoeBallantyne
Posts: 557
Joined: Tue Jul 20, 2010 4:08 pm
Real name: Joe Ballantyne
Location: Redmond, WA

Re: Latest software update for Phillipe David's MKS9xx display hardware.

Post by JoeBallantyne »

So, maybe I might be able to STOP changing the code already.

Or not. :-)

This update switches to the currently available default library for the display that you can download directly from the supported libraries list in the Arduino IDE. The earlier code, used a very old library that you had to add manually, and which was in the libraries.zip attached earlier.

I also added a developer screen to the controller, that gets toggled to with the left button.

So the right button now iterates through the pressure units, and the left button displays a developers screen.

Nothing wrong with sticking with v10, since for fundamental functionality, v10 and v11 are identical. V11 will likely be a bit easier for folks to just drop into the IDE and get it to build, because it uses a current lib.

Joe.

MKSDisplayBoardv11.zip
(4.22 KiB) Downloaded 7 times
Last edited by JoeBallantyne on Tue Feb 04, 2025 7:58 pm, edited 2 times in total.
JoeBallantyne
Posts: 557
Joined: Tue Jul 20, 2010 4:08 pm
Real name: Joe Ballantyne
Location: Redmond, WA

Re: Latest software update for Phillipe David's MKS9xx display hardware.

Post by JoeBallantyne »

For folks who want to update their boards, please make sure that you plug your development computer directly into the USBC connector on the daughter processor board. Do NOT use the top USBC on the main board as that won't connect you directly to the Nano. You MUST use the side USBC connector for uploading the new code into the Nano. (That is the ONLY time you should use that side connector.) Also, make sure that when you plug into the side connector, that nothing is plugged into the top connector on the main control board. Plug into the side connecter only, and disconnect any other USBC plugs. Once you plug in, the Nano will boot up, and run the currently installed code. Don't worry about that, since you can still upload code to the device even when it is running the MKS display code.

The current IDE 2.3.4 makes it REALLY easy to update the device. Just plug into the side connector, make sure in device manager that the drivers load for the USB to serial device (the Nano shows up to the development computer as a USB serial port), then select the port under the Arduino IDE Tools menu (probably com4 or higher), then select Sketch->Upload, and it should build it, download it, and run the new code. At that point you are done. New code is already stored into the Nano non volatile storage. Unplug the side connector. Plug the control board back into your MKS901p, plug the power back into the top USBC connector, and press the board power switch on. Done.

Once you have the Arduino IDE installed and running, and the code file opened, it takes about 30 seconds for the IDE to build and upload the new code to the Nano. Maybe less.

I was absolutely SHOCKED at how easy it was to get the Arduino development tools working and communicating with the devices. A++

Note that you DO NOT need admin privileges to install and run the Arduino IDE on Windows 10. Just install the program to your user account only, and decline the UAC (user account control) admin request prompt that pops for installing the driver package, and decline to give permissions to IDE for the firewall, and it all still works anyway. (I normally use a non admin account.)

Joe.
Matt_Gibson
Posts: 515
Joined: Thu Sep 23, 2021 10:36 am
Real name: Matt Gibson

Re: Latest software update for Phillipe David's MKS9xx display hardware.

Post by Matt_Gibson »

Got v10 uploaded and working. v11 file looks to be missing.

-Matt
Post Reply