A3144 Hall Effect Switch introduction
About two weeks ago, I bought 10pcs of the A3144 (or at least a compatible variant) Hall Effect switch. Today, I’ve had a go at using one.
I hadn’t really looked at the datasheet properly so I was expecting the output to just go high when there’s a magnetic field nearby. So a magnetic field could increment a counter in an Arduino. As it turns out, the output pin is pulled low when activated and floats when not.
The datasheet even tells one what to do when using CMOS logic (which the ATMega328P (the chip the Arduino Uno uses) is).
So, with pull-up resistor (I used a 1.5k ) put between the supply and output pins, I was able to get the Arduino to register when a magnetic field came close to the switch.
I was even able to ditch the Arduino altogether – I wanted to demonstrate the switch using an LED and a way to demonstrate this easily on camera. Simply connecting an LED and series resistor (I re-used the 1.5k) between the output and the supply pins worked. With the magnetic field nearby, the LED lit up; with no field, the LED remained off. The Arduino was used just to tap the 5 volts from the computer.
There are other devices which are useful for switching on/off when a magnet is nearby, such device is a reed switch. This type of switch has moving parts which make or break contact due to a magnet pulling on the contacts and they are usually long, thin and fragile (long compared to the A3144). A great advantage of using a Hall Effect switch is no moving parts – it is a solid-state component. This means there’s nothing to break from constant use and it’s form factor is much much smaller and more convenient. The theory on the Hall effect is much too complicated for me to explain, so I’ll leave it to Wikipedia (link at top of post).
And that’s it for now.