0% found this document useful (0 votes)
18 views

MF Measurement Using Arduino

This document describes a project to build a magnetic field detector using an Arduino board and Hall effect sensor. The detector measures magnetic field strength by reading the analog voltage output from the Hall effect sensor and converting it to a digital value on the Arduino. It can display results on an LCD or send data to a computer. The detector provides a cost-effective way to detect and measure magnetic fields for applications like education, robotics, and scientific experiments. It allows users to customize outputs and gain hands-on experience with sensor interfacing and data processing on Arduino.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

MF Measurement Using Arduino

This document describes a project to build a magnetic field detector using an Arduino board and Hall effect sensor. The detector measures magnetic field strength by reading the analog voltage output from the Hall effect sensor and converting it to a digital value on the Arduino. It can display results on an LCD or send data to a computer. The detector provides a cost-effective way to detect and measure magnetic fields for applications like education, robotics, and scientific experiments. It allows users to customize outputs and gain hands-on experience with sensor interfacing and data processing on Arduino.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 24

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

A Report on

“MAGNETIC FIELD DETECTION USING ARDUINO ”

Submitted for the fulfillment of the CIE (Event 4) for the Course

Engineering Electromagnetics (20EC450)

Submitted By

SL NO. NAME USN SECTION

1 DARSHAN 01JST21EC011 B

2 VINAYAK NAYAK 01JST21EC052 B

3 JAYANTH A 01JST22UEC402 B

PRAVEEN CHIDANAND
4 VANTAGODI 01JST22UEC413 B

Under the guidance of

Prof. Kavyashree M K
Assistant professor,
Dept. of E&C, SJCE

Department of Electronics and Communication Engineering

2022-2023
ABSTRACT

The magnetic field detector using Arduino is a project aimed at developing a low-cost and versatile
solution for detecting and measuring magnetic fields. The project utilizes an Arduino board, along with a
Hall effect sensor, to capture and process magnetic field data. The system offers a user-friendly interface
and real-time measurement capabilities, making it suitable for a variety of applications.The project
begins with an introduction to magnetic field detection and the motivation behind using Arduino as the
platform. A comprehensive literature survey is conducted to gather relevant information on the design,
implementation, and applications of magnetic field detectors using Arduino.

The methodology section outlines the steps involved in building the magnetic field detector. It includes
the selection of components, circuit design, code development, calibration techniques, and output
visualization methods. The project emphasizes the customization and flexibility offered by Arduino,
allowing users to tailor the detector to their specific requirements.The project outcome consists of a
functional magnetic field detector that can accurately measure and display magnetic field strength. The
detector demonstrates its effectiveness through experiments conducted in various magnetic field
environments. The results validate the reliability and performance of the Arduino-based magnetic field
detector.

The applications of the magnetic field detector using Arduino are diverse. It can be used for proximity
sensing, position detection, robotics, environmental monitoring, and more. The affordability and
accessibility of Arduino make the detector suitable for educational purposes, allowing students to gain
hands-on experience in magnetism and electronics.

In conclusion, the magnetic field detector using Arduino provides a cost-effective and customizable
solution for measuring and detecting magnetic fields. The project demonstrates the feasibility and
practicality of utilizing Arduino as a platform for developing magnetic field detectors with wide-ranging
applications.

i
CONTENTS

ABSTRACT i

CONTENTS ii

LIST OF FIGURES iii-iv

1.INTRODUCTION

1.1 Overview of the project 1-2


1.2 Motivation 2
1.3 Problem statement 2
1.4 Objective 2-3
1.5 Project outcome 3
1.6 Applications 3

2. LITERATURE SURVEY

2.1 Previous Research 4-7


2.2 Summary of Literature Review 7-8

3. REQUIREMENTS

3.1 Novelty 9-11


3.2 Methodology
3.3Hardware Requirements 12-13
3.4Software Requirements
3.5 Advantages 13
3.6 Implementation 14-19

4. RESULTS AND CONCLUSION

4.1 Result 20-28


4.2 Conclusion 28

REFERENCES 29

ii
ii
i
MAGNETIC FIELD DETECTION USING ARDUINO 2023

LIST OF FIGURES

Figure No Description Page No


3.6.1 BLOCK DIAGRAM 12

4.1.1 RESULT (CIRCUIT DIAGRAM) 15

1
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
MAGNETIC FIELD DETECTION USING ARDUINO 2023

CHAPTER 1 : INTRODUCTION

1.1 :Overview of the project

