Maker Pro
Maker Pro

AVR/PIC uC to calculate 0-100kph and 100-0 using 2D accelerometer

A

Adam Bradley

Jan 1, 1970
0
Hi all!
I'm mucking about with an AVR/PIC uC and want to choose a suitable
accelerometer
(probably from Analog Devices - but please let me know of any suitable
alternatives!)
to give me good accuracy to calculate 0-62mph times, max lateral G force,
braking G's
etc

What I do need is for someone to point me in the right direction with
regards to how
I can calculate such things using only the accelerometer and a known car
weight?

TIA!
Adam
 
D

David Milne

Jan 1, 1970
0
Adam said:
Hi all!
I'm mucking about with an AVR/PIC uC and want to choose a suitable
accelerometer
(probably from Analog Devices - but please let me know of any suitable
alternatives!)
to give me good accuracy to calculate 0-62mph times, max lateral G force,
braking G's
etc

What I do need is for someone to point me in the right direction with
regards to how
I can calculate such things using only the accelerometer and a known car
weight?

TIA!
Adam

The May 2003 issue of Circuit Cellar has a project ("Automotive G-Force Meter")
using the Analog Devices ADXL202E, a PIC and a 16x2 LC display.
 
E

Eugene Rosenzweig

Jan 1, 1970
0
Seeing the application he'll prob want to work out the power at the wheels
for which you would need the weight. I think the commercial accelerometers
do that. Comes in under the 'etc' part of the things the device would do :)

a taken from accelerometer
v1 = at + v0
W = Fs = mas
P = W/t = mas/t = mav

I think thats right. Good old school physics...

Eugene.
 
P

Phil Allison

Jan 1, 1970
0
Seeing the application he'll prob want to work out the power at the wheels
for which you would need the weight.


** That is not probable at all.

The power delivered depends on air drag force - not calculable
from acceleration.


I think the commercial accelerometers do that.


** How ?


............. Phil
 
P

Phil Allison

Jan 1, 1970
0
Eugene Rosenzweig said:
Air resistance would have an effect but it would be minimal at low speeds.


** 100 kph is NOT a low speed - nor is 80 or 60 or 40 .....


The air resistance would affect the acceleration at higher speeds, air
resistance to speed relationship is roughly cubic I think.


** The point was about power - it takes power to move a car at any
speed.

As I stated in the bit you cut out
P = W/t = mas/t = mav


** Your formulae as all useless since they only work where "a" is a
constant.

The use of an accelerometer is BECAUSE it is not.




............... Phil
 
E

Eugene Rosenzweig

Jan 1, 1970
0
Phil Allison said:
speeds.


** 100 kph is NOT a low speed - nor is 80 or 60 or 40 .....





** The point was about power - it takes power to move a car at any
speed.

All I am saying is it is possible to obtain a value for the power. This
power would be the power at the wheels, not at the engine, since there are
losses between the engine and the wheels (diff, drivetrain). This figure
would be smaller then teh one taken with a proper dynamometer since include
the effect of air resistance during testing, error becoming larger where the
speeds are higher.
** Your formulae as all useless since they only work where "a" is a
constant.

The use of an accelerometer is BECAUSE it is not.

Not at all, its an instantaneous power at the time of measurement. For
instance, if you take enough of these measurements and plot against rpm its
close to what you get when you take your vehicle to people with expensive
on-the-floor dynamometers.

Eugene.
 
P

Phil Allison

Jan 1, 1970
0
Eugene Rosenzweig said:
All I am saying is it is possible to obtain a value for the power.



** With restriction to very low speeds ONLY !!!!

Almost useless.


Not at all, its an instantaneous power at the time of measurement.


** In '' mav " the "v" must be obtained by integration of " a"
since "a" is a variable.

In the the formula v = at a must be a constant.




For
instance, if you take enough of these measurements and plot against rpm its
close to what you get when you take your vehicle to people with expensive
on-the-floor dynamometers.



** I very much doubt that - you have no allowance for air drag or
non-optimum engine load conditions.



.............. Phil
 
E

Eugene Rosenzweig

Jan 1, 1970
0
Phil Allison said:
** With restriction to very low speeds ONLY !!!!

Almost useless.

Depends on what you want to achieve. Almost useless if you are desiring high
precision . However for an average car enthusiast the error is say 5% - 10%
might be acceptable.
is



** In '' mav " the "v" must be obtained by integration of " a"
since "a" is a variable.

In the the formula v = at a must be a constant.

In the context of the thread, the mcu calculates velocity by summing the
acceleration so it is available. The precision of this operation of course
depends on how finegrained the accelerometer data is. That is an
implementation detail. The sample cycle of the accelerometer from Analog
Devices is controlled in-circuit. Higher sample rate means more precision
but might be more susceptible to mechanical noise (high-frequency vibrarions
and such) while lower sample rate would mean less precision.
For



** I very much doubt that - you have no allowance for air drag or
non-optimum engine load conditions.

True, not nearly as good as the professional equipment. However we are
talking 1/2 tonne, many-thousand dollar device vs a hand-held around maybe
$100 dollar job (if you make it yourself with free sample accelerometers
mentioned in the beginning, even less). Considering the price, not bad. Note
that the commercia hand-held like the g-tech I linked to in earlier post is
around $500 I believe.

Eugene.
 
P

Phil Allison

Jan 1, 1970
0
Eugene Rosenzweig said:
Depends on what you want to achieve. Almost useless if you are desiring high
precision . However for an average car enthusiast the error is say 5% - 10%
might be acceptable.



** Huh ? You have changed the subject.

The inability to measure power ar normal driving speeds is not
important ?????




In the context of the thread, the mcu calculates velocity by summing the
acceleration so it is available. The precision of this operation of course
depends on how finegrained the accelerometer data is. That is an
implementation detail. The sample cycle of the accelerometer from Analog
Devices is controlled in-circuit. Higher sample rate means more precision
but might be more susceptible to mechanical noise (high-frequency vibrarions
and such) while lower sample rate would mean less precision.


** Do you always change the subject when responding to points ??

Looks that way here.


True, not nearly as good as the professional equipment. However we are
talking 1/2 tonne, many-thousand dollar device vs a hand-held around maybe
$100 dollar job ...



** Which you do not need to buy - what a silly comparison.


........... Phil
 
Top