Tag Archives: Electrical Engineering

My Arduino Air Compressor Controller Project – Assembly of Control Board

Well, I’ve made some progress on our Arduino project!

I have my control board 100% assembled and functionally tested (without the Arduino). All that is left for the hardware is attaching the push button switches, the pressure sensor, mounting my project box to the compressor, and wiring up the power line to my terminal strip. Then we will begin working on the programming for the Arduino!

Compressor Project Box - 1

The following is a rough sketch of the circuitry so you can visualize it a little better. Note: I created this with fritzing, which has a limited amount of pre-built components – so, the components shown are just for illustration, not all of them are identical to the components I am using.

Compressor Controller - Breadboard Sketch

At the top left, you will see my connector for the 12 volt power supply, which will ultimately supply power for the entire device. The controller fan, and the air compressor relay will be powered from the 12V bus through the transistors.

Right next to the 12V power supply is a voltage regulator – it takes an input from 5-60 volts and regulates it to a stable 5 volts. The regulator’s 5 volt output will supply power to everything else – I chose to power the devices (pressure switch and LCD) directly from the regulator output instead of from the Arduino because of the Arduino’s limited max output of 500 ma – The Arduino is fully capable of powering all these devices from its power source. I just chose to avoid it as a fault in one of the devices could exceed the power output of the Arduino, potentially damaging the Arduino.

Just below the voltage regulator are two transistors. I am using these transistors as switches – to turn them on all you have to do is supply a small voltage/current to the base of the transistor. This will allow current to flow through the transistor, completing the circuit path for the device (the relay and fan). To turn it off, you apply 0 volts, or ground to the base of these transistors and it will shut them off. This can be easily performed by the Arduino’s digital outputs, which can turn off and on (0 volts and 5 volts).

Below the transistors are my three push button switches. These switches will be used as a menu, up, and down buttons to allow me to change my setpoints, and look at different things; temperature & humidity inside the box, status of the fan & relay, current tank pressure, the amount of time the compressor has ran, and the current setpoints. They are connected to the 5 volt bus, so when they are pressed they send a 5 volt signal to the digital pins on the Arduino, which we will program it to monitor and respond accordingly. There is a resistor on the output of the switch to drive it to 0 volts – sometimes these switches float, and have non-zero values when not pressed. I can provide more information about transistors later – they are really cool, and are capable of doing many different things for us.

Underneath the three pushbuttons, is our temperature and humidity sensor. This sensor is powered by the 5 volt bus, and uses a single buss data communication to relay the information. Luckily there is a program library for this, and we don’t have to create any special codes for this communication – one of the great things about Arduinos. Since it is a digital communication, it is hooked up to one of the digital pins.

At the bottom right of the breadboard, you will see a pressure sensor (this is not the same as my 3 wire sensor, but it was all fritzing had in its parts list). The pressure sensor is powered by 5 volts (mine has a +5 volt wire, a ground, and a sensor output). The pressure sensor sends a linear output from 0.5 volts at 0 psi, to 4.5 volts at its max rating (200 psi in our case). The reason it is 0.5 – 4.5 instead of 0-5 is to allow us to detect shorts and opens, which could either give a 0 or 5 volt out. Since this sensor gives a differing voltage output, analog, it is attached to one of the Arduino’s analog input pins.

Now, to the right of the breadboard, at the top, I have the fan and relay. Both of which are being controlled by their own transistors, which will be controlled through the Arduino.

Below the relay is the Arduino, our microcontroller.

To the far right is our 16 X 2 LCD (16 characters by 2 line liquid crystal display). This will be powered from the output of the voltage regulator. Its backlight is the largest load on our 5 volt bus. The LCD will be used to display the information I mentioned earlier about the buttons.

Thanks for joining me again! Next week I will have it completely assembled, and we will begin playing with some code!!! Please follow me and join me next week for more!

My Arduino Air Compressor Controller Project – Part 1

Last week, I introduced Arduinos, and mentioned that I would be discussing my air compressor controller project using an Arduino. I will try to complete this series in 5-6 posts with this introduction, details about the hardware, and details about the programming.

Disclaimer: I am providing this information for educational and informational purposes only. Although this looks simple, working with 120V and 240V components and manipulating them with projects like this can be very dangerous, potentially resulting in severe injury, death, damaged equipment, fire, and will definitely void any warranty you may have on the item(s). If you wish to perform a project like this, seek assistance from an experienced electrician first.

So why am I doing this project, when you can just pick up a new stock controller (pressure switch) for $50 – $60? The standard pressure switch for my air compressor typically starts the air compressor when the air pressure drops below 90 psi, and stops when it reaches around 135 psi. It becomes somewhat problematic when trying to run air tools in the 110-120 psi range – when it drops below 100 psi, the air tool just doesn’t get the power it needs, requiring constant adjustment. Yes, you can manually set these pressure switches to cycle on sooner, but leaving it like that will drastically increase the start/stop cycles on the compressor, causing it to ware out much quicker.


My compressor and compressor motor

So, for this project my goal is to create a microcontroller for my compressor that allows me to change the start/stop points of my compressor, safely. The first step in a project like this is to figure out how it works, so you can figure out what you need in order to control it. Normal household compressors are relatively simple – they use a 120 or 240 volt AC induction motor which are controlled by a mechanical pressure switch. The mechanical pressure switch is what I am replacing, so I won’t get into the other aspects of the compressor.

