
Need ideas for troubleshooting: Device stops working when case is closed.
Hi all! I'm a decently inexperienced researcher creating a prototype of a collision detection device. I'm using an ADXL343 accelerometer to poll for a collision event, which then sends an interrupt to a RP Pico 2 W that causes it to awake from Dormant mode (this requires a reboot of the system since I also have memory disabled during sleep to save on power), at which point it grabs the collision data from the accelerometer and sends it to a server wirelessly.
The issue is that for some reason, the device works perfectly fine, but the moment you put the box lid on and put screws (specifically when you screw it down it seems?) it stops working and doesn't transmit data or so much as wake up (as that would have been noted in the log file).
I've tried changing the configuration a bit and doing a few other things. Originally the pico was underneath the accelerometer (which is screwed to the case itself, the pico is not for ease of access) but I move it to the side because there may have been contact between the GPIO pins and other metal parts like the screws. This didn't seem to really help though. I doubt it to be an issue of the device losing connection to the battery since the LED indicator on the ADXL343 still shines (I believe it's directly connected to voltage input), and even if it lost power for a moment, it would just reboot upon getting power and operate as normal.
The issue is also very inconsistent, some devices seem to work fine when the lid is put on and screwed, others just die instantly. Some I thought were working fine, but then died randomly after a month with no clear sign as to why.
It might be the mess of wires being pushed by the battery case that is causing something to fail, but I'm struggling to find what it is. I tried once taping everything down so there's almost no movement, but still failed. The actual collision itself may also be playing a role when they randomly fail in the field, as the devices vibrate rather forcefully upon a collision (they are mounted to a window).
I'm looking for any ideas on what troubleshooting I should do from those with more experience with this sort of thing. I'm out of ideas for testing after having gone through a good deal of them. Thanks!