Hall effect sensor as 2 wires switch
Your proposed circuit would not work because when the output turns on it will short Vdd to GND, power down the chip, turning off the output, removing the short which will power up the chip which will turn on the output ...







simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. A better way?

The datasheet says the device will work down to 2.5 V and that in the off condition the current through it will be measured in &mu;A. (Double-check this. It's not that clear in the datasheet which refers to "enable" which I suspect means "activated" by a magnet.)

In my Figure 1 R2 provides a path to ground as well as a point to monitor the current. In the quiescent state the output voltage would then be \$ V_{out} = 10\mu \times 1k = 10\ \text {mV} \$. The AH182 would have almost full 5 V supply across it.

When the device turns on R1 limits the current through M1 and creates a potential divider between R1 and R2 so that Vout will be half-supply, 2.5 V. This leaves 2.5 V to supply the AH182 which is just at the minimum operating limit. I'd be inclined to decrease R2 to 820 &Omega; to give a little more voltage to the AH182.

@TimWestcott has pointed out that the switching threshold may change if you change the chip voltage like this. He may be right but there is no indication of this in the datasheet.

Your 2-wire requirement means that you'll have to mount R1 at the sensor.

Try it and see.



From the comments:


  About the "chip enable" and "chip disable" modes, I found more information in AH1807. As you can see in the block diagram of the AH182, there is a "Reg./Switch" block. According to AH1807, the device is "enable" about 0.1% of the time, and drawing about 2mA max when it is the case, 8 uA max otherwise, for an average of 10uA max. The chip mode switching frequency is quite low, about 8Hz. – milembar 40 mins ago


Good work. That explains a lot. We need to redesign then as my Figure 1 wasn't allowing for that 2 mA through the chip. We can create a table of desired outputs.

Table 1.

Chip EN    Ouput     Current    Notes
---------+---------+----------+-------------
Off        Off       8 uA
On         Off       2 mA
Off        On        5 mA       Half the rated max.
On         On        7 mA       Combination of the chip and output current.


With this arrangement you could set the threshold at 3.5 mA and have a good chance of success.







simulate this circuit

Figure 2. Modified for new information.


To keep > 2.5 V across the AH182 we'll go for 2.1 V across R2 at 7 mA. That gives us a value of 300 &Omega;.
We'll now have 2.9 V available for the chip and 5 mA running through R1. The voltage drop across the output transistor is listed as 0.3 V max at 1 mA. Let's assume 0.5 V max at 5 mA and you can test it. That leaves 2.9 - 0.5 = 2.4 V across R1 at 5 mA giving a value of 480 &Omega;. 470 &Omega; is the nearest standard value. Let's update the table.


Table 2.

Chip EN    Ouput     Current    Vout (I x 330 Ω)
---------+---------+----------+-------------
Off        Off       8 uA       2.6 mV
On         Off       2 mA       660 mV
Off        On        5 mA       1.65 V
On         On        7 mA       2.31 V


This looks as though a threshold of around 1 V might work for you.