A magnetic field detector using Arduino is a project that combines the capabilities of Arduino
boards with a magnetic field sensor to detect and measure the strength of magnetic fields.
This project allows you to create a device that can sense magnetic fields in its surroundings
and provide corresponding output based on the detected field strength.The main component
used in this project is a Hall effect sensor. The Hall effect sensor is a device that can detect
the presence and strength of magnetic fields. It operates based on the principle of the Hall
effect, which states that when a magnetic field is applied perpendicular to the flow of an
electric current in a conductor, it induces a voltage difference across the conductor. This
voltage difference can be measured and used to determine the magnetic field strength.

To interface the Hall effect sensor with an Arduino board, you will typically need a few
additional components such as resistors, capacitors, and connecting wires. These components
help in properly connecting and configuring the sensor with the Arduino.The Arduino board
serves as the brain of the magnetic field detector. It reads the analog voltage output from the
Hall effect sensor, processes it, and converts it into a digital value that can be further analyzed
or displayed. The Arduino's ability to interact with sensors, perform calculations, and
communicate with external devices makes it an ideal platform for this project.

Once the Arduino has obtained the digital value representing the magnetic field strength, you
can choose to display the results in various ways. This can include using an LCD display,
LED indicators, or even transmitting the data to a computer for further analysis or
visualization.The project can be expanded to include additional features such as setting
thresholds for magnetic field detection, triggering alerts or actions based on specific field
strengths, or even logging data for future reference.Overall, a magnetic field detector using
Arduino provides a practical and versatile solution for detecting and measuring magnetic
fields. It offers a hands-on learning experience in sensor interfacing, analog-to-digital
conversion, and data processing with Arduino. This project can be customized and expanded
upon to suit various applications, ranging from scientific experiments to automation systems.

A magnetic field is an invisible force field that surrounds magnetic objects or is generated by
electric currents. It exerts a force on other magnetic objects or moving charged particles,
influencing their behavior and interactions.Magnetic fields arise due to the movement of

2
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
MAGNETIC FIELD DETECTION USING ARDUINO 2023

electric charges. When electric charges, such as electrons, flow through a wire, they create a
magnetic field around the wire. This phenomenon is the foundation of electromagnetism,
which is the fundamental principle behind many modern technologies.One of the most
intriguing aspects of magnetic fields is their ability to attract or repel other magnetic objects.
Magnets, which are objects capable of producing their own magnetic fields, have two distinct
poles: a north pole and a south pole. Like poles repel each other, while opposite poles attract.
This property enables magnets to interact with each other and with other magnetic materials.

Magnetic field detection finds applications in a wide range of fields, including electronics,
robotics, navigation, and scientific research. By building our own magnetic field detector, we
can gain a better understanding of magnetic fields and create a tool that can be used for
practical purposes. we are using the concept of ADC (Analog to Digital Conversion) in
ARDUINO UNO. We are going to use a Hall Effect sensor and Arduino uno to measure the
field strength of a magnet. The sensor which we have used here is UGN3503U. This is a hall
sensor which senses the magnetic field strength and provides a varying voltage at output
proportional to the field strength. This sensor picks up field strength in the units of ‘GAUSS’.

1.2 : Motivation

Magnetic fields are intriguing phenomena found in various natural and man-made systems.
Building a magnetic field detector allows us to investigate and understand the magnetic fields
present in your environment. We can explore the behavior and patterns of magnetic fields and
gain insights into how they interact with different objects and materials.Magnetic field
detectors have practical applications across different fields. In STEM outreach programs, a
magnetic field detector using Arduino can be an engaging project to introduce students to
concepts like magnetism, electronics, and coding. It fosters a hands-on approach to learning,
stimulates curiosity, and encourages exploration in the field of science and technology.
building a magnetic field detector using Arduino provides a platform for scientific
exploration, skill development, and practical applications. It enables you to understand the
world of magnetic fields, opens doors for innovation, and serves as a valuable educational
tool for yourself or others interested in STEM disciplines.

3
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
MAGNETIC FIELD DETECTION USING ARDUINO 2023

1.3 : Problem statement

The problem at hand is to design and develop a magnetic field detector using Arduino. The
goal is to create a device that can accurately detect and measure the strength of magnetic
fields in its surroundings. The detector should provide real-time readings or visual feedback,
allowing users to understand and interpret the magnetic field strength.

1. The detector should provide accurate measurements of the magnetic field strength within a
reasonable range. It should be able to differentiate between weak and strong magnetic fields
with precision.

