Skip to main content

ARDUINO SENSORS

                        ARDUINO SENSORS

1) INFRARED SENSOR



IR (infrared) sensors detect infrared light. The IR light is transformed into an electric current, and this is detected by a voltage or amperage detector.A property of light-emitting diodes (LEDs) is that they produce a certain wavelength of light when an electric current is applied--but they also produce a current when they are subjected to the same wavelength light.
A pair of IR LEDs can be used as motion detectors. The first IR LED is wired to emit LED and the second LED is wired to transmit a signal when it receives an IR input. When an object comes within range of the emitted IR, it reflects the IR back to the receiving LED and produces a signal. This signal can be used to open sliding doors, turn on a light or set off an alarm
  


2)ULTRASONIC SENSOR


The energy transmitted by an ultrasonic sensor to an object comes in the form of ultrasound, which is a sound wave above what the human ear can perceive. Ultrasounds are generated by an ultrasonic transducer that transmits ultrasonic waves coming from mechanical energy produced by air blowing.
A basic ultrasonic sensor is composed of a transmitter and a receiver. There are two general types of ultrasonic sensors, differing only in the material used to generate the wave. The first is a piezoelectric sensor, which generates ultrasonic waves through piezoelectric quartz crystals or ceramics. The second is an electrostatic sensor, which makes use of a micro-thin metallic membrane.
Ultrasonic sensors can be used for detecting levels of liquid content in a tank or container. The sensor emits the wave towards the liquid surface, which bounces the wave back to the sensor receiver. The data is sent to a system to calculate the liquid level based on pre-programmed information about the tank's full level. More advanced uses of ultrasonic sensors are found in the field of medicine, particularly in medical ultrasonography, which is used to detect the fetus inside a mother's womb.


3) PIR MOTION SENSOR


                 PIR sensors are more complicated than many of the other sensors explained in these tutorials (like photocells,FSRs and tilt switches) because there are multiple variables that affect the sensors input and output. T

The PIR sensor itself has two slots in it, each slot is made of a special material that is sensitive to IR. The lens used here is not really doing much and so we see that the two slots can 'see' out past some distance (basically the sensitivity of the sensor). When the sensor is idle, both slots detect the same amount of IR, the ambient amount radiated from the room or walls or outdoors. When a warm body like a human or animal passes by, it first intercepts one half of the PIR sensor, which causes a positive differential change between the two halves. When the warm body leaves the sensing area, the reverse happens, whereby the sensor generates a negative differential change. These change pulses are what is detected

                  

4)GAS SENSOR



The Analog CO/Combustible Gas Sensor(MQ9) module is useful for gas leakage detecting, it used the sensitive material SnO2, which with lower conductivity in clean air. It make detection by method of cycle high and low temperature, and detect CO when low temperature (heated by 1.5V). The sensors conductivity is more higher along with the gas concentration rising. When high temperature (heated by 5.0V), it detects Methane, Propane etc combustible gas and cleans the other gases adsorbed under low temperature. MQ-9 gas sensor has high sensitity to Carbon Monoxide, Methane and LPG. The sensor could be used to detect different gases contains CO and combustible gases, it is with low cost and suitable for different application.

5)TEMERATURE SENSOR



A temperature sensor measures temperature using four measurement scales that are divided into various degree units. The measurement scales use the metric Celsius scale, and they start at zero. The Rankin scale is the absolute scale that uses Fahrenheit temperature sensing. Temperature sensors determine absolute zero measurements as close to minus 460 degrees Fahrenheit. The Rankin scale measures absolute zero as 492 degrees Rankin.

A popular thermal measuring method is thermocouple, which is composed of two different metal alloy wires. Combining two different metals generates a strong voltage that has the same capacity as temperature. Thermocouples typically provide vast measurement ranges. They work using the Seebeck effect which involves changes in temperature in electrical circuits. The sensors read temperature by taking measurements of voltage outputs.
Thermistors are another type of temperature sensor, and they’re mostly used in human thermometers and appliances. Their predictable resistance reacts to temperature change. When temperature changes, the electrical current or resistance also changes.
Non-contact temperature sensors measure temperature without touching the object. They measure thermal radiation to determine temperature.

Test code for Sensor are given below;


1)Code for Infrared:

//NBSL COMMERCIAL
int LED = A4;
int obstaclePin = A5;
int hasObstacle = HIGH;

void setup() {
  pinMode(LED, OUTPUT);
  pinMode(obstaclePin, INPUT);
  Serial.begin(9600);
}
void loop() {
  hasObstacle = digitalRead(obstaclePin);
  if (hasObstacle == LOW)
  {
    Serial.println("Stop something is ahead!!");
    digitalWrite(LED, HIGH);
    delay(200);
  }
  else
  {
    Serial.println("Path is clear");
    digitalWrite(LED, LOW);
  }
  delay(200);
}

2)Code for Ultrasonic Sensor:

//NBSL COMMERCIAL
#define trigPin 13
#define echoPin 12
#define led 11
#define led2 10

void setup() {
  Serial.begin (9600);
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
  pinMode(led, OUTPUT);
  pinMode(led2, OUTPUT);
}

