<div dir="ltr"><div>If you're worried about the LM339's
<span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">V_OL,</span> the datasheet mentions, "The V_OL is resistive
and scales with the output current." The 150mV to 400mV specified is measured with I_OL = 4mA, if you can happily reduce the output current down an order of magnitude or two from 4mA, then you're dealing with much lower offset.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 20, 2018 at 10:30 PM, Guy McCusker <span dir="ltr"><<a href="mailto:guy.mccusker@gmail.com" target="_blank">guy.mccusker@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks everybody for the suggestions. I am sort of relieved that there<br>
is not one completely obvious way to do this but a range of<br>
possibilities -- I guess I just have to choose one, or experiment a<br>
bit.<br>
<br>
The only one I won't make use of in this case is the idea of doing<br>
this digitally, but only for the not very good reason that the overall<br>
circuit I am aiming for would be soooo much easier to do digitally<br>
(and better too I imagine) but I am trying to create an analog<br>
solution for the fun and pain of it.<br>
<br>
Thanks again!<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
<br>
On Wed, Jun 20, 2018 at 8:58 PM, <<a href="mailto:d1ffeq@teknik.io">d1ffeq@teknik.io</a>> wrote:<br>
> So it's a voltage modulo function. All I can think of is a comparator controlling an analog switch that switches between original and -5V biased inputs. But this solution is not what I'd call simple. Maybe some sort of A/D converter would be simpler.<br>
><br>
> June 20, 2018 8:27 PM, "Guy McCusker" <<a href="mailto:guy.mccusker@gmail.com">guy.mccusker@gmail.com</a>> wrote:<br>
><br>
>> It's an analog thing: what I really want to do is take an analog<br>
>> voltage X and return X-5 if if X > 5, and just X otherwise.<br>
>><br>
>> I did mention this in the first message, but right at the end, and in<br>
>> parentheses :)<br>
>><br>
>> On Wed, Jun 20, 2018 at 5:34 PM, Scott Gravenhorst <<a href="mailto:music.maker@gte.net">music.maker@gte.net</a>> wrote:<br>
>><br>
>>> It would be helpful if we knew what was being driven by the comparator. Logic inputs<br>
>>> don't require absolute 0.000 volts for a low logic level nor absolute Vcc for a high logic<br>
>>> level. Each logic type will have it's own specification for that. Is this a zero volt<br>
>>> and five volt source for some analog process - or is it digital?<br>
>>><br>
>>> Guy McCusker <<a href="mailto:guy.mccusker@gmail.com">guy.mccusker@gmail.com</a>> wrote:<br>
>>>> --===============<wbr>1895041468437579696==<br>
>>>><br>
>>>> Thank you.<br>
>>>><br>
>>>> I can readily stick a solid 5V reference on the pull-up of an<br>
>>>> open-collector or open-drain comparator, but I am feeling stupid about what<br>
>>>> happens for the low output voltage. The LM339 data sheet lists a V_OL of<br>
>>>> 150 to 400mV. That's a reasonable way above 0V.<br>
>>>><br>
>>>> Should I just live with it and trim it somewhere else in the circuit?<br>
>>>><br>
>>>> Guy.<br>
>>>><br>
>>>> On Wed, 20 Jun 2018 at 17:02, Pete Hartman <<a href="mailto:pete.hartman@gmail.com">pete.hartman@gmail.com</a>> wrote:<br>
>>>> <a href="http://pi3c.lan/cgi/mailbody.cgi?MD4696.MSG=+Get+&MAILBOX=chordman&DATE=20_06_2018_04_00_20" rel="noreferrer" target="_blank">http://pi3c.lan/cgi/mailbody.<wbr>cgi?MD4696.MSG=+Get+&MAILBOX=<wbr>chordman&DATE=20_06_2018_04_<wbr>00_20</a><br>
>>><br>
>>> On Wed, Jun 20, 2018 at 10:30 AM, Lloyd Abbott <<a href="mailto:lloydabbott94@gmail.com">lloydabbott94@gmail.com</a>><br>
>>> wrote:<br>
>>><br>
>>> What rails do you have available ? Have you considered a comparator IC<br>
>>> (e.g. LM339) rather than using general purpose op-amps ?<br>
>>><br>
>>> If you have 0V, +5V and +15V rails, with an LM339 you can reference the<br>
>>> comparator input side to the 0V and +15V rails and have the output side<br>
>>> referenced to 0V and +5V. The datasheet has an example circuit using one<br>
>>> pullup resistor and one cap per comparator.<br>
>>><br>
>>> I was going to suggest this as well. The 339 and its family are all open<br>
>>> collector outputs, so you can use a pull up to any voltage you like, a rail<br>
>>> or a reference voltage or whatever to get the swing you need and if<br>
>>> necessary convert levels.<br>
>>><br>
>>>><br>
>>><br>
>>> -- ScottG<br>
>>> ______________________________<wbr>______________________________<wbr>____________<br>
>>> -- Scott Gravenhorst<br>
>>> -- <a href="http://scott.joviansynth.com" rel="noreferrer" target="_blank">http://scott.joviansynth.com</a><br>
>>> -- When the going gets tough, the tough use the command line.<br>
>>> -- Matt 21:22<br>
>>><br>
>>> ______________________________<wbr>_________________<br>
>>> Synth-diy mailing list<br>
>>> <a href="mailto:Synth-diy@synth-diy.org">Synth-diy@synth-diy.org</a><br>
>>> <a href="http://synth-diy.org/mailman/listinfo/synth-diy" rel="noreferrer" target="_blank">http://synth-diy.org/mailman/<wbr>listinfo/synth-diy</a><br>
>><br>
>> ______________________________<wbr>_________________<br>
>> Synth-diy mailing list<br>
>> <a href="mailto:Synth-diy@synth-diy.org">Synth-diy@synth-diy.org</a><br>
>> <a href="http://synth-diy.org/mailman/listinfo/synth-diy" rel="noreferrer" target="_blank">http://synth-diy.org/mailman/<wbr>listinfo/synth-diy</a><br>
><br>
______________________________<wbr>_________________<br>
Synth-diy mailing list<br>
<a href="mailto:Synth-diy@synth-diy.org">Synth-diy@synth-diy.org</a><br>
<a href="http://synth-diy.org/mailman/listinfo/synth-diy" rel="noreferrer" target="_blank">http://synth-diy.org/mailman/<wbr>listinfo/synth-diy</a><br>
</div></div></blockquote></div><br></div>