Page 1 of 1

ESP32 behaving unexpectedly, not sure how to diagnose

Posted: Fri Feb 09, 2018 3:33 am
by usinjin
I'm using an ESP-WROOM-32 with ESP-IDF. We're getting several sensor's data over I2C and outputting to a servo motor. We're also using BLE in our project. Sometimes, when we boot, or ESP32 seems to go a bit crazy and ignore the code. It's supposed to wait and let a BLE connection initiate and then wait for commands from a mobile application. Very often it's fine, but other times it turns the servo motor at full power and garbage comes over the serial connection, and the whole system is completely unresponsive, forcing us to kill the power to it. After resetting it, it goes back to normal and runs fine. I'm not sure where to start looking for the issue, because when the system goes a bit crazy, nothing intelligible comes over serial that could help us debug. Where can I start to look for why this is happening?

Re: ESP32 behaving unexpectedly, not sure how to diagnose

Posted: Fri Feb 09, 2018 2:37 pm
by mistergreen
Did you protect the ESP from the motor with diodes & capacitors?
Motors will produce current when moving. I'm guessing that the garbage you see is the extra current. I assume the ESP would crash and become unresponsive.

Re: ESP32 behaving unexpectedly, not sure how to diagnose

Posted: Sun Feb 11, 2018 3:42 am
by usinjin
mistergreen wrote:Did you protect the ESP from the motor with diodes & capacitors?
Motors will produce current when moving. I'm guessing that the garbage you see is the extra current. I assume the ESP would crash and become unresponsive.
Thanks for the reply. We have a 15v 1400uF cap on the servo 5v line, but no diodes, I will add one and see of that fixes our issue.