Final-year projects / Smart home

Home security camera with phone photo alerts

Ready-made security cameras need monthly cloud plans. A low-cost camera that takes a photo when someone enters and sends it straight to the owner's phone works with no subscription.

ESP32-CAMMini projectCSE, ECE, Diploma
ESP32motionFeatured
Parts
₹1,410
Build
7 weeks
Board
ESP32-CAM
Objectives
5

Block diagram

Inputs
  • PIR sensorDetects a person entering
Controller
  • ESP32
    ESP32-CAMTakes and sends the photo
Power
  • POWER
    Power monitorMeasures current to work out battery life+
Outputs
  • Flash LEDLights the photo at night
  • TELEGR
    Telegram botDelivers the photo to the phone

Objectives

  1. To detect entry with a PIR sensor and capture a photo within 1 s.
  2. To send the photo to the owner's Telegram with time.
  3. To arm and disarm and request a photo from the phone.
  4. To measure false alarms over three days and the delay from entry to phone.
  5. To reduce average current with sleep modes and verify the battery life by measurement.

Parts and specifications

Total about ₹1,410 at typical online prices. Tap a part for its pinout and datasheet notes.

Design calculations

Photo size

SVGA 800 × 600 JPEG at quality 12 ≈ 30 to 60 KB; upload over Wi-Fi in about 1 s.

PIR settling

The HC-SR501 needs about 60 s after power-on and has a minimum hold of about 3 s; set the trimmer to the shortest hold to re-arm fast.

Battery option

Deep sleep 6 mA (PIR 65 µA + camera board leakage), awake 180 mA for 5 s per event. With 20 events a day on 2600 mAh: average ≈ 6.2 mA → about 14 days.

Pin map

SignalPin or connection
PIR OUTGPIO 13 (also deep-sleep wake source)
Flash LEDGPIO 4 (on board)
CameraOn-board OV2640
Power5 V 2 A to the 5V pin (weak supplies cause brown-out resets)

Firmware outline

  1. Init camera at SVGA; connect to Wi-Fi; check Telegram for /arm, /disarm, /photo.
  2. When armed and the PIR goes high, take a photo (flash at night by light level), and send it with sendPhoto.
  3. Ignore further triggers for 20 s to avoid a flood of photos.
  4. Keep only the owner's chat ID allowed to send commands.
  5. Optional: deep sleep and wake on PIR for battery use.

Test plan

TestExpected result
Walk into the roomPhoto on phone within 5 s
Night with flashFace visible
/photo from phonePhoto returned
Command from another accountIgnored
Three daysFalse alarms counted (pets, sunlight, fan)

These rows start your results table when you plan the project.

Viva practice

Say your answer out loud first, then check. The first 2 answers are free; Maker opens all 5.

1. How does a PIR sensor detect people?
2. Why only allow one chat ID?
3. Why does the ESP32-CAM reset sometimes?
4. Where is the photo stored?
5. How would you avoid pet false alarms?

Make it yours

One or two upgrades for a mini project, two to four for a major one.

Build these first

Datasheets and sources to cite

  • Espressif ESP32-CAM documentation
  • Telegram Bot API documentation
  • OmniVision OV2640 datasheet

About this project

How much does the home security camera with phone photo alerts project cost?

About ₹1,230 for the parts in the base list: ESP32-CAM with OV2640, ESP32-CAM-MB programmer board, HC-SR501 PIR motion sensor, 5 V 2 A USB adapter and cable, 3D-printed case.

How long does it take?

About 6 weeks for the base project, built on an ESP32-CAM. Each upgrade adds time.

Which branches is it suitable for?

Computer Science / IT (IoT, AI), Electronics and Communication, Diploma (any electronics branch), as a mini project.

Which pins and design calculations does it use?

PIR OUT on GPIO 13 (also deep-sleep wake source); Flash LED on GPIO 4 (on board); Camera on On-board OV2640. Worked calculations on this page: photo size, pir settling, battery option.

How do I test it?

Walk into the room: Photo on phone within 5 s. Night with flash: Face visible. /photo from phone: Photo returned. Command from another account: Ignored. Three days: False alarms counted (pets, sunlight, fan).

What are the objectives?

To detect entry with a PIR sensor and capture a photo within 1 s. To send the photo to the owner's Telegram with time. To arm and disarm and request a photo from the phone. To measure false alarms over three days and the delay from entry to phone.