void loop() {
  long duration, distance;
  digitalWrite(trigPin, LOW);  // Added this line
  delayMicroseconds(2); // Added this line
  digitalWrite(trigPin, HIGH);
//  delayMicroseconds(1000); - Removed this line
  delayMicroseconds(10); // Added this line
  digitalWrite(trigPin, LOW);
  duration = pulseIn(echoPin, HIGH);
  distance = (duration/2) / 29.1;
  if (distance < 4) {  // This is where the LED On/Off happens
    digitalWrite(led,HIGH); // When the Red condition is met, the Green LED should turn off
  digitalWrite(led2,LOW);
}
  else {
    digitalWrite(led,LOW);
    digitalWrite(led2,HIGH);
  }
  if (distance >= 200 || distance <= 0){
    Serial.println("Out of range");
  }
  else {
    Serial.print(distance);
    Serial.println(" cm");
  }
  delay(500);
}

3)Code for Pir Motion Sensor:

//NBSL COMMERCIAL
int motion_1 = 2;
 int light_1 = 13;
 void setup(){
   pinMode (motion_1,INPUT);
   pinMode (light_1, OUTPUT);
 }

void loop (){
   digitalWrite (light_1,LOW);
   delay(1000); //this delay is to let the sensor settle down before taking a reading
   int sensor_1 = digitalRead(motion_1);
   if (sensor_1 == HIGH){
     digitalWrite(light_1,HIGH);
     delay(500);
     digitalWrite(light_1,LOW);
     delay(500);

  }
 }

4)Code for Gas Sensor:

//NBSL COMMERCIAL
void setup() {
  Serial.begin(9600);
}

void loop() {
  float sensor_volt;
  float RS_air; //  Get the value of RS via in a clear air
  float R0;  // Get the value of R0 via in LPG
  float sensorValue;

 
    for(int x = 0 ; x < 100 ; x++)
  {
    sensorValue = sensorValue + analogRead(A0);
  }
  sensorValue = sensorValue/100.0;


  sensor_volt = sensorValue/1024*5.0;
  RS_air = (5.0-sensor_volt)/sensor_volt; // omit *RL
  R0 = RS_air/9.9; // The ratio of RS/R0 is 9.9 in LPG gas

  Serial.print("sensor_volt = ");
  Serial.print(sensor_volt);
  Serial.println("V");

  Serial.print("R0 = ");
  Serial.println(R0);
  delay(1000);

}



5)Code for Temperature Sensor:

//NBSL COMMERCIAL
int sensorPin = 0;
void setup()
{
 Serial.begin(9600);
}
void loop()              
{
 int reading = analogRead(sensorPin);
 float voltage = reading * 5.0;
voltage /= 1024.0;
Serial.print(voltage); Serial.println(" volts");
 float temperatureC = (voltage - 0.5) * 100 ;
 Serial.print(temperatureC); Serial.println(" degrees C");
 float temperatureF = (temperatureC * 9.0 / 5.0) + 32.0;
 Serial.print(temperatureF); Serial.println(" degrees F");
 delay(1000);
}


View of Arduino sensors;
                      




                                                      POWERED BY

                                                              NBSL







 


















Comments

  1. This comment has been removed by a blog administrator.

    ReplyDelete

Post a Comment

Popular posts from this blog

India Space Research

INDIAN SPACE RESEARCH                                      The Technology is developing day by day and new innovations are coming out day by day. Many things are runs with help of satellites for example TV receiver, Weather Forecasting, Global positioning systems(GPS), Defense purposes. Thus Aerospace development is very important for an country. INDIA , places 5 th place in space developments. The ISRO is the Indian organization of space research Developments. What is ISRO? ISRO expands as Indian Space Research Organization, which is the Indian space Development organization. ISRO Ranks 5 th place in space research. Who founded ISRO?  Indian Space Research Organization (ISRO) was founded by Jawaharlal Nehru, who is the First Prime Minister of INDIA and Scientist Vikram Sarabhai, who is known as the father of space programs in the year 1962 as Indian National Com...

Top 5 Expensive Cars in the World

5) Bugatti Veyron The Bugatti Veyron is a mid Engine sports car designed and developed by Volkswagen group and manufactured in Molsheim , France . The Top speed of the Bugatti Veyron is 407 km/h and it has 7 Speed direct Shift Automatic Transmission. The Designer of Bugatti Veyron is Jozef Kaban. The Price of Bugatti Veyron is approximately $1.7 million (Rs 12 crore). 4) Aston Martin Valkyrie The Aston Martin Valkyrie is manufactured by Aston Martin and it is the limited production of hybrid electric sports car. The maximum speed of Aston Martin Valkyrie is 402 km/h and it has a 7 speed Ricardo dual clutch transmission. The designer of Aston Martin Valkyrie is Adrian Newey. The price of Aston Martin Valkyrie is approximately $3.2 million (Rs 22 crore). 3) Lamborghini Veneno Roadstar The Lamborghini Veneno Roadstar is manufactured by Lamborghini and only 9 units of Lamborghini Veneno Roadstar were and 8 of them were sold and 1 remained at the facto...

Ice Bergs Melt due to Carbon dioxide

Ice Bergs Melt due to Carbon dioxide What is CO2?                                  CO2 which is expanded has Carbon dioxide . The CO2 in atmosphere is 0.04 and present in Earth Atmosphere. The CO2 is basically an Green House Gas which plays in important role in Maintaining Earth Average Temperature of 57 degrees Fahrenheit . The CO2 is basically an heat trapping effective green house gas. It does not trap all gas molecule on IR radiations and it also remits the IR radiations during night where other else earth average temperature will be 0 degrees Fahrenheit . Any how not only CO2 all green house gases plays an important role in it. How CO2 produced?                              CO2 is given naturally by respiration and deforestation and Main r...