# Hall effect sensor as toggle switch

I know little enough about electronics to have to ask basic questions :P

If I wanted to use a hall effect sensor as a toggle switch what is the minimal circuit that could be used?

Essentially want to put an LED into a badge and use a magnet to turn it on when near but stay on when the magnet is removed. Then turn it off next time the magnet is near and leave it off.

Minimal circuit could be one chip like an analogue asic but that would cost many, many thousands of dollars. Minimal could of course mean cheap or small or both. Stretching it a bit, minimal could mean low power.

Putting all this to one side, amplify the hall sensor's output, feed that into a suitably referenced analogue comparator. That will produce a high signal when the magnet is close. Feed that into the clock input of a D type flip flop configured as a divide by two and drive the LED, via a resistor from the output.

• Perhaps I should have said "I know little enough about electronics" Commented May 9, 2014 at 7:11
• An ASIC is not a "minimal circuit", that's a "minimal BOM" in terms of the number of components. Commented Oct 20, 2015 at 6:55

The simplest solution is to use a latching hall effect sensor. You can use one of these US1881 When you expose it to a magnetic field the output will flip based on the field direction then when you remove the magnetic it will continue to output the current state.

I would say that the "minimal circuit", would be this one. Dependeing on the polarity of the Hall Effect Sensor, when you approach one of the poles of the magnet, the led will turn on.

simulate this circuit – Schematic created using CircuitLab

• Thanks but that isn't a toggle switch. Commented Jul 24, 2014 at 6:56
• @Steve, how come it's not? It's off, when a magnet approaches it turns on, when it draws far, it's off. Maybe I misunderstood your meaning for toggle switch, could you explain what else it should do, please? Thanks. Commented Jul 24, 2014 at 8:05
• Sergio, I have edited to phrase the question better. I want it to turn the switch on when the magnet is near and leave it on when the magnet is removed. Then turn it off when the magnet is near next time (repeat until bored). Commented Jul 24, 2014 at 21:39
• @Steve if you have the ability to turn the magnet around so that its opposite pole faces the sensor, then you can look into latching hall effect sensors. See bildr.org/2011/04/various-hall-effect-sensors Commented Oct 5, 2015 at 0:32

Here's a simple solution for a toggle switch using a 555 timer rather than a hall effect sensor

• I don't see a Hall effect sensor or magnet or toggle action. There is also no explanation of circuit operation. How does this answer the question and why was it accepted? Commented Apr 8, 2016 at 9:49
• @transistor, I have edited the answer for more clarity. Commented Apr 9, 2016 at 0:49
• "Essentially (I) want to put an LED into a badge and use a magnet to turn it on when near but stay on when the magnet is removed. Then turn it off next time the magnet is near and leave it off." It still doesn't address the magnet requirement. Commented Apr 9, 2016 at 7:45