Control a 12V mini air compressor with Arduino

Hi to everybody, I'm actually working in an art project which involve the necessity of controlling a 12V (max 12A) miniair compressor with the arduino. Essentially when a sensor is activated the arduino should trigger the air compressor on and inflate a structure, then when everything is inflate the compressor should shot down. I'd never work with voltage higher then 5 so now I don't know exactly how to deal with it. Actually I have the following problems: - actually the compressor is working with a transformer plugged in the AC socket, there is any solution to make it work without being plugged? - I don't know exactly how to control the miniair compressor, I was search and I found something related to using transistor to control higher voltage, is it ok? - another option that I was thinking was about using eletrovalves and control directly the eletrovalves, it makes any sense? thank you very much

OK poor English but I think I understand. "the compressor should shot down." is the compressor should shut down. - big difference :)

You need to know if your compressor works fro AC or DC, this is vital and without this information you can't proceed as it alters the way you do things.

You say:-

actually the compressor is working with a transformer plugged in the AC socket

but is there anything on the end of the transformer that turns the AC into DC?

If you actually want to run the thing off batteries then maybe that is simpler but a lot more expensive. What you need is called an inverter, that generates mains from batteries, then you need only control the batteries from your arduino.

Ok sorry I make another mistake, the corrent is DC..(both the one for the compressor and the one of the plug..)

Ok if it is DC, then look to use a DC solid state relay, the most common one is the AC type (SSR) but you can get DC ones. This will be easy to use.

Alternatively you could use a mechanical relay and if you are into construction make a DC SSR using FETs.

A logic level MOSFET may be an inexpensive solution.

Yes it would be but it demands a higher skill level than buying and fitting a SSR.

It's one thing to control an air compressor - it's another thing if the air compressor will work for your application.

I'm curious if you have already purchased and tried the air compressor with your "structure" already - does it inflate fast enough? How fast are you needing the "structure" to inflate (how big is it, and what is the CFM of the compressor)?

I would think a standard mini air compressor would inflate something fairly slowly...

Also a mini-compressor may be designed for relatively light duty cycle and short life, given its for inflating car tyres occasionally.

ok thank to everybody! actually I used a DC relay (this one: http://www.sparkfun.com/products/100) and I achieved in make my sensor (UHF sensor) switch on and off the relay (by using this tutorial: http://www.instructables.com/id/Connecting-a-12V-Relay-to-Arduino/) :relaxed:--- yes I proceed with very little steps because i'm a beginner). Actually everything was working with just 9V for trial. (the sensor works with 9V)

Now I will need to put the air compressor (this one: http://www.puntomoto.com/default.asp?l=1&pType=-1&cmd=getProd&cmdID=5780) in the circuit and make the circuit works with 12V but i'm not really sure about how to do it. - Can anybody suggest me a good 12V DC power supply (the ideal solution would be if it is portable and rechargable)? - Do you think that is better to make the relay+air compressor circuit and the sensor circuit work separately (the relay+compressor with 12V supply and the other with 9V battery) or I can try to make everything work with 12V?

another option that I was thinking about was to use an air pump instead of the air compressor. I found this camping air pump (http://www.decathlon.it/pompa-elettrica-a-pile-id_8057254.html), that seems working with just 6v. Do you think it should be a better or worst option (..moreover it works with battery so I can solve the portability problem) thanks

Pd: the structure is like the skeleton of a dress, so is not really big, actually we had tried several time in inflate it with the compressor and it work :)

Can anybody suggest me a good 12V DC power supply (the ideal solution would be if it is portable and rechargable)?

At 12 Amps I would suggest a car battery.

or I can try to make everything work with 12V?

Yes.

Grumpy_Mike: At 12 Amps I would suggest a car battery.

Not if it is meant for indoor usage - flooded cell batteries aren't really meant for indoor applications (fumes, liquid acid, etc)...

I would actually use a large capacity SLA (sealed lead-acid) battery; it won't be cheap, but you won't have to worry about any "leaking" acid, spills, or fumes (from operation or charging - hydrogen is given off).

Also - a standard car battery isn't meant for deep cycling like such a device would cause (over time, with no alternator to recharge it) - if you -had- to use a flooded-cell lead-acid battery, then something deep-cycle (RV or marine) would be best.

You don't really describe the structure you're trying to inflate but I think the air pump would be a better choice (it's designed for high volume, low pressure applications like inflating an air mattress as opposed to a compressor that is designed for high pressure and low volume like inflating tires.) With the air pump you could probably just use the unit's batteries and bypass the switch with your relay.

I would actually use a large capacity SLA (sealed lead-acid) battery;

In the UK all car batteries are sealed, there hasn't been a battery you can open and pour acid in for the last 15 years. I suppose you are still catching up in the states. :)

Grumpy_Mike:

I would actually use a large capacity SLA (sealed lead-acid) battery;

In the UK all car batteries are sealed, there hasn't been a battery you can open and pour acid in for the last 15 years. I suppose you are still catching up in the states. :)

More nanny-state junk, huh? ;)

Actually - we have sealed batteries here as well; many new cars come with them. But the ones with vents on the top tend to be the "replacement" part you get at the auto-parts store, because they tend to be cheaper - a lot cheaper. So - people go with what doesn't hurt them in the wallet, so to speak. The old battery is returned as a "core charge" item, so it get recycled (if you buy a brand new one without a core, you don't get the core charge back).

:)