Hi All,
I'm trying to test some allegro hall effect switches that i recently bought from ebay ( model 3144)
I put up a really simple circuit and wired my sensor correctly.5V to 5V , GND to GND , output to digital input arduino.
My basic code just read a digital pin ( where the sensor is tied) and prints out the state of the switch.
but what i found was not what i expected to read.
If i place a magnet (even really strong ) near the sensor, the state stills LOW.
If i place an AC line ( the one that powers my laptop) near the sensor, it start cycling between a series of zeros and ones. Like this: 0000000000001111111111111110000000000000000111111111111100000000
I noticed that the "period" of this sequence is determined by the distance between the sensor and the AC line: AC line next to -> long streaks of 0 and 1
AC line quite far to --> short streaks.
I also tried to add a 10k pullup resistor between 5v and output pin as i saw in some tutorials, but if i stick it, the signal goes HIGH and no changes are visible even with magnets/ac lines.
i expected the switch to close in presence of EMF and to open in absence of these. Where i'm faulting?