First before we start, let me thank you in advance for your help. I know that I don't totally understand how to make this work but I must make it work.
Let me start from the beginning. I'm using an LM393 because it has two comparators. I'll use one for the low a reference and one for a high reference. The output will be depend on which reference voltage you want to deal with. The input voltages will be in the area of 4.4 to 4.9 volts. One reference will be in the lower range and the second in the upper range. If the 'user' wants to trigger the relay(driven by the output) at the lower they will place the switch in that position and if they want the upper they will flip the switch. In this way I can have one input to the chip and depending on which way the switch is set that side of the chip will do the work and trigger the relay.
I've seen on the web diagrams which cause an LED to burn when the input voltage reaches the reference voltage. I built this and when I try to make it work the LED will light but it does not when the input reaches the reference but far below that. For example when I set the input voltage to 2.3 volts and the reference voltage to 4.7 the LED will not light. As I bring the input voltage up the LED lights when it reaches something like 2.9 volts.
The LM393 uses a 5vdc to power it and the 'ground' is ground. There are mult-turn pots to set the reference voltage and I use a seperate
5vdc supply and a multi-turn pot to set the input voltage. I have no resisters in the circuit other than the pots.
I need to figure out why the LED lights long before the input voltage reaches the reference voltage and what I can do to my circuit so the output will 'output' only when the two voltages are the same or when the input voltage is higher than the reference voltage.
I guess I could have asked this question much simplier by simply begging for someone to offer a diagram with component values of a circuit that actually works and I could pattern mine from that.
Didn't find your answer? Ask the community — no account required.
S
Steve
......
......
The 393 only has an input common mode range of 0 to (V+ - 1.5v). Neither input should be higher than 3.5 for proper operation. Use some voltage dividers to get your signals and references inside the common mode range first.
Steve
B
Bob
Is there a comparator that will permit me to simply wire it up as in one that will permit input and reference ranges in the range of 4.6 -
4.9?
If not please clarify 'voltage divider'. I think this is a component or circuit which would reduce the incoming voltage. Are we talking about a simply resistor here? If so then all I need to do is figure out what the voltage drop must be and use that resister but I'm hoping there is a more accurate way of doing this. Do you have any suggestions as to how I can 'build' a voltage divider?
T
Tim Wescott
sci.electronics.basic may be the appropriate group for these questions.
As long as your device doesn't pull appreciable current on the "Vout", a voltage divider is just two resistors:
Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
Posting from Google? See http://cfaj.freeshell.org/google/
Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" gives you just what it says.
See details at http://www.wescottdesign.com/actfes/actfes.html
S
Steve
Is there a comparator that will permit me to simply wire it up as in
How much accuracy do you really need, and over what temperature range?
Accuracy depends on the resistor choices, and the source/load resistances, but you can make ~1% without much expense. Sounds like you are just tweaking this until it works, so just put a pot into one of the arms of the divider and you can adjust the divide ratio to any setting that you like. Just recognize you sacrifice characteristics like temperature stability. But from what you describe, it probably doesn't matter to you.
Alternately, you could raise the power supply voltage until all your signals fall inside the CM range. But I assume this is a bigger problem than reducing the signal levels. The 393 output is open collector, so you could still get 5V logic outputs if you keep the pull-up resistor on the 5V supply and raise the V+ voltage to some convenient value above ~6.5V
Steve
B
Bob
Thanks,
If I build the circuit like I did before put supply 12vdc to the chip would it allow a reference voltage of 4.4 to 4.9? Please help me understand the pullup resistor on the 5v supply. I'm not exactly sure that I understand this. I guess it's a resistor which is at the supply but where does it connect and what does it do?
B
Bob
I forgot to mention that accuracy up to +/-3 percent is not a problem.
R
Rich Grise
formatting link
Hope This Helps! Rich
J
John Fields
--- OK, the way I interpret that is if your customer wants the relay to energize when the input voltage is >4.9V you'll have him throw the switch one way, but if he wants the relay to energize when the input voltage is input voltage reaches the reference voltage. I built this and when I
--- No, you did a good job of describing where you want to go and what you want to use to get there.
The reason for the problem you're having is that in order for the output to switch properly, neither of the input voltages must go higher than 1.5V below the supply voltage.
That means that you must either raise the supply voltage if you can't change the level of your input signal, or you must change the level of your input signal so that the comparator can sense it properly.
I assume that you'd like to leave the supply alone, so what you must do, then, is decrease the level of your input signal.
In order to do that you need to use a voltage divider, which is nothing more than a couple of resistors in series with your input signal and grounded on one end: (View in Courier)
VINE1 | [R1] | +---->E2 | [R2] | GND>---+---->0V
what it's used for is to attenuate the voltage at the top of the divider, E1, and get a lower-voltage version of it at E2.
The ratio of the resistances determines how much the signal will be attenuated and, for example, two equal valued resistors will cause the voltage at E2 to be half the voltage at E1. The relationships between resistances and voltages is defined by:
E1 * R2 E2 = --------- R1 + R2
and by rearranging the equation any one of the resistances or voltage can be determined if the others are known.
Now, since we know that you're using a 5V supply and the LM393 won't work properly if either of the inputs to its comparators is higher than 3.5V, we'll need to do is drop that 4.9V down to 3.5V (or better yet, down to 3.25V just to err on the side of caution.
OK, what's next?
Well, looking at the divider again, with the voltages added, we have:
But we need to know the values of the resistors, so since the last one will come out automatically when we plug the value of the other one into the equation, what do we do to find the value of the first one? We guess! Well, actually, we don't, because we need to be concerned about how much bias current the comparator needs and how that current will affect the voltage dropped across the resistor and also what kind of a load the divider will present to the signal source. The LM393 needs 250nA max for bias current so if we guess that 10k will be OK, the voltage dropped across dropped across that
10k will be:
E = IR = 250E-9A * 1E4R = 2.5E-03V = 2.5 millivolts
So now, when you put 4.9V into the voltage divider you'll get an output from it which will keep the LM393 happy and which will make the comparator switch where you want it to. :-)
All you need now is a reference for "higher than 4.9V", "lower than
4.4V", and a way to energize the relay when either the high or low limit is chosen, and you'll be set.
Since you're Google-Impaired and can't access the binary newsgroups I've emailed you a schematic of a circuit which should do what you want and I've also posted it to alt.binaries.schematics.electronic for anyone else who might be interested.
-- JF
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.