The motor on my compressor is a 240V motor, so it has 2 terminal leads and a ground. The ground is always connected, but the two leads are what the pressure switch controls – it is what my new controller has to do, switch those two terminal leads on/off to start/stop the compressor (it is possible to control it by switching just one terminal lead, but it is just not a good idea as one motor lead will always be ‘hot’).

Now that we know the basics for how to control the start/stop of this compressor, I’ll move on to safety. Most people should already be aware of the hazards of electricity, but this introduces another hazard – over pressurization of the pressure vessel (air compressor tank). I wish it weren’t so, but mechanical and electrical components fail – there is a possibility that the device we use as a switch could fail, leaving the compressor running, over pressurizing the tank, causing it to rupture.

The main key in preventing these bad things from happening, is by getting the properly rated equipment/material. In the image below, you will see my compressor motor is rated for 240V at 15 amps – The switch I use must meet or exceed this rating, failure to do so will definitely result in the switch failing. It is also important to use the proper internal wiring and any other parts/components that will support the voltage and current (amp) that will be flowing through it.

My compressor motor name plate

My compressor motor name plate

Preventing the over pressurization can be done with a pressure release – a valve held shut by mechanical means, such as a spring, that will open at a certain pressure set point to reduce the pressure. The safety relief must be rated for the proper pressure, and flow – it will do no good if the air compressor can supply more air than the relief can release. Most air compressors only output a small volume of air, so most pressure reliefs you find will suffice, just make sure. You can see in the picture below, that my air compressor is rated to output a volume of 10.3 SCFM at 90 psi (at a higher pressure, like 130 psi, it will output a lower volume). Also, it is important to note that the sticker on my compressor states 135 max psi, I looked up the details which state it is capable of 150 psi, and the tank is also rated for 150 psi. So, I need to get a pressure relief for 150 psi or less, that is capable of relieving 10.3 SCFM or more.


My compressor main label

Pressure vessel name plate

Pressure vessel name plate

Next week I will continue posting about this project, moving into discussing the hardware I’ve chosen for my controller. Thanks for reading and following my blog! Please leave comments, and check back next week for more!

Arduino – Inspiring creativity and innovation of technology through learning

This blog, I would like to talk about one of my hobbies – microcontrollers, specifically, Arduinos.


Arduino Mega 2560

So just what exactly is an Arduino you ask – they are an open-source microcontroller that offers a relatively inexpensive way to learn about microcontrollers and build your own automation systems. There are many other development boards, just to name a few raspberry pi, Intel’s Galileo, even Samsung is getting ready to launch their ARTIK. While these are all great options, I prefer Arduino because there is a lot more documentation and examples available for them, they are easier to setup, and they are an actual microcontroller not a microcomputer (I will discuss the difference later).

What can you do with an Arduino? An Arduino is essentially an I/O (input/output) hardware device that has its own microcontroller. There are numerous different versions of Arduinos, but they range from having 14 digital and 6 analog pins, up to 54 digital and 16 input pins. The digital pins can be used as inputs or outputs, while the analog pins are only for input (except on their Due model, which has a couple of analog outputs). Basically, you use these analog and digital pins on the Arduino to read devices (temperatures, pressures, distance sensors, etc…), then have the microcontroller control a device (servos, motors, switches, send a signal, etc…). Most Arduinos also come with USB connectivity, and have the ability for serial, IC2, and other types of electrical communications – meaning that you can link multiple Arduinos together and to other devices, including computers. Some of the things Arduinos have been used for include:

You can find many, many other projects people have completed with Arduinos, and listed for everyone to see with instructions (http://playground.arduino.cc/Projects/ArduinoUsers).

How do you get started, what does it take, how much does it cost? In order to program an Arduino, you need to have a computer with USB – Arduino has their programming software available for Windows, Mac OS X, and Linux. You must download the Arduino IDE (free), from Arduino’s website. Depending on your electrical engineering desire, you can actually get started learning about Arduinos with starter kits that typically start out around $50 (which you can find on Amazon and EBay). Starter kits typically contain one of the Arduino boards (usually the UNO), some electrical components (LEDs, resistors, switches), electromechanical devices (motors, servos), and an instruction manual (could be printed or some are available online). The official Arduino Starter Kit, which is currently unavailable (I believe they are upgrading it), is $89.90. If you’re ambitious, and want to start off on your own, without a starter kit, you can pick up the Arduino official Arduino boards, such as the UNO (one of their most popular boards) for around $25. Arduinos are an open-source hardware/software device, so you can also find a lot of knockoffs for cheaper on EBay, Amazon, and other places. However, I recommend purchasing from Arduino if possible, as they are the inventors and leaders of this project, providing us with continuous hardware and software improvements.

Seeing how quickly our technology is changing, I highly recommend looking into Arduino’s, as it will give you a deeper understanding of how technology is controlling devices – it will give you a new perspective of your electronics. I would also highly recommend them for families – teaching children these things at a fairly young age could be invaluable in their development and potential career paths.

Thanks for reading my blog post! If you are interested in Arduinos, join me next week, I will discuss one of my Arduino projects – a motor controller for my 220V air compressor.