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.
- Parts
- ₹1,410
- Build
- 7 weeks
- Board
- ESP32-CAM
- Objectives
- 5
Block diagram
- PIR sensorDetects a person entering
- ESP32-CAMTakes and sends the photo
- Power monitorMeasures current to work out battery life+
- Flash LEDLights the photo at night
- Telegram botDelivers the photo to the phone
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.
- To reduce average current with sleep modes and verify the battery life by measurement.
Parts and specifications
- ESP32-CAM with OV2640ESP32 + 4 MB PSRAM + 2 MP OV2640 camera, microSD slot, needs 5 V 500 mA for stable Wi-Fi₹550Buy
- HC-SR501 PIR motion sensorUp to 7 m, 110° cone, adjustable hold 3 s to 5 min, 1 min settling after power-on, 3.3 V output₹80Buy
- 5 V 2 A USB adapter and cable₹200
- 3D-printed case₹250
Total about ₹1,410 at typical online prices. Tap a part for its pinout and datasheet notes.
Design calculations
SVGA 800 × 600 JPEG at quality 12 ≈ 30 to 60 KB; upload over Wi-Fi in about 1 s.
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.
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
| Signal | Pin or connection |
|---|---|
| PIR OUT | GPIO 13 (also deep-sleep wake source) |
| Flash LED | GPIO 4 (on board) |
| Camera | On-board OV2640 |
| Power | 5 V 2 A to the 5V pin (weak supplies cause brown-out resets) |
Firmware outline
- Init camera at SVGA; connect to Wi-Fi; check Telegram for /arm, /disarm, /photo.
- When armed and the PIR goes high, take a photo (flash at night by light level), and send it with sendPhoto.
- Ignore further triggers for 20 s to avoid a flood of photos.
- Keep only the owner's chat ID allowed to send commands.
- Optional: deep sleep and wake on PIR for battery use.
Test plan
| Test | Expected result |
|---|---|
| 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) |
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.
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.
