1) Find a problem to solve
I often woke up before my smartphone alarm rings and it keeps ringing while taking a shower, which is noisy and gives discomfort to my roommates.
2) Describe the general solution
I am going to design a thermal camera device that is attached to the ceiling and scans the temperature of my bed. It is connected to my smartphone through Bluetooth. When I lie on my bed and it could detect my temperature so that allows the smartphone alarm to keep ringing. When I get up and get out of the bed, the device detects my awakeness and stop the alarm.
3) Proof of Concept
The device is composed of an infrared array sensor, a thermal camera, Bluetooth module, and a battery with an Arduino board. The camera keeps detecting the temperature changes in my bed. Since the average human temperature is around 37.5°C, I will use 36.5°C as a threshold for stopping the alarm. When the temperature of my bed goes over 36.5°C, the device allows smartphone alarm to be on, if any alarm is set. When the temperature goes under 36.5°C, which means there is no one on the bed, the device turns off the alarm not to make unnecessary noise.
4) Fritzing Sketch
Components: Arduino Uno, Adafruit AMG8833 IR Thermal Camera Breakout, or Adafruit AMG8833 IR Thermal Camera FeatherWing, and HiLetgo HC-05 Wireless Bluetooth
5) Arduino Sketch
I tried to figure out how to code the features that I explained above for several hours, but I couldn’t. Most of all, to be honest, I have no idea how to connect the device with a smartphone through Bluetooth and control it… :
char Incoming_value = 0; //Variable for storing Incoming_value
Adafruit_AMG88xx amg;
void setup() {
Serial.begin(9600); //Sets the data rate in bits per second (baud) for serial data transmission
pinMode(13, OUTPUT); //Sets digital pin 13 as output pin
status = amg.begin();
if (!status) {
Serial.println(“Could not find a valid AMG88xx sensor, check wiring!”);
while (1);
}
}
void loop() {
if(Serial.available() > 0){
Incoming_value = Serial.read(); //Read the incoming data and store it into variable Incoming_value
Serial.print(Incoming_value); //Print Value of Incoming_value in Serial monitor
Serial.print(“\n”); //New line
if(Incoming_value == ‘1’){ //Checks whether value of Incoming_value is equal to 1
digitalWrite(13, HIGH); //If value is 1 then LED turns ON
}
else if(Incoming_value == ‘0’){ //Checks whether value of Incoming_value is equal to 0
digitalWrite(13, LOW); //If value is 0 then LED turns OFF
}
}
float pixels[AMG88xx_PIXEL_ARRAY_SIZE];
amg.readPixels(pixels);
if(pixels >= 36.5) {
//turn the alarm of the smartphone off
}
else{
//keep the settings of the alarm of the smartphone
}
}
6) Proof of Concept Sketches