|
|
ESP32 NotesBecause I've had two modules lying around for ages and it is time I tried to use them. Module Pin-out notes: There appear to be two very similar modules on the market, plus a substantially different one featuring twin USB-C connectors. There's also some ambiguity about pin-numbering as Espressif number their 38 pin module from top to bottom on each side, but the 30 pin modules I've seen have square pads (commonly designating pin 1) at the bottom of each side. My preference is to use IC-style numbering, running counterclockwise starting at top left. Espressif's own website has a data-sheet for a ESP32-DevKitC module which has 19 pins on each side, 38 pins total. Elsewhere it is common to see modules with 15 pins on each side, 30 pins total. I've seen this pattern described as a ESP32-WROOM-DA. This design looks superficially similar to a ESP8266 module also with 30 pins, but apart from the supply rails at the bottom the rest looks substantially different. To add to the confusion the module actually carries a smaller surface-mount module, the ESP32-WROOM, which in turn carries the actual ESP32 CPU. As it happens the extra pins brought out on the 38 pin version aren't particularly useful to a hobbyist. Six pins are internally connected to a SPI flash device which I believe is used for program storage. Interfering with these will probably prevent the module from running. A secondary group of pins have special functions on initial start-up but then become GPIO. These can generally be safely used as outputs, provided the load doesn't pull the pin into a different state. They are harder to use as inputs as it is important that a connected device doesn't drive the pin during start-up. Peripherals with a specific "enable" function might be suitable, for example GPIO12 has a special function of determining what voltage to supply to the flash, but after that it is assigned SPI serial in. This would typically work because resetting the ESP32 should release SPI chip select which would make the peripheral serial out go high impedance. The module is typically programmed via a USB connection. As I understand it handshake lines (RTS and DTR) are used to reset the device and enter programming mode so off the shelf a module should be programmable via USB. The modules frequently use generic USB-Serial interfaces so the Arduino IDE cannot automatically detect one, it needs to be told what module is connected.
|