# How to speed up charging of output capacitors of ADXL335?

Problem statement

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.

simulate this circuit – Schematic created using CircuitLab

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).

Problem

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?

simulate this circuit

• Have you considered going straight to a pure-digital accelerometer? – pjc50 Jan 20 '17 at 16:32
• I have some of these ADXL335 at home and not experience with digitial ones, so I used what I had. What would be the advantage of digital? setting a high bandwidth for the first readings and lower it for the following measurements? – FarO Jan 20 '17 at 16:35
• What errors in terms of percentages are produced by a late null measurement? What I'm trying to say is "please justify that this needs to be done". It sounds like a none-problem potentially. – Andy aka Jan 20 '17 at 16:41
• Is there no way to power the whole thing from a steady supply and only obtain a reading when the brakelights turn on? – Christian Jan 25 '17 at 7:59
• @Christian it would require bringing there another cable, and that means lifting the interiors, and so on. Not easy. – FarO Jan 25 '17 at 9:47