hall sensor for ac electro magnet

hey all,
i would like to detect when an ac electromagnet is being used.
i have tried using an a1120 but when i simple do a read it bounses 0 en 1
am i using the wrong hall sensor for it?
it is simply a 10k resistor between +5v and signal
and digital in readout

but when i simple do a read it bounses 0 en 1

Is that all of the time, or only when the electromagnet is detected?

only if an ac magnetic field is dedected.
when permanent magnet it's steady low

Since the 'a' in 'ac' means alternating, it should be obvious the magnetic field is also alternating,
so a hall switch is going to produce pulses.