Protecting Microcontrollers (was Re:[sdiy] converting a 10v p to p to a 0-5 volt signal)
Tom Wiltshire
tom at electricdruid.net
Wed May 20 23:06:06 CEST 2009
I've also used the rail limit of op-amps as a solution:
http://www.electricdruid.com/PICCVMixer.png
This has one mixer op-amp, which can't produce an output larger than
+/-15V whatever it does (lightning strikes and ESD spikes excluded, I
suppose).
This is followed by a precision half-wave rectifier which deals with
the -ve voltage, and the gain resistors are set for 1/3rd gain, so
the +15V in becomes +5V out.
I don't know whether I think this is the best solution or not. Let's
just say that it's not a problem I've stopped working on.
T.
On 20 May 2009, at 19:16, Jason Proctor wrote:
> my amateurish solution was to power the opamps suitably. the
> scaling opamp is powered from +/-5v. i put trimmers in appropriate
> places and tested it with input voltages from +15 to -15. seemed to
> work ok.
>
> although i did forget about the opamp output DC offset Ray includes
> in his scale/bias page.
>
> (i've not blown the micro yet!)
>
>
>> Aside from range scaling, I'm still looking for a good protection
>> circuit
>> for microcontroller inputs. I want hard clipping at 0V and 5V to
>> protect the
>> micro. I've seen various solutions described on this list, but
>> when I put
>> them into SPICE I have always found some flaw, such as the lower
>> limit
>> actually being one diode-voltage-drop below zero rather than zero.
>> I'd be
>> very happy if I could find some nice solution to this problem so
>> that my
>> micro-based modules can protect themselves rather than having to
>> depend upon
>> my poor memory to avoid being subjected to unacceptable voltage
>> ranges. :-)
>>
>> Or, putting it another way: converting 10Vp-p to 0-5V with op-amps
>> is a fine
>> solution, but as soon as you add two 10Vp-p signals together (e.g.
>> mixing
>> two LFOs) the input range can easily exceed 10Vp-p and hence the
>> output
>> range will also exceed 0-5V.
>>
>> --Adam
>>
>>> -----Original Message-----
>>> From: synth-diy-bounces at dropmix.xs4all.nl
>>> [mailto:synth-diy-bounces at dropmix.xs4all.nl] On Behalf Of
>>> Jason Proctor
>>> Sent: Tuesday, May 19, 2009 6:50 PM
>>> To: synth-diy at dropmix.xs4all.nl
>>> Subject: Re: [sdiy] converting a 10v p to p to a 0-5 volt signal
>>>
>>> i did exactly this for my Arduino module. it bidirectionally
>>> interfaces a +/-5v signal to the micro's 0-5v range.
>>>
>>> turned out to be pretty easy - on the way in, chop the signal
>>> in half, and bias with +2.5v. then reinvert. on the way out,
>>> do the opposite. 1 dual opamp each way.
>>>
>>> lmk if you want the details.
>>>
>>> (i should also thank Tom Wiltshire here for his help getting
>>> me off the ground with this stuff.)
>>>
>>>
>>> >tonight i was looking at my scope
>>> >
>>> >Checking the input into a circuit that was only able to take
>>> 0-5 volts
>>> >
>>> >Sure enough, the signal was between 0 and 5 but the sawtooth
>>> was clipped.
>>> >
>>> >So i am looking for a input block that can take either
>>> >5vp to p or 10v p to p (or any synth signal)
>>> >and spit it out as a 0-5 signal without squaring the top.
>>> >
>>> >
>>> >anyone know of a good circuit for this?
>>> >
>>> >thanks
>>> >
>>> >_______________________________________________
>>> >Synth-diy mailing list
>>> >Synth-diy at dropmix.xs4all.nl
>>> >http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
>>>
>>> _______________________________________________
>>> Synth-diy mailing list
>>> Synth-diy at dropmix.xs4all.nl
>>> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
>>>
>>
>> _______________________________________________
>> Synth-diy mailing list
>> Synth-diy at dropmix.xs4all.nl
>> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
>
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at dropmix.xs4all.nl
> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
>
More information about the Synth-diy
mailing list