[sdiy] CV input op-amp circuit
Brian Willoughby
brianw at audiobanshee.com
Sat Dec 5 22:01:50 CET 2020
Resistance (for the current-limiter) can be calculated from the voltage drop, e.g. 5V to 3.3V, and the maximum current rating for the pin. Keeping the current below the maximum is ideal, although one significant problem is that it's difficult to calculate the permutations when multiple inputs pins might be clamped. Chip makers often give a maximum rating based on power dissipation when a single pin is handling all the current, but none of the other I/O pins are involved. If your design allows multiple pins to get into this state, the maximum current ends up being shared across multiple pins.
Even with all of that potential complexity taken care of, there's still the possibility that hitting a chip with all it can take will affect sensitive peripherals like the ADC. Personally, I prefer off-chip ADC, even going to the extent of placing the stand-alone ADC chip near the signals being read - such as pots and faders - so that ground and voltage references are more controlled than they might be near a digital processor switching at tens or hundreds of megaHertz.
Brian
On Dec 5, 2020, at 04:07, Vladimir Pantelic <vladoman at gmail.com> wrote:
> I had one 3.3V STM32 design where the SPI MISO came from a 5V IC and I missed that. Each time MISO went high the internal protection diodes of the STM32 kicked in, but that in turn wreaked havoc on the internal V_ref of the ADC making the readings more or less useless. YMMV
>
> On 2020-12-05 13:00, Tom Wiltshire wrote:
>> Yes, I agree.
>> Didier’s question was specifically about PICs, as was my answer, since that’s what I have experience with. With other chips, you’d need to check the datasheet to see what there is in the way of protection and what series resistance the ADC can cope with.
>>> On 5 Dec 2020, at 05:33, Brian Willoughby <brianw at audiobanshee.com> wrote:
>>>
>>> It works so long as there is a protection diode somewhere, connected to the supply reference (ground). As mentioned, *most* uP chips have these, but it's always a good practice to check the data sheet for the "equivalent circuits" for input pins.
>>>
>>> Brian
>>>
>>> On Dec 4, 2020, at 13:39, Tom Wiltshire <tom at electricdruid.net> wrote:
>>>> 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
>>>>
>>>> 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?
More information about the Synth-diy
mailing list