Continue to Site

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.

  • 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/IC Help

Status
Not open for further replies.

tom86951

New Member
I am hoping for help to design a simple circuit. I am not an engineer, so bear with me.

The circuit has two inputs. The first is a 0-5vdc sensor, and the second is a switch that toggles between +5vdc and ground. When the switch is set to 5vdc, I want the circuit to act as a straight voltage follower for the full 0 to 5vdc sensor range When the switch is set to ground, I want the circuit to act a voltage follower up to 1vdc, with any sensor signal over 1vdc creating a 1vdc output from the circuit. I'm hoping there is a single chip that can be used to do this? Suggestions/tips?
 
tom86951 said:
I am hoping for help to design a simple circuit. I am not an engineer, so bear with me.

The circuit has two inputs. The first is a 0-5vdc sensor, and the second is a switch that toggles between +5vdc and ground. When the switch is set to 5vdc, I want the circuit to act as a straight voltage follower for the full 0 to 5vdc sensor range When the switch is set to ground, I want the circuit to act a voltage follower up to 1vdc, with any sensor signal over 1vdc creating a 1vdc output from the circuit. I'm hoping there is a single chip that can be used to do this? Suggestions/tips?

hi,
Get the datasheet for a dual LM393 or LM311 type comparator, it shows a number of example circuits.
Try:
www.datasheetarchive.com
 
Your requirements aren't very clear.

You talk of a voltage follower; an op-amp configured as a unity gain buffer can do that.

Then you mention the circuit's behaviour chainging after a switch is flicked but you've not made this bit very clear.
 
I think the circuit here might work (I Googled opamp voltage clamp ;) ):

http://www.teamfc3s.org/info/articles/fcd/diy_fcd.htm

Put a transistor+base resistor or mosfet between the bottom of the 10K pot and ground. Make Vref +5V. With the transistor's input low, the opamp's non-inverting input is at +5V and will limit only above +5v. Higher, if Vref is higher. With the transistor's input high, the opamp's non-onverting input is at +1V (set by 10K pot) and will limit above +1v.

OK, the input logic is opposite of what Tom wanted, but another transistor and resistor would invert that.

Ken
 
Ken, that's it -- I need it for a different purpose, but this is almost exactly the circuit I am looking for. Thanks a million! I googled for a while before posting here -- I guess it helps to know the lingo. :)
 
KMoffett said:
I think the circuit here might work (I Googled opamp voltage clamp ;) ):

http://www.teamfc3s.org/info/articles/fcd/diy_fcd.htm

Put a transistor+base resistor or mosfet between the bottom of the 10K pot and ground. Make Vref +5V. With the transistor's input low, the opamp's non-inverting input is at +5V and will limit only above +5v. Higher, if Vref is higher. With the transistor's input high, the opamp's non-onverting input is at +1V (set by 10K pot) and will limit above +1v.

OK, the input logic is opposite of what Tom wanted, but another transistor and resistor would invert that.

Ken

Mulling this over, could I not get the logic right by using a PNP transitor at the bottom of the 10k pot to ground, so that a low input to the PNP from my switched control line will complete the voltage divider, clamping the output at the pot setting, while a high input from me switched control line will disconnect the bottom of the pot, creating a clamped limit equal to the undivided Vref of 5v?
 
A PNP won't work. Two NPNs should give you the correct logic.

Ken
 

Attachments

  • Selectable Voltage Clamp.gif
    Selectable Voltage Clamp.gif
    13.8 KB · Views: 240
Ok, I did a little breadboarding this morning, focusing on just the original clamp for now. The circuit worked to clamp the voltage as designed, but only down to about 2 volts or so. In my situation, I am trying to clamp the output to about 1vdc. When I set the clamp pot to 1vdc or thereabouts, the output is about 1.4vdc or so. It seems to have this kind of increase unless the clamp is set higher. At 2 or 2.5 volts, the output is virtually identical to the clamp value. Any ideas why that is?
 
Re-reading some earlier discussion on this, it appears the LM358 cannot output as low as I need. Perhaps I need to find a different chip?
 
tom86951 said:
Re-reading some earlier discussion on this, it appears the LM358 cannot output as low as I need. Perhaps I need to find a different chip?

