Basics project 084h ESP32-CAM Development Board – How to extend Wi-Fi coverage


Basics: Project 084h

Project name: ESP32-CAM Development Board – How to extend Wi-Fi coverage

Tags: Arduino, Ai-Thinker, ESP32-CAM, Development Board with camera, OV2640, how to extend Wi-Fi coverage

Attachments: sketch

In this project, you needed these parts (Dear visitors. You can support our project buy clicking on the links of parts and buying them or donate us to keep this website alive. Thank you):

1. ESP32-CAM Development Board with camera 1 set

esp32-cam

2. Arduino IDE ( you can download it from here  )

3. USB to TTL/Serial adaptor/converter 1 pc

USB to TTL converters
USB TO TTL converters

4. Jumper cables F-F

5. Micro SD card and SD card adapter 1 pc

6. WiFi AntennaCompact Internal WiFi Antenna with U.FL connector and 5.9 inch cable 1 pc (optional)

7. External 5V power supply for ESP32-CAM 1 pc (optional)

General

We will learn in this project how to extend WiFi coverage of the ESP32-CAM Development Board.

Understanding the USB to TTL converter

You can read more about them here.

Understanding the ESP32-CAM Development Board with camera

You can read more about it here.

How to extend the WiFi coverage for ESP32- CAM development board?

The ESP32-CAM development board with camera usually comes with an on-board Wi-Fi antenna, but it also has an IPEX connector for an external antenna. Using an external antenna can solve problems related with connectivity problems.

Close to the IPEX connector there are three small white squares laid out like a “L” letter with a middle square common. There is a resistor selecting the desired antenna. There are two configurations:

  1. External antenna connected to IPEX connector – in this case the resistor must be on the bottom position – “\”;
  2. On-board antenna (PCB antenna) – in this case the resistor must be on the top position – “/”.

Have a look at your board to see which configuration do you have – is it configured to use the on-board antenna or the IPEX connector? If you are close to your router – on-board antenna will provide a very good signal. But we recommend to use an IPEX connector with an external antenna connected for better connectivity.

ESP32CAM

To enable or disable the on-board antenna, you just need to unsolder the resistor and the solder it in the desired configuration. Please note that it’s not necessary to add the resistor as long as the small squares (pads) are connected and you will not be able to use both antennas (on-board and external) same time.

You can check the Received Signal Strength Indication (RSSI) of your WiFi connection to the router. When you will be comparing the RSSI value, please note that the strongest signal will be with value closer to 0. For example, with the distance around 5 meters with walls, the ESP32-CAM development board has the following results:

  • On-board antenna configuration – RSSI around 60;
  • External antenna configuration – RSSI around 34.

Signals and connections of the ESP32-CAM Development Board with camera

ESP32-CAM pinout:

You can read more about ESP32-CAM GPIOs here.

Wiring

ESP32-CAM module    FTDI programmer

U0TXD (GPIO 1)          RXI                   

U0RXD (GPIO 3)         TX0

GND                          GND

5V                             5V

Connect GND and GPIO0 – just for flashing. Many FTDI programmers have a jumper that allows you to select between 3.3V or 5V. Make sure the jumper is on 5V.   

ESP32CAM HOW TO UPLOAD

Please note: the order of the FTDI programmer’s pins on the diagram may not match yours. Make sure you check label next to each pin on ESP32-CAM development board.

Step by Step instruction

1. Adding ESP32 platform to Arduino IDE

To program the ESP32-CAM development board with Arduino IDE, you need to have Arduino IDE installed as well as the ESP32 add-on.

If you previously installed the hardware libraries for the ESP32 using the old method you need to delete them. Find the folder where your Arduino libraries are kept by opening File -> Preferences in the Arduino IDE. See the sketchbook location field. Click on Browse button. Inside Arduino folder open the hardware folder and find and delete either the esp32 folder or espressif folder.

We are using PC with Windows 7 OS.

1.Download and install the latest Arduino IDE version Windows Installer. You can download it here.

2.Open Arduino IDE. 

3.Open the Preferences window from the Arduino IDE. Go to File -> Preferences.

4.Paste the following line into the Additional Boards Manager URLs fieldhttps://dl.espressif.com/dl/package_esp32_index.json

5.If you have entries in this field already then add the new line before them but separate them with a comma.

6.Go to Tools -> Board -> Board Manager…

7. Type ESP32, point with mouse cursor on record line found (ESP32 by …) and click on Install button to install the new hardware libraries.

8.When installation done, close and open your Arduino IDE again.

9.You will be able to find all the ESP32 boards in the Arduino IDE’s board selector.

2. Uploading the sketch to the ESP32-CAM Development Board with camera using FTDI programmer

1. Most SD cards work right out of the box, but it’s possible you have one that was used in a computer or camera and it cannot be read by the SD library. It’s not desirable to format SD cards frequently, as it shortens their life span. You’ll need a SD reader and computer to format your card. The library supports the FAT16 and FAT32 filesystems, but use FAT16 when possible. See additional info here. Please note that according to the ESP32-CAM development board specifications, the ESP32-CAM should only support 4 GB SD cards. However, we have tested it with 16 GB SD card and it works very well.

2.Format the SD card as FAT16 or FAT32. Insert the SD card adapter with Micro SD card in your PC. Go to My Computer and right click on the SD card. Select Format…

3.A new window pops up. Select FAT32, press Start to initialize the formatting process and follow the onscreen instructions.

4. Click on Close button when done. Take out and insert the formatted Mirco SD card to TF card slot in ESP32-CAM.

5.Do wiring. Very important: GPIO 0 (IO 0) must be connected to GND otherwise you will not be able to upload code. We use the AI-THINKER ESP32-CAM Development Board.

6.Attach external WiFi antenna or use on-board antenna.

7.Attach OV2640 camera.

8. Plug your FTDI programmer into your PC USB port.

9. Open Arduino IDE. Open the sketch. Change ssid and password for your local network configuration.

10. Go to Tools -> Board, select AI Thinker ESP32-CAM.

esp32-cam how to upload

11. Go to Tools -> Port and select the COM port the ESP32-CAM Development Board connected to (we have COM7).

esp32-cam how to upload

12. Click on Upload button in your Arduino IDE.

13.When you see some dots in the debugging window, press the ESP32-CAM Development Board on-board RST (RESET) button to restart your ESP32 in flashing mode.

esp32-cam how to upload code

14. After a few seconds, the code should be successfully uploaded to your board. When you see the “Done uploading” message, you need to remove GPIO0 from GND and press the ESP32-CAM Development Board on-board RST (RESET) button to run your new code.

ESP32CAM
esp32cam
esp32-cam settings

Troubleshooting

If you have any errors with your ESP32-CAM development board please check our project – Basics: Project 084d ESP32-CAM Development Board with camera – Troubleshooting

Summary

We have learnt more about different antenna configurations, how to extend WiFi coverage of the ESP32-CAM Development Board.

Thank you for reading and supporting us.

Libraries:

  • None

Project resources:

  • See attachments on the beginning of this project description

AcoptexCom

Leave a Reply

Your email address will not be published.