2018/04/14

ESP32 module that supports external antenna

I recently developed a breakout board based on ESP32-WROVER-I because some of my projects use metallic enclosures and I need a way to attach an external antenna to ESP32 so that the radio wave could be propagated outside the enclosure.



References:
https://en.wikipedia.org/wiki/ESP32

ESP32-WROVER-I Datasheet
https://www.espressif.com/sites/default/files/documentation/esp32-wrover_datasheet_en.pdf

In the photo below, the board on the left is the ESP32-WROVER-IPEX board that I developed. The board on the right this the NodeMCU-32S board commonly seen on the market.


The ESP32-WROVER-IPEX board is pin and form compatible with those of NodeMCU-32S except for GPIO16 and GPIO17 because these 2 pins are used by ESP32-WROVER-I to connect to the integrated PSRAM.

Ref.: https://www.espressif.com/sites/default/files/documentation/esp32-wrover_datasheet_en.pdf


Because of the support for integrated PSRAM, the ESP32-WROVER-I module, the following functions are affected:

- UART2;
- Ethernet;
- SD / SDIO / MMC Host Controller.

For detail, please refer to the photo below. The table can be downloaded from https://github.com/SensorsIot/ESP32-Deep-Sleep/blob/master/ESP32.xlsx.


Writing firmware to the module

To write firmware to the module, first follow the schematic below to wire up the module.

Wiring Schematic


The sample sketch

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(2, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(2, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(2, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

IDE Configuration

Be sure to select "NodeMCU-32S" as the Board and set the baud rate and COM port correctly.


Follow the steps below to put the module into programming mode.

1. Open Serial Monitor in Arduino IDE;

2. Press and hold IO0 button, then press and hold EN button;

3. Release IO0 button, then release EN button;

4. The module is now in programming mode;


5. Click the upload button in Arduino IDE to compile and upload the sketch;

6. After the sketch is uploaded successfully, power off then power on the module;


7. The LED attached to GPIO2 is now blinking as programmed.

No comments:

Post a Comment