The circuit has two inputs. The first is a 0-5vdc sensor, and the second is a switch that toggles between +5vdc and ground. When the switch is set to 5vdc, I want the circuit to act as a straight voltage follower for the full 0 to 5vdc sensor range When the switch is set to ground, I want the circuit to act a voltage follower up to 1vdc, with any sensor signal over 1vdc creating a 1vdc output from the circuit. I'm hoping there is a single chip that can be used to do this? Suggestions/tips?

Hi,
If I am reading your original post correctly, you require the output to follow the 0V thru +5V sensor input when the clamp is not active..is that correct.?

Also when the clamp is active you want the output to follow the sensor input from 0v thru +1v then clamp any higher sensor voltage to an output of +1V..is that correct.?
 
ericgibbs said:
Hi,
If I am reading your original post correctly, you require the output to follow the 0V thru +5V sensor input when the clamp is not active..is that correct.?

Also when the clamp is active you want the output to follow the sensor input from 0v thru +1v then clamp any higher sensor voltage to an output of +1V..is that correct.?

That is correct. I am starting to think it would be easier to have a simple 0=5vdc voltage follower and simply switch the output over to a fixed 1vdc (or other "clamp" value) via a the hef4053 or 4066 circuits when (a) the input exceeds 1vdc AND (b) the throttle/control switch is closed. This was my original thought and the reason for my "throw switch" thread. But will an LM358 follow voltage from 0 to 5vdc with a single +12v power supply?
 
tom86951 said:
That is correct. I am starting to think it would be easier to have a simple 0=5vdc voltage follower and simply switch the output over to a fixed 1vdc (or other "clamp" value) via a the hef4053 or 4066 circuits when (a) the input exceeds 1vdc AND (b) the throttle/control switch is closed. This was my original thought and the reason for my "throw switch" thread. But will an LM358 follow voltage from 0 to 5vdc with a single +12v power supply?

Well, although I'm a bit confused, my breadboard shows that the LM358 (or 324) wired as a simple voltage follower will indeed follow voltage all the way down to zero. So, seems to me it would be much simpler just to use the straight voltage follower all the time, and use the HEF4052 or 4066 to switch over to a fixed 1vdc voltage anytime my control (throttle) switch is closed AND the input voltage exceeds 1vdc. That way, the output will mirror the input all the time, except when the input exceeds 1vdc with the throttle switch closed (which has been my goal all along)... Sound right?
 
tom86951 said:
So, how about this...

hi,
In the original circuit if you measure the Vsat on pin 7 of the LM358, when the clamp is active, you will read about +0.8V.

If you add this voltage to the Vfwd drop of the diode you will have about +1.5V at the output voltage. As you have already observed.OK.

The last circuit you posted dosn't have a diode in the feedback, so it will just act as a voltage follower. Its output will not switch rapidly ON/OFF, which is what you need to control the 4066 gates.

I'll look thru the remainder of your drawing.

Why do you need to clamp at +1V and how 'sharp' do you want the switching point voltage.?
 
hi,
Looking at the remainder of the 4066 circuit, it has problems.

1. The diode controlling the 2nd half of the LM358 is missing.
This diode is required so that the LM358/2 operates a non symetrical comparator.

2. The 680R output resistor is missing.
This 680R is required as its part of the clamping.
Ideally the 'output' end of the resistor would be clamped at +1V by the diode.

The cathode of the diode is connected to output pin of the LM358/2, which is low when the clamp is operating.
If the LM358/2 did go to true 0V, then the 'output' of the clamp would in effect be the forward voltage drop of the diode, +0.7Vnom.

Without the 680R the output of the LM358/1 would be shorted to 0V via the diode..
The 680R is chosen to be as close to the 'resistance' of a forward biassed diode.

3. The connection from the LM358/1 output to the LM358/2 input is missing, so how are the 'clamp' and Sensor voltages going to be referenced to each other.?

4. If the clamp did operate, the output would be clamped to 0V not +1V.

Do you follow this .?
 
Thanks for the feedback. You're right, I do have some missing logic in my circuit. I was trying to get away from the LM358 acting as a clamp, since it can't clamp below 2 volts or so. Instead, I was trying to have the circuit switch between the sensor input line and a fixed 1v line based on the input of the throttle switch on pin 13 of the 4066. What I fogot to do, however, is add logic so that it only switches to the 1v line if BOTH the switch is on AND the sensor input is more than 1vdc on pin 1 of the 4066. So, I'll go back and add a voltage comparator to pin 1 of the 4066 and and an AND gate on pin 13 of the 4066, and then see what you think. If that makes any sense...
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top