Introduction: Temperature Activated Door Lock

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

  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.

Step 1: Connect the Arduino to the Breadboard

  1. 5V → Bread Board positive strip (+)
  2. GND → Bread Board negative strip (-)

Step 2: Connect the 128x64 OLED Display (I2C)

  1. VCC → 5V
  2. GND → GND
  3. SDA → A4
  4. SCL/SCK → A5

Step 3: Connect the TMP36 Temperature Sensor

  1. VCC → 5V
  2. GND → GND
  3. Vout → A0

Step 4: Connect the LED

  1. LED anode (+) → Digital Pin 13
  2. LED cathode (–) → 220Ω Resistor → GND

Step 5: Connect the Piezo Buzzer

  1. Positive → Digital Pin 12
  2. Negative → GND

Step 6: Connect the Servo Motor

  1. Signal(Yellow) → Digital Pin 7
  2. Power(Red) → 5V
  3. GND(brown or black) → GND

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

  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.

Step 8: Make Your Own Bitmaps

  1. Make your design on Canva or a similar website.
  2. Use THIS as a tutorial for making the design into Arduino code.

Step 9: Upload the Code

  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.

Step 10: Troubleshooting

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).