Temperature Activated Door Lock

by Nat King in Circuits > Arduino

28 Views, 0 Favorites, 0 Comments

Temperature Activated Door Lock

1000003078.jpg
1000003082.jpg
20250804_093534.jpg
20250804_113549.jpg

This project monitors temperature using a TMP36 sensor and displays it on a 128x64 OLED screen. If the temperature exceeds 80°F, the system activates a warning system by flashing an LED and sounding a buzzer. Additionally, the lock mechanism (servo motor) will also react to the temperature.

Supplies

20250807_095107.jpg
  1. 1 x Arduino Uno R3 - runs the code for the project.
  2. 1 x Bread Board
  3. 1 x Red LED - flashes on and off when the temperature is too high.
  4. 1 x 220Ω Resistor - used with the LED to stop short circuits.
  5. TMP36 Temperature Sensor - reads what the current temperature is.
  6. 1 x Servo Motor - acts like the door lock for the project.
  7. 15 x Jumper Wires - use male to male, and male to female, wires.
  8. 1 x Piezo Buzzer - buzzes when the temperature gets to high, like and alarm.
  9. 1 x 128x64 OLED display - displays the fake company name, if the temperature is above or below 80F, and if the door is locked or unlocked.

Connect the Arduino to the Breadboard

Screenshot 2025-08-06 at 2.43.33 PM.png
  1. 5V → Bread Board positive strip (+)
  2. GND → Bread Board negative strip (-)

Connect the 128x64 OLED Display (I2C)

20250807_111037.jpg
1000003098.jpg
Screenshot 2025-08-07 at 11.12.19 AM.png
  1. VCC → 5V
  2. GND → GND
  3. SDA → A4
  4. SCL/SCK → A5

Connect the TMP36 Temperature Sensor

Screenshot 2025-08-07 at 11.14.58 AM.png
1000003092.jpg
  1. VCC → 5V
  2. GND → GND
  3. Vout → A0

Connect the LED

Screenshot 2025-08-07 at 11.22.44 AM.png
1000003095.jpg
  1. LED anode (+) → Digital Pin 13
  2. LED cathode (–) → 220Ω Resistor → GND

Connect the Piezo Buzzer

Screenshot 2025-08-07 at 11.18.52 AM.png
1000003099.jpg
  1. Positive → Digital Pin 12
  2. Negative → GND

Connect the Servo Motor

Screenshot 2025-08-07 at 11.21.09 AM.png
Screenshot 2025-08-07 at 11.27.52 AM.png
1000003096.jpg
  1. Signal(Yellow) → Digital Pin 7
  2. Power(Red) → 5V
  3. GND(brown or black) → GND

Download Arduino IDE (If You Don't Have It)

Screenshot 2025-08-06 at 2.54.18 PM.png
  1. Open Arduino IDE.
  2. Install the program if you don't already have it.
  3. Make a new sketch and name it, try naming it something that describes the project.

Make Your Own Bitmaps

Screenshot 2025-08-07 at 11.52.52 AM.png
  1. Make your design on Canva or a similar website.
  2. Use THIS as a tutorial for making the design into Arduino code.

Upload the Code

Screenshot 2025-08-07 at 11.32.11 AM.png
Screenshot 2025-08-07 at 11.32.16 AM.png
Screenshot 2025-08-07 at 11.33.08 AM.png
Screenshot 2025-08-07 at 11.33.15 AM.png
  1. Paste the code into your Arduino IDE sketch.
  2. Paste you bitmap code in the the areas under the "Bitmaps Here" comment, in the:
const unsigned char welcomeBitmap[] U8X8_PROGMEM = {}
  1. Connect your Arduino Uno via USB Cable.
  2. Upload the code to the Arduino.

Troubleshooting

Screenshot 2025-08-07 at 11.36.33 AM.png
Screenshot 2025-08-07 at 11.36.47 AM.png
Screenshot 2025-08-07 at 11.37.12 AM.png
Screenshot 2025-08-07 at 11.41.36 AM.png

If the circuit isn't working, try:

  1. Double checking that everything is connected to the correct places.
  2. Double check you've installed all your Libraries.
  3. Adjust the needed temperature for the alarm to activate (like shown in the picture).