
5-Way Ball Valve and Controller
Particle and Gaseous Pollutant
Switching Manifold
The lab I worked in during my MSME program studied air quality. Very early on I noticed limitations in our ability to reliably gather data during field studies. Otherwise good data was being lost due to system malfunctions and a lack of robustness in our sampling apparatuses.
One of the major sources for lost data was our multi-port switching apparatuses. With a single set of analytical instruments, one can gather quasi continuous data in multiple locations if the sampling inlet switched periodically (usually 5-10min sampling periods).
​
Below I show some of the build iterations that took place as I built the lab multiple switching mechanisms and controllers over the course of my time at PSU in the Healthy Building Research Lab.

1st Gen. Two Position System
One of the first iterations of this system involved off-the-shelf relay timers. The small cylindrical valve in the bottom corner is a Teflon coated solenoid valve appropriate for gaseous pollutant testing and the large 2-position ball (Assured Automation) valve was used for particle testing.
​
A few problems existed with this first system.
The system was limited to two locations
The geared motor was so loud it disrupted homeowners during long field campaigns.
The geared DC motor used to actuate the ball valve was slow. So slow that it caused a disruptive vacuum buildup within our sampling systems. To solve this two bypass solenoids had to be used to relieve vacuum buildup.
Troubleshooting and programming of this system was non-trivial. The multitude of relays and timers convoluted intuitive human interaction.

2nd Gen Four-Position Gaseous Switching Manifold
This second platform was when our controller was introduced. This iteration did not advance the particle switching manifold, it was mainly an enhancement of the gaseous system.
​
Advancements in the second iteration.
Two additional solenoid valves increased sampling from 2 to 4 locations.
First attempt at a centralized controller, based on an Arduino platform.
A reliable real-time clock had been integrated into the circuit.
Position data was logged onto an SD card with accurate time stamps.
This was the first use of a relay board in the design since the Arduino had to control multiple 24V solenoids at once.

Controller Design
Up to this point, our controller had been made with breadboards and protoboards. With an increase in the number of components, it was time to start taking the complexity of the system seriously by designing custom PCB shields to house things like our RTC, relay circuits, LCD/keyboard connectors.
​
I had no idea how to do PCB design so I took a Saturday class in EagleCAD from PSU and got started. Below are the first shield designs to be used with an Arduino Mega board.


Laser Cut Enclosure
The first electronics enclosure was purchased off the internet, but as the design evolved I found it necessary to increase it's size and laser cut my own.

3rd Generation Particle Valve
Up to this point, I had made few advances in regards to the particle sampling switching manifold. One of the challenges was finding an electrically actuated ball valve with a large enough orifice. Too small of an orifice and particles will impact the walls of the valve as they fly around corners. As I looked around on ebay I found a giant valve commonly used in the petroleum industry. Unfortunately, it was most commonly actuated manually or via pneumatics, neither of these were acceptable for our application. Although we toyed with the idea of employing a 24-7 undergrad to turn the knob every 5 minutes it didn't seem cost effective. It was my job to design an actuation system for this valve.


Motor Selection
My selection criteria for a motor were as follows...
Cost had to be less than $500.
Required accurate position control as there were four valve positions.
Had to be fast enough to not cause a vacuum buildup within the sample lines.
Had to supply adequate torque.
Hopefully it would be quiet.
​
Large DC motors with encoders for position feedback were expensive and required a slightly more complex motor control circuitry, I decided on a large NEMA 42 stepper motor. I bought a separate controller to simplify the construction of the system. All together the motor and controller were about $400.
Motor-Valve Interface
I had to design a motor mount and a way to couple the shafts of the valve body and the stepper motor. The following are a few designs before finally deciding on a solid body motor mount. While I had wanted to build the mount on the right, it was going to be much more cost effective and less time consuming to have the mount on the left made overseas.



Final Assembly
Getting the parts back from the machine shop was exciting. To find the most affordable shop I used Xometry, they gave an instant quote for both domestic and international manufacturing as well as a timeline. It was a joy to use their service.


4th Gen Switching Manifold
The final iteration combined all the individual systems I had built over the year. Also one additional microcontroller was used to send step and direction signals to the large stepper motor controller. All systems are powered via one wall plug, and one power supply.Â
This can be used to sample both gas and particles in four different locations. This project really stretched me but I was happy to build something that will be used in my lab for a long time.