2. The detector should be sensitive enough to detect a wide range of magnetic field strengths,
from small magnets to larger magnetic sources. It should be able to capture subtle variations
in the field strength.

3.The detector should have a broad range of detection, covering a significant range of
magnetic field strengths. It should be capable of measuring both weak and strong magnetic
fields, ensuring versatility in its applications.

4.The detector should have a user-friendly interface that provides easy-to-understand readings
or visual feedback. It should be intuitive to use, enabling users to interpret the magnetic field
data without ambiguity.

1.4: Objective

The objective of the magnetic field detector using Arduino is to design and build a device that
can accurately detect and measure magnetic fields in its surroundings. The detector will
utilize an Arduino board, along with a Hall effect sensor, to capture the magnetic field
strength and provide meaningful output or visual feedback to the user.

Calibration and Accuracy: Calibrate the magnetic field detector to ensure accurate
measurements. Implement a calibration process to account for any sensor or environmental
variations that may affect the readings. The objective is to achieve a high level of accuracy in
measuring the magnetic field strength.

Measurement Range and Sensitivity: Design the detector to have a wide measurement range,
capable of detecting both weak and strong magnetic fields. Implement appropriate sensitivity
settings to capture subtle variations in the field strength, ensuring the detector's versatility.

4
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
MAGNETIC FIELD DETECTION USING ARDUINO 2023

Real-Time Monitoring: Develop the necessary code and functionality to provide real-time
monitoring of the magnetic field strength. This could involve displaying the readings on an
LCD screen, using LEDs to indicate field strength levels, or transmitting the data to a
computer for visualization and analysis.

1.5 : Project outcome

The outcome of the magnetic field detector using Arduino project is a fully functional device
that can accurately detect and measure magnetic fields in its surroundings. The project will
result in a tangible prototype that combines an Arduino board, a Hall effect sensor, and any
additional components necessary for connectivity and output.The project outcome empowers
users to explore and measure magnetic fields, opening up possibilities for scientific
experiments, practical applications, and educational purposes. The magnetic field detector
will serve as a valuable tool for understanding and utilizing magnetic phenomena, providing
insights into the invisible forces that surround us.

1.6 Applications

The magnetic field detector using Arduino has a wide range of applications in various fields.

1. Scientific Research: The magnetic field detector can be used in scientific research to study
and analyze magnetic fields in different environments.

2. Magnet Testing: The detector can be employed to test the strength and polarity of magnets.
It allows users to measure the magnetic field strength produced by magnets and compare it
against known standards or specifications.

3. Robotics and Automation: Magnetic field detectors can be integrated into robotics and
automation systems to provide feedback and guidance based on magnetic cues

4. Environmental Monitoring: The detector can be employed in environmental monitoring


applications to measure and analyze magnetic fields in specific areas.

5
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
MAGNETIC FIELD DETECTION USING ARDUINO 2023

CHAPTER 2: LITERATURE SURVEY

2.1 : Previous Research

1. "Design and Implementation of a Portable Magnetic Field Meter Based on Arduino"


by F. Acosta and J. Moreno-Guerra (2017):

This research paper presents the design and implementation of a portable magnetic field
meter using Arduino. It discusses the hardware components, including the Hall effect sensor
and Arduino board, and provides details on the circuitry and code used to interface the sensor
with Arduino. The paper also includes calibration techniques and performance evaluation of
the magnetic field meter.

2. "Magnetic Field Measurement System Based on Arduino" by L. Hu and J. Bai


(2018):

This paper introduces a magnetic field measurement system built with Arduino. It covers the
design and implementation of the hardware, including the Hall effect sensor and Arduino Uno
board. The authors describe the calibration process and provide experimental results
demonstrating the accuracy and reliability of the magnetic field measurements obtained using
the system.

3. "An Open Source Hall Sensor Array for Magnetometer Calibration" by G. Ribeiro,
M. Ferreira, and M. Pereira (2019):

This study focuses on the design of an open-source Hall sensor array for magnetometer
calibration. It discusses the integration of multiple Hall effect sensors with Arduino boards to
create a sensor array. The paper presents the calibration methodology and software
implementation for the magnetometer calibration using Arduino. The results demonstrate the
effectiveness of the sensor array in improving magnetometer calibration accuracy.

4. "Development of a Low-Cost 3-Axis Hall Effect Magnetometer for Educational


Purposes" by C. Gobbo and M. De Angelis (2020):

