GY-511 LSM303DLHC is a digital 3 axis accelerometer and 3 axis magnetometer with I2C interface.
Magnetic current and field are directly related to each other. When current flows in a wire (electrons start travelling in one direction), a magnetic field is created. The main idea of compass sensors is based on this relationship. The direction of the earth’s magnetic field affects the flow of electrons in the sensor. By measuring these changes in current, the sensor will be able to detect directions.
The GY-511 module uses the LSM303DLHC chip to detect and direct magnetic fields. The communication protocol of this module is I2C and you can connect it to different processors including Arduino boards using SCL and SDA pins.
Feature & Application:
16-bit data output 3 magnetic field axis and 3 acceleration axis Full-scale range of ± 1.3 to ±8.1 magnetic field ±2g/±4g/±8g /±16g user-selectable full-scale acceleration ranges 6D/4D-orientation detection Embedded FIFO 2 independent programmable interrupt generators for free-fall and motion detection Power-down mode / low-power mode Tilt-compensated compasses Map rotation Position detection Motion-activated functions Free-fall detection Click/double-click recognition Pedometers Intelligent power-saving for handheld devices Display orientation Gaming and virtual reality input devices Impact recognition and logging Vibration monitoring and compensation
Pin Configuration:
VIN: Power supply module 3.3 to 5 volt 3V: There is a 5 to 3.3 volt regulator on the module. The maximum current that can be supplied by this pin is 100 mA. GND: Ground SCL: Clock Pin for I2C communication SDA: Data pin for I2C communication INT2: Interruption 2 INT1: Interruption 1 DRDY (DataReady): This pin is activated when new values are measured by the sensor and sent to the output.