Posts: 21
Joined: Fri Jan 11, 2019 4:42 pm

Air Pressure Regulator/Solenoid

Fri Jan 11, 2019 4:53 pm

First: I am new to all this. A programmer for many years, but new to RPi and "physical computing". That said,

I am looking to only-very-minorly regulate the flow of air (through a fish tank sized small vinyl air hose) using RPi/GPIO.

I know of solenoids, but as far as I know they strictly are all-the-way engaged or all-the-way UNengaged (open or closed)...I need a similar device, only that allows partial movement...a percentage of the line to be open (similar to the precision of a servo or stepping motor...maybe in about 4 increments (I don't necessarily need like 100 degrees of precision, just at-least a few release air at the PSI I decide through software.

Posts: 1339
Joined: Thu Oct 09, 2014 2:50 am

Re: Air Pressure Regulator/Solenoid

Fri Jan 11, 2019 7:24 pm

It sounds like you need a servo-controlled valve...AFAIK, solenoids tend to be all or none type devices. It might be fun to see, as an experiment, if PWM can partially control a solenoid but I have no idea of whether or not it would work. I don't recall ever seeing a servo valve that could be driven by an RPi but you could probably make an interface that would be controllable. Another approach would be to couple a stepper motor to a valve...matching the stepper to the valve resistance would be a PITA but possible.

User avatar
Posts: 6044
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Air Pressure Regulator/Solenoid

Sat Jan 12, 2019 10:34 am

Solenoids are usually a coil producing a magnetic field that pulls on a permanent magnet (and a spring to return it). As the magnet moves in, the pull gets stronger, in a quite non-linear fashion. Try holding a screwdriver just a millimetre above a magnet, and you'll see what I mean!

So to pull it part way in then hold it there, you'd have to start with full current and reduce the current (using PWM or any other way) as it approaches the position you want. Not easy without being able to sense its position.

Posts: 1406
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Air Pressure Regulator/Solenoid

Sat Jan 12, 2019 11:22 am

practically while there are servo controlled valves out there (search ebay etc for motorised ball valve..)

for controlling air flow I think a needle valve would be applicable, and a motorised one could be very expensive.??.

I did keep fish myself a while back, and iirc there were small clamps sold for squeezing and restricting the air tubes to manage flows.

A diy clamp made from a small stepper motor with an offset cam fitted to its rotor or operating a usual clamp? could provide a budget and easy to find roadmap solution??

Are you considering any form of monitoring of the resulting flow for feedback and automatic correction?

Posts: 21
Joined: Fri Jan 11, 2019 4:42 pm

Re: Air Pressure Regulator/Solenoid

Sat Jan 12, 2019 9:23 pm

I may look into the whole squeezing the line thing a bit more. Since this is not a scientific or medical sort of project, I don't have to be exact (I'm not really measuring anything). If I had two servos working like a thumb and index finger together, they could compress the line together to minorly change my airflow as needed. Like all of this stuff, there's 142 ways to do things, but, hey, cheers! Thanks all!

Return to “HATs and other add-ons”