• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Comparator for closed loop zone

Status
Not open for further replies.
I have an alarm zone (closed loop ) the board is bad and want to do a temporary fix. I can either hook up a normally open relay but that will be energized all the time or I thought using a comparator, with two different input voltage levels the output would or should go high if the other input becomes open, any better ideas ? There are no more zones available.
 

crutschow

Well-Known Member
Most Helpful Member
Need more info on what you are trying to do.
  1. What is the signal from the zone?
  2. What output do you need when you get a signal from the zone?
  3. What power do you have available?
 
I actually just wanted to know in theory if a comparator would do what I described. I understand a comparator "compares" two dis similiar inputs, lets say: Input A is: 12V and Input B is: 6V and both inputs are available there is: 0V output, until a loss of one of the inputs the larger will become the output. Example A=12V B=6V , a loss of input "B" will create a high (positive) output of: 12V (1+1=0) (1+0=1) I am actually just beginning to work with that type of integrated circuit incorporating it with the ones I have learned (Im a hobbiest only electrician by trade) I know the 555's and 4017 counters, I try to know everything about them before I use them and I picked one up from RS and just did a quick read on them. From what I read you give the chip 2 different inputs and the loss of one input causes an output so I guess thats a OR logic? In one state its an AND in the other state its an OR or maybe Im getting it wrong maybe they would be NOR and NAND ????? Thanks in advance, Jim
 

Dx3

New Member
A comparator is a 2 input decision maker in that one input is marked + and the other is marked -
It's kind of a contest between the inputs. If the input marked + has higher voltage than the other one, the chip outputs +...the highest voltage it can do, considering the limits of the power supply.

If the input marked - has a more positive voltage than the other one, the - input wins and the chip outputs the lowest voltage it can..very close to zero.
 

Pommie

Well-Known Member
Most Helpful Member
Which comparator did you buy? A comparator will output a high if the positive input is higher than the negative input, otherwise low.

Mike.
 
ok, its an LM339 quad comparator. it has 4 inputs and four outputs which are independent of each other. so lets just take inputs 1 & 2 each input has a positive and a negative. if i have 12v on input 1 and 6v on input 2 i'll have 12v output on 1 if input 1 is lost i'll have 6v on output 2 and zero on output 1, am i getting that? because each output is only 1 pin, i get a little lost when someone says "voltage on negative" because of being an electrician but im understanding the negative volt thing a little better like the output of a 555 is negative
 

Pommie

Well-Known Member
Most Helpful Member
You have it a little confused. The output is either high (the supply voltage) or low (0V). If you look at the LM339 then if pin 5 is higher than pin 4 then pin 2 will be V+. If 5 is lower than 4 then pin 2 will be 0V. If you want the function you describe then you can achieve it with two diodes.

BTW, an LM339 has 8 inputs and 4 outputs.

Mike.
 

crutschow

Well-Known Member
Most Helpful Member
Positive and negative in electronics do not always refer to absolute polarity, it can be referring to relative polarity. Thus the plus and minus inputs on the LM339 refer to the relative voltage polarity between the two pins. If the plus input has +2V applied and the minus input has +1V applied, the output will be high. If -2V were applied to the plus input and -1V applied to the minus input (with plus and minus power to the LM339), the output would be low, since now the plus input is relatively more negative than the minus input.
 

Pommie

Well-Known Member
Most Helpful Member
One other thing, as pointed out by EricGibb (thanks Eric), the output of the 339 is open collector and so it can only be low or floating. To make it work as a comparator you need an additional resistor from the output to the positive supply.

Mike.
 
Status
Not open for further replies.

EE World Online Articles

Loading
Top