LM2903 Configuration Question/Input/Help

Thread Starter

QuantumElectro

Joined Jun 19, 2019
15
Hello,

This is my first time using the LM2903 Dual Comparator. I am designing a circuit for a school project and wanted some input on the circuit.

The circuit takes a voltage signal and compares it to two reference voltages (high and low threshold). I was reading about the LM2903; however, I am not that comfortable with dual comparators.

My goal for the comparator is to take the input bus voltage and compare that voltage with a high and low reference voltage. If it passes then the OpAmp would release a 1 fail is a 0.

ALL ADVICE/CRITICISM IS WELCOMED. I am an Electrical Engineering student, always willing to learn.

upload_2019-6-19_22-20-29.png
 

crutschow

Joined Mar 14, 2008
29,466
ALL ADVICE/CRITICISM IS WELCOMED. I am an Electrical Engineering student, always willing to learn.
Okay, you asked for it. :D

The first thing you do, as a good engineer, is to thoroughly read and understand the data sheets of all the parts you use.
I know they are often hard to understand, and many newbie designers avoid it like the plague, but it's necessary if you are to become an effective designer.
Study each and every parameter until you understand what it means (you may have to do a Google search to understand some of them).
Otherwise you will likely use the device incorrectly and you'll then puzzle over why it's not working as you wanted. :rolleyes:

For example, look at the common-mode input range of the LM2903 below:
upload_2019-6-19_22-27-41.png
As you can see, the input voltages must be no greater than 1.5V to 2.0V below the supply voltage.
But look at your circuit.
You have a 5V supply with input of 15V, obviously way above the input voltage range. :eek:
(Note that few IC's will accept an input voltage higher than the positive supply rail or below the negative rail.)
So you either need to increase the supply voltage appropriately, or reduce the input voltage (perhaps with a resistive voltage divider).

The comparator outputs are an open-collector, so if you want a single output from the two comparators, you can connect them together with one pull-up resistor to the supply voltage.
This will give an AND function (both outputs have to be high for a high output).
So from that you should be able to determine how to connect the inputs to the two comparators to get the output you want.
 

Thread Starter

QuantumElectro

Joined Jun 19, 2019
15
Okay, you asked for it. :D

The first thing you do, as a good engineer, is to thoroughly read and understand the data sheets of all the parts you use.
I know they are often hard to understand, and many newbie designers avoid it like the plague, but it's necessary if you are to become an effective designer.
Study each and every parameter until you understand what it means (you may have to do a Google search to understand some of them).
Otherwise you will likely use the device incorrectly and you'll then puzzle over why it's not working as you wanted. :rolleyes:

For example, look at the common-mode input range of the LM2903 below:
View attachment 180048
As you can see, the input voltages must be no greater than 1.5V to 2.0V below the supply voltage.
But look at your circuit.
You have a 5V supply with input of 15V, obviously way above the input voltage range. :eek:
(Note that few IC's will accept an input voltage higher than the positive supply rail or below the negative rail.)
So you either need to increase the supply voltage appropriately, or reduce the input voltage (perhaps with a resistive voltage divider).

The comparator outputs are an open-collector, so if you want a single output from the two comparators, you can connect them together with one pull-up resistor to the supply voltage.
This will give an AND function (both outputs have to be high for a high output).
So from that you should be able to determine how to connect the inputs to the two comparators to get the output you want.
Thank you for the feedback. I updated the circuit based on the feedback. I switched to a 15v source.

upload_2019-6-19_23-37-9.png
 

crutschow

Joined Mar 14, 2008
29,466
Sigh. :oops: You didn't really understand my post.
The data sheet stated that the supply voltage has to be a least 1.5V above the highest input voltage (or the input voltage 1.5V below the supply voltage).
They can't be equal.
 

crutschow

Joined Mar 14, 2008
29,466
I plan on increasing VCC to 20Vdc and use a voltage divider to get to 15Vdc.

I want to keep the threshold between 13.9v and 15.0v
Do you have any power already available?
If so, it might be easier to operate the device at that voltage, and use resistive dividers to lower the voltages at the comparator input.
 

Thread Starter

QuantumElectro

Joined Jun 19, 2019
15
Should the output voltage be 20V? I was reading where the pull-up resistor should have a current value of 1ma so I changed it to 20k ohms. I will be having this output to an MCU and I am worried about the high voltage. is that a concern? it's an ATTINY2313A MCU.

I just had thought the pull up resistor would set the current to 1ma.

upload_2019-6-22_22-5-46.png

upload_2019-6-22_22-9-19.png
 

crutschow

Joined Mar 14, 2008
29,466
I am worried about the high voltage. is that a concern?
It certainly is.
(Note what I said in post #3 about the input voltage to an IC not being more than its supply voltage.)
So to limit the ATTINY input voltage to the supply voltage, connect the pull-up resistor to the ATTINY's supply.
If it's 5V then use a 5kΩ pull-up to get 1ma of current.

.
 

Thread Starter

QuantumElectro

Joined Jun 19, 2019
15
It certainly is.
(Note what I said in post #3 about the input voltage to an IC not being more than its supply voltage.)
So to limit the ATTINY input voltage to the supply voltage, connect the pull-up resistor to the ATTINY's supply.
If it's 5V then use a 5kΩ pull-up to get 1ma of current.

.
That is what I have done, but I am getting picoamps instead of mA. see photo

upload_2019-6-22_22-55-5.png
 

crutschow

Joined Mar 14, 2008
29,466
That is what I have done, but I am getting picoamps instead of mA. see photo
Look at the output voltage and you'll see why.
Obviously there is no current through a resistor if there is no voltage across it.
The output has to be low to get the 1mA current.
 
Last edited:
Top