Compare 6 voltages to find highest voltage
I have 6 voltage lines with voltage of 0V to 1V I want to find the highest voltage line
I am looking for a hardware solution, is there a chip that can accomplish this task?
6 lines in , 6 lines out, the output would have only 1 pin high, or all low if 0V on all iinput lines.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think outside the BOX!
I am looking for a hardware solution, is there a chip that can accomplish this task?
6 lines in , 6 lines out, the output would have only 1 pin high, or all low if 0V on all iinput lines.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think outside the BOX!
Comments
Sid
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester yet?
http://hometown.aol.com/newzed/index.html
·
If you have 6 microphones lined up in a row that can provide a signal from 0 to 1 volt
You tap one microphone , you now have 6 voltages from the highest (the one that is just been tapped) and 5 decending voltages.
How would you go about using a shift register to find the result that microphone 1 is the one that has just been struck given that that line would be the highest voltage.
I will have a look at shift registers while I wait for a reply.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think outside the BOX!
...You apply for a job anytime recently?
My company is C&C Special Products, www.ccspecial.com
I wish I could work in electronics for a full time job though it would be more fun than making stickers.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think outside the BOX!
You could do pair-wise analog comparisons with the output of the comparator feeding an analog multiplexor that forwards the analog level to the next set of comparators. You'd need 2 quad comparators (5 of 8 used) and a quad analog multiplexor to find the highest signal, then what's effectively a priority encoder to produce the outputs. I'm sure there are some gate arrays that include some simple analog circuitry that could do the whole thing, but it'd be simpler to use a PIC16F676 or SX28.
I was thinking of using comparators, by using 3 comparators i can eliminate 3 of the lowest voltage inputs, but I have not had a chance to put it to paper (i am working on a printing press while I think about this stuff)
So in my hesd when it comes to more than a few connections,and and or gates and comparators all connected to give the output i am seeking, well It is just to much for one little head.
But it sounds like STEEL has the answer, I just need to pry it out of him somehow. Evan if he wont give up the answer, perhaps a few clues and i can go from there, get me pointed in the right direction as it were. I know I have to re-invent the wheel to learn this stuff but the more I learn the harder the questions I seem to ask.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think outside the BOX!
Sorry about that...I actually had one person ask on 3 different forums how to solve the problem and try to weasel into a design position...
I would agree with the MAX1112 interface.· Just connect the REF voltage to 1 Volt.
Connect /CS,SCLK,DIN,/SHDN,DOUT, and SSTRB to the SX...Or just connect what you need (/CS, SCLK, DIN, DOUT)
That way, you can connect all 6 inputs to this chip, use the SX to send the chip what channel you want to look at into DIN,(see documentation[noparse]:http:[/noparse]//datasheets.maxim-ic.com/en/ds/MAX1112-MAX1113.pdf) and SHIFTIN·DOUT,·SCLK, Variable·then you have the values in the SX.
Save the values as variables.· Compare the Variables to see which one is greatest/Least.·
At that point, you can use a D/A converter to spit those values back out, or you can send a message anywhere...
hope that helps.
Shaun
The simplest answer here is to use an SX with 6 virtual A/Ds; it will even work when the signal is AC, provided the input frequency is not too high (say 10 KHz).
And, I believe the intent was to have an SX for further processing anyway, so 12 resistors, 6 small capacitors, a few dozen lines of assembler, and you're done, everything in one chip. It will consume 12 I/O pins for frequencies near the top end, and could be only 6 pins for lower frequencies, up to, say, 100 Hz.
Cheers,
Peter (pjv)
For my information, where's there information on doing multiple virtual A/D converters with the SX chips?· I could only find source code for a single A/D converter and the SX user's manual talks about a single comparator on one pin of the B or E port.· I'm sure this would be a good fit for this project, but I don't know how it works on the SX.
Mike
My solution fully hardware for about $8.00.
I realize that with this solution I will need to increase the voltage on the sense resistor part of the circuit but that is not a problem.
The ADC solution would work as well but I am having more fun designing hardware solutions vs software.
Of course I don't know if this will work, the minus input may have to be biased, some comparators would require pullups on the output, I have some that don't require pullups.
Diode Array Link: http://www.computronics.com.au/module/diodearray/
No luck on DIGIKEY in their search for diode... arrays filter but that is a science in itself finding parts that digikey has without knowing the part number.
Just for fun what are your thoughts on this potential solution. Any design recommendations?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think outside the BOX!
Mike, the comparator is not (or rather need not be) used in the virtual A/D design. What is done instead is the switching level of an input pin is used; it's half of the supply voltage when using the CMOS intut mode. There are two rather similar designs, one uses two port pins, runs a little faster, and takes a little less software.... about 8 or 12 instructions for one A/D. The other design uses only one port pin, is a little slower, and has slightly more complicated software. Multiple A/D's are simply a minor extension in the software. You can have as many as you have port pins available plus two resistors and one small capacitor each.
I owe an explanantion and some schematics to another poster (Joshua), and I now finally have some time to dedicate to this, so in the next while I will attend to it. In fact, one of my current contest entries uses 8 single bit A/D's for sensing analog and digital input levels.
Metron9; I'm curious why anyone would opt for a more complicated (my opinion) solution than a simpler/more elegant one, especially if you already have an SX in the circuit. Depending on what your application is. your circuit may not be adequate..... latching outputs for example in case the signal is AC.
Anyhow, if your preference is hardware over minimal component count (always my preference), then have at it.
Your approach would NOT be how I would tackle your quest..... but then only you know what you're trying to achieve with this application. The rest of us are just guessing.
Cheers,
Peter (pjv)
Post Edited (pjv) : 9/8/2006 4:04:03 AM GMT