Getting Started With ESP 32 CAM | AI Thinker Wifi Camera Module

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi let's get started with esp32 Cam module in this video the purpose objective of this video is to get started with this module download some programs onto this module using the artino ID and try to understand how the camera functions and also try to create a sample code for making this camera up and running and see it on our computer so let's get started now esp32 is a very popular iot board as you know and the esp32 cam board are primarily available to create the iot systems which utilizes camera you want to have a camera capture an image and send it over to a Wi-Fi server or send it over to any places for multiple applications now in order to start with esp32 Cam module it's important to understand first of all how to download code onto this module unlike the other esp32 modules the code cannot be directly downloaded onto this module using the USB that is available some boards that you may find will have a USB onto it some may not for your clearance or reference I using the AI thinker esp32 module now how do you download the program on to it then in order to download a program onto the cv32 cam module you're going to need to use a usb2 art module now the one that I'm showing here in this diagram is a CP 21102 based usb2 art modu but it's not mandatory that you use only this one you can use CP 21102 or you can use ftdi 232 module it doesn't matter what module you're using as long as it gives you the uart outputs at 5 volt level the purpose of this module is to convert the USB into comport for your computer and then you need to make some connections as shown here so this is the esp32 cam module and let me go to this particular diagram over here just a minute so this is the connection that you're going to need you need to connect the ground of the sp32 cam module to the ground of USB converter 5 volt to extract power from the converter u r this spin should go to TX of your converter u t or TX spin should go to RX of your converter and this is important gpio Zer should be grounded so this this is the GPI zero grounded this is the receive and transmit pin this is the 5 Vol and this is the ground pin going to power you need to make this much of Connections in order to download any program onto this modu also remember that the esp32 cam module will have a USB port onto it which you will have to use for powering up the system when using camera you can download the code when you power the system using the module but you cannot run it because you will get very less power from this module to run the camera you can run simple blink applications LED blinking and that kind of things but for running the camera you will have to connect the external power supply so let's get started now one more thing that is to be noted this connection gpio Z to ground is only important for downloading the code but if keep this connection made even after downloading the code you will not see that the code is functioning in order to make the code function or in order to make the code run you will have to remove this jumper I'll show it to you on my setup soon enough now the usual things with respect to RDO so what I'm doing here is I'm using the latest version of ardino available at this state it is the ardino 2.1.0 much improved one I would say because you will easily be able to find out your projects board manager Library manager the shortcuts are available made available over here now first thing first what you need to do is you need to go to file preference then here you will find this link or text position to add this link so this is there for the already know to search for the ESP 32 modules and install them you will have to have this link added into this space additional board manager URLs once you do this what you need to do next is go to your sketch sorry go to your tools board and Boards manager this is the boards manager you need to search for esp32 over here and when you search for esp32 into this boards manager you will find esp32 by expressive systems now I'll tell you a short tip here if you are like me if you have installed the new ardino on the top of the existing other ardino you may find multiple packages over here all you need to do in that case is remove all of them simply every single one of them esp32 package and then freshly install whichever is the latest shown over here that's that that's all you need to do so the first step is done we have installed the esp32 modu the second step to do is connect your es USB to serial device and see if it shows in your comport let me show you so this is my camera this is my USB to you want module connected to my computer okay this is cp2102 BAS if I remove this cable you will notice that the port has disappeared from here if I connect it the port should be again [Music] visible cp2102 Comm 11 this is important step if this is not showing up then all you need to do is right click that and update its driver so that your Port drivers are properly installed and showing up and this here is my esp32 cam module as said it has a USB connection for powering on when using the camera and then it is also having this flashlight LED and then there is a tiny LED right over here which we will be using for the blink purpose the connections are made over here that's shown exactly in the diagram VCC ground txd rxt and this short connection over here if you see this purple wire gray wire so this is U and ground pin shorted with each other we need to keep it shorted as long as we download the code Beyond which we have to remove it so that the code can function now now this is the pinout of AI thinker esp32 cam module now what you need to understand is there are number of different pins available for usage for this video we are interested only in blinking the LEDs so there is one LED which is on board which is connected to pin 33 and there is another LED which is the big flashlight LED which is connected to pin number four you can blink any one of them with this connection now if you have made this connection like this then we are good to download our first program onto this so let me open a blank sketch let me write down the setup so I'll just do in LED is 33 pin mode LED comma output and then the loop all I need to do is I need to Blink it so let me just write down the simple blink code digital right LED comma High delay th000 digital WR LED comma low delay th000 now what I'll do is I'll just keep my uh ardino open at one end and the camera open at the other end now let me start downloading the code so once this connection is done go to tools select the board by going into esp32 this Cate will be shown to you you will have to do a lot of scrolling through it if you are like me having installed multiple boards to find out AI thinker esp32 cam once you select that board again go to tools and select the comport which is assigned to your USB to Art module and now all you need to do is simply try to download the code so I'll click on the upload here it will start the process and you will find the LEDs on the converter module blink when it starts now as you have seen we do have an error because of some compilation mistake so if you see here and here I have made two mistakes so we need this semicolon here this has to be semicolon not a Col now let's click on upload and let's try to observe the module if there is any activity after the compilation the uploading will start as you see the lights are blinking both TX RX LEDs are blinking onto the module which is an indication that the code is being downloaded now as it says hard resetting we are TS spin it means the code has been successfully downloaded but we don't see the LED blinking over here onto this why because as said you need to remove this jumper the io zero pin and ground and after removing this one you can simply click on the reset button over here now you will see the LED blinking the red one which is connected to pin 33 if I again connect this Spin To iio Zero the ground you will see it has no change but when I reset it means in when I reset when the connection is made the system goes into boot mode and the code will not work so remove this one and reset your system so the code starts working now here we are trying this small onboard LED but in front of camera we also have a flashlight LED let's try to Blink that one okay so instead of 33 I'll make just one small change I'll make it four 4 for downloading the code I will have to make this connection and then reset the system and then click on upload so upload download we use this alternatively pointed from computer to the esp32 board now let's see that code is being uploaded it's almost done now what I need to do is I need to remove this connection and I need to click on the reset button over here here now you'll see this big LED it's a flashlight it's just too big too huge to see for camera okay now if you have a glass or a simple piece of paper then also it would make a bit more sense to see in the camera not even here it's quite bright okay so that's how you can try the basic programs for your LED blinking onto it I'll just change this one and I'll again make the default code working for smaller L now apart from that what you can do is you can also test the camera if it's working well or not and in order to do that make sure you use an external 5 Vol adapter and with this adapter what you will do is you will remove the 5V power from here keep all other connections as it is and connect the external power right over here I will not go much into the details but I'll simply show you the code and how to make it functional now if you go to file you will find in examples in esp32 camera you will find example camera web server this camera web server is basically an actual web server which will connect your esp32 module to the camera and connect it to your Wi-Fi and run a Wi-Fi based camera server to do that all you need to do is add the Wi-Fi SS ID and password to this SS ID and password space I'm adding one for my lab and then since I'm using AI thinker module comment the line number 11 and then uncomment the line number 17 camera model AI thinker that's that on the hardware side what we have done is we have removed the power going from USB module and connected the power from the external adapter it's basically a 5 Vol charger now all I need to do is upload this code this is a big code so uploading will take some time or to say some significant amount of time for this code both for compiling as well as for uploading but once done we will be able to see the camera demo onto a web server this web server will be running on us32 module connected to our Wi-Fi and you can view it either using your computer or tablet or mobile phone basically any Wi-Fi connected device the program is still in compiling mode will take some time based on how much is your computer's uh processing let me just reset the board now the code downloading has started sometimes if the board is not into the flash mode you need to manually reset it once before uploading but remember if you make this connection if you press the reset button once the board is in the boot mode and your ardino download will function for sure as said it is going to take some time for downloading this code because it's quite bigger and uh once this code is downloaded you will have to see the status messages onto the serial port or the serial monitor which you can invoke using this button over here on AUD I'll just keep it on here so whenever this uploading is done the serial monitor will start now the uploading is completed hard setting is done I'll just keep the serial monitor open and here what I will do is I will remove this short connection IO Z to ground and then I will reset it the moment I reset it you will find some messages over here okay so Wi-Fi connected starting web server on Port 0 starting stream server on Port 81 camera ready to connect now you may come across some errors over here there are only two primary reasons for that error one is you have not given an external power to the board second error is probably you forgot to uncomment the correct camera definition line if both of them is done as you can see on my message the web server is ready to run just open a browse and type this address 192.168.0 0.23 0.23 you will see the web server running here I'll have my camera open as well for you to see and I'll just simply click on start stream I'll have this multimeter in front of it now can you see this is the Stream coming from esp32 look at it here I won't say the quality is as good as this Logitech one but it is fair enough okay you can also change the resolution increase it if you want or decrease it if you want you can have it as big as this much 1600 by 1200 as you go on increasing the resolution you will see the frame rate will be slightly delayed so this is your basic esp32 cam test the LED is currently off if you see here what you can do is you can turn that led on in your program as well the flashlight LED so this is the basic test of esp32 Cam I hope everyone will be able to do this and get started using their esp32 cam module for a variety of projects thank you for watching this video
Info
Channel: Kitflix
Views: 16,035
Rating: undefined out of 5
Keywords:
Id: JeROmvryXDU
Channel Id: undefined
Length: 19min 1sec (1141 seconds)
Published: Fri May 05 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.