Repair Job Fixes Compressor, Gets It Online

We’ll never cease to be amazed at the things people try to put on the Internet of Things. Some are no-brainers, like thermostats, security cameras, and garage door openers. Others, like washing machines and refrigerators, are a little on the iffy side, but you can still make a case for them. But an IoT air compressor? What’s the justification for such a thing?

As it turns out, [Boris van Galvin] had a pretty decent reason for his compressor hacks, and it appears that the IoT aspect was one of those “why not?” things. Having suffered the second failure of his compressor’s mechanical pressure switch in a year, and unwilling to throw good money after the $120 that went into replacing the first contactor, [Boris] looked for a cheaper and more interesting way to control the compressor. An ESP8266 dev board made interfacing the analog pressure sensor a snap, and while he was at it, [Boris] added a web interface with a nice graphical air pressure gauge and some on-off controls. Now he can set the pressure using his phone and switch it off in the middle of the night without going outside. That’s an IoT win right there.

No air compressor? No worries — build your own from an old fridge. The non-IoT kind, preferably.

35 thoughts on “Repair Job Fixes Compressor, Gets It Online

  1. I’m building a CNC in my shop but my compressor and shopvac is outside in the shed at the side of the house just beside my workshop.
    I am planning to do the same thing but controlling both of them.
    Believe it or not I all ready have a tube going threw the house with a stop in my work shop and then keeps going out to the carport that the family knows how to use and they do. At least till I had to redo my side shed.
    I have not done anything with the shopvac yet. I still have to put a nice big hole in the house for the hose and more wires.
    I did have the compressor on a timer but I found out one night that it messed up and was going in the middle of the night and I believe it was disturbing the neighbors. Couldn’t have that and wasting electricity.

    So many things to do not anuff time.

    Right now I’m working with one of the Orange PI’s that has 2 gig of ram. I was gluing the heat sinks on till one day I dropped it. OCH. I ended up braking one of the voltage coils off when it hit the ground. I now have now 3D printed a bracket for the heat sink and fan. Not bad so far but I lost the networking and one of the USB ports. I love the extra ram makes things go so much more faster.

    I know I should be posting on hackaday but there is not anuff time in the day to do so many things and I am not able to do a lot of things now and it takes so long.

    Thanks for listening.

    Good work. I like the Idea of adding the control for the pressure.
    I think I’m going to add it to my compressor.

  2. Really neat for an idea I’ve read about using Windmills to directly turn a compressors to store the energy as pressurized air in large tanks for later use. To elaborate on that idea, other than drainage operations to avoid corrosion, I can see this idea growing to be more automated like a charge controller (maybe can automate line drainage too)… really a air pressure controller for on demand electricity. Technically, you could couple another IoT control valve to an air engine to turn a generator/alternator… so that essentially you have a compressed air battery… with maybe a battery to run the operation that is solar, wind or logic to recharge itself with the compressed air system. Have to do the math mass energy balance to determine feasibility considering losses along the power train. Seems interesting and the IoT Air Compressor is a really practical system alone. You can add the output to your workshop screen/calendar too.

  3. If you broke 2 electro mechanical pressure switch contactors in one year, something is wrong. I would not count on the SSR or triac you are planning on using to control the system to have a long life.

    A common failure for air compressors is for them to develop an air leak or if it is a belt driven compressor to have the belt brake. That makes the motor run continuously until you discover it or it burns the motor out. That may have also killed the first pressure switch’s contacts and taken out the bearings in your motor. With bad bearings, it would not be surprising for the second pressure switch to fail.

    You might be repairing the symptom and not the problem.

    1. The reason the contractors failed was not due to the points, we are in a coastal area and they tend to rust up. I could oil them but would rather not have oil and grease neat the compressor as any oil or grease vapor that gets sucked in to the line will mix with the air and react with some of the paints I use. even putting a filter on the end does not tend to remove the oil that well.

      Thanks for the idea on the belt breaking, I may just add an option to the code where it checked the pressure against the motor run time, if the pressure does not increase while the motor is running it will trigger an error and shut it down.

  4. A broken hose is a good reason to monitor an air compressor. Ours is running every half hour or so. There is a leak somewhere. It would normally not run at all unless it’s being used. Having no leaks is like insulating a hot water tank. It costs more to let it run down and then run it back up than doing the right thing. Normally a A/C is run at 120PSI and left alone, with regulators to drop the level just like in DC power supplies. If you are spraying with 40PSI you don’t want the tank to switch on at 40PSI

    Speaking of hot tanks, that energy scheme with wind-compressors? We’ll let all that hot air out right now. Lookup the energy loss in heat when compressing air and then getting back about 20% of what you put in first.

    1. I managed to find most of the leaks in my line, if i set the pressure to 120Psi it tends to take about 12 or so hours for the pressure to drop to 50Psi I suspect one of the fittings may be leaking a little.

      On the output of the compressor i have a separate regulator and the air brush I use only requires about 30Psi so triggering the compressor at 40Psi seems to give me a nice stable flow of air when I am spraying graphite.

      One of the things I was tempted to add was a temperature sensor to the pressure line connecting the compressor to the storage tank as the copper line gets real hot, it was a huge issue when I was running my power hammer. I however no longer have that so the chances of having to run high pressures like that are prety slim nowadays

    2. I have to read into the heat issue as I’m not visualizing in my mind confidently well. I’m to lazy at the moment to look up and my internet connection isn’t helping. Sounds like an insulation issue then. I was more thinking a de-humidifier or some way to prevent the corrosion in the first place of the contactors. I can’t visualize what is corroding and how that can’t be sealed maybe even with silicone or epoxy versus the desiccant in an air vent box/filter idea I noted.

  5. Replacing OEM electro mechanical pressure control with hobby grade processor and hobby grade power supply? Simply add hobby electronics to just take the switching load off the electro mechanical 2-3 psi earlier and retain the electro mechanical for “hobby grade junk failed safe mode” and safety sake. Can improve the system by having the processor also control a condensate drain. Upgrading a compressor needs be all reliability upgrades and redundancy, no compromises. Hobby components are not reliability by any means, so emphasis on redundancy.

    1. The issue is/was the mechanical contractors are less reliable where I live as they rust up, putting rust protection on them is not really an option. a solid state unit can be protected from corrosion by sealing the system. if required maybe even potting the unit.

      This is Hackaday and not commercial creation day, saying that something is hobby grade these days is a bit of a joke as when you now open up many commercial devices you will find they are based on similar components to what is available to the hobby community. An example of this is my CNC machine, Imagine my surprise when I had to tear the motor controller down and found an arduino sitting inside.

      As for having a failsafe there is still a mechanical pressure vent that will open if a set pressure is exceeded in the tank so ensure that if for some silly reason the system fails and runs contentiously the tank will not explode. All my controller does is manages the on/off of the compressor motor and clocks the pressure.

      An SSR that is grossly over rated has a really really slim chance of going short circut if something fails, and arduino or micro that locks up or fails is not likely to output a HIGH on its output. and a PSU that fails may send a high voltage to the 5V line but is more likely to just go open circuit. so the chances of a failure resulting in something like the compressor running and over pressurising the tank is prety slim.

      Compare that to a mechanical contractor that has failed twice, once ON and once OFF. if the contractor shaft has corroded like it did in both instances and in the first instance the corrosion caused the unit to jam ON and the motor to continuously run there is a huge issue. Yes the release valve will eventually pop but that is not an ideal situation.

      If we precluded hobby components from being used in any form of development Apple would not have been started, we would likely not have the home PC and 3D printers would be non existent. there are pleanty of examples where a “Hobby Device” created with “Hobby Components” have eventuated in to something that is more robust and will/has outlasted commercial devices or has just created the foundation for a commercial unit.

      I used for many years a remote switching system called a SMITCH, this was a cheap pager connected to a hobby micro controller that would allow me to remotely reset a wireless network that provided broadband to well over 200 square kilometers. Oh and the network was built using what was deemed at the time as home networking devices. I could reset a node and have the system back up and running within a few minutes as opposed to driving all the way out to reset the thing manually. The network ran for over 8 years until fiber was pulled in to the area and provided clients with 2Mb connections in an area where you were lucky to even be able to achieve dialup.

      1. First of all: Nice project. I think of “connecting” my compressor as well because I forget to turn it off sometimes and my workshop is several miles from home. Could save me lots of unpleasant and unnecessary nighttime drives….
        That’s really bad luck with your pressure switches/contactors. My shop compressor is 50++ years old and has still the original D*nf*ss switch on it. It’s located in a pretty nasty environment as well.

        1. Thanks Hank, So far it has proved itself handy, compressor kicked in last night while watching TV and was making a racket so grabbed the cell phone, connected and turned it off.:)
          The original contactor’s were great while they were on there, the first one that faulted did so while I was away and I cam back to the motor having been running for near on 2 days in its box and the over pressure valve having popped open. I guess the real test will be to see how this one is working in a year or so :)

      2. You’re overgeneralizing the definition of hobby components and the context. Apple and the rest weren’t necessarily hobby components to begin with. It was just a new application of what existed. That’s off topic anyway.

        The ‘hobby’ components of the post were directed at the context of a control system running something that’s potentially dangerous. An Arduino in a 3d printer failing isn’t going to potentially cause a high pressure rupture that can cause injury or death. Relief valves can fail too after all.

        There are many different approaches to solving a corrosion problem. Ever consider a marine grade contactor in a NEMA sealed enclosure? SSRs are perfectly acceptable as long as they’re sufficiently rated, but those contacts can corrode as well.

        1. And arduino failing in a 3D printer has the potential to burn your house down. there is risk any just about anything we create. and Yes we all should access the best method to mitigate potential catastrophic failure. In my case that is a case of keeping the pressure release valve to ensure if there is a failure the tank will never reach a pressure even close to its rated failure point.

          Sealing a new contactor in a nema housing could work and that would require 120.00 to be spent on a new contractor, another $30.00 to be spent on a new IP rated casing, some kind of one way air valve as the case could not be sealed as when the contractor switches the valve releases a blast of air that would explode the case if it was sealed. should the dent become blacked by dust, spiders etc you have the potential for the case exploding throwing plastic shrapnel all over the place.

          Then there is the risk that if and when the contactor fails it will fail in the OK position running the motor like if did the first time for a couple of days.

          You are correct, any project albeit commerical, home or otherwise the risks must be investigated and mitigated before a decision is made to install and run an alternative option but saying just because something is built from “Hobby Device’s” does not mean it is sub standard.

          1. I didn’t read into more your reply thoughts… something cheap filtration of the air added to the box. HHhmmm… color changing desiccant is the easiest that you can put in the oven to re-use. I recall chrome/cobalt something in dryerite. Looks like on the web there are references to improvised methods with silica kitty liter, road salt, plaster of paris, I’d go with an indicator that changes color.

            I was also thinking since we technically can make our own pcb boards heavier duty with higher rating and more reliable components…like I’ve read the old Soviet electronic components (albeit I read most were salvaged for their gold/copper) were really over engineered heavy duty. Just make a heavier duty version.

            Then again, I’m not visualizing the situation with the mechanical design issues on the contactor why there is a need for air purge around the contacts (is there a leak) or am I reading wrong?

      3. I agree, with a mechanical pressure vent, there is little chance of serious overpressure. I do, however, understand Biomed’s uneasiness, I have been one concrete wall away from a compressor/air system explosion. Without that wall, I doubt I’d be typing this. Serious damage was done to that wall. Someone (I know who, he was my boss) deliberately tampered with the compressor, the fool “modified” it for a much higher pressure, and disabled the safety vent, without that I’m sure it would never have happened. He did this to avoid getting another, or a bigger, compressor. If it hadn’t been lunch hour, people would have died. It was a big compressor, 100hp and a tank you could easily climb in. But compressors make me nervous to this day. I would feel safe with Boris’ mods combined with the stock pressure relief valve though.

  6. i just think that esp8266es are better and cheaper and faster than most arduinos. so its not a forgone conclusion to use one on those grounds alone. then you got a wifi radio just sitting there doing nothing. thats no good. make it do iot thingstuffs and were golden.

    1. The esp8266 is an awesome chip, sadly there is only one analogue line but that is not too hard to work around. I have not yet looked in to it but would be interested to see how well these things will mesh. would be nice having them all synch up in to a nice big mesh.

  7. As a security researcher who works primarily in the embedded space with control systems ranging from building to nuclear I may be a bit pessimistic. I have rarely found a setup that the team can’t take control of, or at lest disrupt if we can’t establish firm control.

    The more complex a system is the less reliable it will be. This looks like the classic case of ‘what can I do’ without asking ‘should I do it’. Having a remote pressure display is useful, but relying on a non-industrial rated part hooked up without extra protection measures for control of a pump is questionable. I would always have an independant mechanical failsafe, or multiple if you want to experiment with control systems.

    1. Agreed :) having a fail safe is important. In this case the failsafe is a pressure release valve mad of brass that will pop if the pressure exceeds the preset limit. from memory its about 200psi or close to that. That is well under the rated pressure of the steel tank and other hardware. I have seen a tank rupture and its not a pretty sight. I have also seen air feeder lines explode so ensuring that there is a safety valve is a must just like a fuse on any electronic components.

          1. My cheep Canadian Tire special has a pressure release valve on it.
            And so do the compressors at Princess Auto and Wallmart.
            I would think that all store bought compressors would come with this safety feature.
            Even your hot water tank has one.

    2. TEMPEST harden the wireless links and use fiberoptics or proprietary bore sight lasers relays. Who needs optocouplers? OK, isn’t there a limit with encryption we can implement or the Hale Bop suicides they developed some sort of way to much encryption they didn’t want to disclose just rumors. Maybe a pager idea using txt, email or whatever communications device is on him warning if something is corrupted with the system?

      1. Bwahaha.. Tempest Hardened compressor!! Oh if only i had the time and did not have other projects that needed to be done. Quite a number of years ago I wrote an interface that was designed to handle Debit card entries and PIN pad entries vie the internet.
        The system was deigned to interface to a serial device that handled the transaction and had several layers of checks. the interface itself used randomized screen entry system that used the refresh rate of your screen to only display a portion of the time. You could see the interface but if you tried to take a picture of it or video it you would end up with all blank buttons.

        The next part was the actual interface, it was a java interface that created a secure session, if you for instance entered a 1 on the interface the communication back to the core server was not only encapsulated but was randomized to the point where 1 would be interpreted as a 64bit number, even the server had no idea what it was going to be decoded as. The only thing that could decrypt it was the hardware sitting on the other end of the serial port.

        The next part was the synch between the use and the hardware, that was kind of unique in the way was a time stamped encrypted packet with an internal and external chesum, what was really cool is if the packet was opened mid stream it would become corrupted and would then be rejected by the server.

        It took me 6 months to wire the entire system, was patent pending and sent off to some security guys in OZ for assessment however they rejected it because they were not able to analyse the packets to get any readable information that would allow them to rubber stamp it.

        I now see that several banks are using excerpts from the code for their user interface.

        1. Interesting. Some days I wonder if there are “inside” ways and means to steal to either entrap; or maybe some systems if there are legal loopholes, to get away with stealing.

          Another item I wanted to mention that came to mind last night was vaseline on the corroding components, however I can’t visualize in my head so I don’t really understand the process in exact detail. Maybe the vaseline (I’ve even used coconut oil on locks before) might help slow the corrosion. Was trying to think of commercial off the shelf items to be cost effective, extend the life cycle of system and be safe.

    1. Back when I worked for a certain European compressor and tool company, we had a division that was prototyping an IoT interface for one of their large industrial units; I remember having several arguments trying to convince them that placing a random and untested interface directly on the Internet for a sales demo was a very bad idea exactly for this reason.

      Granted this was being done in the days before IoT (and the security concerns that come with it) was a thing, but still…

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.