Electronics (alt.electronics)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to alt.electronics
external usenet poster
 
Posts: 26
Default Comparator question

Using a comparator (one section of a LM3900) I connect the (+) input to a
source voltage via a 1K resitor.
The source is obtained from a series load resistor, so that as the load
varies so does the source voltage to the (+) input.

The (-) input is connected to the wiper of a 5K pot. The comarators open
collector output via 2K2 to pos supply.

The idea is to compare the two inputs so that a signal can be detected at
the output of the comparator depending on the level applied to the (+)
input comared to the setting on the (-) input. Normal comaparator operation.

All unused terminals grounded, the chip supply is decoupled.

The problem I am experiencing is that the voltage on the (-) input is also
varying slightly in sympathy to the varying voltage on the (+) source input,
enough so as to prevent the comparator from operating when set to small
values, ie: 0.8 volts.

Example:
The (-) input is set to 0.8 volts.
With the equipment output circuit running at normal load the applied source
voltage on the comarators (+) input is 0.5 volts.
When the output load is increased the source voltage at (+) input increases
accordingly, but so to does the voltage at the (-) input. The result is that
the comparator does not "compare" at the expected point( 0.8volts) - if at
all. Sometimes the preset voltage on (-) keeps lifting to a level above the
source with the result that the comarator does not trigger.
Does anyone know how to overcome this "voltage creep"? What should I do to
prevent it?

I hope I have explained the problem adequately.

Any assistance appreciated.

**********************************************
Time is a great teacher, but unfortunately it kills all its pupils
-- Hector Berlioz


  #2   Report Post  
Posted to alt.electronics
external usenet poster
 
Posts: 2,022
Default Comparator question

On Sun, 10 Sep 2006 00:59:17 GMT, "Farticus"
wrote:

Using a comparator (one section of a LM3900) I connect the (+) input to a
source voltage via a 1K resitor.
The source is obtained from a series load resistor, so that as the load
varies so does the source voltage to the (+) input.

The (-) input is connected to the wiper of a 5K pot. The comarators open
collector output via 2K2 to pos supply.


---
It's not clear how you get your source voltage, but your comparator
should be wired like this:

V+--------+---------+--------+
| | |
| | [2k2]
| | |
| +---|--[1M]--+
| | | |
VIN--[1K]-------+--|+\ |
| | ------+--VOUT
[5k]--+--|-/ LM3900
| | |
| | |
GND-------+-----+---+-----------GND

Note the 1 megohm resistor used for hysteresis.
---

The idea is to compare the two inputs so that a signal can be detected at
the output of the comparator depending on the level applied to the (+)
input comared to the setting on the (-) input. Normal comaparator operation.

All unused terminals grounded, the chip supply is decoupled.

The problem I am experiencing is that the voltage on the (-) input is also
varying slightly in sympathy to the varying voltage on the (+) source input,
enough so as to prevent the comparator from operating when set to small
values, ie: 0.8 volts.

Example:
The (-) input is set to 0.8 volts.
With the equipment output circuit running at normal load the applied source
voltage on the comarators (+) input is 0.5 volts.
When the output load is increased the source voltage at (+) input increases
accordingly, but so to does the voltage at the (-) input. The result is that
the comparator does not "compare" at the expected point( 0.8volts) - if at
all. Sometimes the preset voltage on (-) keeps lifting to a level above the
source with the result that the comarator does not trigger.
Does anyone know how to overcome this "voltage creep"? What should I do to
prevent it?


---
The only thing short of a wiring error that comes to mind is that if
your supply voltage is varying with the load, then your reference
will be varying also. The way around that is to use a real
reference which will stay stable as the supply varies, or to stiffen
up the supply, or to regulate the comparator's supply.


--
John Fields
Professional Circuit Designer
  #3   Report Post  
Posted to alt.electronics
external usenet poster
 
Posts: 26
Default Comparator question

Thanks for the assistance John. I think I've fallen into the trap of using a
crappy breadboard thus resulting in sloppy connections ending up with a
sagging supply voltage. The bench supply is more than adequate and well
regulated.

I have been playing with a protection circuit that I need to develop to
protect FET's used as output devices.
I want to have their drive circuit turn them off when a certain current is
reached to protect them etc.

The source to the comparator is derived as below:


(+)--------------------------------------------------------|

|

[LOAD]
Source ---------------------- |

__|
---||
__ FET

|

|
(-)---------------------------------------------------------|

NOTE: There is no limiting resistor in the FET circuit, so it is vunerable
to short circuiting.

There are 8 FET's driven from PORTB of a micro. I want to use the signal
from the comparator to feed back to the micro to turn the offending port bit
off, and use another output port to indicate the fault.

Hopefully once I get rid of the crap breadboard the problem will go with it.

"John Fields" wrote in message
...
On Sun, 10 Sep 2006 00:59:17 GMT, "Farticus"
wrote:

Using a comparator (one section of a LM3900) I connect the (+) input to

a
source voltage via a 1K resitor.
The source is obtained from a series load resistor, so that as the load
varies so does the source voltage to the (+) input.

The (-) input is connected to the wiper of a 5K pot. The comarators open
collector output via 2K2 to pos supply.


---
It's not clear how you get your source voltage, but your comparator
should be wired like this:

V+--------+---------+--------+
| | |
| | [2k2]
| | |
| +---|--[1M]--+
| | | |
VIN--[1K]-------+--|+\ |
| | ------+--VOUT
[5k]--+--|-/ LM3900
| | |
| | |
GND-------+-----+---+-----------GND

Note the 1 megohm resistor used for hysteresis.
---

