Sample Projects


1.Human Height Measurement System Using Arduino UNO R3 






How to Make it?

The Ultrasonic Sensor is the main module in this project.This Sensor is usually used to measure the distance between the sensor and the subject in front in it.It has two eye like module by which a low Hz sound is Transmitted and Received. Thus the Calculate the distance

The Following Image Explains it :







The Ultrasonic Sensor, The Display and Buzzer is Connected with the ARDUIINO UNO R3 Board in this way:(See the Circuit Diagram)





Components Used: 1.Arduino UNO R3 2.Ultrasonic Sensor 3.AlphaNumeric 16x2 Display 4.Female to Male Jumper Wires(The type of Jumper Wires may vary depending on your Arduino board usually Male to Male or Female to Male) 5.A Arduino UNO R3 cable 6.A Power Supply(You can use Power Bank)




Code::


// includes the LiquidCrystal Library

#include <LiquidCrystal.h>

 

// includes the LcdBarGraph Libra

 

// Maximum distance we want to ping for (in centimeters).

#define max_distance 200

 

// Creates an LCD object. Parameters: (rs, enable, d4, d5, d6, d7)

LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

 

 

 

const int trigPin = 11;

const int echoPin = 12;

long duration;

int distance;

int distance1;

int speakerPin = 8;

void setup()

{

  lcd.begin(16,2); // Initializes the interface to the LCD screen

 

  pinMode(trigPin, OUTPUT);

  pinMode(echoPin, INPUT);

}

 

void loop()

{

  // Write a pulse to the HC-SR04 Trigger Pin

  digitalWrite(trigPin, LOW);

  delayMicroseconds(2);

  digitalWrite(trigPin, HIGH);

  delayMicroseconds(10);

  digitalWrite(trigPin, LOW);

 

  // Measure the response from the HC-SR04 Echo Pin

  duration = pulseIn(echoPin, HIGH);

 

  // Determine distance from duration

  // Use 343 metres per second as speed of sound

  distance= duration*0.034/2;

  distance1= 180 - distance ;

  // Prints "Distance: <value>" on the first line of the LCD

 

  if (distance1 > 100) {

   tone (speakerPin, 1000);

 

   } else {

    noTone (speakerPin);

 

  }

  lcd.setCursor(0,0);

  lcd.print("HEIGHT: ");

  lcd.print(distance1);

  lcd.print("  cm  ");

 

  // Draws bargraph on the second line of the LCD

 

 

  delay(500);

}


This Site is managed by Electronics and Communication Engineering Department of FX Polytechnic College. All project Demos and models uploaded in this Site is made in our Department. Important 🚨 All videos uploaded in this Site is not under copyright. This Site is only for Educational purpose. For Enquiries: iotlaboratoryfxpoly@gmail.com #iot #fxpoly #youthclub











No comments:

Post a Comment