7

There are lots of examples on the internet on how to build Arduino from scratch such as IN THIS LINK. I will like to do the same but with the esp32.

I have this development board:

enter image description here

And I am able to program it with the Arduino framework/IDE thanks to THIS VIDEO.


Now the question

How can I flash my code and run it on a standalone ESP-WROOM-32 chip like this one:

enter image description here

I do not want to use voltage regulator etc as I am planning to run it from a 3.3V battery.

Before asking this question this was my research:

  1. In this video (https://www.youtube.com/watch?v=n43rHugPbTg) Hugatry does exactly what I am looking for but he does not explain what pins he is using. Moreover what happens if I connect my 5v serial to the chip? will it burn?

  2. I went directly to espressif website and looked for the schematics (https://www.espressif.com/sites/default/files/documentation/esp32-wroom-32d_esp32-wroom-32u_datasheet_en.pdf). It is hard to understand I just want to do something simple.

  3. This blog (http://blogs.oregonstate.edu/copaps/resources/programming-esp32-on-custom-pcb/) explains how but the pins are different than my esp-wroom-32 chip.

Looking more on the internet/youtube everyone explains how to solder it. But I haven't found a diagram that will enable me to flash it and run my code. Also will I have to burn a bootloader like with arduino?

What I am about to try is to buy a 5V to 3.3V serial converter connecting TX with RX and RX with TX. Providing 3.3V power to the 3.3V pin and connect the last cable to ground. If I try that will it work?

Tono Nam
  • 966
  • 1
  • 10
  • 22

4 Answers4

8

This is what I was looking for. The development board is not the minimum as @Majenko and @StarCat stated on their comments. This is exactly what I need as I plan to run my project from a battery. Moreover, the development board consumes a lot more energy when in sleep mode. I will even remove the LED that shows on this diagram:

enter image description here

So basically use a programming board like @KenVanHoelandt stated to program the board and then wire the esp32 like in the diagram above.

I got that diagram from this link:

https://www.14core.com/wiring-and-flashing-programming-esp-32-esp32s-with-usb-ttl-uart/

Tono Nam
  • 966
  • 1
  • 10
  • 22
2

There are programming boards available to which you can plug one of these SOCs into them. There are different boards for different types of ESP SOCs. You can find them at popular Chinese vendors, and probably elsewhere too.

They look like this:

ESP32 flash burner tool

ByteWelder
  • 151
  • 6
2

You could use wireless. First, use OTA programming (eg Elegant OTA) to burn a basic OTA uploader. Then, in principle, you can then upload any sketch you want so long as it ALWAYS has the basic OTA sketch included within your program.

1

OK, so the answer to the original question, how to upload code to a bare ESP32 that's not on a Development board, is as follows:

  1. Using an FTDI board, connect FTDI ground to ESP32 Ground, connect the FTDI TX pin to the ESP RX pin, then connect the FTDI RX pin to the ESP TX pin.
  2. Make sure you have a decent 3.3v power supply connected to the 3.3v and ground pins of the ESP32, do not use the FTDI power pins, the FTDI board doesn't supply enough power for the WiFi of the ESP32 and it will just keep rebooting.
  3. On the ESP32 connect the D0 pin to Ground to enable Flash mode.
  4. Upload your code.
  5. Disconnect D0 from ground and reboot the ESP32.

Job done.

vince31
  • 11
  • 1