<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="">Yes, the series resistor limits the current flowing when the input voltage goes above the uP’s supply voltage (or above the supply voltage plus whatever the diode drop is in this case - fairly low, iirc).<div class=""><br class=""></div><div class="">So it works for negative inputs too.</div><div class=""><br class=""></div><div class="">Tom</div><div class=""><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 21:07, Didier Leplae <<a href="mailto:didierleplae@yahoo.com" class="">didierleplae@yahoo.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div dir="ltr" class="">How dangerous is it to have negative voltage going to the microcontroller’s pins? I’ve read that it is to be avoided, but I seem to have done it plenty of times without frying my pic chips. Would the series resistor also protect against that?</div><div dir="ltr" class=""><br class=""><blockquote type="cite" class="">On Dec 4, 2020, at 2:52 PM, Christian Maniewski via Synth-diy <<a href="mailto:synth-diy@synth-diy.org" class="">synth-diy@synth-diy.org</a>> wrote:<br class=""><br class=""></blockquote></div><blockquote type="cite" class=""><div dir="ltr" class=""> <title class=""></title> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" class=""> <img id="E66B0B3F13BF36320A27D0C85AA5901A" width="0px" src="https://read-receipts.canarymail.io:8100/track/C49266956199D83F011285EF840B71C7_E66B0B3F13BF36320A27D0C85AA5901A.png" height="0px" data-unique-identifier="" class=""><div id="CanaryBody" class=""> <div class="">@Tom<br class=""></div><div class=""><br class=""></div><div class="">It’s just what I expect. So no hard input. It’s a good point to protect against overvoltage and currents that are too big.</div><div class=""><br class=""></div><div class="">Regarding a 3.3V supply on the op amp, I saw my input being cut off when testing the circuit, so I upped it to 5. Limiting it like this makes total sense though. I can maybe provide a screenshot of the scope.</div><div class=""><br class=""></div><div class="">@all</div><div class=""><br class=""></div><div class="">Thank you so much for all the great input. I didn’t have time to read through all the answers but I’m confident I will be able to compile a working circuit out of this. I will read everything and report back in due course. </div><div class=""><br class=""></div><div class="">Thanks again, I’m really happy to have found this list.</div><div class=""><br class=""></div><div class="">Chris</div> <div class=""><br class=""></div> </div> <div id="CanarySig" class=""> <div class=""> <div style="font-family:Helvetica;" class=""><div style="font-family:Helvetica;" class=""><br class=""></div></div> <div class=""><br class=""></div> </div> </div> <div id="CanaryDropbox" class=""> </div> <blockquote id="CanaryBlockquote" class=""> <div class=""> <div class="">On Friday, Dec 04, 2020 at 9:10 PM, Tom Wiltshire <<a href="mailto:tom@electricdruid.net" class="">tom@electricdruid.net</a>> wrote:<br class=""></div> <div 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 class="">==================<br class=""> Electric Druid<br class="">Synth & Stompbox DIY<br class="">==================</div><div class=""><br class=""></div><br class="Apple-interchange-newline"> </div> <div class=""><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" class=""><fart.png></span> <font size="4" class=""><span id="cid:947193319@04122020-0AC5" class=""><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=""><a href="http://synth-diy.org/mailman/listinfo/synth-diy" class="">http://synth-diy.org/mailman/listinfo/synth-diy</a><br class="">Selling or trading? Use marketplace@synth-diy.org<br class=""></div></blockquote></div><br class=""></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=""><a href="http://synth-diy.org/mailman/listinfo/synth-diy" class="">http://synth-diy.org/mailman/listinfo/synth-diy</a> <br class="">Selling or trading? Use <a href="mailto:marketplace@synth-diy.org" class="">marketplace@synth-diy.org</a> <br class=""></div> </div> </blockquote> <span class="">_______________________________________________</span><br class=""><span class="">Synth-diy mailing list</span><br class=""><span class=""><a href="mailto:Synth-diy@synth-diy.org" class="">Synth-diy@synth-diy.org</a></span><br class=""><span class=""><a href="http://synth-diy.org/mailman/listinfo/synth-diy" class="">http://synth-diy.org/mailman/listinfo/synth-diy</a></span><br class=""><span class="">Selling or trading? Use <a href="mailto:marketplace@synth-diy.org" class="">marketplace@synth-diy.org</a></span><br class=""></div></blockquote></div></div></blockquote></div><br class=""></div></div></body></html>