esp32 cam

steve44
Posts: 4
Joined: Tue Feb 16, 2021 11:08 pm

esp32 cam

Postby steve44 » Tue Feb 16, 2021 11:53 pm

Good evening to everyone. I am facing in the last 2 days a problem with a esp32 cam. The problem i am facing is during the programming of the esp32 cam. Before i begin to describe the problem i face, i want to inform you that i am new to esp32 (being a lot familiar with Arduino and raspberry) and i am trying to understand the new features that this microcontroller has. So i have bought from china an esp 32 cam, so i can program it and check how this camera works. To program the esp32 cam, i bought a ftdi ft232rl. The connections with the cables between the ftdi and the esp32 cam are fine and i have checked it a lot of times.
esp32 cam ftdi
gnd gnd
3,3V Vcc (3,3V)
UoR Tx
UoT Rx
...and a cable connection between GPI0 and gnd which is an essential only for the programming duration. I find the example from the ArduinoIDE for the camera web server, i choose from Tools->Board: AI Thinker ESP32-CAM, i mark with // the define camera_model_wrover_kit and i unmark the // from the define camera_model_ai_thinker. Then, i select the Serial port com1 (which is the only one available) and when i press the upload button, i get this message that i have attached in the screenshot_6.

I have tried to do it with a 5V supply (changing ofc the jumper from the ftdi to provide %v from the Vcc), i pressed the reset button a lot of times during the uploading the program, i tried again from a different USB port from my computer and i have tried with an another miniUSB cable but nothing from all these i mentioned above worked. Now, i noticed that behind from the esp32 cam, the chipset writes esp32-s fccid:2AHMR-ESP32S and not ai thinker as i searched in other sites and in the ArduinoIDE in the board section hasn't any corresponding board. Could be this the reason why i can't program the camera? Has anybody else faced a similar problem like me? With the screenshot, i will attach 2 pictures with the esp32 cam and the ftdi adapter. Every point of view would help me a lot and thank you for the time u dedicated to read my topic.
Attachments
picture2.jpg
picture2.jpg (2.47 MiB) Viewed 9373 times
picture1.jpg
picture1.jpg (2.35 MiB) Viewed 9373 times
Screenshot_6.jpg
Screenshot_6.jpg (120.93 KiB) Viewed 9373 times

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

Re: esp32 cam

Postby alanesq » Wed Feb 17, 2021 9:10 am

Hi,

