ESP32 resets with mechanical shock

Hi Everyone,

I am using ESP32 Cam (I know poor choice but i make use of what's laying around) and I've made a system that uses IR Proximity Sensor installed on my cycle and connected and I'm using Blynk app to show the data like speed and distance covered.

When I first made it, it was as simple as this and the board was mounted using hot glue and little bit of tape, jumper wires soldered directly to the sensor and micro USB to power the board. It worked flawlessly other than it losing wifi connection using my hotspot once or twice during my trip.

Then a few days ago i decided to add buttons and led lights to work as an indicator so I made all the connections and the necessary stuff for it to all work (Like using 555 Timer IC for indicator blinking, relay board, a boost convertor to convert 5V to 12V for the LED) on a perfboard but I used female header for the ESP. The perfboard has a screw type power header and is connected to a power bank using a stripped usb cable which I know is not broken from the insides, already tested that.

The problem I'm facing now is that a little big mechanic shok seems to reset the ESP and then it reconnects back showing the data once again. It's happening too frequently like on every road bump. If I'm using indicators then it may stop if I encounter a bad patch of road.

This didn't happen earlier, the connections are proper and soldered other than the fact that ESP sits on a header.

I've tried soldering a 3300uF capacitor directly to the 5V and Ground pin to hopefully fix if this was a wiring issue but didn't help. My next process of debugging this would be to directly solder the positive and negative of the USB cable to 5V and Ground pin.

If it doesn't reset, then it means I did a sloppy job on the perfboard, but if it does then it could only mean one out of two things, either the wire is broken (Highly Unlikely) or mine ESP32 is sensitive to mechanical shocks. But if that's the case why didn't it happen earlier when it was just ESP and the Sensor?

Thanks, and sorry for long question.

This sentence contradicts itself, invalidating the rest, but I also add;

Lost in electronics' history to Tik Tok builds meant for clicks only, is the need to protect microelectronics from electrostatic discharge, through which, delicate and sensitive circuits suffer permanent damage, and worse; intermittent damage. Welcome to ESD.

Or your connections are not solid.

  • Always show us a good schematic of your proposed circuit.

  • Show us good images of your ‘actual’ wiring.

Likely not a Programming problem for here in the Programming Section of the forum.