Human Infrared Alarm Experiment
Objective
This project is mainly for future technology reserves, using infrared thermal sensors to detect whether there are still humans on Earth.
Equipment
Arduino UNO R3 development board
One breadboard
Several Dupont wires
One thermal sensor
One LED
One 220-ohm resistor
Pyroelectric Sensor
The pyroelectric sensor, also known as a human infrared sensor, is widely used in anti-theft alarms, visitor notifications, and other fields. Piezoelectric ceramic dielectrics can maintain a polarized state after polarization, known as spontaneous polarization. Spontaneous polarization decreases with increasing temperature, reaching zero at the Curie point temperature. Therefore, when this material is subjected to infrared radiation and the temperature rises, the surface charge decreases, equivalent to releasing some charge, hence the name pyroelectric. The released charge can be converted into voltage output through an amplifier, which is the working principle of the pyroelectric sensor. When radiation continues to act on the pyroelectric element, causing its surface charge to reach equilibrium, it will no longer release charge. Therefore, the pyroelectric sensor cannot detect constant infrared radiation.
The pyroelectric sensor only responds to moving human bodies. To increase its sensitivity, a Fresnel lens is generally added in front of the sensor. The Fresnel lens not only focuses, refracting or reflecting the infrared signals radiated by the human body onto the sensor but also divides the detection area into several bright and dark areas, allowing moving objects entering the detection area to generate varying pyroelectric infrared signals in the form of temperature changes.
Pyroelectric Sensor
● Working voltage range: DC4.5-20V
● Static current: <60uA
● Level output: High 3.3V/Low 0V
● Trigger mode: Repeatable trigger (default)
● Delay time: Default 8S+-30%
● Sensing angle: <100 degrees cone angle
● Sensing distance: Within 3 meters
● Working temperature: -20-+80 degrees
Physical Diagram
Read the digital signal output from the pyroelectric sensor through the D8 pin of the Arduino UNO board, and control the LED through the D13 pin.
Physical Diagram of Human Infrared Alarm
Program
int ledPin = 13; // Set LED connected to pin 13 of Arduino board
int sensor = 8; // Set sensor signal output pin connected to pin 8 of Arduino board
int val = 0;
void setup()
{
Serial.begin(115200);
pinMode(ledPin, OUTPUT); // Set as output digital pin
pinMode(sensor, INPUT); // Set as input digital pin
}
void loop()
{
val = digitalRead(sensor); // Read input pin
if (val==1)
digitalWrite(ledPin,HIGH); // Set LED high level
else
digitalWrite(ledPin,LOW); // Set LED low level
Serial.println(val);
}
Results
When a human body approaches, the diode lights up; when the body moves away, the LED turns off after about 8 seconds delay.
Light-Controlled Electronic Piano
Objective
Use a light-sensitive resistor to detect light intensity, causing the buzzer to produce different tones based on varying light strength.
Equipment
One Arduino UNO R3 development board
One breadboard
Several Dupont wires
One light-sensitive resistor
One 10k resistor
One passive buzzer
Physical Diagram
Light-Controlled Electronic Piano
Program
// Define scale constants
#define Do 262
#define Re 294
#define Mi 330
#define Fa 349
#define Sol 392
#define La 440
#define Si 494
int buzzerPin=7; // Define buzzer pin
void setup(){
Serial.begin(115200);
pinMode(buzzerPin,OUTPUT);
}
void loop()
{
int n = analogRead(A0); // Read analog pin A0 to get light intensity
Serial.println(n); // For IDE serial monitor
if (n<=200)
tone(buzzerPin,Do,1000);
else if(n<=220)
tone(buzzerPin,Re,1000);
else if (n<=240)
tone(buzzerPin,Mi,1000);
else if (n<=300)
tone(buzzerPin,Fa,1000);
else if (n <=350)
tone(buzzerPin,Sol,1000);
else if (n<=400)
tone(buzzerPin,La,1000);
else if (n<=500)
tone(buzzerPin,Si,1000);
delay(500);
noTone(buzzerPin);
delay(1000);
}
This WiFi module is great, with a powerful built-in microcontroller that supports Arduino development. With this WiFi module as the core, plus an OLED screen, you can connect to a wireless router to get network time, while obtaining weather data, such as PM2.5 values, and display it on the local OLED screen. You can also add temperature and humidity sensors to display local temperature and humidity. It’s not difficult to do this; is anyone interested?
Since using Arduino, have your legs stopped hurting and your waist stopped aching? Do you feel more sophisticated now?
Your world originates from your vision; go out and play, circuit experiments are very interesting.
Leave a Comment
Your email address will not be published. Required fields are marked *