| Electronics > Projects, Designs, and Technical Stuff |
| Find highest value of 4 inputs without microcontroller? |
| << < (5/12) > >> |
| spec:
--- Quote from: unitedatoms on November 18, 2018, 01:37:30 am ---@Spec: great! I'd rather rewire input opamps to be followers and leave it for diodes to decide on outcome of voltage drop across individual diodes. In theory only one diode will win and will have highest voltage drop across itself. After that works, the output 4 opamps/comparators should only compare cathode vs anode. So the divider can be removed and negative inputs of comparators should be connected only to single resistor. --- End quote --- Thank you too uA :) Hmm, some interesting thoughts about the architecture. Could you perhaps post an outline schematic of your approach to illustrate. |
| spec:
--- Quote from: T3sl4co1l on November 18, 2018, 12:42:17 am ---Should be able to do it in slightly fewer, due to this being a sorting problem (of sorts) and sorting problems being guaranteed N log N worst case complexity. Not that this helps much at small N, and indeed, if N = 4, then 4 lg(4) = 4*2 = 8, so the 6-comparator solution given earlier can't be too far from there. I suspect it's possible to save some comparators, in exchange for more logic (e.g., doing pairwise comparisons on ordered sets; using analog muxes to compare pairs in sequence, latch the state and resolve the sampled result; etc.), but this probably won't save many transistors or much space. The analog method is to use a max(a, b, c, d) circuit and monitor the current through each diode; only one will be active at a time (outside of a transition range, which we can make arbitrarily narrow with op-amps). To improve on spec's proposal: instead of a pull-down resistor, first just use a current sink instead of a pull-down resistor. This keeps the offset, transition band, and speed more consistent over the operating range, and lets us work with it more easily, at least for now. Either: - In place of the diodes, use transistors to detect when a channel is active. That is, the pull-down current is communicated through the active transistor's collector, to a load resistor, which probably needs a level shift to get back to a standard logic level (say if the A through D inputs are 0-5V, and the output is 5V CMOS logic level). So we'd need four NPNs and four PNPs, plus resistors (the PNPs can be the "prebiased" or "digital" kind, saving on components). - When a channel is "losing", its op-amp is saturated to -V. In an active rectifier circuit, we often use a diode from -in to out, to reduce integrator windup (i.e., holding the output at (-in) - Vf rather than allowing it to saturate to the full -V, saving slewing time when that signal turns back on). We can capture this with crude comparators (probably just transistors or diodes), and resolve state with logic if necessary. (This is probably not as nice of a method, so I haven't fleshed it out as well.) Similar logic applies to this circuit as well, though being just a two-channel min(a, b) implementation for a particular situation (i.e., wrapping around an error amplifier). https://www.seventransistorlabs.com/Images/Limiter2.png By adding a logic output to the diff pair, a comparison output is available; this could be scaled to any number of limit inputs, if such were needed. This works very nicely for a power supply where you want V/I limiting and indication. The 4-variable version works just the same, but with more process variables. Tim --- End quote --- A schematic can often replace a thousand words. ::) |
| LaserSteve:
My friend Jim modeled this attached circuit for me right before he passed on. My application was RGB to luminance for ILDA standard signals [0 to 5V] in laser show projectors with only green lasers. Enjoy.. |
| T3sl4co1l:
--- Quote from: spec on November 18, 2018, 05:59:03 am ---A schematic can often replace a thousand words. ::) --- End quote --- Takes as long to write. And doesn't contain any design info! Tim |
| spec:
--- Quote from: T3sl4co1l on November 18, 2018, 04:21:05 pm --- --- Quote from: spec on November 18, 2018, 05:59:03 am ---A schematic can often replace a thousand words. ::) --- End quote --- Takes as long to write. And doesn't contain any design info! Tim --- End quote --- Ah I see your clever scheme- use transistors as diodes and difference amplifiers. The only thing is that the A#15 circuit uses: 2 x LM234 , 4 x diodes, 3 x resistor While the A#23 circuit uses: 1 xLM324, 9 transistors, 11 resistors Don't you use a circuit capture package? If not, you do know that there are some pretty good free versions available on the web. I'm an EAGLE fanboy ::) |
| Navigation |
| Message Index |
| Next page |
| Previous page |