<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Chris, is the -5V to 7V range a hard limit or just the “expected” input?<div class=""><br class=""></div><div class="">If it’s the expected input, the 3.3V single-supply rail-to-rai op-amp clipping is preferred, since it *can’t* go beyond what the microcontroller input can handle.</div><div class=""><br class=""></div><div class="">A circuit like David’s that scales and offsets is fine while the inputs are reasonable, but the output is potentially going within a diode-drop or two of the +/-15V rails which is plenty to fry the poor micro.</div><div class=""><br class=""></div><div class="">Another think to mention is that I’ve had good results just putting a series resistor ahead of the ADC input. The micro will have protection diodes that prevent over-0voltage, but too much current can fry them and leave the chip unprotected (=instant death) but with the resistor, the current can never get high enough to kill the diodes and the protection survives the abuse.</div><div class=""><br class=""></div><div class="">On the PICs I used, a 4K7 value was enough to save the input from all practical abuse. The higher the value, the slower the ADC can be read (series resistance increases the acquisition time) so be aware of that limitation.</div><div class=""><br class=""></div><div class="">Tom</div><div class=""> <br class=""><div class="">
<div>==================<br class=""> Electric Druid<br class="">Synth & Stompbox DIY<br class="">==================</div><div class=""><br class=""></div><br class="Apple-interchange-newline">
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On 4 Dec 2020, at 19:36, David G Dixon <<a href="mailto:dixon@mail.ubc.ca" class="">dixon@mail.ubc.ca</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<title class=""></title>
<meta content="text/html; charset=us-ascii" http-equiv="Content-Type" class="">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" class="">
<meta name="GENERATOR" content="MSHTML 8.00.6001.23562" class="">
<div style="font-family: Helvetica; font-size: 13px;" class="">
<div dir="ltr" align="left" class=""><span class="947193319-04122020"><font size="2" class="">Or, if you
prefer, here is the same circuit with a -5V to 7V sinusoid, coming out at 0 to
3.3V (ya gotta love Multisim):</font></span></div>
<div dir="ltr" align="left" class=""><span class="947193319-04122020"><font size="2" class=""></font></span> </div>
<div dir="ltr" align="left" class=""><span class="947193319-04122020"><span id="cid:947193319@04122020-0ABE"><fart.png></span>
<font size="4" class=""><span id="cid:947193319@04122020-0AC5"><CVShiftSmall.png></span></font></span></div></div>
_______________________________________________<br class="">Synth-diy mailing list<br class=""><a href="mailto:Synth-diy@synth-diy.org" class="">Synth-diy@synth-diy.org</a><br class="">http://synth-diy.org/mailman/listinfo/synth-diy<br class="">Selling or trading? Use marketplace@synth-diy.org<br class=""></div></blockquote></div><br class=""></div></body></html>