Hall Effect Sensor A3144 with Arduino

Hi everyone,

I am trying to build a Persistence Of Vision (POV) rotating device and want to use A3144 hall effect sensor to detect the start of rotational cycle. Unfortunately I haven't been able to use it successfully. I am not sure what I am doing wrong. Here are the things I have done:

  • With shorter side facing towards me, left pin has 5V, middle pin ground and right pin connected to pin 2
  • A pull up resistor (tried both 10k and 1k ohms) between left pin and right pin
  • I have a sketch that reads pin 2 and if it is high makes the LED pin 13 HIGH and if pin2 is LOW it makes LED pin 13 LOW.

No matter how many magnets I use or how close I bring them to the sensor, the LED pin 13 continues to be HIGH/ON (I believe the pull up on pin 2 between left and right pin is bringing pin 2 to HIGH which is the state of no magnetic presence).

I have 4 of those sensors and all of them behave the same. Either all of them are bad, or I am not doing something right.

Am I missing something? Any help will be appreciated.

Thanks.

You can grab the Hall code from this project and test:

Ray

mrburnette:
You can grab the Hall code from this project and test:

http://www.instructables.com/id/Arduino-Door-event-logger/?ALLSTEPS

Ray

Thanks mrbrunette, for the reply. I already have the code written. And it is not the code I know since I also measured the voltage at the output pin, and I even hooked up an LED directly to the output pin and ground, and the output voltage just stays stuck at HIGH. I think the sensor is bad, but I had like 3 sensors and I tried all of them, and all behaved the same. Maybe a bad batch.

And it is not the code I know since I also measured the voltage at the output pin, and I even hooked up an LED directly to the output pin and ground, and the output voltage just stays stuck at HIGH. I think the sensor is bad, but I had like 3 sensors and I tried all of them, and all behaved the same. Maybe a bad batch.

Following your idea of changing sensors to test hardware, changing software is also a good way to test. Whenever possible, try a sketch provided by the hardware manufacturer or the distributor (Sparkfun, Adafruit, etc.). Otherwise, extract enough code from a working sketch to try using the sensor differently.

Maybes a bad batch. I seriously doubt this.

Ray

mrburnette:

And it is not the code I know since I also measured the voltage at the output pin, and I even hooked up an LED directly to the output pin and ground, and the output voltage just stays stuck at HIGH. I think the sensor is bad, but I had like 3 sensors and I tried all of them, and all behaved the same. Maybe a bad batch.

Following your idea of changing sensors to test hardware, changing software is also a good way to test. Whenever possible, try a sketch provided by the hardware manufacturer or the distributor (Sparkfun, Adafruit, etc.). Otherwise, extract enough code from a working sketch to try using the sensor differently.

Maybes a bad batch. I seriously doubt this.

Ray

HI ... Had a quick look at the hall effect data sheet, said min operation voltage is 4.5v . could your power supply be low ?

You must have a pull-up resistor on the output, that's definitely required (though the
built-in pull-ups will do.

These are unipolar devices so the magnet needs to be the right way round or nothing will happen.