Human beings should be accustomed with sensors. We have been blessed with 5 senses of our own; Hearing, Sight, Touch, Smell, and Taste.
These senses allow us to navigate and make sense (pardon the pun) of the world.
Imagine a world where you couldn’t smell or taste your favourite food, or be able to see where you are walking.
Sensors play a crucial role in an electronic system in the same way our 5 senses play a crucial role in our lives.
They interpret real world data and send this information to a microcontroller or microprocessor for processing.
Real world data such as temperature, rotation of a motor, force, pressure, humidity and many more.
But, are these sensors input or output devices?
Sensors are in fact Input devices. They interpret information from the real world and convert it to a signal that can be processed (by the main processing unit).
The flow of information starts from outside the electronic system (this case the real world) and works its way toward the main processing unit (microcontroller or microprocessor) via the sensor.
I shall cover more detail of the difference between Inputs and Outputs below.
Difference between and Input and Output?
In an electronic system the main processing unit is either a microcontroller or microprocessor, which executes the main program.
Connected to the main processing unit are inputs and outputs.
To better understand whether a sensor is an Input or an Output, it will help to understand the differences between them.
Input
An input is something that reacts to external changes, and sends this information to the microcontroller for processing. The main objective of an input is sending data to a microcontroller.
It can be something as simple as pressing a button.
A button is considered an input because it is responding to a change in state through physical touch (either high to low, or low to high) and sending this information to be processed accordingly.
Sensors are the most common form of inputs.
For example, a temperature sensor reacts to changes in temperature and sends this information to the main processing unit to be further dealt with.
Outputs
Outputs on the other hand work in the opposite direction.
Rather than sending information to a microcontroller, a microcontroller sends information to the output which responds accordingly.
A Liquid Crystal Display (LCD) is a common output. It has the ability to display information sent to it by the main processing unit.
Other forms of outputs are motors, speakers, buzzers, LEDs and many more.
Below is a simple flow diagram of an electronic system with and input and output:
Sensors
So, now that we have established that sensors devices are inputs and not outputs, let’s take a closer look at the Sensor.
As I mentioned earlier, Sensors are input devices that respond and/or detect changes in the environment.
However, a sensor cannot do much by itself. It requires some sort of processing unit, like a microcontroller or microprocessor.
Working Principle
A sensor outputs a voltage depending on how it detects the physical environment.
The minimum and maximum levels of voltage depend on the electronic system as well as the maximum voltage range of the sensor.
The change in voltage level that it outputs according to the changes in the physical environment depend on its Resolution or Sensitivity.
So, if the output of a Light Dependent Resistor (LDR) varies by 0.5V for an increase of 1 Lux (light intensity), then its resolution is 0.5V/Lux.
This voltage gets sent to the Microcontroller’s Analog to Digital Converter. As the name suggests, this part of the microcontroller has the job of converting this analog signal into digital values.
Two primary types of Sensors
In the field of electronics, there are two types of sensors; Analog and Digital.
Analog sensors convert physical data and output them in the form of an analog signal. This analog signal is a range of values depending on the voltages that it is working with.
For example, imagine you have a temperature sensor that has a resolution of 0.1V/Degree.
So, for every degree change you will have an increase or decrease of 0.1V.
This gives us a nice continuous analog signal waveform.
Digital sensors on the other hand, are limited to a certain set of possible values (these values being ones and zeros).
Due to this fact, analog sensors are much more precise than their digital counter parts.
Different types of sensors
Depending on the application, be sure there will be a sensor available.
Need to detect smoke, there’s a sensor for that.
Need to find the distance between you and an object, there’s a sensor for that.
You get the point.
Below are a list of different sensors available depending on your needs:
- Temperature Sensor
- Proximity Sensor
- Accelerometer
- IR Sensor (Infrared Sensor)
- Pressure Sensor
- Light Sensor
- Ultrasonic Sensor
- Smoke, Gas and Alcohol Sensor
- Touch Sensor
- Color Sensor
- Humidity Sensor
- Tilt Sensor
- Flow and Level Sensor
This however, is not an extensive list, but a list of the most common sensors available.
Why use sensors?
But, why use sensors to begin with? What is their real purpose?
We know that sensors can sense changes in the physical world. This benefits us in many applications.
We can all feel the temperature rise and fall, but we cannot accurately tell the precise temperature.
Sensors however, have the ability to accurately determine the exact temperature. This helps Meteorologists predict weather patterns, so that you can plan whether to take your umbrella or not when heading out on a cloudy day.
Smoke detectors are built with smoke sensors that sound an alarm every time it senses smoke, which means there is an imminent danger of a fire.
They help us stay one step ahead of the game, letting us be proactive rather than reactive.
Since human beings only have 5 senses, electronic sensors enable us to extend our sensing abilities.
Where are sensors used?
Sensors can be found everywhere from your home, your car, your mobile phone and many other areas and fields.
Here are some of the most common applications :
- Consumer Electronics (mobile phones, gaming systems, Computers etc)
- Automobile
- Aviation
- Medical
- Safety
- Chemical
- Marine
- Weather
Again, there are many more applications but these are the most common.
Conclusion
Sensors are devices that help us in daily life.
They help us sense things that we simply would not be able.
While there are many different definitions of a sensor, one thing that is certain is that they are input devices.
It is an input device that provides a signal to a processing unit depending on changes it detects in the real world.