Hall Effect Switch
Posted: Sun Apr 08, 2012 12:11 pm
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.
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.