for RP6 Robot, but also useable for RP6 WIFI, ARUDINO
and ASURO
Introduction:
General purpose 3D accelerometer module for robots. This 3D accelerometer can
determine the absolute angle of your robot, e.g. Roll and Pitch value can be easily
calculated by a microcontroller. In addition you can calculate the vector of a collision
impulse. This information can be used to move around an obstacle.
Hint: Often, the differences between a Gyro and an Accelerometer is not clear and
got mixed up.
Here a clarification:
A gyroscope is very good in finding the rate of an angular change, but can’t detect an
absolute angle – but an accelerometer does!
The picture on the left shows the M32 board with an 8 pin DIL socket.
The Accelerometer module fits on the boards as drop in solution.
PIN1
PIN3 and PIN 7 on M32 Board are connected to Vdd ! Recommendation is to remove R2 and R3!
Pin1 is on the lower right hand side on the picture below (hence DIL socket).
VDD is 3.3 or 5.0 V nominal.
3.) Connecting to RP6WIFI, ASURO or ARUDINO
Alternatively you can connect this module to the I2C Bus instead of SPI. Therefore
you need to pull PIN1 to VDD. PIN5 is then SDA while PIN 6 is SCL!
With PIN2 you can select the less significant bit of the device ID.
In this case you can use it together with the RP6WIFI, ASURO or ARUDINO Robot
and the specific extension board!
4.) Software changes (SPI):
The data access and initialization works over SPI Bus (for details on Registers and
functions refer to the datasheet of the LIS302DLH.
Change the software on the control board as following:
PORTB &= ~ACC_CS;
writeSPI(0x27);
status = readSPI();
PORTB |= ACC_CS;
return status;
}
This SW example demonstrates the access to the module – your SW need to handle to
output to a display or the terminal via RS 232. The part is much more capable as shown here