Page 1 of 1

Hall Effect Switch

Posted: Sun Apr 08, 2012 12:11 pm
by JohnCrow
Dual Channel Hall Effect Switch Part 1

This simple project is based round the Melexis US1881 Hall Effect switch

It is a simple 3 pin device in a TSOT package (Thin Small Outline Transistor).
The simple connections are
Pin1 = 5V
Pin2 = Out
Pin3 = Ground

Pin 2 has a 10kΩ pull-up resistor to 5V
Each device has its own pull up, unlike for example the I2C bus.
A100nF capacitor is placed across the power rails and a separate 4n7 capacitor decouples each output to ground.

When a magnet is placed near the front side of the device it will change state and latch until the opposite magnetic pole is brought near to the device.

i.e. North pole will cause the device output to go high. It will remain in this state until a magnetic south pole is brought near the device.

Note
Turning off the power will result in the devices resetting to the off state.

The output is read by means of the ADC inputs

The example program uses floating point and displays the output voltage.
Output values will be dependant on the specific device but are approximately:

Off = 0.01 V
On = 0.49 V

The sensors have been placed so they can be switched either independently or simultaneously by placing the magnet between the devices.

The image shown below is using read as Integer on the ADC and not as a float as in the test program.
Hall Sensor Test - Float V1.fcf
(11 KiB) Downloaded 270 times
Full Test System
Full Test System
System.JPG (106.48 KiB) Viewed 4222 times
Dual Channel Hall Sensor
Dual Channel Hall Sensor
Hall Sensor.JPG (98.5 KiB) Viewed 4222 times

Hall Effect Switch Part2

Posted: Sun Apr 08, 2012 1:28 pm
by JohnCrow
This version uses read as INT on the adc input and switchs an LED on / off depending on input

North Pole = LED On
South Pole = LED Off

If a bar magnet is placed in front (or slightly above, the sensors, held with a non magnetic shaft, and rotated the outputs will pulse alternately.
System
System
System2.jpg (89.77 KiB) Viewed 4218 times
Hall Sensor Test - Int V1.fcf
(18 KiB) Downloaded 306 times

Re: Hall Effect Switch

Posted: Tue Apr 17, 2012 6:46 pm
by Bobw
John,
Anyway to make it so that it will not latch?
I need a home position sensor, I thought about using a hall sensor, but I know you normally have to reverse the pole of the magnet to reverse the state of the hall sensor.

Bob

Re: Hall Effect Switch

Posted: Tue Apr 17, 2012 7:32 pm
by JohnCrow
Hi Bob

The latching function is built into this device.
You can get non latching sensors just did a quick google and found this one. Looks even simpler to wire up than the one in my circuit.
Non Latch Hall.pdf
(38.88 KiB) Downloaded 356 times
Im sure you will find something suitable

Re: Hall Effect Switch

Posted: Tue Apr 17, 2012 10:41 pm
by Bobw
See,
Learn something new everyday, always thought hall sensors were of the latching type.
Will give it a look.
Digikey should love me this month.

Bob