4.1 Accelerometer Module
- An accelerometer is an electronic component that measures tilt and motion.
- An accelerometer chip attached to the user's head detects the inclination of the head
- According to the inclination, the wheels of the wheelchair move forward or backward or turn to the right or left.
- This module is thus aimed at improving the mobility of the wheelchair and reducing the human effort required for the same.
The ADXL345 is a small, thin, low power, 3-axis accelerometer with high resolution (13-bit) measurement at up to ±16 g. Digital output data is formatted as 16-bit twos complement and is accessible through either a SPI (3- or 4-wire) or I2C digital interface. The ADXL345 is well suited to measure the static acceleration of gravity in tilt-sensing applications, as well as dynamic acceleration resulting from motion or shock. Its high resolution (4 mg/LSB) enables measurement of inclination changes less than 1.0°. Several special sensing functions are provided. Activity and inactivity sensing detect the presence or lack of motion and if the acceleration on any axis exceeds a user-set level. Tap sensing detects single and double taps. Free-fall sensing detects if the device is falling. These functions can be mapped to one of two interrupt output pins. An integrated, patent pending 32-level first in, first out (FIFO) buffer can be used to store data to minimize host processor intervention. Low power modes enable intelligent motion-based power management with threshold sensing and active acceleration measurement at extremely low power dissipation.
Figure 14: Accelerometer ADXL345 (Top View)
4.1.1 Incorporating accelerometer into the wheelchair:
- In the smart wheelchair, an accelerometer module can be incorporated for enhanced and easy mobility.
- In quadriplegics, the only mobile part of the body is the head up to the neck. An accelerometer can thus be attached to the head/neck.
- The motion of the head/neck is detected by the accelerometer and according to the direction and magnitude of motion, the wheelchair will move either forward or backward, or turns right or left.
4.1.2 Accelerometer Functions
- FUNC 1) Bend head forward : Forward motion
- FUNC 2) Tilt head right : Right turn
- FUNC 3) Tilt head left : Left turn
- FUNC 4) Lift head upwards : Reverse motion
- FUNC 5) Default : Rest
4.1.3 I2C Interfacing
- I2C and SPI digital communications are available. In both cases, the ADXL345 operates as a slave. I2C mode is enabled if the CS pin is tied high to VDD I/O.
- To interface the ADXL 345 with the Raspberry Pi we use I2C protocol because that allows us to have sufficient number of GPIO pins available for other module interfacing.
- To use the I2C interfacing we have utilized a library from github called i2clibraries.
Figure 15: Differences between I2C and SPI