Saturday, January 10, 2026

3D Magnetic Flux Meter Using Arduino

ashwiniIn engineering, especially electronics, often the magnetic flux is required to be measured around a device. It also has several other applications such as detecting a speaker installed inside a device or locating a wire inside a wall or other areas. Traditional Digital Magnetic Flux Meters only give a 1-D reading and not of the entire surrounding XYZ axis. 


So today we will make a simple 3-D Digital Magnetic Flux Meter that gives us reading in all three dimensions. 

3D Magnetic Flux Meter Using Arduino

- Advertisement -

3D Magnetic Flux Meter Using Arduino

Bill of Material

3D Magnetic Flux Meter Using Arduino

- Advertisement -

Coding 

In the Arduino IDE, go to the Library Manager, search for LIS2DML library and install it. Next, search for U8G2 library and install it as well. Now you can begin the coding by including the above libraries for retrieving data from sensors and for displaying data on the OLED.

After that, create a setup function where we will need to initialize the I2C connection with the sensor and the OLED

3D Magnetic Flux Meter Using Arduino

Next, create a loop function, which will clear the display buffer and send a new buffer so that the display data is refreshed each time the loop runs.

3D Magnetic Flux Meter Using Arduino

Connection 

Connect the parts as described in the below connection table and diagram. 

Arduino  OLED and Sensor 
SCl SCL
SDA SDA
GND GND
5V VCC

 

3D Magnetic Flux Meter Using Arduino

Testing 

Power the device with a 3V battery. You are now ready to measure the magnetic flux in all three dimensions. The X-axis shows magnetic flux in X plane, Y-axis in Y-plane and Z-axis in Z-plane.

3D Magnetic Flux Meter Using Arduino

Code

Ashwini Sinha
Ashwini Sinha
A tech journalist at EFY, with hands-on expertise in electronics DIY. He has an extraordinary passion for AI, IoT, and electronics. Holder of two design records and two times winner of US-China Makers Award.

SHARE YOUR THOUGHTS & COMMENTS

EFY Prime

Unique DIY Projects

Truly Innovative Electronics

Electronics News

Latest DIY Videos

Electronics Components

Electronics Jobs

Calculators For Electronics