Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
Thread Tools Display Modes
Old 3rd August 2006, 01:31 PM   (permalink)
Default How to measure 2 inputs (0V-5V) and output the highest voltage

I need to design a circuit that will take two inputs (from pots), both of which have a range from 0V to +5V.

From these two inputs, I then need to output the one which has the highest value.

e.g.

Input 1 = +2V
Input 2 = +4V

Therefore output = +4V

Does anyone know of a circuit that can do this ?

I thought of using 2 diodes (as an analogue OR gate) but then I would get a voltage drop accross the diodes.

There must be some way of doing it using op-amps and resistors etc ?
skyrat is offline   Reply With Quote
Old 3rd August 2006, 01:44 PM   (permalink)
Default

Seems like it should be very simple butn othing comes to mind rightaway. How much current do you need to take out of the circuit. ? aanalog comparators ???
zkt_PiratesDen is offline   Reply With Quote
Old 3rd August 2006, 02:22 PM   (permalink)
Default

Quote:
Originally Posted by zkt_PiratesDen
Seems like it should be very simple butn othing comes to mind rightaway. How much current do you need to take out of the circuit. ? aanalog comparators ???
Sounds fairly simple doesnt it, I just cant think of a good way to do it !

I dont need much current, only a few tens of mA.

How does this sound (refer to the attached file, circuit.jpg)....

From the 2 inputs (RV1 and RV2), put them into a comparator (U1) whos output switches to either 0V or +5V depending on whether RV1>RV2 or RV2>RV1.

The output of the comparator (U1) then controls the address lines of an analogue multiplexer (U2) that chooses which input (RV1 or RV2) goes through to the output of the multiplexer.

Im not sure if I have designed the circuit correctly ?

- can I use an op-amp (as shown in the circuit) to change its output state to either 0V or +5V, depending on its inputs ?

- will the analogue multiplexer (4051) give a full output range of 0V to 5V and would the voltage on the input be the same as the voltage on the output (e.g. 2.3V in would give 2.3V out)
Attached Images
File Type: jpg circuit.jpg (46.4 KB, 27 views)

Last edited by skyrat; 3rd August 2006 at 02:25 PM.
skyrat is offline   Reply With Quote
Old 3rd August 2006, 02:32 PM   (permalink)
Default

Have you ever heard of an "ideal diode" circuit? The idea is to wrap the diode in an op-amp feedback loop to remove the fixed diode voltage drop. It obviously won't work to the voltage extremes (It'll drop out at the upper end of the voltage range), everywhere else, it'll act like a diode with a 0 volt drop.

-google for "ideal diode" and opamps

Though the absolute easiest way to do this is in software/firmware...

James
hjames is offline   Reply With Quote
Old 3rd August 2006, 04:38 PM   (permalink)
Default

Probably the best idea is to tell us exactly what you're trying to do?, generally if something is a little 'unusual' it's because the original premise is wrong. Tell us what you're trying to do, and people may be able to make better suggestions?.

From your original suggestion the two diode gate sounds good, simply place a diode in the bottom end of each pot to lift that one diode drop. This obviously loses you one diode drop at the top end still, but without more details it's hard to know if this might be a problem? - if the pots are fed from a 7805, stick a diode in it's ground lead to increase the supply to 5.7V.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 3rd August 2006, 06:45 PM   (permalink)
Default

Maybe a comparator to do the selection and relays - crude but maybe sufficient.

I second Nigel's thoughts on sharing a little more detail.
__________________
stevez
stevez is offline   Reply With Quote
Old 3rd August 2006, 07:38 PM   (permalink)
Default

A simple problem requires a simple solution.

on1aag.
Attached Images
File Type: gif unknown.gif (49.5 KB, 59 views)
on1aag is offline   Reply With Quote
Old 3rd August 2006, 08:41 PM   (permalink)
Default

The concept is quite common in process control applications, it is called a High Signal Selector.
Usually it is implemented using a complete off the shelf function module wired into the circuit, or programmed in a function block in a PLC.

ON1AAG appears to have a nice 2 opamp solution.

JimB
__________________
Experience is directly proportional to the value of the equipment ruined.
JimB is online now   Reply With Quote
Old 3rd August 2006, 08:57 PM   (permalink)
Default

