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.
Feed an ESP32 project
Re: Feed an ESP32 project
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.
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.
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: Feed an ESP32 project
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.
Re: Feed an ESP32 project
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
https://www.ebay.co.uk/itm/MP2307-Adjus ... 2749.l2649
-
- Posts: 73
- Joined: Mon Mar 09, 2020 7:36 pm
Re: Feed an ESP32 project
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.
Re: Feed an ESP32 project
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?
Re: Feed an ESP32 project
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: top_secret_guy and 97 guests