CONCEPT:
Ultra-Temp is a project that explores the idea of creating a circuit that allows for detection of both, movement and temperature simultaneously.

 

COMPONENTS:
The main components required to execute this project are the HY-SRF 05 Ultrasonic Sensor, the DHT11 temperature sensor, 1 Servo motor and 1 LED pin along with – 1 Rev3 Arduino UNO Board, 2 Resistors of 10 Ohms each, 1 Breadboard, 1 Arduino UNO USB cable and a couple of jumper wires.

 

 

TECHNIQUE:

  • The HY-SRF 05 Ultrasonic Sensor is first used to detect movement.
  • The detected movement causes both, the LED and Servo Motor to run simultaneously as programmed while the DHT11 gives the reading of the ambient temperature.
  • The HY-SRF 05 Ultrasonic Sensor and the DHT11 act as sensors while the Servo Motor and LED act as an actuator and a binary actuator respectively.

 

OUTPUT:
The final output of the project is the rotation of the Servo motor, the activation of the LED light and the detection of ambient temperature.

VIDEO DEMONSTRATION:

 

APPLICATIONS:
The application of the combination of these sensors and actuators can be applied in-

Light activation in any space
Automated openings
Ambient temperature readings to help set temperature to a user’s desired thermal comfort

THE CODE:

#include <SimpleDHT.h>
#include <Servo.h>

// for DHT11,
// VCC: 5V or 3V
// GND: GND
// DATA:4
int pinDHT11 = 4;
SimpleDHT11 dht11(pinDHT11);

int LED = 2;

Servo servo1;
int trigPin = 8;
int echoPin = 9;
long distance;
long duration;

void setup()
{
Serial.begin(9600);
servo1.attach(7);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(LED, OUTPUT);
}

void loop()
{
// start working…
Serial.println(“=================================”);
Serial.println(“Sample DHT11…”);

// read without samples.
byte temperature = 0;
byte humidity = 0;
int err = SimpleDHTErrSuccess;
if ((err = dht11.read(&temperature, &humidity, NULL)) != SimpleDHTErrSuccess) {
Serial.print(“Read DHT11 failed, err=”);
Serial.print(SimpleDHTErrCode(err));
Serial.print(“,”);
Serial.println(SimpleDHTErrDuration(err)); delay(1000);
return;
}
Serial.print(“Sample OK: “);
Serial.print((int)temperature); Serial.print(” *C, “); Serial.print((int)humidity); Serial.println(” H”);
// DHT11 sampling rate is 1HZ.
delay(1500);
ultra();
servo1.write(0);
if(distance <= 10){
servo1.write(90);
digitalWrite(LED, HIGH);
}
else
digitalWrite(LED, LOW);
}
void ultra(){
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = duration*0.034/2;
}

 

ULTRA-TEMP” is a project of IAAC, Institute for Advanced Architecture of Catalonia developed at
Introduction to Programming & Physical Computing, Masters in Advanced Architecture in 2021-2023 by students: Preetam S P and faculty: Angel Muñoz , Cristian Rizzuti and Bernat Morato