A
Tilt Sensor or a Tilt Switch is a component that detects orientation of
an object. One of the best example for the application of a tilt sensor
is its use in aircrafts.
The horizontal and vertical orientation or inclination of the airplane will be provided by the tilt sensor to on board computers. This information is provided to the pilot for safe travelling.
There are different types of tilt sensors based on the axes it can measure.
A simple tilt sensor is basically a
switch that will turn ON or OFF based angle or orientation of the
sensor. Such sensor is useful for single axis tilt detection.
In this project, the basic functioning of a tilt sensor in determining the orientation is demonstrated.
As mentioned earlier, a tilt sensor is
basically a switch. One end or terminal of the tilt sensor is connected
to any of the digital I/O pins of Arduino.
In this project, it is connected to pin 3 of Arduino. The other terminal of the sensor is connected to ground.
A buzzer and an LED are used to
indicate the detection of the tilt by Arduino. The buzzer is controlled
by the PWM output of the Arduino to generate different tones.
Hence, positive terminal of the buzzer
is connected to any of the PWM pins of the Arduino. In this
demonstration, it is connected to pin 6. The other terminal of the
buzzer is connected to ground.
LED is also used to indicate the tilt
action. As the output current from Arduino is only 20mA, we are
connecting the LED directly to Arduino without any current limiting
resistor.
It is advised to use a current limiting
resistor just to be safe. Anode of the LED is connected to pin 13 of
the Arduino while the cathode is connected to ground.
Working of Arduino Tilt Sensor
A Tilt sensor is similar to a normal
switch except that the current flows through it only when it is tilted
at a certain angle. Hence, a tilt sensor is used to detect the tilt or
orientation of an object.
There are different types of tilt
sensors. For a simple one axes orientation, a tilt switch with accurate
angle of orientation can be used. An accelerometer based 3- axis tilt
sensor is used to detect full motion in three axes.
In this project, we used a single axes
tilt sensor. There are two technologies that are used in the
implementation of Tilt Sensors: Mercury based and Roller Ball based.
Older tilt sensors are made of mercury.
A blob of mercury is placed in a small
glass tube with two metal contacts coming out. When the sensor is held
upright, the mercury will make contact with both the terminals and the
switch is closed.
When the sensor is tilted in either direction, the mercury goes off contact with the terminals and the switch is open.
In roller ball based tilt sensors, one
or two metal balls are used to close or open the switch. When the sensor
is positioned upright, the metal ball makes contact with both the
terminals and closes the switch.
When the orientation of the sensor is
changed i.e. tilted at an angle, the metal ball loses contact with the
terminals and the switch is open.
The advantage of mercury based tilt
sensor is that there is no chance of de-bouncing. But due to the toxic
nature of mercury, the usage of such type of tilt sensors is reduced.
Irrespective of the type of the sensor
used, the best way to test the tilt sensor is by using the following
circuit. It consists of a tilt sensor, an LED, a current limiting
resistor and a power source like battery.
When the sensor is held upright, the
circuit is closed. Current flows through the LED and it glows. When the
orientation of the sensor is changed, the circuit is open and the LED is
turned off.
Another simple way to test the tilt
sensor is using a multimeter. The multimeter is set to continuity mode
and the terminals of multimeter are connected to tilt sensor. The angle
at which the switch opens and closes can be determined by this test.
In this project, an Arduino will sense
the tilt of the sensor and triggers a buzzer and an LED. The code for
Arduino is written and uploaded to the board.
When the tilt of the sensor is detected, the buzzer and LED are triggered by Arduino.
Code
#define SENSOR_PIN 2
#define LED_PIN 13
void setup()
{
pinMode(SENSOR_PIN, INPUT_PULLUP);
pinMode(LED_PIN, OUTPUT);
}
void loop()
{
if (digitalRead(SENSOR_PIN) == LOW)
{
digitalWrite(LED_PIN, HIGH);
}
else
{
digitalWrite(LED_PIN, LOW);
}
}
The working of a simple tilt sensor is demonstrated in this project.
Tilt sensors can be used in security systems, where the orientation of the object is used as the security measure.
Tilt sensors are often used in gaming consoles and mobile phones.
They are used in navigation systems of boats, airplanes etc., to determine the pitch and roll.
GSM Based Home Security Alarm System Using Arduino Home Security Systems are an important feature of modern residential and office setups. Home security systems must be affordable, reliable and effective. Modern complex home security systems include several security features like fire, intruders, electronic door lock, heat, smoke, temperature, etc. Some security systems may be a combination of all the security measures. Such complex systems may be expensive and may not be affordable by everyone. There are individual security systems based on the requirement. In this project, we designed a simple but very efficient home security that has a function of calling the homeowner on his/her mobile number in case of an intruder alert. Help us in selecting the next DIY Arduino Project. : Select your Favourite Project » The project is based on Arduino, PIR motion detection sensor and GSM Module. Table of Contents Circuit Diagram Hardware Required Circuit ...
More and more makerspaces around the world are looking to add coding and electronics to their maker education programs. One of the best ways to do this is by integrating an Arduino board into makerspace projects and lessons. We’ve found that a lot of maker educators haven’t taken the plunge into coding or Arduino because they think programming is scary. Because of this, we wanted to make sure this tutorial was written for the absolute beginner with no experience whatsoever. This tutorial is a high level view of all the parts and pieces of the Arduino ecosystem. In future posts, we will take you step by step in creating your first simple Arduino project. What Is Arduino? Arduino is an open source programmable circuit board that can be integrated into a wide variety of makerspace projects both simple and complex. This board contains a microcontroller which is able to be programmed to sense and control objects in the physi...
Arduino Solar Tracker In modern solar tracking systems, the solar panels are fixed on a structure that moves according to the position of the sun. Let us design a solar tracker using two servo motors, a light sensor consisting of four LDRs and Arduino UNO board. Table of Contents Circuit Diagram Components Required Working Setup Project Code Circuit Diagram The circuit design of solar tracker is simple but setting up the system must be done carefully. Four LDRs and Four 100KΩ resistors are connected in a voltage divider fashion and the output is given to 4 Analog input pins of Arduino. The PWM inputs of two servos are given from digital pins 9 and 10 of Arduino. Components Required Arduino UNO [ Buy Here ] Servo Motor [ Buy Here ] Light Sensors LDR Resistors Working LDRs are used as the main light sensors. Two servo motors are fixed to the structure that holds the solar panel. The program for Arduino is uploaded to the microcontroller. Th...
Comments
Post a Comment