Feed an ESP32 project

nacheitor
Posts: 6
Joined: Fri Oct 09, 2020 8:13 am

Feed an ESP32 project

Postby nacheitor » Mon Oct 26, 2020 10:37 am

Hi everyone. I am developing a project with an ESP32 microcontroller. I have connected several sensors (8 sensors) to the I2C bus and the readings work correctly, all powered from the board's usb (esp32-wroom-32). Through the USB I also read the data from the computer.

The problem happens when I try to connect a pair of stepper motors, two limit switches and an RGB led to the microcontroller. The system becomes unstable and the sensors begin to fail. I do not know what the problem might be.

Perhaps it is a power problem, the usb is not able to supply enough power to the system. But when I add an external pc source, to the 3.3v (orange wire (28 amps)) and GND (black wire) pins, the problem continues.

I do not know if it is to feed the system from two different sources, the USB and the 3.3v pin. But I need to read the data from the USB.

I have not found much information on how to correctly feed an ESP32 microcontroller when you need to feed many sensors, several motors, LEDs, buttons ... But I have been able to verify that the I2C bus is very sensitive to the system's power supply.

Could someone advise me how to power the system so that the I2C bus and sensors work properly?

Thanks in advance.

alanesq
Posts: 84
Joined: Thu Dec 14, 2017 8:38 pm

Re: Feed an ESP32 project

Postby alanesq » Mon Oct 26, 2020 11:41 am

Hi,
It may be that you need to install some decoupling capacitors, I find that if there is a problem with the power you get all sorts of weird behaviour with the esp32 especially when using the wifi.

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: Feed an ESP32 project

Postby ESP_Sprite » Tue Oct 27, 2020 5:56 am

For sure. Especially stepper motors can induce lots of noise on the power lines; you may even need to feed those from an entirely different power supply.

Spile2
Posts: 23
Joined: Tue Sep 22, 2020 8:39 pm

Re: Feed an ESP32 project

Postby Spile2 » Tue Oct 27, 2020 11:34 am

I have been impressed with the performance, size and price of the MP2307 DC:DC converter.

https://www.ebay.co.uk/itm/MP2307-Adjus ... 2749.l2649

Scott.Bonomi
Posts: 73
Joined: Mon Mar 09, 2020 7:36 pm

Re: Feed an ESP32 project

Postby Scott.Bonomi » Tue Nov 03, 2020 1:37 am

There is some control on the amount of power available to each GPIO. You may be running into control problems with too great a parasitic power draw from too many components. Watching the I2C IO with a scope could be valuable. You might also want to look at distance to the motors. The length and size of the wires might add enough resistance to lower voltage at the motor causing them to want more current instead.

nacheitor
Posts: 6
Joined: Fri Oct 09, 2020 8:13 am

Re: Feed an ESP32 project

Postby nacheitor » Thu Nov 05, 2020 9:48 am

I have an external source that powers the pololus (a4988), while the esp32 is powered by usb. The only connections between the pololu and the esp32 are the STEP, DIR lines, and ground. If I turn off the usb source the reading of the i2c sensors is successful. If I turn on the 12 source, I start to have errors in the reading of the sensors. Could I add some kind of filter to these inputs so it doesn't destabilize the controller?

becorey
Posts: 92
Joined: Sat Mar 28, 2020 4:18 pm

Re: Feed an ESP32 project

Postby becorey » Mon Nov 09, 2020 5:48 am

Motors can cause large spikes in the power supply. Try adding a bulk capacitor across the motor power supply. You might have noise on GND that affects the sensors. Can you share more of the schematic or setup?

Who is online

Users browsing this forum: Google [Bot] and 56 guests