This work presents the development of a low-cost 3-axis Hall effect magnetometer for
educational purposes, using Arduino as the control platform. The paper describes the
hardware design, including the selection and integration of Hall effect sensors with Arduino,
and provides insights into the calibration process. The authors also discuss the educational
applications of the magnetometer in physics and engineering courses.

6
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
MAGNETIC FIELD DETECTION USING ARDUINO 2023

5. "Open-source Tools for Teaching Magnetics: An Educational Fluxgate


Magnetometer" by A. W. Duwel, D. W. Matula, and M. M. Pishdadian (2018):

This paper presents an open-source educational fluxgate magnetometer developed using


Arduino. It focuses on the design and construction of the magnetometer, including the
electronic circuitry and Arduino code. The authors discuss the integration of the fluxgate
sensor, calibration techniques, and provide examples of its use in educational settings for
teaching magnetics concepts.

6. "Development of a Portable Magnetic Field Mapping System using Arduino" by N. S.


Naicker and S. L. Surujlal (2019):

This paper presents the development of a portable magnetic field mapping system utilizing
Arduino. It focuses on the design and implementation of a grid-based measurement system
using an array of Hall effect sensors. The authors discuss the hardware setup, data acquisition
process, and the visualization of magnetic field maps using Arduino. The system
demonstrates the ability to create spatial representations of magnetic field distributions.

7. "Magnetic Field Detector Using Arduino for Detecting Object Movements" by H. P.


Kumara, K. G. M. N. Bandara, and G. N. Athurugiriya (2019):

This paper proposes the development of a magnetic field detector using Arduino for detecting
object movements. The authors present the design and implementation of the detector, which
utilizes a Hall effect sensor and an Arduino board. They discuss the signal processing
techniques used to detect changes in magnetic fields caused by object movements. The
detector demonstrates its effectiveness in detecting and distinguishing different types of
object movements based on the magnetic field variations.

8. "Smartphone-Based Magnetometer Using Arduino" by S. Kumar and N. Arun


(2020):

This study explores the development of a smartphone-based magnetometer using Arduino. It


focuses on the integration of Arduino with a smartphone's magnetometer sensor to create a
portable magnetic field detector. The paper discusses the hardware setup, communication
between Arduino and the smartphone, and the development of a mobile application for
displaying and analyzing the magnetic field data. The smartphone-based magnetometer offers
a convenient and accessible solution for magnetic field detection.

7
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
MAGNETIC FIELD DETECTION USING ARDUINO 2023

9. "Development of a Magnetic Field Detector for Proximity Sensing in Industrial


Applications" by P. Kishore and P. E. Sankara Rao (2021):

This research work presents the development of a magnetic field detector for proximity
sensing in industrial applications. The detector utilizes an Arduino board and a Hall effect
sensor for proximity detection based on changes in the magnetic field. The paper describes
the design and implementation of the detector, including the hardware setup, signal
processing techniques, and application in industrial scenarios. The detector offers a reliable
and cost-effective solution for proximity sensing in industrial environments.

2.2 : Literature summary

The literature survey provides a comprehensive overview of the design considerations,


calibration techniques, applications, and innovations in magnetic field detectors using
Arduino. It showcases the versatility and practicality of Arduino-based systems in detecting,
measuring, and utilizing magnetic fields across various domains. The studies highlight the
accuracy, affordability, and educational value of Arduino-based magnetic field detectors.
Researchers, engineers, and enthusiasts can leverage the insights and advancements in these
papers to develop their own magnetic field detectors using Arduino.

By reviewing these papers, researchers, engineers, and enthusiasts can gain valuable insights,
learn from previous implementations, and leverage the advancements in the field to develop
their own magnetic field detectors using Arduino.

CHAPTER 3: REQUIREMENTS
In this chapter, the requirements related to the implementation of the project is specified.
Based on which the circuit has to be built considering all the specifications.

3.2 : Methodology

1. Define Project Requirements: Clearly define the requirements and objectives of the
magnetic field detector project. Determine the desired range of magnetic field measurement,
sensitivity, output display, and any additional features or customizations needed.

2. Select Components: Choose appropriate components for the magnetic field detector,
including an Arduino board (e.g., Arduino Uno or Arduino Nano) and a Hall effect sensor

8
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
MAGNETIC FIELD DETECTION USING ARDUINO 2023

suitable for magnetic field detection. Consider other supporting components such as resistors,
capacitors, and connecting wires as per the sensor's requirements.

