donny681 / ESP32_CAMERA_QR

Apache License 2.0
628 stars 226 forks source link

Connecting the Ai-Thinker CAM board to PC #6

Closed gazialankus closed 4 years ago

gazialankus commented 5 years ago

How do I connect the Ai-Thinker CAM board to PC? The links in the quick start lead to ESP32 boards with a USB port.

I guess I need to connect the Ai-Thinker CAM board to the USB port of my PC somehow. I have one of these for ESP8266, can I use this for this purpose somehow?

Thanks.

drJeckyll commented 5 years ago

Have no idea about your 8266 "device" (may be it can be used, I just don't know and don't see schematics for it). Better get one of USB-FTDI modules like this or something similar. Use 3.3V voltage selector. To program ESP32-CAM you need to connect: U0R and U0T from ESP32-CAM to TX(0) and RX(I) from FTDI board (or swap if not working), GND and 3.3V also. Then connect IO0 and IO2 from ESP32-CAM to GND. make flash will do the rest - then remove IO0 to GND (may be IO2 to GND also), so module can boot from flash. That's it. P.S. Be sure you enable CONFIG_SPIRAM_SUPPORT - it is not set by default (Support for external, SPI-connected RAM under ESP32-specific) or there will be no enough memory to run QR demo.

aguaviva commented 5 years ago

Does the module have that external SPI-connected RAM?

drJeckyll commented 5 years ago

@aguaviva Can speak for my module, which don't have enough memory to run code without enabling this option. After that it run OK.

raphaelbs commented 5 years ago

Hi @gazialankus I got my Ai Thinker working using a USB to TTL like this one.

Steps to flash

If you don't pull IO0 to ground the board will boot in RUN mode. Also you need external power because USB ports doesn't have enough juice.

Niek commented 5 years ago

What worked best for me is:

You can do this with a regular USB adapter, cut the cable open and use the red and black wires.

To flash, you need the following additional connections:

As mentioned by @drJeckyll you need to enable CONFIG_SPIRAM_SUPPORT, in menuconfig this is under Component config -> ESP32-specific -> Support for external, SPI-connected RAM. When this is enabled, you see that free heap (in monitor output) is 4M+.