In this post Hall Effect Sensor Circuit with IC LM393 is used to detect magnetic field.
It gives output when a magnet comes near.
The module uses LM393 comparator to give digital output.
It is used in motor speed detection, position detection and security systems.
Circuit Working:

Parts List:
Component | Value | Quantity |
---|---|---|
Resistors | 1k 1/4 watt | 6 |
Potentiometer 10k | 1 | |
Capacitors | Ceramic 0.1μF | 2 |
Semiconductors | IC Comparator LM393 | 1 |
Any LED | 2 | |
Hall Effect Sensor Module | 1 | |
4 pin Connector | 1 |
The Hall sensor has three pins.
Pin 1 VCC, Pin 2 GND, Pin 3 OUT.
Sensor gives small voltage change when magnetic field is near.
This voltage is compared inside LM393 comparator.
The comparator compares sensor signal with reference set by 10k potentiometer.
If sensor signal is higher than reference then comparator output changes the state.
LED DO glows when magnet is detected.
Another LED PWR shows power supply.
Formulas:
Comparator output depends on input voltage difference.
Vout = High if Vin+ > Vin-
Vout = Low if Vin+ < Vin-
Reference voltage set by potentiometer is:
Vref = (R2 / (R1 + R2)) * Vcc
here,
- R1 and R2 are parts of potentiometer division.
For example with 10k pot and Vcc = 5V
Vref can be adjusted between 0V and 5V.
Output current for LED = (Vcc – Vf) / R
- Vcc is supply voltage for example 5V
- Vf is forward voltage drop of LED which is around 2V for red LED and 3V for white/blue LED
- R is series resistor for example 1k in diagram
- I is LED current in amperes A
So the resistor controls how much current flows through the LED.
How to Build:
To build a Hall Effect Sensor Circuit with IC LM393 follow the below mentioned steps:
- Assemble all the circuit parts as shown in diagram above.
- Hall Sensor Pin 1 VCC to +5V supply
- Hall Sensor Pin 2 GND to Ground
- Hall Sensor Pin 3 OUT goes to comparator input pin 5
- LM393 Pin 8 to VCC
- LM393 Pin 4 to Ground
- Pin 5 connected to Hall output
- Pin 6 connected to potentiometer reference
- Pin 7 comparator output connected to LED DO and module output pin
- Capacitors 0.1uF used for noise filter
- Resistors 1k used for current limiting to LEDs
- Connector with 7 pins: Pin 1 AO Analog Output, Pin 2 DO Digital Output, Pin 3 GND, Pin 4 VCC
Conclusion:
Hall Effect Sensor Circuit with IC LM393 is easy to use.
It detects magnet presence.
Output is digital and analog.
Sensitivity can be adjusted with potentiometer.
Circuit is useful for motor speed, magnetic switches and automation projects.
Leave a Reply