Using Arduino to control workshop compressor cut in and cut out

Firstly, I'm fairly new to arduinos, I have done a bit of programming and stuff before, but really can't say I know much so sorry for any basic questions!

So, I have just bought an old air compressor with a 3 phase 4hp motor but it doesn't have a switch, let alone a pressure regulated switch. Turns out that semi decent switches with adjustable pressure cut out and cut in are rather expensive.

For those of you who are wondering what I'm trying to do, I'm trying to build a setup that will turn on the motor let the compressor build up pressure, then when it gets to the correct psi, cut out the motor, wait until the psi drops to a certain level and then turn the motor back in to bring it up again..etc...

Leaving the code aside for now which I doubt would be too exceedingly complicated (or am I being optimistic here?), how hard would it be to set this up?

I was thinking an Arduino one (only because that's the first one I came across and is reasonably priced, let me know if you think I should choose something else.

Then a pressure sensor like this tapped into the air tank hoses: http://www.ebay.co.uk/itm/Pressure-transducer-or-sender-200-psi-stainless-steel-for-oil-fuel-air-water-/262863030572?hash=item3d33db892c:g:6xAAAOSwtfhYpXwc

And then a relay like this: http://www.ebay.co.uk/itm/TSR-25DA-3-32VDC-to-480VAC-25A-Three-Phase-Solid-State-Relay-Module-DC-to-AC/122142442782?_trksid=p2047675.c100005.m1851&_trkparms=aid%3D222007%26algo%3DSIC.MBE%26ao%3D2%26asc%3D40656%26meid%3Daf9ce900a90f40fc925e62b5e2534ce1%26pid%3D100005%26rk%3D6%26rkt%3D6%26sd%3D272551548688

Connect it up to measure the analogue voltage on the sensor, then use a digital output logic level to trigger the relay for the 3 phases.

Future additions could be some LEDs to show the rough pressure in the tank or possibly a switch to choose between a few presets. Maybe even add a screen etc, who knows.

So, what have I missed? Any thoughts on this would be greatly appreciated, believe it or not, spending ~£40 on a project like this is cheaper than buying a decent quality pressure switch and means I get to learn a load with a small project with so many more options!

I think that the commercial switch is cheap compared to the ramifications of getting anything wrong in your implementation due to coding issues, hardware selection and vibration. What happens if something goes wrong and your device fails to shut off the compressor?
(It rhymes with BOOM!)

Do air compressors need certification in the same way that boilers do?

If so you have little alternative to getting a professional job done. Nobody in his right mind would certify your (or my) Arduino code.

Even if you don't need formal certification your liability insurer might like to have a say in the matter.

...R

Without regard to the legal/regulatory issues, your plan looks reasonable.

But personally, I wouldn't buy the components for an industrial application (or any "serious" application) from unknown suppliers/manufacturers on eBay.

And, I didn't see the electrical specs for the pressure sensor. Did you find the specs?

You need to build some hysteresis into your code. For example, if your target pressure is 100PSI, it should build pressure till you hit, say 105PSI. Then it shouldn't com-on again until you hit 95PSI. That way it won't cycle on & off 10 times a second trying to hold the "perfect" pressure.

There should also be a totally-mechanical over-pressure safety release valve. I assume that's a legal requirement as well as a "smart" thing to do!

And, it would be a good idea to have a mechanical pressure gauge.

Know that in the US, Canada and the UK they must have an emergency bleed for over pressure (mechanical tend to be cheapest and about the best)

Also going with DVDdoug on the cut in out pressure provisions.

Mine (15 gallon US) comes in at almost exactly 85 and does not cut out again until 110.

It also has a certification plate that is tack welded on.
They are not supposed to be ever removed in case there ever is an accident..
Some are even stamped INTO the tank like other major gas bottles.

Despite the additional cost you should go with something available (not off the internet) at a good hardware store or tools store.
Also dont "cut into" the lines but use a proper distribution block. That will also allow you to fit a strainer / dessicator and lube bottle to it.
That in and of itself will save you big time on air tools.

Also make sure the manual / water drain works and seals properly. Again cheap enough to replace.

Robin2:
Do air compressors need certification in the same way that boilers do?

...R

Once the receiver is above a certain size they need periodic inspection for commercial use.
20 litres i believe although that can be less for very high pressure receivers.

For private use i doubt that there is any policing although if there is a problem there may be insurance issues.
I know of someone with a large hydrovane compressor which is used for car spraying as a 'home job', he does not bother with the safety niceties.

All have to undergo certification at manufacture though.
The pressure vessel regs are online if you have a search for them.

Eyebrows:
So, I have just bought an old air compressor with a 3 phase 4hp motor but it doesn't have a switch, let alone a pressure regulated switch. Turns out that semi decent switches with adjustable pressure cut out and cut in are rather expensive.

Leaving the code aside for now which I doubt would be too exceedingly complicated (or am I being optimistic here?), how hard would it be to set this up?

So, what have I missed?

I do not think you have missed much.

The required components are unfortunately expensive . as is the mandated periodic test for a compressor of that size.

4HP compressor. For a fully working and safe one i would expect to pay 1000 plus.
Using 'standard' compressor controls which are electromechanical i would suggest will work out cheaper/safer than using an arduino to control.

Eyebrows:
Leaving the code aside for now which I doubt would be too exceedingly complicated (or am I being optimistic here?), how hard would it be to set this up?

Not particularly complicated but it is really a plumbing/ wiring issue and the bits being mechanical can be expensive.

I have a B and Q £80 , 20 litre compressor complete with all required options,not ideal but does the job.
With a compressor of your size things get rather expensive.

Didn't see any mention of an unloader valve which is normally a part of the standard pressure switch for compressors such as this. Rather involved to duplicate with software , valves, power supply, sensors etc. and without it there is a possability of snapping a crankshaft, stalling and cooking the motor etc. Also I see no mention of motor control overloads or possible start current reduction equipment. Perhaps the latter not required below 5 hp but needs checking with supply authority.

AFIAK Unloader valve or pressure relief is mandatory on all air receivers.
At the very least a one time rupture valve.Possibly a self resetting mechanical one.
Electrical spec i do not know , i suspect the worst you will do is burn out the motor.

Unloader valve is to release head pressure at shutoff to avoid starting problems. Not to be confused with pressure relief on the tank.

Pressure relief valve of the correct pressure setting for your tank is absolutely crucial whether using a commercial or homemade switch. I've had a commercial switch allow the pressure to exceed the setting before. I actually just bought an expensive compressor of a quality brand name, made in the USA, that came right from the factory with the pressure switch adjustment screw set and glued in place at a pressure exceeding the maximum rating. Luckily the relief valve opening alerted me to the issue. With a relief valve in place and working properly I don't think there is much safety concern in a DIY switch as far as pressure goes. Obviously you have to be competent to work with mains voltage.

I really don't think saving money is a valid reason by itself to attempt this project. Those pressure switches are really not so expensive once you add up all the parts and time involved in putting together a homemade one. Don't forget to add in the cost of the enclosure, mounting hardware, cable strain relief, etc. That's not to say it's not worth doing but you need to have other motivations (such as learning and the expanded functionality possible with a microcontroller based system).

Hi everyone, thank you very much for all the very informative replies, really do appreciate it, sorry for not replying earlier!

Right, firstly, this air compressor is a huge, vintage thing from about the 40s-50s. I think when it was run in its original shop it was just left running, as it was constantly used they just left it running. It has a blow off valve on the side of the tank so when the pressure reaches a certain psi it just vents off. This is apparantly how it used to be running. But this is incredibly inefficient unless you're powering a massive shop, you're just wasting loads of that pressure and the pump is running much more than it needs to. So, even if my code/switch idea failed, it would just vent the extra pressure and be fine, it just wouldn't shut off. Or what is more likely is it'll just shut the motor off and not build up any pressure.

I was thinking getting it to cut in at about 80psi then off about 120 for a start, go from there depending on the tools etc

Good point about the unloader valve, hadn't thought of that, I haven't looked at the thing properly yet as only just been offered it at a crazy low price (considerably lower than what you payed for your B&Q one Boardburner2) but it's incomplete, missing a couple of minor parts. So it's a project, hence why I was considering making the switch a project too!

With regards to the cheap unbranded parts, yes, I do agree I don't enjoy using them, could anyone recommend some branded alternatives, don't mind paying a little more but don't fancy paying £120 for a pressure sensor.

Might have to look into the unloader valve a little more and see whether I'm going to need it or not. From memory I don't think older compressors had them, might be worth putting one in though (which would probably require a normal switch)!

Oh and as this is all a project, the fact it may save me money is my excuse to try this, I mainly want to do it because of the learning etc! (As with all these things, it'll probably end up more expensive than a normal switch!).

P.S. before connecting the relay up to the 3 phase, it will be getting checked over by a qualified electrician!

Eyebrows:
Might have to look into the unloader valve a little more and see whether I'm going to need it or not. From memory I don't think older compressors had them,

P.S. before connecting the relay up to the 3 phase, it will be getting checked over by a qualified electrician!

Yes, they did have them , even back when.

You could use a cheap pressure switch, they work ok. Already set pressure levels or can be adjusted.
Connect to a lower voltage control circuit(run from N) for the 3 phase contactor ( you need one of these anyhow)

As for the latter part of the quote, how do you intend to test it? :confused:

Pressure switch here ...http://www.ebay.com.au/itm/4-Port-Air-Compressor-Pressure-Switch-With-Unloader-Control-Valve-On-Off-Switch-/351977654503?hash=item51f380c8e7:g:iFoAAOSwCU1YnEXJ

I had a free compressor of similar ilk some time back.
Simliar problems.
The 80 from B and Q was not ideal but sufficient.
Big compressor wold be nice to have for paint spraying etc.
Depends what you want the air for.
Buying old stuff can be cheap but can end up costing lots with bits.
Tried to build a workshop with auction stuff.
Some stuff however required 1 to 3 phase convertore etc which did not work out well.

Thanks for the replies, again very much appreciated.

Ok, looks like the blow-off valve is a definite then, the problem with a pressure switch is that the cheap ones have a very limited range of adjustability, the one you linked won't work because of the pressure range but I'm sure i could find one that has a higher rating easier enough.

The idea of using a pressure switch to trigger a 3 phase contactor is a very good idea. With regards to 3 phase contactors though, they really do seem to vary in cost a huge amount, where would you suggest trying to buy one from?

I have 3 phase available hence that isnt an issue for me and i prefer to pay the same for old solid stuff rather than new cheap stuff that won't last nearly as long. This is a project and not something i expect to have running without a fair quantity of elbow grease and bit of money.

Could something like this be used as a blow-off valve? Maybe with a relay to power it (which i already have)?

If I'm honest I'm slightly worried about using unbranded eBay parts here and whether they'll be up to the job or not. Their specs are one thing. But whether or not they'll be able to keep to those specs is another thing all together!

http://www.ebay.co.uk/itm/152445814581

Not as a blow off valve no.
They should be purely mechanical.
In any case i suspect your size of compressor would be too big for the throughput of that valve.l

One of these does it , no need for an electrical contactor.

http://www.ebay.co.uk/itm/like/252729685204?chn=ps&adgroupid=39613511478&rlsatarget=pla-279121868841&abcId=923836&adtype=pla&merchantid=113632268&poi=&googleloc=9045558&device=c&campaignid=737386489&crdt=0

No, not as a blow off valve, as an unloader valve between the compressor and tank

Not sure about that, unloader valve may even be on the cylinder head(s) with some models.
They are not always present/needed , depends on size i think.

With big compressors sometimes a star delta starter is required , i would not expect it at 4HP but it might be wise to consult a sparkie.
Bluejets has already mentioned this.

My experience is limited to the B and Q one and 50 HP industrial units though.

Just so you guys can get an idea, here's a picture of what we're dealing with here. You can see the mechanical blow off valve on the side of the tank.

Big reciever.
I would suggest you get it tested by a compressor service guy.
Both for pressure and operation of the blow off valve.
The addition of previously mentioned pressure switch and some pipework could then give a safe working system.

The solenoid valve may work as an unloader but they often have low flow rates.
Possibly a solenoid operated spool valve as used for pneumatic controls would be better as the flow is normally defined.
Can be had for 10 on EBAY.

EDIT
Provided the receiver has a manufacturers plate on it hydrostatic testing is rarely needed.
Ultrasonic thickness guage and a peek inside with a camera is more of the norm.

Scrub some of that , i just remembered the unloader valve is fitted to the suction side not the delivery side, they are designed specifically for the application.