A security device, according to various aspects of the present invention,
detects movement of a provided portal cover. The security device includes
a sensor, a bias magnet, and a processor. The sensor provides indicia of
a magnitude of a magnetic flux through the sensor. The bias magnet
provides the magnetic flux through the sensor. The processor detects a
change in the magnitude of the magnetic flux outside an upper boundary
and a lower boundary of a first threshold and a second threshold
respectively. The sensor does not move with respect to the magnet.
Movement between the sensor and the portal cover changes the magnitude of
the magnetic flux through the sensor. The processor determines an average
value of a series of values of the indicia of the magnitude of the
magnetic flux that fall within the upper boundary and the lower boundary
of the first threshold. The upper boundary and the lower boundary of the
first threshold and the second threshold respectively are set in
accordance with the average value.