Using a Hall Effect sensor with an LCD screen (solved)

I am using a Parallax Melexis 90217 Hall-Effect Sensor (from and a 16x2 alphanumeric LCD (from the Arduino Starter Kit) both work correctly form previous tests. The magnet is a strong Neodymium Magnet.

What I want to do is print HIGH to the LCD when a magnet is present and print LOW when there is no magnet present. It is like a read out whether or not a door is opened or closed (LOW or HIGH).

Right now when the magnet is passed over the sensor it has no effect, the LCD continues to print LOW. The LCD only changes to HIGH when I remove the orange and black wires attached to the hall effect sensor and goes back to LOW when I plug them back in. My wiring and code is a combination of an LCD tutorial and a Hall Effect tutorial so maybe that’s why it does not work effectively.

Any help on the coding/wiring is greatly appreciated!

Here is a download link of my wiring schematic the same schematic is pictured below:

You need a pull up on the output of the hall sensor. When the sensor switches "on" the output of the hall sensor sinks current (acts like a ground). You need to add a resistor between 5V and the output to set the signal high for when the sensor is not "on" and sinking current.

Melexis recommends a 5.6K resistor (or a 10K would probably be OK) for the pull up between pin 1 and pin 3 of the hall sensor.

If it's not apparent by what I've said above, the sensor will report a "high" signal when no magnet is present and low when the magnet is present.

I have 1kOHM, 4.7 kOHM and 10kOHM resistors. The 10kOHM is pictured in the schematic. It seems to have no effect. I’ve tried the other resistors and they all behave the same: no effect.

In other places online I’ve seen that they’ve used resistors for hall effect sensors so I’m pretty sure that is the solution here. Maybe the error is in my code or with my wiring set up?

I would say that either you've wired the sensor backwards or you've blown it.

Yes that was the problem, I wired the Hall effect sensor backwards. Thank you problem solved! :slight_smile: :slight_smile:

I also put a 10kOHM resistor between pins 1 and 3 on the Hall effect sensor in-case anyone else is facing a similar problem as me.