Maker Pro
Maker Pro

UGN3503 Hall effect sensor -> mosfet -> parallel port

E

Emil Johnsen

Jan 1, 1970
0
I'm using a UGN3503 Hall effect sensor to detect the presence of a magnet.
The signal should be half the supply voltage when no magnetic field is
present. Actually I get ~2.35V with a 5.1V supply. With the magnet I'm using
the output rises to 3.2-3.5V when the magnet is close to the sensor.

When the signal is high I want to draw one of the input pins of the paralle
port to gnd.

I eventually got this to work using a mosfet with a Gate-Threshold voltage
of 3V (BUZ21). Obviously using a (somewhat costly and bulky) 20amp mosfet
when the load will be at most a few mA is not a very elegant solution. Also
I migth have been lucky that this mosfet was close to the typical
Gate-Threshold voltage rather than the min (2.1V) or the max (4V).

Are there any small (preferably TO-92 or SMT) mosfets with a Gate-Threshold
voltage of 3V with thighter tolerances? If min and max were withing 2.5-3.2V
I could be sure it would work. I have looked at a lot of datasheets but I
have not found anything yet.

Maybe I'm geting needlessly attached to mosfets.. Is there a better way of
doing this?
 
J

John Popelish

Jan 1, 1970
0
Emil said:
I'm using a UGN3503 Hall effect sensor to detect the presence of a magnet.
The signal should be half the supply voltage when no magnetic field is
present. Actually I get ~2.35V with a 5.1V supply. With the magnet I'm using
the output rises to 3.2-3.5V when the magnet is close to the sensor.

When the signal is high I want to draw one of the input pins of the paralle
port to gnd.

I eventually got this to work using a mosfet with a Gate-Threshold voltage
of 3V (BUZ21). Obviously using a (somewhat costly and bulky) 20amp mosfet
when the load will be at most a few mA is not a very elegant solution. Also
I migth have been lucky that this mosfet was close to the typical
Gate-Threshold voltage rather than the min (2.1V) or the max (4V).

Are there any small (preferably TO-92 or SMT) mosfets with a Gate-Threshold
voltage of 3V with thighter tolerances? If min and max were withing 2.5-3.2V
I could be sure it would work. I have looked at a lot of datasheets but I
have not found anything yet.

Maybe I'm geting needlessly attached to mosfets.. Is there a better way of
doing this?

There is a component specifically to do a 1 bit analog to digital
conversion (which is what you are doing. It is called a comparator.
It has two high impedance inputs, labeled + and -. When the + input
is more positive than the - input, the output goes to a logic high.
Otherwise it is a logic low.

All you have to do is provide a reference voltage (from a voltage
divider, for example) to compare your signal to.

They come in 5 pin surface mount packages and draw very little
current. An opamp is similar, except that the output has been slowed
down enough that it can be tied back to the - input, and produce a
voltage equal to that applied to the + input, without oscillating. If
you are not worried about the microsecond or so this slow down delays
the output, you could use an opamp for your job, also.

Here is one example of a comparator:
http://cache.national.com/ds/LM/LMC7211.pdf
 
Top