ESP32-Cam Basics (for timelapse, pet surveillance, nesting boxes, front door cameras etc.)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video i will show you how you can monitor your pet or a self-made nesting box for less than 10 euros with the help of an esp32 cam microcontroller as you can see i am currently still looking for a tenant i'll also show you how to use a raspberry pi or linux based server to regularly crap an image for the esp32 cam and assemble it into a time-lapse video however for the image quality of this video i use the raspberry pi hq cam but the underlying principle is always the same [Music] welcome to my youtube channel for this video i assume that you have the arduino ide installed on your computer if you like to save the pictures regularly on your server and have them processed to a time-lapse video you also need a raspberry pi or linux based server you will also need an esp32 cam microcontroller which is currently available on ebay or aliexpress for about 6 euros including shipping to be able to program it you also need a usb to ttl converter like this one first we connect the cables from the ground 5 volts rxd and txt to the usb converter i use the black for crowned and red for 5 volts the r in rxd stands for receive and the t in txt for transmit these must be connected crosswise at the esp to make sure that the esp32 doesn't boot normally but starts in programming mode after power on it is also necessary to connect the pin io 0 to ground you can now connect the usb to ttl converter via usb to your computer and continue with the software programming first we enter the shown additional board manager urls in the preferences of the arduino ide you can also find the links in the video description then we make sure that under tools board boards manager the esp32 boards from espressif are installed this is already the case for me so i only have the remove button here now under file examples esp32 camera should be the camera web server example which we now open there we have to enter the ssid and the password of our wi-fi network we also have to select the correct camera type in my case this is the ai thinker model so we change the double slashes in the appropriate places now we can compile the file and upload it to the esp32 we do that under tools board esp32 arduino ai thinker esp32 cam after checking if the correct com port is set for the usb converter we can press the upload button if there is no connection during the upload you have to press the reset button on the board if you're using breadboard like me you can't reach this button that's why i unplug the five volts cable and plug it in again now the upload should start i sped up the video here a little bit now we can remove the bridge cable between pin io zero with crowned and reset the esp32 if you start the serial monitor in the arduino ide the boot process should look like this once the esp32 has booted up it will display the ip address that the router assigned to it now you can also remove the receive and transmit cables and run the esp32 only with 5 volts and crown if we enter the ip address of the esp32 in the browser we get its interface and can shoot the first test images when we click on the start stream button we can already transmit a first video image by the way some internet users report that the connection is interrupted again and again when the esp starts up the error message in the serial monitor then refers to a pronoun detector it can have if there is a slightly increased voltage of about 5.5 volts if this is not enough you can solder a additional electrolytic capacitor and a ceramic capacitor between crown and 5 volts to get a better coverage of the voltage peaks during booting of the microcontroller with this the power supply should be stable if you want to use the esp32 cam for your projects and you are quite satisfied with the example project i would still recommend a few optimizations if you use it continuously you will soon notice that the microcontroller stops working if the wifi signal is interrupted for short time in order not to have to reset the hardware regularly by hand we add an esp restart in the code if the wifi is not found after a few seconds during the boot process and we add a similar check to the loop which checks again and again if the wifi connection is still up with this the project should now be ready for continuous operation by opening the ip address with a slash capture command you can get the current image of the camera without having to go through the interface with slash status you get the current settings as a list you can change each parameter by typing slash control here i did it for example for the image quality the next time capture is called the image will have lower resolution and with control i reverse this and get the original size again so you can take the modifiable attributes from the status overview and simply change them according to the shown scheme thus we are able to write a simple linux script that brings the esp into the desired settings and write an image via wget to our server if we now call this script with a simple corndog for example every minute there is always a current image in the specified folder i have refined the script a bit but the basic principle is still the same first i want three pictures to be taken per minute i add a timestamp to the file name now under the variable latest the name of the latest file is stored and just in case the esp has reset itself the settings are sent to the microcontroller over again now i create a watermark with the current date and time on the image and save a copy of it on my web server as you can see the main folder with the timestamps fills up with the images after a while with a second bash script i now let daily or hourly convert the pictures to a video for this i write the file names into a text file and then convert them with m encoder into h.264 file then i convert it with ffmpeg into a mp4 and a webm video and delete the jpegs though that the server doesn't run over by the way you can find the examples on my github account which is linked in the video description for applications like the nesting box it can be helpful to use infrared leds for the illumination with this as in my example the birds can be observed undisturbed during the day and night here again the time-lapse video in daylight and sunshine to make the esp32 cam sensitive to infrared light it is necessary to remove the infrared filter of the lens so if you are feeling lucky you can try to peel off the front of the camera with a knife to take out the infrared filter after that shots with both 940 and 850 nanometers work great i also just use this infrared modification on another project where i used an esp32 cam as a front doorbell camera of course it should be clear that the removing of the ir filter makes the images look almost black and white but for many purposes this doesn't matter too much you see the esp32 cam can be used for many purposes together with the shown scripts it is especially useful for entertaining time-lapse videos which you can enjoy day by day if you liked my short tutorial subscribe to my channel and give me a thumbs up and don't miss my next video when i show you how to use the esp32 cam for ai supported reading of your water meter [Music] you
Info
Channel: MakerMeik
Views: 100,677
Rating: undefined out of 5
Keywords: Arduino, ESP32, ESP8266, ESP32-Cam, Birds, Pets, Dogs, Cats, Camera, surveillance camera, surveillance, Maker, Make, Electronics, Nistkasten, Nesting Box, Front door, doorbell
Id: OeogSzLhRLk
Channel Id: undefined
Length: 10min 40sec (640 seconds)
Published: Mon Apr 26 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.