Accelerometers inexpecliably stopped working

My code is a bit lengthy so I'll just link the relevant parts. My accelerometers (ADXL-362) have been working fine for months now - two days ago, I made a few changes and this morning all of them stopped working completely for some reason. I tested a few and I think they actually are permanently damaged, which makes me believe I did something wrong in my firmware.

Please forgive me if this post seems a bit unorganized - I'm really having trouble figuring out what happened here

I have this in the beginning of my code:

xl.begin(SS);
xl.beginMeasure();
xl.setupDCActivityInterrupt(300, 10);
xl.setupDCInactivityInterrupt(80, 400);
xl.SPIwriteOneRegister(0x2B, 0x40);
xl.SPIwriteOneRegister(0x27, 0x3F);
byte POWER_CTL_reg = xl.SPIreadOneRegister(0x2D);
POWER_CTL_reg = POWER_CTL_reg | (0x04);
xl.SPIwriteOneRegister(0x2D, POWER_CTL_reg);
xl.checkAllControlRegs();

I then have the following towards the end of my code:

xl.beginMeasure();
xl.setupDCActivityInterrupt(500, 10);
xl.setupDCInactivityInterrupt(150, 10);
xl.SPIwriteOneRegister(0x2A, 0x40);
xl.SPIwriteOneRegister(0x27, 0x3F);
byte POWER_CTL_reg = xl.SPIreadOneRegister(0x2D);
POWER_CTL_reg = POWER_CTL_reg | (0x04);
xl.SPIwriteOneRegister(0x2D, POWER_CTL_reg);
xl.checkAllControlRegs();

Part 2 is always run - Part 1 only in some circumstances.

Since this is the main thing I changed about my accelerometers recently, it's my prime suspect. My thought is that something in here could potentially have killed off all of them over time?

@Vitesze, I would say go back and run a known good example for the ADXL-362 to see if the devices are working or not.

1 Like

The first two accelerometers I tested with a simple library were confirmed dead…no readings whatsoever I get from them anymore with several libraries. But no. 3 did actually have readings on it still, so now I’m confused. I’ll test all my accelerometers and figure out what’s going wrong here.

How likely would it be that an accelerometer dies just by running some firmware (assuming mistakes are made in the firmware)? Is it a plausible scenario?

I would suggest looking at how your firmware physically interacts with your hardware. If the devices are truly dead, it is likely they saw more than 3.3V somehow.