[Solved] ESP32 Problem with sketch upload

I have created my own board for an ESP32 project for a laser tag target for halloween.

Here I have taken over a Programmer logic with a CH340. So far everything works here. However, I have the problem that my upload via the Arduino IDE does not always work successfully.

Error message:

The sketch uses 778417 bytes (59%) of the program memory. The maximum is 1310720 bytes.
Global variables use 39240 bytes (11%) of dynamic memory, leaving 288440 bytes for local > variables. The maximum is 327680 bytes.
esptool.py v3.3
Serial port COM4
Connecting......................................

A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: Troubleshooting - ESP32 - — esptool.py latest documentation
The selected serial port For troubleshooting steps visit: Troubleshooting - ESP32 - — esptool.py latest documentation
is not present or the board is not connected

Sometimes the upload works but I haven't found out yet if it has to do with the random click on the Reset or Program button.

I am using an Espressif ESP32 Wroom 32d.
My schematic file is here:
IrTarget.pdf (218.6 KB)

I have the feeling that the ESP does not enter the programming mode. Or does anyone have another idea?

Try: press and hold reset then press and hold program.

When you see Connecting......................................
release reset

At about 20-50% release the program switch

SK6812 is 5v.

LEDs 12, 13, 14, 16 need series resistors.

MOSFET gates should have ~10k to GND.

Thank you Larry for your help :slight_smile:

  1. Tryed your logic for uploading the sketch round about four times and it didn't work :frowning: Any other ideas?
  2. Sk6812 maybe i miss here something but these are connected on the top to 5V. Where did you see a mistake?
  3. LEDs and series resistors > There is a resistor array direct in front. 4 x 1k. So 1k for each led. Or is there another problem that I missed?
  4. I added a resistor for the mosfet. Is this correct?

Quick update: I thought I had found the solution. I pressed and held both buttons before connecting the USB cable, plugged in the USB and hold both buttons.

Then pressed the sketch upload button and at "connecting...." released the reset button and the upload started directly.

But even that I could not recreate a second time after several attempts.

So still the strange phenomenon, that it works sometimes and sometimes not. I think there is still a problem with me in the circuit.

Success rate is somehow felt so at 10%


Was referring to these MOSFETs needing a gate to GND resistor.

image

Maybe this might help ? :thinking:

Hi,

That fixes most of the ESP32 load problems, I got a batch of 6 quite a while ago and the capacitor fix solved the loading problem.

Simple fix..

Tom... :smiley: :+1: :coffee: :australia:

A few here needed that too. :nerd_face:

2 posts were split to a new topic: I can't display what I want on my console

Succeed once and then use OTA.

First thank you for this help :slight_smile:

  1. Sk LED: Thank you now i understand what you meen :slight_smile: the led works fine with 5V there i have no problem until now

  2. LEDs No Problem :slight_smile:

  3. Mosfet: Sorry there was something other in my mind :wink: I Think that is the same like the LEDs... der is a resistor array on the left:


    But yes maybe i placed it on a confusing way :smiley:

can i also use a small smd capacitor? or must this be a big one?

Same question: can i also use a small smd capacitor? or must this be a big one?

Can you explain it more what you mean exactly? :slight_smile:

It is the value that is important.

10 uF electrolytic capacitor

Observe the polarity markings.


Okay :+1:

https://randomnerdtutorials.com/esp32-over-the-air-ota-programming/

fire up the IDE with no board connected
look at the ports available
connect the ESP
restart the IDE
look at the ports available
you will see a new port. it might be ACMAO, or it might be USBTTY0
connect to that port.
start your serial monitor at 115,200
press reset on the ESP
if you get a page full of reboot chatter, you're in

Ah cool the WifiManager has also a Update area. But your instructions show how to make the bin :slight_smile:

My question was more if also someone like this works: KEM C0G0603 10N: Vielschicht-Kerko, 10nF, 25V, 125°C bei reichelt elektronik

10nF is 1000 times smaller than 10uF

.00000001F versus .00001F

You need 10 micro Farad i.e. 10uF