robogaia.com
  • Products
    • 3 Axis Encoder Conter Arduino Shield
    • 6 Channel Encoder Counter Arduino Shield
    • 8 Channel Encoder Counter Arduino Shield
    • Raspberry Pi 6 Channel Encoder Hat
    • Raspberry Temperature Controller Plate
    • 4 Relays Raspberry Pi Plate/Shield
    • C2N-UNI8IO To Terminal Block Board
    • Arduino Solid State Relay
    • Encoder Shield Connector
    • Mechanical Encoder Board with Connector
    • Raspberry Pi Dual Thermocouple Plate
    • Raspberry Pi 3 Channel Encoder Hat
    • HC-SR04 Ultrasonic Distance Sensor
  • Blog
  • Contact
  • Tutorials
    • How to Add a Web Interface to the Raspberry Pi 4 Relay Board
    • How to add a simple web server on Raspberry Pi with Flask Framework
    • How To Calculate Resistor Wattage
    • How To Start With Robotics
    • How To Start With Artificial Intelligence
    • How to start with CNC 6040 machine
    • How to calibrate Robogaia accelerometer/gyro shield
    • How to build Balancino (the balancing robot)
  • Distributors
  • Services
  • About

How to calibrate Robogaia  accelerometer/gyro shield

Picture
Earth's gravity is pulling down with a force of 1G which means one gravity . This is very specific to Earth and the Moon has 1/6 of gravity of earth.

The accelerometer sensors usually output an analog , PWM or digital signal. Usually the maximum output is proportional to the VCC voltage.

       In order to calibrate the accelerometer we have to know the output of the accelerometer for the axes that is perpendicular to the Earth surface. So for example for x axes the axes has to point up.
The Earth acts on one of the chip's axes with a force of one G . By Taking note of the output value we determined the value at 1 G.
If we would know the output value when the sensor output.
The chip outputs a 16 bit signed value that is from -32768 to 32767.
For accelerometers means from - 4G to +4G  and  for 1 G it will be 8191 counts.




Code Example (Also available here)

In the code example the accelerometers are setup to output up to +/- 4 g.

The first code example outputs the raw data from the sensors and the second example outputs
the values in international units.
accelerometer_gyro_shield_test_v1.0_.zip
File Size: 3 kb
File Type: zip
Download File

accelerometer_gyro_shield_test_international_units.zip
File Size: 3 kb
File Type: zip
Download File

X Axis Accelerometer

Picture
In this orientation the X axis should output
1G or about 8191 counts (configured with 4G output)
The other 2 axes should output values closed to 0

Y Axis Accelerometer

Picture
In this orientation the Y axis should output
1G or about 8191 counts (configured with 4G output)
The other 2 axes should output values closed to 0

Z Axis Accelerometer

Picture
In this orientation the Z axis should output
1G or about 8191 counts (configured with 4G output)
The other 2 axes should output values closed to 0

Gyros Calibration

The gyros are setup in the code example for maximum Gyro scale +/-2000º/s


@Robogaia 2021