Comparator question
"John Fields" wrote in message
...
On Mon, 11 Sep 2006 02:04:46 GMT, "Farticus"
wrote:
"John Fields" wrote in message
.. .
Assuming that you're using an "N" channel MOSFET for the switch and
ignoring the 1 megohm resistor for the moment, is this what your
circuit looks like?
+V---------+-----------+------+--------+
| | | |
| | | [2k2]
[LOAD] | | |
| | +---|--[1M]--+
| | | | |
+-----[1K]--|--+--|+\ |
| | | ------+-- TO µC
D [5K]---|-/
Vc-------G | |
S | |
| | |
-V---------+-----------+------+-----------GND
--
John Fields
Professional Circuit Designer
Yes thats it John.
---
OK.
If you've got a well-regulated supply capable of handling the load
current, there's _no way_ the reference voltage can change, so
something else must be happening.
That's not a very good way to sense the current through the load
because you're using the MOSFET's channel resistance as the sensing
resistor, and it can/will vary, so I suspect that's where the
problem lies.
Assuming that you want the output of the comparator to go high when
the current through the load increases past a certain point, a
better way to do it would be like this:
+V---------+-----------+------+--------+
| | | |
[LOAD] | | |
| | | [2K2]
D | | |
Vc-------G | | |
S | +---|--[1M]--+
| | | | |
+---[1k]----|--+--|+\ |
| | | ------+-- TO µC
| [5K]---|-/
[Rs] | |
| | |
-V---------+-----------+------+-----------GND
Where the drop across Rs at the trigger current is greater than the
the voltage on the comparator's - input.
1. What's the supply voltage?
2. What's making the current in the load change? That is, is the
load resistance itself changing (Are you using the MOSFET like a
switch) or are you varying Vc to make the MOSFET look like a
variable resistor?
The MOSFET is being used as a switch to turn restistive loads on/off.
I want to protect them from careless users short-circuiting the outputs.
3. What's the range of current through the load?
Maximum 2A
4. Anything else you can think of :-)
--
John Fields
Professional Circuit Designer
Hi John,
I found the bug - dam cheap and nasty croc clip!! Just enough resistance to
cause a voltage drop between the psu and the breadboard. I should have known
better.
If possible I don't want to use a limiting resistor in the FET circuit due
to size constraints. 12volt/2A 25W resistor.
So I have employed the above circuit and have used fixed value resistors in
place of the preset. With a combination 4k7/1k I get the circuit to trip
very nicely at a fraction below 2A.
(+)-----------------------------------------------------------------------
|
[LOAD]
|
|--\/--|
_| ------|
| |------------[2k2]------------------------|_ |
| | |
|
| uP | ---
|
| | ----------- [LM311] --------------------|
|___ |
The above basic configuration (a lot left out here!) is working well
providing the necessary protection to the output devices (FETs).
I take a feed via 1N4148s from each of the 8 output FETs to a LM311. If any
of the 8 FET output devices gets overloaded the
software control turns off the port and uses another output to flash a LED
indicator to advise of the overload condition.
John, thanks so much for all your help - really appreaciated. When next
youre over here in Australia on the Gold Coast let me know I owe you a cold
beer(or six)!!
Regards.
|