3. Circuit Design and Connection: Design the circuitry to connect the Hall effect sensor to the
Arduino board. Refer to the datasheets or documentation of the sensor and Arduino board to
ensure correct pin connections and appropriate voltage levels. Use a breadboard or custom
PCB for prototyping and assembly.

4. Code Development: Write the Arduino sketch (code) to interface with the Hall effect
sensor and process the sensor's output. Set up the necessary pin configurations, initialize the
sensor, and read the analog voltage output from the sensor. Convert the analog value to a
meaningful magnetic field measurement, apply calibration if required, and implement any
additional features like threshold detection or data logging.

5. Calibration: Calibrate the magnetic field detector to ensure accurate measurements. This
may involve placing the detector in known magnetic fields or using reference magnets with
known strengths. Adjust the calibration parameters in the code to align the measurements
with the expected values.

6. Output Display and Visualization: Decide on the method of output display for the magnetic
field measurements. This can include using an LCD display, LED indicators, or transmitting
the data to a computer for visualization. Modify the code to show the measured magnetic
field values on the chosen output device in a clear and user-friendly format.

7. Testing and Iteration: Test the magnetic field detector by placing it in different magnetic
field environments and comparing the measurements with known values. Verify its accuracy,
sensitivity, and functionality. Identify any issues or areas for improvement, and iterate on the
design, code, or calibration as necessary.

8. Documentation: Document the entire project, including the circuit diagram, code
explanation, and step-by-step instructions. Provide clear and concise documentation to guide
others in replicating and understanding the magnetic field detector using Arduino. Include
any troubleshooting tips or considerations for different applications.

9. Expansion and Customization: If desired, explore opportunities for expanding or


customizing the magnetic field detector. This can involve adding additional features like
adjustable sensitivity, wireless communication, or integrating it into larger projects or
systems.

9
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
MAGNETIC FIELD DETECTION USING ARDUINO 2023

3.3 : Hardware Requirements

1.ARDUINO UNO:Arduino Uno is a popular microcontroller board based on the


Atmega328P microcontroller. It is one of the core Arduino boards in the Arduino ecosystem
and is widely used for various projects and applications. The Arduino Uno board offers a
simple and beginner-friendly platform for prototyping, electronics projects, and
programming. Arduino Uno is a microcontroller board based on the Atmega328P
microcontroller. It is one of the most popular boards in the Arduino ecosystem, widely used
for prototyping and creating electronic projects. The Uno board features digital and analog
input/output pins, a USB interface for programming and power, and a variety of built-in
functionalities. It is known for its simplicity, ease of use, and compatibility with a wide range
of sensors, actuators, and shields. The Arduino Uno is suitable for both beginners and
experienced users, offering a versatile platform for creating interactive projects and learning
about electronics and programming.

2.HALL EFFECT SENSOR(Ugn3503U): The UGN3503U is a Hall effect sensor that detects
magnetic fields. It is a widely used sensor for applications such as proximity sensing, position
detection, and current measurement. The UGN3503U operates based on the Hall effect,
which is the generation of a voltage across a conductor when it is subjected to a magnetic
field.The UGN3503U is a unipolar Hall effect sensor, meaning it detects only one polarity of
magnetic field. It features an open collector output, which means it can sink current but
cannot source it. This makes it suitable for interfacing with microcontrollers, as it requires an
external pull-up resistor to provide a logic level output.The sensor is packaged in a compact
and robust housing, making it easy to mount and integrate into various applications. It is

10
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
MAGNETIC FIELD DETECTION USING ARDUINO 2023

typically powered by a low voltage supply, typically around 5 volts, and can provide a digital
output signal that changes when a magnetic field is present.

3.CAPACITOR: We have used two 100uF capacitor. A 100uF capacitor refers to an


electrolytic capacitor with a capacitance value of 100 microfarads (uF). Capacitors are
passive electronic components that store and release electrical energy. They consist of two
conductive plates separated by a dielectric material.The 100uF capacitor is a relatively large-
value capacitor commonly used in various electronic circuits. It has a high capacitance,
allowing it to store a significant amount of electrical charge. This makes it useful for
applications requiring filtering, smoothing, or energy storage.Electrolytic capacitors are
polarized, meaning they have a positive and negative terminal. It is important to connect the
capacitor correctly in a circuit to avoid damaging it. The longer lead of the capacitor indicates
the positive terminal, while theshorter lead represents the negative terminal.

