esp32 camera: motion detecting security camera

alanesq
Posts: 84
Joined: Thu Dec 14, 2017 8:38 pm

esp32 camera: motion detecting security camera

Postby alanesq » Thu Jan 23, 2020 12:15 pm

Hi,

I have been working on an Arduino sketch for using the cheap ESP32 camera modules (£5 on eBay) as a security camera.
My basic idea is to have it detect movement (by the camera image alone) and when it triggers send me an email which includes a captured image.

So far I have it in a basic working state (although there is a lot of tweaking to be done yet) and thought I would post it here as it might be of interest to others and also as I am VERY far from a professional programmer I am sure people on this forum will be able to offer advice on how I can improve it etc.
At the moment it only sends an email when you load the .../test URL so you can run it without worrying about setting up the email.

You can download my latest version from here which I will keep updated: http://alanesq.com/esp32/CameraWifiMotion.zip

It is a zip file which includes the libraries I have used. It uses Wifi manager so first time you run it you will need to connect to it's wifi and enter your wifi access details - more info here: https://randomnerdtutorials.com/wifiman ... d-password

Much of the sketch is the code from other people's work which I have combined together, I believe I have links to all the sources but let me know if I have missed anyone.

It is slow to capture a frame as I have to restart the camera in a different mode first. I don't think there is any way round this as the mode required to take an image and the one for motion sensing are very different.

alanesq
Posts: 84
Joined: Thu Dec 14, 2017 8:38 pm

Re: esp32 camera: motion detecting security camera

Postby alanesq » Fri Jan 24, 2020 9:05 am

Here are a couple of screen grabs from the web pages it produces:

http://alanesq.com/esp32/2.png

http://alanesq.com/esp32/1.png

BTW - The web response can sometimes be a bit sluggish, this is something I am looking in to?
I did discover a lot of this can be caused by poor power supply to the board

alanesq
Posts: 84
Joined: Thu Dec 14, 2017 8:38 pm

Re: esp32 camera: motion detecting security camera

Postby alanesq » Wed Jan 29, 2020 1:46 pm

I now have the project in a usable state and have created a github for it

See: https://github.com/alanesq/CameraWifiMotion

alanesq
Posts: 84
Joined: Thu Dec 14, 2017 8:38 pm

Re: esp32 camera: motion detecting security camera

Postby alanesq » Wed Feb 12, 2020 11:07 am

In case anyone is interested, I think I have it pretty much finished now (I keep thinking that then coming up with another idea - lol)
You can see a video of what it does here: http://alanesq.com/temp/CameraWifiMotion.mp4

Who is online

Users browsing this forum: No registered users and 28 guests