A big part of what makes the Arduino great for projects is the myriad of sensors that can be used with the Arduino. This article discusses some useful sensors that allow you to build cool projects and prototypes on your Arduino board.
Connecting the Sensors
For your prototyping and electronics projects, I would advise using breadboards and jumper cables to connect the sensors to your Arduino.
There are also extension prototype shield boards that generally fit on top of the Arduino to give it more functionality and allow for more sensors to be connected. Typically, you would need to connect the sensor to the Arduino’s 5V pin, ground, and another pin; however, this depends on the sensor.
1. Gas Sensors
Gas sensors detect carbon monoxide, hydrogen, and smoke, among other gases.
Below are a couple of examples:
- MQ2 gas sensor: can detect gases such as butane or hydrogen.
- MQ3 gas sensor: can detect other gases, such as methane and hexane.
These gas sensors are chemiresistors, as they sense how the resistance changes when a chemical compound comes into contact with a combustible gas. The gas sensing material is, for example, tin oxide, which only has a high enough conductivity when the air has one of the gases in it. The gas sensor’s sensitivity can be changed by turning the attached potentiometer.
For most of these gas sensors, while the presence of the gas can be detected, the type of gas cannot be determined.
2. Accelerometer
There are sensors that can be used to determine acceleration as well as tilt (gyroscope measurements). The sensors can be added to breakout boards that measure acceleration and orientation.
One project that these sensors are good for is step-counting builds, as they require the measurement of orientation and acceleration changes.
Another use for these sensors is in gaming controllers or intuitive remote controls for drones, where tilt and gesture inputs are important.
3. Heat and Movement Sensors
If you want to make your own alarm system, a passive infrared (PIR) sensor is useful. The PIR sensor is a motion sensor that can detect when a person (or warm body) moves near it.
A PIR detects changes in heat as infrared (IR) radiation. As the person moves in front of the sensor, within the given range, the change in infrared radiation activates the sensor and any alarm that is triggered with it.
4. Air Quality Sensors
A dust sensor can be used to determine the air quality in terms of the amount of fine dust particles in the air. It measures the concentration – the number of particles of dust per million of air. The sensor has an infrared light-emitting diode and a phototransistor and detects the dust when the pathway of light is interrupted by the fine dust particles in the air.
The dust reflects the infrared light and absorbs some of it, with the degree to being determined by the size and number of dust particles. Dust sensors are useful for a number of projects, including air purification systems or vacuum cleaners.
There are also sensors that are calibrated to determine a number of gases in the air, such as formaldehyde, acetone, and carbon monoxide. These sensors are helpful to determine air quality, both inside and outside.
5. Liquid Sensors
A moisture sensor is useful for such things as checking how wet the soil is of a potted plant to determine whether it needs to be watered or not.
The moisture sensor can be placed in the soil, then connected to an Arduino. The moisture sensor works based on measuring the resistivity of the moisture in the soil.
An alcohol sensor can be used to sense alcohol in projects such as a breathalyzer. It works using a semiconductor, which has a voltage output dependent on how much alcohol is in the breath.
6. Temperature and Humidity Sensors
Some sensors can help detect the weather and are used in weather stations, thermometers, hygrometers, and weather displays. They are often bundled as temperature and humidity sensors.
A temperature sensor, otherwise known as a thermistor (thermal resistor), is especially dependent on temperature and made up of two metals that have a variable resistance across them when the temperature changes. They are also known as resistance temperature detectors (RTDs).
Humidity sensors usually have a thin metal with a variable capacitance based on how humid the air is.
The temperature and humidity sensors have certain ranges of operation and may not be able to measure low temperatures and very high temperatures. The type of thermocouple used, will determine the operating temperature range that it can measure. The accuracy depends on the sensor and the size and type of metals used.
With the humidity and temperature measurement, these sensors can also tell of the atmospheric pressure. This is dependent on the input of the altitude.
7. Light Sensors
Light sensors are one of the most common type of sensor. They work by converting photons of light into an electrical output, thus known as photosensors.
One such sensor is a photoresistor, which could be used to detect sunlight. The resistance varies based on the amount of photons that hit the compounds in the photoresistor.
The resistance generally decreases as the intensity of the light increases. These are light dependent resistors (LDRs), which are useful in a number of projects, such as controling lights so that they turn on automatically at night.
Light sensors are not only used for visible light, as there are also infrared photosensors, such as those in infrared distance sensors. These work by emitting infrared (IR) light then measuring it with the phototransistor when it returns.
Generally, the more lighter the color of the object that the IR light hits, the more light is reflected back.
8. Touch Sensors
A touch button can be used for many projects to start or stop a process when the button is pressed.
A capacitive touch sensor detects the change in capacitance when you press the touch pad with your finger (or when your finger is just close enough to the touch sensor).
There are also resistive touch sensors that do not measure the capacitance changes, but do measure the pressure applied to the sensor. This applied pressure is measured through three layers: two conductive layers and one non-conductive layer sandwiched between them. When the button or sensor is pressed, the two conductive layers make contact, and the sensor is activated.
Capacitive touch sensors allow for more fine adjustments and multi-touch, whereas resistive touch typically allows for simple activation of on and off.
9. Sound and Ultrasonic Sensors
Sound sensors are generally built from microphones. They work similarly to the human ear, with a diaphragm that vibrates when sound waves hit it. These vibrations are then converted to an electrical input from the sound sensor.
There is usually a potentiometer on the sound sensor that can be turned to adjust the sensitivity.
Ultrasonic sensors are commonly used to measure distances, as a sound wave at ultrasonic frequencies (that can’t be detected by the human ear) is transmitted then bounces back off of objects and is received by the transducer.
10. Magnetic Hall Sensors
Hall sensors are named for the Hall effect, which is used to measure the magnetic fields. These are useful for a number of projects where speed and proximity measurements are needed.
An example would be to detect when a door or window is open, using a magnet and a Hall sensor that detect when the magnetic field is no longer close (when the door with the attached magnet is opened away from the Hall sensor).
There are, of course, other sensors, such as cameras with artificial intelligence. You can also learn the basics of Arduino. If you are excited about the possibilities with the Arduino, read more about Arduino starter kits so that you can get working on a project.
Frequently Asked Questions
How do you choose the right sensor?
There are certain specifications that you should look for, such as temperature sensors and the temperature ranges that they work for, and levels of precision. The supplier should also be reputable so that you know the sensor is well made. The cost is always a factor, but the size may well be another, especially if you need to fit the sensor into a confined space.
What is the difference between an actuator and a sensor?
A sensor is used to take physical measurements, then transfer it as electrical signals, while actuators have an electrical input which they then transfer into physical, or mechanical, action.
How do you measure proximity with an Arduino?
The easiest way would be to use an infrared sensor. The infrared light that is emitted hits an object and is reflected back to a photo sensor. Another way is with an ultrasonic sensor, which allows for the measurement of distance to objects.
All photographs and screenshots were taken by the author.
Get the best of IoT Tech Trends delivered right to your inbox!