I suspect your problem will be the power related as they are very fussy about their power supply and it will behave in all sorts of weird ways if it has a problem with it. Are you connecting 5volts from the ftdi board to the 5v pin on the esp32cam?
It is worth trying a separate 5v supply for the esp32cam module (don't forget to link the GNDs)
It is also worth trying swapping the Tx and Rx pins over as I have an FTDI board where they are labelled the wrong way round for some reason
also worth trying a slower serial speed.

BTW - When you get it working you might be interested in having a look at my sketch which shows the easiest ways I have found to use these modules - https://github.com/alanesq/esp32cam-demo

steve44
Posts: 4
Joined: Tue Feb 16, 2021 11:08 pm

Re: esp32 cam

Postby steve44 » Wed Feb 17, 2021 1:29 pm

Hi alanesq and thank you for your response!

I forgot to tell you that i had already checked the power supply, because one of the things i thought was the power supply. I checked with the multimeter and the Vcc from the ftdi (and when the jumper was on 5V and 3,3V) and it gives the right voltage. Just some minutes ago, i checked that the esp32 cam gets the right voltage and when i try it on 3,3V (on the 3,3V pin) and on 5V (on the 5V pin). I tried to switch the cables as you told me between Tx and Rx from the ftdi but unfortunatelly nothing happened. I also tried to supply the esp32 cam from an ArduinoUno from 5V and 3,3V pins respectively (ofc i added a new cable from gnd of arduino to the gnd of esp32 cam) but nothing changed. The only thing i didn't find was that one u refered on changing the uploading speed. When i add the Board:Ai Thinker esp32 cam, i have no choice to change the upload speed. Is there any other direction you could give me on choosing the upload speed or something else?

Thank you again for your time!

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

Re: esp32 cam

Postby alanesq » Wed Feb 17, 2021 3:08 pm

Hi,
If you select "ESP32 Dev Module" it will let you change the serial speed, you may need to enable PSRam to get sketches to work but it should compile and upload ok
The issue tends to be current rather than voltage with the power, the esp has short spikes in current requirement especially when using wifi which can cause issues, it could be worth trying a different computer in case it has problems with this although probably unlikely?

BTW - This site shows how to connect the esp32cam which may show something to help although I can't see anything you have missed - https://randomnerdtutorials.com/program ... esp32-cam/

This shows how to use an Arduino Uno as a programmer which you could try in case there is a problem with your FTDI board
https://technoreview85.com/how-to-progr ... uno-board/

steve44
Posts: 4
Joined: Tue Feb 16, 2021 11:08 pm

Re: esp32 cam

Postby steve44 » Wed Feb 17, 2021 10:50 pm

Hi again.

Thank you for giving me those directions! Here's what i did. I removed the ttl (since that i had no change) and i followed the link you sent me with the Arduino. I did all the connections with the cables and i followed all the instructions as shown in the link you sent me. Unfortunatelly without success. I searched it more and i found more users that they faced the same problem and everybody mentioned about the ArduinoIDE version, that they solved by installing a previous one (1.8.12). So i did it, and i installed the esp32 from the board manager (version 1.0.2 as in the link and not the latest), but again with no success. I got the same message again. Also, i pressed the reset button during the uploading of sketch. I am afraid that it will never work and i should try to buy the AI thinker.
Attachments
Screenshot_9.jpg
Screenshot_9.jpg (124.78 KiB) Viewed 9305 times
Screenshot_8.jpg
Screenshot_8.jpg (66.35 KiB) Viewed 9305 times
picture 3.jpg
picture 3.jpg (13.89 KiB) Viewed 9305 times

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

Re: esp32 cam

Postby alanesq » Thu Feb 18, 2021 7:51 am

Hi,
It is starting to look like there is a fault with your esp32cam?
Maybe worth seeing if you can erase the flash using ESPTOOL to see if this can communicate with it , this would take the arduino ide out of the equation and maybe even wiping the flash would fix it (the command I use in Linux is: esptool.py --port /dev/ttyUSB0 erase_flash)
I have had a couple with faulty cameras, maybe try removing the camera and see if you can then upload code on the off chance a faulty camera module is stopping the ESP from booting
Maybe worth programming a different esp32 or arduino using your FTDI board just to confirm that it is working as expected.

steve44
Posts: 4
Joined: Tue Feb 16, 2021 11:08 pm

Re: esp32 cam

Postby steve44 » Thu Feb 18, 2021 4:47 pm

Hi!

I have good news, because the problem solved!Here's what i did.

I tried to program an arduino with the ftdi and i couldn't! That lead me that something is going wrong with the ftdi on software. When i opened the device manager i noticed that the UART driver was with an exclamation mark! So that meant, that the driver of ftdi weren't installed properly or something like that! I searched on google for the driver and i downloaded it from the following link:

https://www.usb-drivers.org/ft232r-usb-uart-driver.html

I didn't followed all the steps, just to install the driver (Right click on UART driver -> Update driver and i gave the path of the whole file i'd just downloaded. When i did this, i unplugged and i plugged again the miniUSB cable, thus i had another option in the Port menu in the ArduinoIDE (i had only COM1 option and after that i had the option of a COM4)! Also, i changed in the code example by putting in a comment with // the define wrover kit and deleting the // from the line with the #define AI Thinker. After this, the upload was done and i had the ability the get video from the IP address that i got from the Serial monitor!

I want to thank you so much for the directions you gave me and of course for the time you dedicated to give me those directions!

Thank you again so much!!
Attachments
Screenshot_11.jpg
Screenshot_11.jpg (95.69 KiB) Viewed 9248 times
Screenshot_10.jpg
Screenshot_10.jpg (100.33 KiB) Viewed 9248 times

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

Re: esp32 cam

Postby alanesq » Thu Feb 18, 2021 5:15 pm

Glad you got it working :-)

It has been a while since I have used Windows, I forgot the issues you get with having to find the correct driver for the ESP modules etc...

Amannigamitsme
Posts: 1
Joined: Sat Jun 04, 2022 11:37 am

Re: esp32 cam

Postby Amannigamitsme » Mon Jun 06, 2022 5:54 am

Can we program ESP32 CAM for stream videos via bluetooth

Who is online

Users browsing this forum: No registered users and 103 guests