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 Effect Switch
Moderator: Benj
- JohnCrow
- Valued Contributor
- Posts: 1367
- Joined: Wed Sep 19, 2007 1:21 pm
- Location: Lincolnshire
- Has thanked: 364 times
- Been thanked: 716 times
Hall Effect Switch Part2
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.
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.
1 in 10 people understand binary, the other one doesn't !
-
- Posts: 157
- Joined: Sat Jan 22, 2011 10:39 pm
- Location: Michigan
- Has thanked: 6 times
- Been thanked: 27 times
- Contact:
Re: Hall Effect Switch
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
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
- JohnCrow
- Valued Contributor
- Posts: 1367
- Joined: Wed Sep 19, 2007 1:21 pm
- Location: Lincolnshire
- Has thanked: 364 times
- Been thanked: 716 times
Re: Hall Effect Switch
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.
Im sure you will find something suitable
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.
Im sure you will find something suitable
1 in 10 people understand binary, the other one doesn't !
-
- Posts: 157
- Joined: Sat Jan 22, 2011 10:39 pm
- Location: Michigan
- Has thanked: 6 times
- Been thanked: 27 times
- Contact:
Re: Hall Effect Switch
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
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