Topics covered in the BerryIMU Quick Start Guide;
- How to assemble BerryIMU
- Connecting BerryIMU to a Raspberry Pi.
- Connecting BerryIMU to other Microcontrollers
- BerryIMU sensor datasheets.
- BerryIMU i2c addresses.
- Mechanical dimensions.
- Sample code.
- Guides and tutorials
How to assemble BerryIMU
BerryIMU comes with one 4 pin male header and a 2x3 pin female header;
At least one of these headers needs to be soldered to the BerryIMU to allow it to interface with a Raspberry Pi. You can also solder both if you like.
The 4 pin male header is used to connected BerryIMU to the Raspberry Pi via jumper cables. The 4 pin header is soldered to the underside of BerryIMU at the P2 designation highlight in red below;
The 3 pin 2 row female header is used to allowed BerryIMU to connect right onto the GPIO pins of the Raspberry Pi and it is soldered on the underside of BerryIMU at the P1 designation highlighted in red below;
Note. There are 5 remaining pins at P5, no male pins were supplied for these locations as in 99% of all use cases these pin locations will not be used. However, if you plan to use the Data Ready and Interrupt functions of the sensors, please feel free to solder some male headers here.
Connecting BerryIMU to a Raspberry Pi
Or BerryIMU can sit right on top of the GPIO pins on a Raspberry Pi A, B, B+ and A+. The first 6 GPIOs are used as shown below.
Connecting BerryIMU to more Microcontrollers
Sparkfun Thing Dev Hookup
Adafruit Feather Huzzah! Hookup
Datasheets for BerryIMU
BerryIMU i2c Addresses
The default i2c addresses on the BerryIMUv1 are;
- 0x1E for the magnetometer and accelerometer
- 0x6A for the gyroscope
- 0x77 for the pressure sensor
The first two addresses above can be changed by soldering close the appropriate address pads on the BerryIMUv1
The image below shows where these pads are located on the PCB for BerryIMUv1.
ADDR2, when soldered together, the address for the magnetometer and accelerometer will change from 0X1E to 0x1D.
ADDR1, when soldered together, the address for the gyroscope will change from 0x6A to 0x6B.
The default i2c addresses on the BerryIMUv2 are;
- 0x6A for the gyroscope and accelerometer
- 0x1C for the magnetometer
- 0x77 for the pressure sensor
Solder the pads on JP2 together will change the address for the accelerometer and magnetometer from 0x1C to 0x1E.
Solder the pads on JP5 together will change the address for the gyroscope from 0x6A to 0x6B.
Git repository here
The code can be pulled down to your Raspberry Pi with;
Guides and Tutorials
In this order;
Guide to interfacing a Gyro and Accelerometer with a Raspberry Pi
Guide to interfacing a Gyro and Accelerometer with a Raspberry Pi - Kalman Filter
Create a Digital Compass with the Raspberry Pi – Part 1 – “The Basics”
Create a Digital Compass with the Raspberry Pi – Part 2 – “Tilt Compensation”
Create a Digital Compass with the Raspberry Pi – Part 3 – “Calibration”
Create a Digital Compass with the Raspberry Pi – Part 4- “Smartphone Replica”
Converting values from an Accelerometer to Gs – “ Proper Acceleration”