Problem in using comprator ic

Status
Not open for further replies.

fasihgardazi

Newbie level 3
Joined
Dec 11, 2011
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,312
Sir i m using proteus isis and using comparator ic 3302 in it. i have a problem that i m not able to make it work. i have seen its data sheet and i m trying to use it according to its pin diagram. but i get error that model is not specified.and it is also not working on bread board please give me some advice.
 

Do you remember that LM139,LM239,LM2901,LM3302 and LM339
have open collector output.
They need load resistor from output to V+

You should show your circuit.
 


Sir this my circuit and B4 is the battery giving voltage to inverting terminal all three comparators as this voltage is greater than the b3, b2 and b6 voltage so what i think is that there should be no voltage going in the base of the transistor and thus the transistors q1, q2, q3 should be in cutoff and there should be maximum voltage drop across emitter collector terminal of the transistors. but whenever i try and run this i get errors no model specified for each comparator and partition analysis error.can you please tell me how to correct it.
 

Look datasheet , as i said these comparator type need load resistors from open collector output to V+.
Add for example 4.7kohm resistors from output to V+.

**broken link removed**



Circuit dont need -12V supply
and make comparator reference voltage with resistor divider.

Look examples....
**broken link removed**

 
Last edited:

    V

    Points: 2
    Helpful Answer Positive Rating
sir, i m not understanding wat do you mean by open collector in terms of comparator ic because wat i think is that open collector is a configuration of transistor can you please correct this circuit for me.
 

sir, i m not understanding wat do you mean by open collector in terms of comparator ic because wat i think is that open collector is a configuration of transistor can you please correct this circuit for me.

Let us take one ouput, say pin 14.

On your circuit, when it is supposed to be high, nothing happens. To get a voltage on it, we need to add a resistor between this pin and Vcc (as your +12V). So we can disconnect the R1 (1K) terminal from the Q1 base and connect it to Vcc (+12V) instead. But here we don't need just a high voltage at the ouput, instead we look to drive Q1 so that it will be turned on in this state. To do this, first let us change the value of R1 from 1K to 10K for example since Q1 base doesn't need too much current for a load of 1K (R4) at its collector. Then we connect the Q1 base directly to pin 14 (output).

We will notice that the voltage at pin 14 drops from 12V (no connection to the base) to about 0.7V (when connected and which is the average forward voltage between base and emitter of a silicon npn transistor). Now R1 passes a current to Q1 base and the collector of Q1 will be close to zero (said in saturattion). You may say but why this current goes to Q1 and not into pin 14. Here it comes the role of what we call an output with open collector. It is like we have Q1 without R4 at its collector. Q1 can sink current through R4 (when connected) if its base is driven by a small current but it cannot source any current if Q1 is off (no base current), so when R4 is removed Q1 collector would look like an open circuit in this state. Similarly, the output of the comparator here is just a collector of an NPN transistor hence it can sink a current if low and becomes an open circuit otherwise (that is why we call the output type; open collector).

In brief, the corrections at pin 14 (same for the other outputs):

[1] R1 is connected between pin 14 and 12V. Practically its value could be made 10K to provide about 1mA only, to the Q1 base.

[2] Q1 base is connected directly to pin14. When pin 14 is low Q1 is turned off since the comparator output will sink the 1mA leaving its base current without any current.

Have fun :smile:
 
Last edited:

    V

    Points: 2
    Helpful Answer Positive Rating

sir, this is wat i have done and i m still getting an error.i connected the end of the resistor (which was connected to the base of transistor)
to the vcc and i have connected the base of the transistor to the output of the comparator.and still there is an partition analysis error.
 

Does your partition analysis error look like this...

Compiling source files...
Build completed OK.
Compiling netlist...
Linking netlist...
Partition analysis...
ERROR [PSM] : No model specified for 'U1:A'.
Simulation FAILED due to partition analysis error(s).

then simulator does not have model for LM3302
try to change ic to LM339 instead
 


Just in case you will use a comparator you have its model (I am familiar with LTspice simulator only), I guess you already know that pin 7 (IN+) voltage is lower than of pin 6 (IN-). Pin 1 is therefore low and Q1 is off. This lets your blue LED (D1) shine with a current (12V-3.3V)/1K = 7.7mA (approximately, since the forward voltage of the blue LED might be other than 3.3V).
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…