Analyse of Some Basic Sensor

by tmvinay95 in Circuits > Arduino

33 Views, 0 Favorites, 0 Comments

Analyse of Some Basic Sensor

WhatsApp Image 2024-12-27 at 11.25.40_9b89f4cf.jpg

This prototype system integrates multiple sensors using a sensor shield, which simplifies the connection process and interfaces the sensors with a microcontroller for data acquisition. It is ideal for IoT projects, environmental monitoring, or educational purposes.

Supplies

dht11.jpg
flame.jpg
mag.png

1. Flame Sensor

  1. Sensitive Detection: Quickly detects the presence of a flame or fire in its line of sight.
  2. Wide Application: Useful in fire detection systems and safety applications.
  3. Compact Design: Small and easy to integrate into various systems.
  4. High Accuracy: Designed to detect flame light wavelengths (760 nm – 1100 nm).
  5. Cost-Effective: Affordable solution for flame detection.

2. DHT11 (Digital Temperature and Humidity Sensor)

  1. Easy to Use: Digital signal output simplifies integration with microcontrollers.
  2. Low Power Consumption: Operates on minimal power, ideal for portable systems.
  3. Affordable: Cost-effective for temperature and humidity monitoring projects.
  4. Pre-Calibrated: No need for additional calibration, providing accurate results out of the box.
  5. Reliable Output: Provides consistent and stable readings within its range.

3. Light Dependent Resistor (LDR)

  1. Simplicity: Analog output makes it easy to use in circuits for light detection.
  2. Versatility: Widely used in light-sensitive applications like streetlights and light meters.
  3. Low Cost: Economical and readily available.
  4. Wide Range: Can detect a broad spectrum of light intensities.
  5. Passive Device: Requires no power for operation, making it energy-efficient.

4. Magnetic Field Sensors

  1. High Sensitivity: Can detect small changes in magnetic fields, useful for precision applications.
  2. Versatile Applications: Used in navigation, motor control, and proximity sensing.
  3. Non-Contact Operation: Measures magnetic fields without requiring direct contact.
  4. Durable: Typically robust and reliable for long-term use.
  5. Compact: Small size makes it suitable for integration into various systems.

5. Ultrasonic Sensor

  1. Non-Contact Measurement: Measures distance without physical contact, reducing wear and tear.
  2. Wide Range of Applications: Used in robotics, object detection, and liquid level sensing.
  3. High Accuracy: Provides precise distance measurements.
  4. Reliable in Various Environments: Performs well in dark or dusty conditions where optical sensors might fail.
  5. Affordable and Accessible: Widely used and budget-friendly for projects.


ABOUT BHARAT PI SENSOR DOCK

The Bharat Pi Sensor Dock is a versatile development platform designed to simplify the integration of multiple sensors with microcontrollers or single-board computers like the Raspberry Pi. It is tailored for educational, prototyping, and IoT applications, offering a modular and user-friendly interface to explore various sensor technologies.

Connection

Untitled Diagram-Page-1.drawio.png

make sure u have short pwr and sw

Central Sensor Dock/Shield

  1. The shield has labeled ports (e.g., D2, D3, etc.) corresponding to digital or analog pins.
  2. Each port provides power (VCC), ground (GND), and signal pins (S).
  3. The sensors are connected using jumper wires to these ports for easy interfacing.

MAGNETIC FIELD SENSOR(Top Left)

  1. A MAGNETIC FIELD SENSOR is connected.
  2. Wiring:
  3. VCC (Red): Powers the sensor.
  4. GND (Black): Ground connection.
  5. Signal (Yellow): Output connected to the shield for detecting gas presence.
  6. Analog Pin Not Used: The analog output pin is not connected, implying digital output is being used.


Flame Sensor (Bottom Left)

  1. A Flame sensor module is connected to detect fire or flame light.
  2. Wiring:
  3. VCC (Red): Supplies power.
  4. GND (Black): Ground connection.
  5. Signal (Yellow): Connected to the shield for detecting flame presence.
  6. Analog Pin Not Used: The analog pin is not connected, so digital output is utilized.

DHT11 Temperature and Humidity Sensor (Bottom Center)

  1. The DHT11 sensor measures temperature and humidity.
  2. Wiring:
  3. VCC (Red): Supplies power.
  4. GND (Black): Ground connection.
  5. Signal (Yellow): Digital data pin for sending temperature and humidity readings.

Ultrasonic Sensor (Top Right)

  1. The HC-SR04 Ultrasonic sensor measures distance using sound waves.
  2. Wiring:
  3. VCC (Red): Supplies power.
  4. GND (Black): Ground connection.
  5. TRIG (Green): Trigger pin connected to the shield.
  6. ECHO (Yellow): Echo pin connected to the shield

LDR(Bottom Right)

  1. The LDR module detects LIGHT INTENSITY
  2. Wiring:
  3. VCC (Red): Supplies power.
  4. GND (Black): Ground connection.
  5. Signal (Yellow): Sends light intensity detection signals to the shiel



CODING

#include <DHT.h>

#define DHTPIN 33

#define DHTTYPE DHT11

DHT dht(DHTPIN, DHTTYPE);

#define ldr 13

#define trig 26

#define echo 25

#define FLAME 5

#define magnet 18

int flameValue=0;

 

 int magnetvalue=0;


void setup() {

 Serial.begin(115200);

 pinMode(ldr, INPUT);

 pinMode(FLAME, INPUT);

 pinMode(trig,OUTPUT);

 pinMode(echo, INPUT);

 pinMode(magnet, INPUT);

 

}



void loop() {

 float temp = dht.readTemperature();

  float hum = dht.readHumidity();

 

 

 Serial.print("temperature is:");

 Serial.println(temp);

 Serial.print("humidity is:");

 Serial.println(hum);

 

 delay(1000);

 



 float ldrvalue = analogRead(ldr);

 Serial.print("light intensity:");

 Serial.println(ldrvalue);

 delay(1000);


 int flameValue = digitalRead(FLAME);

 Serial.print("flaame is");

 Serial.println(flameValue);

 delay(1000);


 long duration,distance ;

 digitalWrite(trig, LOW);

 delayMicroseconds(2);

 digitalWrite(trig, HIGH);

 delayMicroseconds(10);

 digitalWrite(trig, LOW);

 duration = pulseIn(echo, HIGH);

 distance = (duration/2)*0.0334;

 Serial.print("Distance: ");

 Serial.print(distance);

 Serial.println(" cm");

 delay(500);


 int magnetVlaue = digitalRead(magnet);

 Serial.print("magnet vaue is");

 Serial.print(magnetVlaue);

 delay(1000);

 

 

 

}