ESP32 Troubleshooting

Hi,
I am having issues when transferring ESP32 chip from programmer to the circuit board. Once transferred, I am getting no response which is supposedly coming from chip not being able to connect to wifi.

1.Serial monitor repeatedly prints:
esp32 Retrying in "500" milliseconds Connection to "XXXXX " failed

  1. Attempts to reprogram chip while it is in the circuit gives following error:
    A fatal error occurred: Failed to connect to ESP32: No serial data received

  2. When chip is removed from the circuit it is functioning properly.

  3. Pin connections at boot:
    3.3V Supply
    3 GND pins connected to ground
    IO 32 33 34 35 36 39 -> input connected to GND
    IO 26 27 14 4 16 17 -> Output connected 1.4 V
    All the other pins are technically floating.

So your chip is not working as expected when on custom board but otherwise fine? What this has to do with IoT Cloud?

Yep, forgot to change category

check if the floating pins need to be tied by pullups/pulldowns it can cause problems, also if pins are software pull-able by internals then you need to set it...
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/gpio.html

1 Like

Thanks for the lovely article, however I couldn't figure it out. It said that pins 16 17 should not be used, so i removed connections there, but it changed nothing. I agree, it must be something with floating pins, but I am not sure...
I have attached pinout for my circuit.

If you want forum members to check your connections, you need to show us a schematic.

Edit, added:

And I can see you published an apparent layout of a PCB, so did you breadboard the design, to check the connections worked, before designing the PCB ?

@srnet beat me to it. It's crazy to answer this without a look at the schematic.

And maybe explain what that means, makes no sense to me.

Why would you be connecting outputs to 1.4V ?

Schematic is complicated, I will try to explain what each pin is used for.
1)ADC 1-6 (IO32 33 34 35 36 39)-> Set as Input. Measuring voltage which is coming from current measuring IC. Incoming voltage will range from 0 to 2.5 Volt. At the moment it is 0 since no current is passing.
2)ADJ 1 3 5 6 (IO 26 27 14 4)-> Set as Output. These pins output PWM when circuit is functioning, which controls LED driving ICs. When circuit is powered, these pins receive 1.4 volt which come from LED drivers( it is temporary until mcu boots and starts output PWM.
3)AIR (IO 23) - > Set as Output. Outputs PWM to the gate of NMOS
4)3.3 (IO 21)- > Set as Output. Outputs digital high at all times. Connection is Open as of right now.
5) TOG&RST (IO 22 15)-> Set as Input. Receives digital inputs. Technically floating
6) TH_DATA (IO 13)-> Set as Input, but floating right now.
7) BLU GRN RED (IO19 18 5)-> Set as Output, but floating right now
8) IO pins 14 & 25 set as Output LOW

All the other pins are floating/not pulled by software

I tested ESP32 on the breadboard prior moving it to the circuit. I've also tested circuit with ESP32 kit board (layout picture attached), and it worked just fine. It feels to me that mcu is constantly resetting or having difficulties connecting to wifi. When mcu is removed from the circuit, and connected to programmer, it is functioning properly.

I don't see it. Where is it?

I disagree, a schematic is easy to understand.

And a schematic is absolutly essential !!!!!!!!!!!!!!!!!!!!

Right, so the module is fine, the code is fine.

Strong suggestions that there is a problem with your PCB ?

In the rendered drawing I see a module. So what is it, really? What programmer? Edit - oh, I see. You decided to show us a test setup instead the real one.

In that case, how do you know that you have even programmed the chip properly? Because the test of the module is not the same as the test of the chip. It only proves the software works.

So now, it could be a PCB design problem, or a chip programming problem...

You can connect to wifi while in the programmer? How can you verify all the operations if there is no hardware attached?

Yes there is problem with PCB. I need to know all the ESP32 pins which should be pulled high, low or floating for it to function properly. I am definitely using some pins which i shouldn't or not pulling pins which i should.

Let's back up a bit here. Do you possess a schematic?

Yes it is connecting to wifi and everything works flawlessly. I attached picture of the


programmer and mcu.

Good that limits it to the PCB.

I do, but it is a bit outdated. I would have to spend few hours to get it right. I believe we should only be concerned with what mcu sees, which is this:
1)ADC 1-6 (IO32 33 34
35 36 39)-> Set as Input. Measuring voltage which is coming from current measuring IC. Incoming voltage will range from 0 to 2.5 Volt. At the moment it is 0 since no current is passing.
2)ADJ 1 3 5 6 (IO 26 27 14 4)-> Set as Output. These pins output PWM when circuit is functioning, which controls LED driving ICs. When circuit is powered, these pins receive 1.4 volt which come from LED drivers( it is temporary until mcu boots and starts output PWM.
3)AIR (IO 23) - > Set as Output. Outputs PWM to the gate of NMOS
4)3.3 (IO 21)- > Set as Output. Outputs digital high at all times. Connection is Open as of right now.
5) TOG&RST (IO 22 15)-> Set as Input. Receives digital inputs. Technically floating
6) TH_DATA (IO 13)-> Set as Input, but floating right now.
7) BLU GRN RED (IO19 18 5)-> Set as Output, but floating right now
8) IO pins 14 & 25 set as Output LOW