Can you spot a mistake I made?

I am working on a vehicle that is controlled by ESP32-CAM, but for some reason when I plug batteries in the ESP32 board doesn't start (WiFi hotspot is not created), only after I disconnect wire1 or wire2 the AP starts.
As I understand the power lines are disconnected from each other and shouldn't interfere each other, probably I have chosen not appropriate batteries for this? Anyway after the AP appears I reconnect the previously disconnected wires and it works smoothly for the rest of time. I spent too much time struggling with this, maybe someone has an idea what can be wrong?
This is my wiring diagram

@borysv

I spent too much time struggling with this, maybe someone has an idea what can be wrong?

You have the input wires to the buck connected backwards.
The red wire should go to IN+

I did a mistake in the diagram, but in the vehicle it is connected correctly, otherwise it wouldn't work after motors are disconnected. I corrected the diagram

Then it should not matter whether wire 1 and/or wire 2 are connected or not.
Are you sure the batteries are charged?
Sometimes the cheap breadbords do not make good connections or sometimes are intermittent
Try connecting the power wires directly without the breadboard.

No, you did a new mistake correcting the previous. Now your buck has a two "IN+" terminals :slight_smile:

I would advise you to check your assembly again, maybe you have mixed up something else...

Once you are sure your wiring is correct, leave off JUST the motors, and see if the circuit awakes. If it does, it's just the cumulative load of the motors is too much for the battery; in that case, power down, add one of the two motors, and power up again.

1 Like

I tried 2 things:

  • I started disconnecting wires that go from ESP32 to motor driver one-by-one and the board started up only after the last wire was disconnected
  • Pretty much the same thing happened with the second approach. I reconnected all the wires and started disconnecting the wires that go from motor driver to the motors and the ESP32 booted only after the last one was disconnected

What is interesting even when I have all the wires that go from motor driver to the motors disconnected and the only 1 wire left of 4 that go from ESP32 to motor driver it still doesn't boot up

Most likely, to me, is that you have the voltages (-,+) to the motor driver reversed. Both will then work when disconnected, but if you connect anything between, you have a fundamental problem.

Tried to connect it using such a connector and the result is the same. Also checked batteries, look good to me


First you said that you only needed to disconnect wires 1 and 2 for it to start
So which is it?
Do you need to disconnect ALL wires for it to work or just the power connections?

As turned out it works in both cases:

  • disconnect power of motor driver
  • disconnect all logical pins from motor driver

The thing is if I disconnect the motor driver for a second and then plug it back it works just fine, ESP32 with camera and wheels are spinning

I think I know what is wrong.
Connect everything except for the wires to IO12 and IO15
See it the ESP starts up OK

Wow it worked, despite the wheels started rotating (because 2 logical pins were disconnected) the ESP32 started successfully. Could you explain what is wrong with those 2 pins?

They are ESP32 strapping pins.
IO12 must be LOW and IO15 MUST be HIGH for the ESP32 to boot.
The motor driver is somehow preventing those pins from being pulled to the correct levels.
I think IO12 may be the problem.

So one more test connect everything except IO12 and see if it boots.

Yes, the problem is in the GPIO12 indeed, everything works when this one is disconnected.

Thank you so much! I was struggling with this for days. I also tried to connect a servo to the GPIO12 and it works just fine too!

Since the motor driver pins were inputs they should not have had any effect on the strapping pins but obviously they did.
The website list all the ESP32 pins which ar good to use as I/O under what conditions.
Might help

I saw this article too and they recommend using GPIO12 unless you are using SD card, but I never go by the link to see the details of each pin that was a mistake, thank you again :slightly_smiling_face:

Motor drivers usually have internal pull-ups or pull-downs on the inputs to prevent inadvertent motor activation when the pins are not connected. Read those datasheets(!)

Can you please show in the datasheet where the pullups are specified.