Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Arduino Ethernet with LSM303DLHC Accelerometer and Compass Interface

Image of Arduino Ethernet with LSM303DLHC Accelerometer and Compass Interface

Circuit Documentation

Summary of the Circuit

This circuit integrates an Adafruit LSM303DLHC Triple-axis Accelerometer+Magnetometer (Compass) with an Arduino Board Ethernet to create a system capable of measuring acceleration and magnetic fields while providing network connectivity. The accelerometer+magnetometer communicates with the Arduino over the I2C bus, using the SCL and SDA lines for clock and data, respectively. The Arduino Board Ethernet can process the sensor data and potentially send it over a network for remote monitoring or logging.

Component List

Adafruit LSM303DLHC Triple-axis Accelerometer+Magnetometer (Compass)

  • Description: A sensor board that provides digital acceleration and magnetic data over I2C.
  • Pins: SCL, SDA, INT2, INT1, DRDY, GND, VIN, 3.3V

Arduino Board Ethernet

  • Description: A microcontroller board based on the ATmega328, with built-in Ethernet connectivity.
  • Pins: D8, D9 PWM, D10 PWM/SS, D11/MOSI, D12/MISO, D13/SCK, GND, AREF, A0, A1, A2, A3, A4, A5, D0/RX, D1/TX, D2 PWM, D3 PWM, D4, D5 PWM, D6 PWM, D7, RESET, 3V3, 5V, VIN, RTS, PD1, PD0

Wiring Details

Adafruit LSM303DLHC Triple-axis Accelerometer+Magnetometer (Compass)

  • SCL connected to Arduino Board Ethernet A5
  • SDA connected to Arduino Board Ethernet A4
  • GND connected to Arduino Board Ethernet GND
  • VIN connected to Arduino Board Ethernet 5V

Arduino Board Ethernet

  • A5 connected to Adafruit LSM303DLHC SCL
  • A4 connected to Adafruit LSM303DLHC SDA
  • GND connected to Adafruit LSM303DLHC GND
  • 5V connected to Adafruit LSM303DLHC VIN

Documented Code

No code has been provided for the microcontrollers in the circuit. To fully utilize the circuit's capabilities, embedded code for the Arduino Board Ethernet should be written to initialize and read data from the Adafruit LSM303DLHC sensor, process the data as needed, and use the Ethernet capabilities to communicate the data.

The code should include the following functionalities:

  • Initialization of the I2C bus.
  • Configuration of the LSM303DLHC sensor settings.
  • Periodic reading of acceleration and magnetometer data.
  • Data processing and any required conversion to meaningful units.
  • Establishing a network connection using the Ethernet interface.
  • Sending sensor data over the network.

Since no code is provided, it is recommended to consult the Arduino and Adafruit LSM303DLHC libraries and documentation for example code and further implementation details.