This is a project I have had in my head for some months but only just felt well enough recently to complete it.
The other reason it took some time was I regularly changed my mind as a I went along and as I was in no hurry I kept ordering parts online.
The aim of this project was to make a timer controller to control the venting of air/water from my reticulated compressed air system/line.

To remove water in the lines last year I installed a large desiccant/filter and a finned copper condenser section of pipe into the reticulated line.

Most of the water condenses out in the tank and this water is released by an auto venting valve in the base of the tank that vents every 45s for 0.5s and drives out any water that has condenses out inside the tank.

Unfortunately water also condenses in the line and settles at two "low points", one before and one after the finned copper pipe where I had taps to manually vent the water. I have to remember to do this on a regular basis otherwise the desiccant in the filter gets saturated with water and then needs regeneration which is a bit of a PITA so I wanted something that would auto vent the tank and the two low points. I also wanted to be able to adjust the auto vent valve timing parameters and manually vent the compressor tank without going outside the shed - compressor is outside in an enclosure.

This sort of thing should be a doddle for a micro controller like an Arduino and I thought it would make a simple and interesting project to undertake while I did not have much energy to do anything else.

The final micro controller unit is shown in the photo below.
The LHS has the Arduino micro controller board and the display, while the RHS has the mains V controls to drive the 3 solenoids.

Parts online are dirt cheap eg Arduino Uno microcontroller ($12) the display was a whole $2, the 5v-240V relay (small blue rectangle) was $2.
The plastic box was $11, the nice IP rated blue/black 240V mains connector plug/sockets on the RHS were about $5 each - its just that I needed 6 of them that added to the cost.
Some of the parts have also been salvaged from various bits of gear.

The display top line shows the current time and "Et" is the "Elapsed time" since the previous vent.
Second line shows "VI" = Interval between vents, "Vt" is the time for each vents.
The photo shows it's been 3 mins since the previous vent, and 1 second vents occur every 50 minutes.
Microcontroller.jpg.

The Uno Arduino micro controller does not come standard with a real time clock so this module had to be added for a whole $2 including the battery!
After adding a header line of 4 pins to the Arduino board the RTC module plugs straight in.
RTCaddon.jpg
Programming the RTC is straight forward providing for accurate timing and a full range of day/date/time functions.
The main reason for the RTC is I don't want venting take place after hours so its programmed for no venting between 7pm and 7am.
I could have included manual adjustment of these times but it's currently fixed in the program and the controller needs to be hooked up to a computer to modify this.

Th control's are shown in the photo below.
A sets the interval time in minutes between vents and B the length of the vent time in seconds
C is a switch that toggles between "normal operation" and access to setting "A" and "B" enabling these parameters to update in real time on the display.
D is a manual vent button.
If I press this all 3 solenoids will vent for as long as hold the button down. I will use this immediately before using my plasma cutter to vent that last skerrick of condensed water from the low points.
Controlls.jpg
E is a mains (240V) switch - this isolates the 240V from the relay and solenoids.

Below are the solenoids I used.
I could have used cheap plastic garden retic solenoids but I already had a reasonable quality brass one left over from another project so I bought 2 more like it for $18 each.
One advantage of these solenoids are low power units so they do not get hot when activated - not that they are ever activated for more than about 10s anyway.

I used similar slim line IP rated mains plugs and sockets to the blue and black ones on the microcontroller box.
I could have hard soldered everything but even though its more work these plugs make it so much easier to install/remove/replace/repair etc, especially for the 2 outside the shed.
Solenoids.jpg

ExternalSolenoid2.jpg
The photo above shows a solenoid at the low point for the finned copper pipe located on an outside wall of the shed.
All the water condensed by this pipe drains to this point - this is outside the shed so for protection I added a simple short section of 100 mm PVC topped by an endocarp.

ExternalSolenoid.jpg

Inside the shed the setup looks like this
The box on the LHS with the timer on it controls the compressor and displays Current and Voltage.
This box used to have a lot more in it when I was running the compressor using a 3P motor and VFD.

The other box under the micro controller runs the compressor enclosure fan - ie activates when the compressor starts and continues to run after the compressor stops for the time preset by the small rotary timer, typically 10 minutes..

The micro controller box that does the venting only uses about 35mA so its no big deal to run from a USB adapter attached to the same 15A GPO as the compressor.
The 240V to drive the solenoids comes from a nearby 10A GPO - not that the solenoids consume much power anyway - just a few Watts.
shedsetup.jpg s

So there it is. Now I will dry out the desiccant in the filter and remeasure the inline compressed air humidity and see what happens.