Hall effect not constant

Hi all.

I want to build an anemometer using Hall Effect sensor US5881LUA, but as I test it on a simple schematic (http://wiki.mchobby.be/index.php?title=Senseur_%C3%A0_Effet_Hall#Montage_Arduino ) it answers very chaotically: the LED lights on or does not when I bring the rare earth magnet close to the sensor (I do it by hand, not with an iron rod like in the video), and twice the same movement brings two different results...

Where resides the problem? Is it reasonable to build an anemometer if the behavior of the sensor is not reliable? Is there an alternative solution?

If you are using the US5581LUA sensor as in the link, that appears to be obsolete.

If not, which sensor are you using?

Note that Hall sensors are sensitive to the [u]polarity[/u] as well as the magnitude of the magnetic field. Also, you do not need a strong rare earth magnet, so try different magnets

They sold me this one: https://shop.mchobby.be/proximite/86-senseur-effet-hall-us5881lua-extra-3232100000865.html In what aspect is it obsolete? What to use instead?

Yes, I read that they are sensitive to polarity, and alas the magnet I bought bears no mark to identify the south pole - but I tried both face and one of them worked, though not consistently.

OK, after three days of working on it and checking the wiring an uncountable number of times, here's the cause: I wired pin 3 of the sensor as the pin 1, and vice-versa...

So, now it works, and reliably so.

Why it worked sometimes when I wired it wrong still puzzles me, but at last I can start working on the anemometer part.

OK, after three days of working on it and checking the wiring an uncountable number of times, here's the cause: I wired pin 3 of the sensor as the pin 1,

So as a newcomer to the web site do you understand why, with the information you gave, that anyone had a chance of finding this out. That is why we ask for a schematic and photograph of your wiring, as told here How to use this forum