Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
The Hall Effect sensor referenced in this forum thread would work for you, and it does not need a relay. You can run it on any voltage above 3.8V; say a 9V battery. You need a current-limiting resistor in series with the led.
The LED bit is just to show a rough estimate of the amount of power
that will need to be turned on and off. I don't know the exact amount
and I don't want to have to figure it out - I do know that a relay will do
the job though.
I fixed a screw-up in the diagram. Look at it again.
The sensor will sink 20mA. That is not enough for a relay coil, but it is enough to drive the base of a switching transistor. You will need a PNP transistor to drive the relay coil. Forget using a small battery. The relay coil will require enough current to where you should use a power supply like a wall wart. You need to recalc the LED's current-limiting resistor for 12V. You dont need a watch battery, just put the led/resistor in parallel with the relay coil.