An intravenous (IV) pump is disclosed. The IV pump includes a housing, a permanent magnet, an electromagnet, and a switch configured to selectably energize or de-energize the electromagnet. The permanent magnet generates a magnetic field and the electromagnet, when energized, generates a magnetic field that approximately cancels the magnetic field of the permanent magnet.