Current sensor switch circuit


Current sensors are used when there is a need to measure the amount of current consumed by a certain appliance or device. There are several methods to measure the current flow and we are about to use Hall effect in our Current sensor switch circuit. IC ACS712 a simple linear current sensor form the most significant part of this circuit.

IC ACS712:


The IC ACS712 is a low cost hall effect current sensor which is capable of measuring current up to 20 Amperes. This IC consist of a copper conduction path through which the current to be measured flows. The output voltage will be proportional to the input current flow. Also the output voltage of this IC will go through a change of 100mV/A.


The Working is pretty straight forward, when current flows from the Pins 1,2 & 3,4 through the conduction path, it generates a magnetic field which is sensed by the hall effect sensor. This in turn converted into proportional output voltage.  This equivalent output voltage will be obtained in the Pin 7 of the IC ACS712.

This type of Current sensor module will be useful for Microcontroller applications. The output from this circuit can be used with Analog pins of the Microcontroller and therefore precise value of current flow can be determined.



We can convert the current sensor circuit to a switch circuit by adding a simple stage of comparator along with it. The above circuit is a current switch toggles the output state whenever current exceeds a certain limit in their flow.

The reference value was set using variable resistor RV1 which feeds the non inverting input by preset level, whereas the output from the sensor IC was fed to inverting pin of the Op Amp. When the output voltage of IC is less than the preset value the output of Op amp remains high. The moment VIOUT exceeds the preset voltage Op amp toggles the output to low state. A LED was added as an indicator in the above circuit diagram you might also use relay provided sufficient power to drive it.

We can make it work the other way around that is make Op Amp gives logic 1 when current reaches preset value or logic 0 when it is below preset value. This can be done by simply swapping the inverting and non inverting pins of the Op Amp.


  • ACS712
  • 100k POT
  • 1nF Capacitor
  • 100nF Capacitor
  • 470 Ohm Resistor
  • LM393 comparator
  • Red LED

Ask your query

3 Comment threads
3 Thread replies
Most reacted comment
Hottest comment thread
4 Comment authors
Frank DonaldJeff DarlingBillyEbrahim Recent comment authors
newest oldest most voted
Notify of
Jeff Darling
Jeff Darling

How do I get a list of the parts?

parts list

1nF capacitor
100nF capacitor
100k Resister

I can see there are some others listed but do not know the specs.


Hi, which model of opAmp could I use for this circuit? And what I have to do if I want have 3.3v out for Raspberry pi GPIO trigger. Thank you Frank very interesting.


How about Inrush current(input surge current or switch-on surge)?I built this circuit as an electronic fuse,But Inrush current make this fuse unusable,It disconnect repeatedly at start.How to solve This problem?