|
Megasquirt-3 MS3 Accelermeter input |
Introduction -
Wiring -
Settings -
The accelerometer input allows for a user-supplied one, two or three axis accelerometer to be connected to the
Megasquirt and datalogged. It may be connected to any of the five spare analogue inputs or remotely via a CAN.
(e.g. The JB-perf IO-Extender can be supplied with a 3 axis accelerometer on-board.)
The accelerometer is calibration to +/-1g for convenience, but internally the code uses SI measurement
units (ms-2) so accelerometer acceleration can be compared to vss measured acceleration.
There are three main choices for wiring
- the three MS3X analogue inputs
General wiring for these inputs is shown here
- DIY wiring inside the case for "JS4" and "JS5"
See the board schematics to duplicate the input protective circuits.
- via a CAN extension board
Ensure your CAN connectors are made and enable collecting remote ADCs. See here
In the previous wiring step you should have identified which ADC ports are connected to your accelerometer.
The dialogue allows you to define these ports and the calibration.
However, BEFORE enabling the accelerometer, your need to collect the calibration data.
Collecting calibration data
In this example we will assume that the three axes are connected to ADC11, ADC12, ADC13.
1. Ensure that the accelerometer is wired in and powered on.
2. Open up Generic Sensors and define three spare 'sensors' with the three accelerometer inputs.
3. Next, define a gauge on your TunerStudio dash to match one of these inputs.
Right click on a gauge and then re-define it to match one of the sensor inputs you just defined.
4. Physically move and rotate the accelerometer until it gives the minimum reading on that gauge. Write it down.
5. Repeat for the maximum reading on that gauge. Write it down.
The minimum value will be for -9.81ms-2 (-1g) and the maximum will be for +9.81ms-2 (+1g).
5. Repeat for all three axes.
6. Return to the Generic Sensors screen and turn off the three inputs you defined.
7. Go to the Accelerometer dialogue and enable the three inputs and enter the pairs of calibration data you captured.
8. The process is now complete and in future the acceleration will be recorded in datalogs as accelX, accelY, accelZ.
If you have a question, comment, or
suggestion for this FAQ please post it on the forum.
No part of this manual may be reproduced or changed without written permission from James Murray and Ken Culver.