[sdiy] CV input op-amp circuit
Tom Wiltshire
tom at electricdruid.net
Fri Dec 4 22:39:47 CET 2020
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).
So it works for negative inputs too.
Tom
==================
Electric Druid
Synth & Stompbox DIY
==================
> On 4 Dec 2020, at 21:07, Didier Leplae <didierleplae at yahoo.com> wrote:
>
> 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?
>
>> On Dec 4, 2020, at 2:52 PM, Christian Maniewski via Synth-diy <synth-diy at synth-diy.org> wrote:
>>
>>
>> @Tom
>>
>> 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.
>>
>> 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.
>>
>> @all
>>
>> 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.
>>
>> Thanks again, I’m really happy to have found this list.
>>
>> Chris
>>
>>
>>
>> On Friday, Dec 04, 2020 at 9:10 PM, Tom Wiltshire <tom at electricdruid.net <mailto:tom at electricdruid.net>> wrote:
>> Chris, is the -5V to 7V range a hard limit or just the “expected” input?
>>
>> 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.
>>
>> 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.
>>
>> 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.
>>
>> 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.
>>
>> Tom
>>
>> ==================
>> Electric Druid
>> Synth & Stompbox DIY
>> ==================
>>
>>
>>
>>> On 4 Dec 2020, at 19:36, David G Dixon <dixon at mail.ubc.ca <mailto:dixon at mail.ubc.ca>> wrote:
>>>
>>> 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):
>>>
>>> <fart.png> <CVShiftSmall.png>
>>> _______________________________________________
>>> Synth-diy mailing list
>>> Synth-diy at synth-diy.org <mailto:Synth-diy at synth-diy.org>
>>> http://synth-diy.org/mailman/listinfo/synth-diy
>>> Selling or trading? Use marketplace at synth-diy.org
>>
>> _______________________________________________
>> Synth-diy mailing list
>> Synth-diy at synth-diy.org
>> http://synth-diy.org/mailman/listinfo/synth-diy
>> Selling or trading? Use marketplace at synth-diy.org
>> _______________________________________________
>> Synth-diy mailing list
>> Synth-diy at synth-diy.org
>> http://synth-diy.org/mailman/listinfo/synth-diy
>> Selling or trading? Use marketplace at synth-diy.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20201204/3581b3ea/attachment.htm>
More information about the Synth-diy
mailing list