I thought I'd post a little adaptation I've made to my cheap Amazon pump, that lets me use it to fill up relatively large air tanks. I have an affordable air-cooled pcp pump from Amazon, the GS compressor.
It's great for filling up my rifle, but I've migrated to using a tank, and this pump would overheat and die before it could fill up anything but the smallest tank. That said, provided I turn the pump off to let it cool down, it can fill up a big tank. The problem is, for large tanks this could entail hundreds of on/off cycles over many hours.
So I thought I'd build a little Arduino circuit to do the job. I've tried a few different options, re-learning some basic things about electric circuits along the way. I've settled on a basic design that seems pretty robust. The core of the circuit is an Adafruit Feather 32u4 "Basic Proto" although I imagine you can find other similar circuits from other dealers. This is a very basic board that uses Arduino coding conventions. All we need from it is we can program it to turn on and off a 3V terminal.
The 3v terminal will be connected to a solid-state relay. The key thing is to find a solid state relay than can turn on and off wall power (120V, moderate amperage), yet triggered by a 3v current. This one by Inkbird does the job.
I've been doing some home rennovations recently -- tearing down some walls, and tearing out the electrical wiring so I have some electrical wiring sitting around that's perfect for the job. You can find this kind of wiring at shops like Home Depot. With these ingredients, I wired them all together, and put little male/female plugs on the wire ends. Getting a female plug with an LED to indicate power is a good idea, as it helps to test the circuit.
Not certain if you can see it or not, but I soldered on "headers" to my Adafruit board, as it makes it easier to connect things to it.
Not necessary, but it makes life easier.
So my little circuit plugs into the wall power supply, and then to my compressor. I leave the compressor's switch "on" so that the Adafruit can control it. I should add, if you aren't very comfortable doing electrical work, one of these socket testers will really help.
If you plug it into your female socket with the adafruit turning it on and off, it should alternate between displaying nothing (off) and "correct". If it gives you something else, you know you wired things up the wrong way. It's important to know the relay needs to have the hot wall line connected to it. It won't run properly if you've connected your wall neutral (or ground) to it.
Here it is, off.
And on.
My pump and air filter.
The Arduino code. To change the code on your Arduino, you will need a computer with a USB port, i.e. you probably can't do this on most phones.
#define SECOND 1000UL
#define MINUTE (SECOND * 60UL)
#define HOUR (MINUTE * 60UL)
int TRIGGERPIN=10;
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);
}
}
As you can see, it turns the circuit on and off, on for 1:40, off for 5:00. You'll have to manage the on-off cycle lengths yourself, depending on your pump and the ambient temperature -- whatever it takes to keep the pump cool. I plan on updating the circuit soon, so that it keeps track of the pump's temperature via a thermistor. Will also update the circuit to provide a little display, to help you keep track of how much running time the pump has had, etc. These Adafruit circuits are fairly noob-friendly. As you can see in the code, I'm using pin "10" as the trigger pin. So my relay connects to the Adafruit via pin "10" (clearly labelled) and the ground pin (labelled GND).
The Feather is powered by a little Li-Ion battery. You'll need to purchase something like that to keep it running, or power it with a little wall adapter.
One other element of my code, I have it stop at 40 on/off cycles. This is a basic safety protocol, as it won't let the tank get to a dangerous pressure, unsupervised. For any tank you should compute how many cycles it will take to finish, and set your limit appropriately. Some companies have touchable displays that could allow this to be configurable without plugging it into a computer -- i.e. maybe in the future I'll add something like this to the circuit.
Did I miss anything? Will update this thread as I update the circuit.
It's great for filling up my rifle, but I've migrated to using a tank, and this pump would overheat and die before it could fill up anything but the smallest tank. That said, provided I turn the pump off to let it cool down, it can fill up a big tank. The problem is, for large tanks this could entail hundreds of on/off cycles over many hours.
So I thought I'd build a little Arduino circuit to do the job. I've tried a few different options, re-learning some basic things about electric circuits along the way. I've settled on a basic design that seems pretty robust. The core of the circuit is an Adafruit Feather 32u4 "Basic Proto" although I imagine you can find other similar circuits from other dealers. This is a very basic board that uses Arduino coding conventions. All we need from it is we can program it to turn on and off a 3V terminal.
The 3v terminal will be connected to a solid-state relay. The key thing is to find a solid state relay than can turn on and off wall power (120V, moderate amperage), yet triggered by a 3v current. This one by Inkbird does the job.
I've been doing some home rennovations recently -- tearing down some walls, and tearing out the electrical wiring so I have some electrical wiring sitting around that's perfect for the job. You can find this kind of wiring at shops like Home Depot. With these ingredients, I wired them all together, and put little male/female plugs on the wire ends. Getting a female plug with an LED to indicate power is a good idea, as it helps to test the circuit.
Not certain if you can see it or not, but I soldered on "headers" to my Adafruit board, as it makes it easier to connect things to it.
Not necessary, but it makes life easier.
So my little circuit plugs into the wall power supply, and then to my compressor. I leave the compressor's switch "on" so that the Adafruit can control it. I should add, if you aren't very comfortable doing electrical work, one of these socket testers will really help.
If you plug it into your female socket with the adafruit turning it on and off, it should alternate between displaying nothing (off) and "correct". If it gives you something else, you know you wired things up the wrong way. It's important to know the relay needs to have the hot wall line connected to it. It won't run properly if you've connected your wall neutral (or ground) to it.
Here it is, off.
And on.
My pump and air filter.
The Arduino code. To change the code on your Arduino, you will need a computer with a USB port, i.e. you probably can't do this on most phones.
#define SECOND 1000UL
#define MINUTE (SECOND * 60UL)
#define HOUR (MINUTE * 60UL)
int TRIGGERPIN=10;
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);
}
}
As you can see, it turns the circuit on and off, on for 1:40, off for 5:00. You'll have to manage the on-off cycle lengths yourself, depending on your pump and the ambient temperature -- whatever it takes to keep the pump cool. I plan on updating the circuit soon, so that it keeps track of the pump's temperature via a thermistor. Will also update the circuit to provide a little display, to help you keep track of how much running time the pump has had, etc. These Adafruit circuits are fairly noob-friendly. As you can see in the code, I'm using pin "10" as the trigger pin. So my relay connects to the Adafruit via pin "10" (clearly labelled) and the ground pin (labelled GND).
The Feather is powered by a little Li-Ion battery. You'll need to purchase something like that to keep it running, or power it with a little wall adapter.
One other element of my code, I have it stop at 40 on/off cycles. This is a basic safety protocol, as it won't let the tank get to a dangerous pressure, unsupervised. For any tank you should compute how many cycles it will take to finish, and set your limit appropriately. Some companies have touchable displays that could allow this to be configurable without plugging it into a computer -- i.e. maybe in the future I'll add something like this to the circuit.
Did I miss anything? Will update this thread as I update the circuit.