10th Exp IOT

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Experiment Number: 10 Date:

Design a simple circuit to apply Hall effect sensor.

AIM:

To build circuits that use the Hall Effect sensor for detecting the availability of
Magnets, and transmit this content via Bluetooth / WiFi to a remote location using
Arduino and Blynk App.

DEMO EXPERIMENT:

To build a circuit that detects Magnets available using a Hall Sensor.

SETUP REQUIRED:

 Arduino Uno – 1 No.


 Hall Effect Sensor – 1 No.
 USB 2.0 Cable Type A/B
 Jumper Wires – As required
PROGRAM:

#define Hall_Sensor A0 //A0 used with analog output, D2 with digital output
#define Hall_Sensor_D 2

int Val1=0, Val2=0; //Here you can store both values, the Val2 can be
boolean

void setup()
{
Serial.begin(9600); pinMode(Hall_Sensor_D,INPUT);
pinMode(Hall_Sensor,INPUT);
}

void loop() {
Val1=analogRead(Hall_Sensor); // Read value and display on serial monitor
Serial.print(Val1);
Val2=digitalRead(Hall_Sensor_D);
Serial.print("\t");
Serial.println(Val2);
delay(2000);
}

CIRCUIT DIAGRAM:

Offline Mode: Hardware Circuit

PROCEDURE:

OFFLINE – Using Hardware

Place the Arduino Nano and breadboard on the table.


Connect the A0, GND, VCC and D0 pins of the Hall Effect Sensor to the A0,
GND, 5V and Pin2 of the Arduino board, respectively.
Next enter the Program in the Arduino IDE tool.
Make sure that the Port Connection is made, and the Arduino UNO is selected.
Next Press the Check Button in Arduino IDE, to check for errors.
Connect the USB 2.0 Cable Type A/B to the Arduino Board.
Now press the Compile button on the Arduino IDE.
Turn ON the Serial Monitor of the Arduino IDE.
When the Hall Sensor is placed near a particular magnet, the Digital output
value becomes 1. Similarly, when the sensor is moved away from the magnet,
the Digital output value becomes 0.
HARDWARE:

PROGRAM ON IDE:

LAB EXPERIMENT:
1. Consider that your house door is locked along with a magnet placed on the
door. When you are away from home you need to be aware of whether
someone has accessed the door without your permission.

TINKERCAD:
Rubrics for On-Lab work and Laboratory record

Criteria Obtained Marks Allotted Marks

Experimental Procedure 20

Execution of the program 20

Result 10

Lab Activity 50

Total 100

Result :
Thus with the help of knowledge of working of a hall effect sensor, circuits have been
constructed and implemented successfully.
RESULT:

Thus, with the help of knowledge of working of a Hall Effect Sensor, circuits
have been constructed and implemented successfully.
.

You might also like