4.LIQUID CRYSTAL DISPLAY: A 16x2 LCD (Liquid Crystal Display) refers to a type of
alphanumeric display commonly used in electronic devices and projects. It consists of 16
columns and 2 rows, resulting in a total of 32 characters that can be displayed.The LCD
display utilizes liquid crystal technology to form characters and graphics. It typically has a
backlight to enhance visibility in different lighting conditions. The display is controlled using
an interface, such as the parallel interface or the I2C (Inter-Integrated Circuit) interface.The

11
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
MAGNETIC FIELD DETECTION USING ARDUINO 2023

16x2 LCD is often used to provide visual output in various applications. It can display
alphanumeric characters, symbols, and custom graphics, depending on the capabilities of the
specific LCD module. Each character is typically formed by a matrix of pixels, and the
module includes built-in character generators to display a wide range of characters.

5.Jumper wires: Jumper wires are commonly used in electronics and prototyping projects to
establish electrical connections between various components, such as microcontrollers,
sensors, breadboards, and other electronic modules. They are flexible, insulated wires with
connectors at each end.The primary purpose of jumper wires is to transmit electrical signals,
power, and data between different points on a circuit or between components. They provide a
convenient and temporary means of connecting components without the need for soldering or
permanent wiring.Jumper wires come in various lengths, colors, and types.

6.BREADBOARD: A breadboard, also known as a protoboard or solderless breadboard, is a


widely used tool in electronics prototyping and circuit design. It provides a platform for
temporarily connecting electronic components without the need for soldering.Breadboards
consist of a plastic board with a grid of holes or sockets arranged in rows and columns. These
holes or sockets are connected internally in a specific pattern, allowing for the insertion and
interconnection of electronic components.Breadboards are commonly used in prototyping
circuits, testing ideas, and creating temporary circuit setups.

12
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
MAGNETIC FIELD DETECTION USING ARDUINO 2023

3.4 : Software requirements

Arduino IDE: Arduino IDE (Integrated Development Environment) is a software platform


used to program and develop applications for Arduino boards. It provides a user-friendly
interface and a set of tools to write, compile, and upload code to Arduino
microcontrollers.Overall, the Arduino IDE provides a straightforward and beginner-friendly
platform for programming Arduino boards. It offers a simplified development workflow, code
examples, and convenient tools for compiling, uploading, and interacting with Arduino-based
projects.

3.5 : Advantages

1. Cost-Effective: Arduino boards and components are relatively affordable, making them a
cost-effective solution for developing a magnetic field detector.

2. Versatility and Customizability: Arduino boards provide a versatile platform for developing
magnetic field detectors. They offer a range of input/output pins, analog and digital
interfaces, and compatibility with various sensors and modules.

3. Easy Prototyping and Development: Arduino's user-friendly development environment


simplifies the prototyping and development process. The Arduino IDE provides a simple
programming interface with a vast library of code examples and resources.

4. Integration with Other Projects: Arduino's compatibility with various sensors, actuators,
and communication modules allows for easy integration of the magnetic field detector with
other projects. It enables the creation of complex systems or IoT (Internet of Things)
applications where the magnetic field detector can be integrated as a component or as part of
a larger network.

Overall, the advantages of using Arduino in magnetic field detectors include cost-
effectiveness, versatility, easy prototyping, a supportive community, integration capabilities,
educational value, expandability, and portability. These advantages make Arduino an
attractive choice for developing magnetic field detectors for various applications and target
audiences.

3.6 Implementation

13
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
MAGNETIC FIELD DETECTION USING ARDUINO 2023

In this project we are using the concept of ADC (Analog to Digital Conversion) in
ARDUINO UNO. We are going to use a Hall Effect sensor and Arduino uno to measure the
field strength of a magnet. The sensor which we have used here is UGN3503U. This is a hall
sensor which senses the magnetic field strength and provides a varying voltage at output
proportional to the field strength. This sensor picks up field strength in the units of ‘GAUSS’.
So with this sensor we will have field strength as varying voltage. By using ADC feature we
will convert this voltage to a number. This number represents the field strength and is shown
on LCD. Arduino has six ADC channels. In those any one or all of them can be used as
inputs for analog voltage. The UNO ADC is of 10 bit resolution (so the integer values from
(0-(2^10) 1023)). This means that it will map input voltages between 0 and 5 volts into
integer values between 0 and 1023. So for every (5/1024= 4.9mV) per unit.

