As an Arduino learning tool and alfa proto I am using a Chinese board ESP32 devkit v1.0 . My first sketch works ok and I am starting to add more functionality using Arduino IDE. What I am curious about is the following: if for final product I design my own pcb and use ESP-WROOM 32 modules (not dev kits) from Espressif or Digikey, do I need to flash them with some sort of Arduino interpreter or a bootloader or I can program them with Arduino produced ELF file without Arduino?
-
Code storage is handled by the controller itself.
-
When you bring the ESP32 Reset and Boot lines LOW then you make Reset go HIGH, then you make Boot go HIGH, the ESP32 is placed in the programming mode waiting for new compiled code.
-
Uploading a sketch from the Arduino IDE starts the ESP32 to store the compiled code.
-
After the sketch is fully uploaded, a LOW to HIGH on the Reset line starts the code running.
-
At subsequent power up times, an RC circuit on the Reset line starts controller code running.
1. You collect the following ESP-WROOM-32 Module (Fig-1) which comes with Bootloader Program pre-installed within the ROM Memory of the ESP32 MCU.
Figure-1:
2. Include the following circuit with the design to upload sketch. You might prototype the circuit before making the PCB.
Figure-2:
Thanks for your answer. For programming I am planning to use USB modem cable which has CH340G chip built in and provides level translation like this one from DigiKey: https://mm.digikey.com/Volume0/opasdata/d220001/medias/docus/500/USB-SERIAL-CABLE-F_Web.pdf
I am assuming that Boot and Enable push buttons need to be there only for programming.
In final device serial cable will NOT be connected and ESP32 will start by itself as soon as power is applied, with no external reset circuitry needed. Is that correct?
Have made many DIY, ESP32 stand alone boards.
There is no real need to have an on board USB serial chip.
By one FTDI USB 3V3 serial board module, connect the RX and TX pins to the ESP32 when you need to update the code.
example:
... and your system starts as soon as power is applied, no need to push anything, totally stand alone?
Correct.
Thanks LarryD.
Will you be soldering the ESP32 controller onto the PCB.
That is the plan.
Did you include RC reset circuit in your design or it is inside the ESP32 module?
That is the plan.
Have you any experience in soldering .05β castellated chips ?
Did you include RC reset circuit in your design ?
Yes.
5vββ[10k]ββ[Reset pin]β.β[100nF]ββGND
βββ[Switch]ββGND
Once I tried to program ESP32-CAM Module with the CH340G based USB/TTL adapter; but, I was not successful. Then I had to use CH340G based ESP32-CAM-MB Adapter from which I have copied Fig-2 of post #3. Look at the DTR and RTS signals which are not active in your cable.
The board in post #5 above works first time every time with an FTDI 5V/3V3 module.
Also the ESP32Cam boards work wth the same FTDI module as well if the process in post #2 is followed.
See this post for further information:
The following setup (Fig-1) of this link nver worked for me to program ESP32-CAM Board (the black GND line was connected to the real GND line near 5V-point). Anyway, I have to finish the programming task using ESP32-CAM-MB CH340G based adapter (Fig-2).
Figure-1:
Figure-2:
This is the schematic of the programmer in post #13.
- Press and hold Reset.
- Close S1 (Boot).
- Release Reset.
- Open S1 (Boot).
- The ESP32 is now placed in the programming mode waiting for new compiled code.
- Uploading a sketch from the Arduino IDE starts the ESP32 to store the compiled code.
- After the sketch is fully uploaded, press and release Reset; the code starts running.
In the schematic of post #15, the Reset Button and the Reset signal to the MCU are missing.
The pin marked as GND at the right-bottom of CAM Board is a false inscription; it is not a real ground; rather it is connected with EN-pin (Pin-3 of ESP-WROOM-32 MOdule), which is connected with CHIP_PU-pin (Pin-9 of ESP32 MCU).
That is true for some ESP32CAMs, but not all.
The ones that I have that have the pin next to the UOT pin connected to EN\Reset have the pin labelled 'GND/R'
The other type where the pin next to the UOT pin really is connected to GND have the pin labelled 'GND'
The Reset switch is found on the bottom of the Camera module U1(Green in the schematic).
Top left corner, it is a small square momentary switch, when pressed, resets the Camera.
Right! It is at the backside of the Camera Module. My guess was that it was your DIY Project.
Just a query: Why have you not inserted a bias resistor for the zeener diode in the schematic of post #15?