Measure And Display The Earth's Magnetic Field
About the project
This project shows how to use Pmod CMPS2 and Arduino Uno to measure and display the Earth's magnetic field components. The 3 components of the magnetic field, module, & angle are displayed in the serial monitor.
Estimated time: 1 hour
Items used in this project
This is a demo project for the Digilent Pmod CMPS2. The X, Y and Z components of Earth's magnetic field are measured, converted in mG (milliGauss) and displayed on the Serial monitor. The module of the components and the angle of the device is also calculated and displayed (calculations are made according to the Pmod's datasheet). To control the Pmod, an Arduino UNO is used, which also sends the data to the computer. To communicate with the peripheral device, I2C communication protocol is used, the device address is 0x30. Data is received as two 8-bit parts of a 16-bit number in two's complement form.
Schematics, diagrams and documents
Digilent Inc., a National Instruments company, is a leader in the design, manufacture and worldwide distribution of FPGA development boards and Test and Measurement devices for both industry and education. Since our founding in 2000, Digilent has partnered with different leading semiconductor companies including Xilinx, Microchip, Analog Devices, ISSI and Texas Instruments to bring products with the latest embedded & electronics technology. Our expert team of engineers, combined with our manufacturing services and worldwide distribution has made us an ideal partner for several leading technology providers. We want to enable our partners to be successful through well designed, high quality and well manufactured hardware.