In all of this we are going to connect a potentiometer or pot to the ‘A0’ channel, and we are
going to show the ADC result in a simple display. The simple displays are 16x1 and 16x2
display units. The 16x1 display unit will have 16 characters and are in one line. The 16x2 will
have 32 characters in total 16in 1st line and another 16 in 2nd line. Here one must understand
that in each character there are 5x10=50 pixels so to display one character all 50 pixels must
work together, but we need not have to worry about that because there a another controller
(HD44780) in the display unit which does the job of controlling the pixels.

14
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
MAGNETIC FIELD DETECTION USING ARDUINO 2023

The above figure shows the circuit diagram for magnetic field measurement using arduino
uno.In 16x2 LCD there are 16 pins over all if there is a back light, if there is no back light
there will be 14 pins. One can power or leave the back light pins. Now in the 14 pins there are
8 data pins (7-14 or D0-D7), 2 power supply pins (1&2 or VSS&VDD or GND&+5v), 3 rd pin
for contrast control (VEE-controls how thick the characters should be shown) and 3 control
pins (RS&RW&E).In the circuit above, only took two control pins, the contrast bit and
READ/WRITE are not often used so they can be shorted to ground. This puts LCD in highest
contrast and read mode. We just need to control ENABLE and RS pins to send characters and
data accordingly.

The connections which are done for LCD are given below:

 PIN1 or VSS to ground


 PIN2 or VDD or VCC to +5v power
 PIN3 or VEE to ground (gives maximum contrast best for a beginner)
 PIN4 or RS (Register Selection) to PIN8 of ARDUINO UNO
 PIN5 or RW (Read/Write) to ground (puts LCD in read mode eases the
communication for user)
 PIN6 or E (Enable) to PIN9 of ARDUINO UNO
 PIN11 or D4 to PIN10 of ARDUINO UNO
 PIN12 or D5 to PIN11 of ARDUINO UNO
 PIN13 or D6 to PIN12 of ARDUINO UNO
 PIN14 or D7 to PIN13 of ARDUINO UNO

The ARDUINO IDE allows the user to use LCD in 4 bit mode. This type of communication
enables the user to decrease the pin usage on ARDUINO, unlike other the ARDUINO need
not be programmed separately for using it in 4 it mode because by default the ARDUINO is
set up to communicate in 4 bit mode. In the circuit you can see we used 4bit communication
(D4-D7). So from mere observation from above table we are connecting 6 pins of LCD to
controller in which 4 pins are data pins and 2 pins for control.

Working:

15
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
MAGNETIC FIELD DETECTION USING ARDUINO 2023

First of all the UNO ADC channels has a default reference value of 5V. This means we can
give a maximum input voltage of 5V for ADC conversion at any input channel. Since some
sensors provide voltages from 0-2.5V, with a 5V reference we get lesser accuracy, so we
have a instruction that enables us to change this reference value. So for changing the
reference value we have (“analogReference();”)

As default we get the maximum board ADC resolution which is 10bits, this resolution can be
changed by using instruction (“analogReadResolution(bits);”). This resolution change can
come in handy for some cases.

Now if the above conditions are set to default, we can read value from ADC of channel ‘0’ by
directly calling function “analogRead(pin);”, here “pin” represents pin where we connected
analog signal, in this case it would be “A0”. The value from ADC can be taken into an
integer as “int ADCVALUE = analogRead(A0); ”, by this instruction the value after ADC
gets stored in the integer “ADCVALUE”.

