I'd love a copy of the arduino code and schematics!
The Arduino code is very simple. It's just an on/off cycle, and stopping after a fixed number of cycles, to avoid over-comprression. I'll probably modify the code eventually so that the arduino has a thermistor, to get a better sense for the pump temperature. I could also add a little camera for it to read the tank pressure meter. A less direct way to do this would be to record the current being used by the pump -- as the tank pressure goes up, the current demand goes up. That might be the more electronically-savvy way of determining a cut-off time.
I'm using an Adafruit Feather plugged into a solid-state AC relay. Eventually I might replace the pump's on/off switch with this feather-controlled relay, so that I can keep the pump's fans working while the pump is off.
There isn't a whole lot of safety precautions built into this at present. When you build this you want to have a relay that is "usually off". Avoid locking relays if you can.
#define SECOND 1000UL
#define MINUTE (SECOND * 60UL)
#define HOUR (MINUTE * 60UL)
int TRIGGERPIN=8;
int LIGHTPIN=13;
unsigned long timeUp = 1UL * MINUTE + 40UL * SECOND;
unsigned long timeDown = 5UL * MINUTE + 0UL * SECOND;
int countVar = 0;
int numCycles = 40;
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin 13 as an output, this is the RED LED.
pinMode(TRIGGERPIN, OUTPUT);
pinMode(LIGHTPIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
if (countVar < numCycles) // run for this many cycles.
{
countVar++;
digitalWrite(LIGHTPIN, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(TRIGGERPIN, HIGH); // turn relay ON
delay(timeUp); // on delay
digitalWrite(LIGHTPIN, LOW); // turn the LED off by making the voltage LOW
digitalWrite(TRIGGERPIN, LOW); // turn relay OFF
delay(timeDown); // off delay
}
else
{ // have the light flash rapidly when pumping is done.
digitalWrite(LIGHTPIN, HIGH);
delay(1000);
digitalWrite(LIGHTPIN, LOW);
delay(500);
}
}
I'll fire along some more details once I've got this process a little more reliably "cooked". Currently my circuit is torn-apart as I put together the 3rd generation...