I need to obtain as fast as possible after power-up a reading from an accelerometer. The accelerometer is located in a car and is powered by the same rail of the rear braking lights, therefore it is powered only after I press the brake pedal. The idea is to obtain as fast as possible a clean reading of the initial gravity vector, before the car actually starts decelerating. Later I will subtract it to obtain the deceleration vector. If the first reading takes too much time (20 ms is already too late), I would be reading a combination of gravity + deceleration.
My intermediate solution
I used an Arduino Pro Mini (5V, 16 MHz) connected to a GY-61 accelerometer module. The module has a 3.3V low dropout regulator, an ADXL335, low-pass capacitors. The ADXL335 is ratiometric, therefore the Vcc of the ADXL335 is used as Aref for Arduino.
Arduino is set to wait 16k cycles + 0 ms upon power-up, the other options being 16K + 4 ms or 16K cycles + 65 ms. The setup is tested as working: I can obtain the first analog reading about <1.5 ms after application of input voltage.
The low-pass filter of the board was originally set to 50 Hz, but I changed the capacitor to have 200 Hz bandwidth, therefore the analog input (A0) takes about 5.5 ms to provide stable readings. This was also tested.
The stable output voltage of the accelerometer can be (depending on mounting) between 1.43V and 1.77V for -1g to 1g. The ADXL335 does not tolerate more than about 3.5V on any pin (to be on the safe side).
I would like to stabilise the output of the accelerometer faster, without waiting the full 5.5 ms after power-up: this would allow me to sample more times the initial gravity value, before it changes due to deceleration. I would like to keep 200 Hz as bandwidth to reduce the noise later during the following measurements of braking deceleration.
The ADXL335 has a resonance frequency 5.5 kHz and a bandwidth of >550 Hz when no capacitors are used: before the low-pass capacitor the first reliable value is ready about 2 ms after power-up. That means more than 3 ms saved compared to my current case.
How can I do that?
Can I connect the output of the capacitor also to an additional pin, set as output for about 1 ms and then set as high-impedance input, through a resistor? or would I damage the ADXL335?
Is it maybe better to perform all the filtering in digital to change the bandwidth as needed? Even in this second case, would the setup I described work?