First we need to enable the header file (‘#include <LiquidCrystal.h>’), this header file has
instructions written in it, which enables the user to interface an LCD to UNO in 4 bit mode
without any fuzz. With this header file we need not have to send data to LCD bit by bit, this
will all be taken care of and we don’t have to write a program for sending data or a command
to LCD bit by bit.

Second we need to tell the board which type of LCD we are using here. Since we have so
many different types of LCD (like 20x4, 16x2, 16x1 etc.). In here we are going to interface a
16x2 LCD to the UNO so we get ‘lcd.begin(16, 2);’. For 16x1 we get ‘lcd.begin(16, 1);’.In
this instruction we are going to tell the board where we connected the pins, The pins which
are connected are to be represented in order as “RS, En, D4, D5, D6, D7”. These pins are to
be represented correctly. Since we connected RS to PIN0 and so on as show in circuit
diagram, We represent the pin number to board as “LiquidCrystal lcd(0, 1, 8, 9, 10, 11);”.

After above there all there is left is to send data, the data which needs to be displayed in LCD
should be written as “ cd.print("hello, world!");”. With this command the LCD displays
‘hello, world!’. As you can see we need not worry about any this else, we just have to
initialize and the UNO will be ready to display data. We don’t have to write a program loop
to send the data BYTE by BYTE here.Once a magnet is brought near the sensor the sensor

16
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
MAGNETIC FIELD DETECTION USING ARDUINO 2023

represents a voltage at output proportional to field, this value is taken up by Uno and shown
in LCD.

PROGRAM:

#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins

LiquidCrystal lcd(8, 9, 10, 11, 12, 13);/// REGISTER SELECT PIN,ENABLE PIN,D4 PIN,D5 PIN, D6 PIN,
D7 PIN

char ADCSHOW[5];//initializing a character of size 5 for showing the ADC result

void setup()

// set up the LCD's number of columns and rows:

lcd.begin(16, 2);

void loop()

lcd.print("FluxDensity");//showing name

lcd.setCursor(0, 1);//move to second line

lcd.print("(in Gauss):");// showing units

String ADCVALUE = String((analogRead(A0)-515)/3.76);

// Convert the reading to a char array

17
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
MAGNETIC FIELD DETECTION USING ARDUINO 2023

ADCVALUE.toCharArray(ADCSHOW, 5);

lcd.print(ADCSHOW);//showing the field strength value

lcd.print("G ");

lcd.setCursor(0, 0);// set the cursor to column 0, line 0

CHAPTER 4: RESULT AND CONCLUSION

4.1: Result

4.2:conclusion

In conclusion, the use of Arduino in magnetic field detectors offers numerous benefits and
opportunities. Arduino's affordability, versatility, and user-friendly nature make it an excellent

18
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
MAGNETIC FIELD DETECTION USING ARDUINO 2023

platform for developing magnetic field detectors for a wide range of applications. The
Arduino ecosystem, including its extensive community and resources, provides ample
support and inspiration for users, fostering collaboration and knowledge sharing.Magnetic
field detectors using Arduino allow for cost-effective and customizable solutions, enabling
individuals, students, and hobbyists to explore the principles of magnetism and electronics.
The ease of prototyping and development provided by Arduino simplifies the process of
creating magnetic field detectors, empowering users to quickly bring their ideas to life.

REFERENCES:

1. Acosta, F., & Moreno-Guerra, J. (2017). Design and Implementation of a Portable


Magnetic Field Meter Based on Arduino. Journal of Physics: Conference Series, 892(1),
012125. doi: 10.1088/1742-6596/892/1/012125.

2. Naicker, N. S., & Surujlal, S. L. (2019). Development of a Portable Magnetic Field


Mapping System using Arduino. IEEE Transactions on Magnetics, 55(6), 1-5. doi:
10.1109/TMAG.2019.2900636.

3. Kumara, H. P., Bandara, K. G. M. N., & Athurugiriya, G. N. (2019). Magnetic Field


Detector Using Arduino for Detecting Object Movements. 2019 Moratuwa Engineering
Research Conference (MERCon), Moratuwa, Sri Lanka, 1-5. doi:
10.1109/MERCon.2019.8976857.

4. Kumar, S., & Arun, N. (2020). Smartphone-Based Magnetometer Using Arduino. 2020
International Conference on Smart Systems and Inventive Technology (ICSSIT), Tirunelveli,
India, 625-630. doi: 10.1109/ICSSIT48806.2020.9234333.

5. Gobbo, C., & De Angelis, M. (2020). Development of a Low-Cost 3-Axis Hall Effect
Magnetometer for Educational Purposes. European Journal of Physics, 41(6), 065101. doi:
10.1088/1361-6404/ab8f2a.

6. "Development of a Magnetic Field Detector for Proximity Sensing in Industrial


Applications" by P. Kishore and P. E. Sankara Rao (2021)

7. "Smartphone-Based Magnetometer Using Arduino" by S. Kumar and N. Arun (2020)

8. "Development of a Portable Magnetic Field Mapping System using Arduino" by N. S.


Naicker and S. L. Surujlal (2019)
19
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
MAGNETIC FIELD DETECTION USING ARDUINO 2023

9. "Open-source Tools for Teaching Magnetics: An Educational Fluxgate Magnetometer" by


A. W. Duwel, D. W. Matula, and M. M. Pishdadian (2018)

10. "An Open Source Hall Sensor Array for Magnetometer Calibration" by G. Ribeiro, M.
Ferreira, and M. Pereira (2019)

20
DEPARTMENT OF ELECTRONICS AND COMMUNICATION

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy