Linear Hall Effect Sensor supply voltage

Hello everyone,

First of all, thank you for taking the time to read this - I appreciate it!

I'm working on a project that includes a Honeywell SS495A-S linear hall effect sensor. I'm using my Arduino Uno to try and get an idea of the analog readings of the sensor, because I need to program my micro controller based on those readings.

Now, when the source voltage for the HE sensor is the 5V pin of my Arduino Uno, the analog readings are as expected: the readings without any magnetic field present remain neatly within the 506-514 range (i.e. half the supply voltage). And when a permanent magnet is brought near the sensor, the readings jump (close) to either 1023 or 0, depending on which pole is aimed at the sensor.
But, when I attach the source pin of the HE sensor to the + terminal of an external battery, and the drain pin to the - terminal of the battery, and the signal pin to any analog pin on the Arduino Uno, the readings are entirely whacky; without a magnetic field present, it will vary anywhere in between 0 and 1023, and it does not seem to respond to a magnetic field at all. I have tried this with 3 1.5V batteries connected in series, as well as with a single 9V battery, and both give unexpected (and unwanted) readings.

The code I am using to read the analog signals is the very simple example code "AnalogReadSerial" that comes pre-installed with Arduino software, and my test circuit is as described above. (A pull-up resistor from the HE signal pin to the voltage source seems to have no effect).

Does anyone have any idea what might me happening here? Any tips or insight would be much appreciated.

Kind regards,

M

Is the Arduino ground connected to the battery ground?

MartijnvdK:
But, when I attach the source pin of the HE sensor to the + terminal of an external battery, and the drain pin to the - terminal of the battery, and the signal pin to any analog pin on the Arduino Uno, the readings are entirely whacky

That's because you no longer have a circuit. A circuit is a loop (clue in the name). What you have made is
one circuit using another as an antenna, so you see all the EMI floating about in the space
near your circuits.

Don't do this BTW - you'll backfeed the Arduino through a pin.

Just use the Arduino 5V to power the sensor, then whenever there is no power to the Arduino, the
sensor is powered down too and cannot back-feed (phantom power) the Arduino.

[ BTW it doesn't have a source and a drain, it has V+ and V- and an output ]

I've been working on this project for about half a year now. I've cursed a lot and I've learned a lot. And its at times like these that I realize just how much experience and prior education I lack. But I've learned that the more inclined I am to curse, the more important the lesson.

Thank you for putting me straight mikb55 and MarkT.