Quote:
Originally Posted by JimB
The concept is quite common in process control applications, it is called a High Signal Selector.
Usually it is implemented using a complete off the shelf function module wired into the circuit, or programmed in a function block in a PLC.

ON1AAG appears to have a nice 2 opamp solution.
I must admit, it's a very interesting looking solution, but presumably it relies on the special opamp?, the CA3160 - the pin 8's connected together are 'strobe pins', which according to a quick scan of the datasheet appear to disconnect the output stage?.

So I'm quite confused as to how it works?.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 3rd August 2006, 11:17 PM   (permalink)
Default

This is a very clever circuit. The op amp with the highest input forces the output to be equal. This turns off the other op amp. See the attached simplified schematic.
Attached Images
File Type: png max voltage selector1.PNG (19.5 KB, 34 views)
__________________
Ron


Last edited by Roff; 3rd August 2006 at 11:27 PM.
Roff is offline   Reply With Quote
Old 3rd August 2006, 11:20 PM   (permalink)
Default

Yes, it has to be a CA3160 opamp.
Pin 8 (strobe) is the drive to the output transistors. If you take current out of pin 8, the voltage at the output pin 6 will rise.

It took me a while wo work out what was going on with that circuit.

JimB
__________________
Experience is directly proportional to the value of the equipment ruined.
JimB is online now   Reply With Quote
Old 4th August 2006, 12:48 AM   (permalink)
Default

Quote:
Originally Posted by skyrat
I thought of using 2 diodes (as an analogue OR gate) but then I would get a voltage drop accross the diodes.
Isn't it easy to raise the opamp output voltage by one diode drop by wiring the feedback signal after a diode and get your wanted output voltage from the opamp output pin direct?
__________________
L.Chung
eblc1388 is offline   Reply With Quote
Old 4th August 2006, 01:53 AM   (permalink)
Default

Even simper:
Insert a diode between the pot's "-" terminal and ground, Vee, or whatever. This will ensure that the pot output voltage is always 0.7v above ground/Vee.

Put a diode with its anode on each wiper, and then tie their cathodes together. Add a pulldown resistor to the cathodes.

That'll give you the desired mixer without powered amps. Disadvantage, the highest output voltage is Vdd-0.7v. It is possible to lower this to 0.3v with Schottky diodes.
__________________
I thought what I'd do was I'd pretend I was one of those deaf-mutes.
Oznog is offline   Reply With Quote
Old 4th August 2006, 02:03 AM   (permalink)
Default

Quote:
Originally Posted by eblc1388
Isn't it easy to raise the opamp output voltage by one diode drop by wiring the feedback signal after a diode and get your wanted output voltage from the opamp output pin direct?
You can do it with two op amps and two diodes. You could use a dual op amp and, if you wanted, a dual diode (hardly worth it). I drew that up yesterday for this thread, but I didn't post it because I thought this was homework, and was waiting for more ideas from the OP. I also drew up one with emitter followers instead of diodes, which will source more current. Both of them are on my computer at work. I'll post them tomorrow.
__________________
Ron

Roff is offline   Reply With Quote
Old 4th August 2006, 02:18 AM   (permalink)
Default

Quote:
Originally Posted by Oznog
Even simper:
Insert a diode between the pot's "-" terminal and ground, Vee, or whatever. This will ensure that the pot output voltage is always 0.7v above ground/Vee.

Put a diode with its anode on each wiper, and then tie their cathodes together. Add a pulldown resistor to the cathodes.

That'll give you the desired mixer without powered amps. Disadvantage, the highest output voltage is Vdd-0.7v. It is possible to lower this to 0.3v with Schottky diodes.
Well, that sorta works, except:
1. You can't predict the input voltages by looking at the pot rotation (in the unlikely case where you have a calibrated 10-turn pot).
2. You won't be able to draw tens of milliamps, as specified by the OP, unless you use something like 10 ohm pots, and even then you'll have an error.
3. The current through the active OR'ing diode will in general be different from that through the offsetting diodes, so their voltage drops wil be different.
__________________
Ron

Roff is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes




All times are GMT. The time now is 05:32 PM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.