The idea is to compare the two inputs so that a signal can be detected at
the output of the comparator depending on the level applied to the (+)
input comared to the setting on the (-) input. Normal comaparator

operation.

All unused terminals grounded, the chip supply is decoupled.

The problem I am experiencing is that the voltage on the (-) input is

also
varying slightly in sympathy to the varying voltage on the (+) source

input,
enough so as to prevent the comparator from operating when set to small
values, ie: 0.8 volts.

Example:
The (-) input is set to 0.8 volts.
With the equipment output circuit running at normal load the applied

source
voltage on the comarators (+) input is 0.5 volts.
When the output load is increased the source voltage at (+) input

increases
accordingly, but so to does the voltage at the (-) input. The result is

that
the comparator does not "compare" at the expected point( 0.8volts) - if

at
all. Sometimes the preset voltage on (-) keeps lifting to a level above

the
source with the result that the comarator does not trigger.
Does anyone know how to overcome this "voltage creep"? What should I do

to
prevent it?


---
The only thing short of a wiring error that comes to mind is that if
your supply voltage is varying with the load, then your reference
will be varying also. The way around that is to use a real
reference which will stay stable as the supply varies, or to stiffen
up the supply, or to regulate the comparator's supply.


--
John Fields
Professional Circuit Designer



  #4   Report Post  
Posted to alt.electronics
external usenet poster
 
Posts: 2,022
Default Comparator question

On Sun, 10 Sep 2006 12:18:58 GMT, "Farticus"
wrote:

Thanks for the assistance John. I think I've fallen into the trap of using a
crappy breadboard thus resulting in sloppy connections ending up with a
sagging supply voltage. The bench supply is more than adequate and well
regulated.

I have been playing with a protection circuit that I need to develop to
protect FET's used as output devices.
I want to have their drive circuit turn them off when a certain current is
reached to protect them etc.

The source to the comparator is derived as below:


(+)--------------------------------------------------------|

|

[LOAD]
Source ---------------------- |

__|
---||
__ FET

|

|
(-)---------------------------------------------------------|

NOTE: There is no limiting resistor in the FET circuit, so it is vunerable
to short circuiting.

There are 8 FET's driven from PORTB of a micro. I want to use the signal
from the comparator to feed back to the micro to turn the offending port bit
off, and use another output port to indicate the fault.

Hopefully once I get rid of the crap breadboard the problem will go with it.


---
I can't understand your drawing. That is, it looks like you used
tabs instead of spaces and nothing lines up.

Also, if you bottom post it makes it a lot easier to chronologically
follow the thread.

Thanks,



--
John Fields
Professional Circuit Designer
  #5   Report Post  
Posted to alt.electronics
external usenet poster
 
Posts: 26
Default Comparator question


"John Fields" wrote in message
...
On Sun, 10 Sep 2006 12:18:58 GMT, "Farticus"
wrote:

Thanks for the assistance John. I think I've fallen into the trap of

using a
crappy breadboard thus resulting in sloppy connections ending up with a
sagging supply voltage. The bench supply is more than adequate and well
regulated.

I have been playing with a protection circuit that I need to develop to
protect FET's used as output devices.
I want to have their drive circuit turn them off when a certain current

is
reached to protect them etc.

The source to the comparator is derived as below:


(+)--------------------------------------------------------|

|

[LOAD]
Source ---------------------- |

__|


---||
__ FET

|

|
(-)---------------------------------------------------------|

NOTE: There is no limiting resistor in the FET circuit, so it is

vunerable
to short circuiting.

There are 8 FET's driven from PORTB of a micro. I want to use the signal
from the comparator to feed back to the micro to turn the offending port

bit
off, and use another output port to indicate the fault.

Hopefully once I get rid of the crap breadboard the problem will go with

it.

---
I can't understand your drawing. That is, it looks like you used
tabs instead of spaces and nothing lines up.

Also, if you bottom post it makes it a lot easier to chronologically
follow the thread.

Thanks,



--
John Fields
Professional Circuit Designer


(+)-----------------------------
|
[LOAD]
|
Source ---------|
_|
---------| _ FET

|
(-)----------------------------|----GND

The drawing depicts a FET with a LOAD at its drain and the circuits source
signal tapped off at the drain below the load.





  #6   Report Post  
Posted to alt.electronics
external usenet poster
 
Posts: 2,022
Default Comparator question

On Sun, 10 Sep 2006 22:03:54 GMT, "Farticus"
wrote:


(+)-----------------------------
|
[LOAD]
|
Source ---------|
_|
---------| _ FET

|
(-)----------------------------|----GND

The drawing depicts a FET with a LOAD at its drain and the circuits source
signal tapped off at the drain below the load.


---
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
  #7   Report Post  
Posted to alt.electronics
external usenet poster
 
Posts: 26
Default Comparator question


"John Fields" wrote in message
...
On Sun, 10 Sep 2006 22:03:54 GMT, "Farticus"
wrote:


(+)-----------------------------
|
[LOAD]
|
Source ---------|
_|
---------| _ FET

|
(-)----------------------------|----GND

The drawing depicts a FET with a LOAD at its drain and the circuits

source
signal tapped off at the drain below the load.


---
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.


  #8   Report Post  
Posted to alt.electronics
external usenet poster
 
Posts: 2,022
Default Comparator question

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?

3. What's the range of current through the load?

4. Anything else you can think of :-)


--
John Fields
Professional Circuit Designer
  #9   Report Post  
Posted to alt.electronics
external usenet poster
 
Posts: 26
Default 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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 DIYbanter.
The comments are property of their posters.
 

About Us

"It's about DIY & home improvement"