This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Spikes in ADC input

Other Parts Discussed in Thread: MSP430F5438, CC2430

Hi,

I am working with the MSP430F5438 dev kit. My inputs to the ADC are creating spikes, which blew two of my microcontrollers. 

Anyone encountered a similar problem before? how do I suppress the spike?

 

Thanks

SF

  • Do you know what creates spikes? What part of the micro-controller was blown?

    As far as I know, there is noting inside the MSP430F5438 that is capable of self-destruct. Destruction of the input/output circuits of a pin is usually caused by connecting out-of-spect external signal to that pin. This may include signals generated by another pin and externally connected to the pin in question.

  • Yes, the pins I am connecting to the ADC are creating the spikes. But, thats how my input is. Is there anyway to collect the input, but suppress the spikes they have?

  • You need a circuit to suppress the spike before it is connected to the MSP430.

    (1) It has to limit the signal to within the power rails of the MSP430. (That is, AVcc and AGND.)

    (2) Itself must not be destroyed by the spikes.

    (3) The distortion it introduces must be acceptable to your application.

    It depends on the characteristics of the input signal.For example, you can find OpAmp with input that tolerate +-15V and with output limited to 3V/0V. But if the spikes is 100V, it may fail (2). If the input is subject to lightning strikes, you will need a lightning arrest-er  followed by other circuits.

  • Hi,

    Thanks a lot for the reply!

    The opamp idea might work, as my spikes only go to about 10V. 

    I am sorry, I am a bit unfamiliar with opamps. Will I need to give +-15V supply to my opamp, or will 3V do? Also, can you please suggest an IC number?

     

    Thanks again!

    SF

  • Without more information it is hard to suggest a design but here is something to consider.

    Let's assume the CC2430 is opperating at Vdd =3.2V, the max input into the ADC to be safe is 3.0 
    You have a ADC input that produces spikes of 10V  which exceed Vdd and kills the CC2430

    Example 1

    You can simply use a resistor divider to divide the 10V spike down to 3.0V

                   R2         ADC            R1
    +10V -/\/\/\/\/------3.0V------/\/\/\/\/\--GND   when calculating the value of R1 remember the 200K input of the ADC that will be in parallel with R1.

    This works if the input you are trying to measure is a large percentage of the 10V. By example if you are monitoring a 6V battery when the  10V is divided down to 3V then the battery voltage will be divided down to 1.8 volts. The ADC is 12 bits(4096)  so 3V/4096 = 0.7mv per bit which is over 11bit over the 1.8V (6V before being divided) and may meet your needs.

    Example 2

    But let say you are trying to digitize a audio signal that is 100mv which is only 30mv after the divider or .03V/.0007V per bit which is only 42 counts, or a little more than 5 bits which might not be enough. 

                  R2          ADC       D1
    +10V -/\/\/\/\/------3.0V------|<------GND       If D1 is a 2.3V zener it will prevent the CC2430 from seeing the 10V spike and is so far above the 100mv audio signal it will not effect performance. This an improvement because you now have .10V/.0007V or 142 counts or over 7 bits at the ADC.  R2 is sized to protect the zener from over current while not becoming a RC filter reducing the frequency response of the input.

    Generally the op-amp will need to operate at a voltage above the input or its output + 150mv or so. One could be used to replace the resistor divider in Example 1 above and since the output would never exceed 3.0V max it could run off of 0 / 3.2V. There would still be the divider on its input but given the high impedance (10 -100 M Ohms) input of the op-amp the resistor values could be larger requiring less current while maintaining a good frequency response. In this configuration the gain of the op amp could be increase to amplify the 100mv signal to take advantage of more ADC bits. Since its supply voltage is only 3.2V the output would never exceed 3.2V regardless of its input. This means if the 100mv was amplified to 1V (10:1) an input over 300mv would causing clipping and distortion because the output would saturate at 3.0V. If the 10V spike is rare this may be acceptable.

    Ti and others have nice op-amp circuit design tools that are free and easy to use.

    So, the question is what range are your voltages of interest and then how large are the spikes? What is the bandwidth of your signal, that is how fast does it change?

     

     

  • An unfiltered +10V spike will surely destroy the MSPs input pins.

    All inputs have clamp diodes which shortcut the inputs to VCC, but these can only sink 2mA. If the incoming current is greater, then the diodes will be fried and then the inputs.

    The simples way of protection that will also provide a relatively low level of distortion is a simple series resistor. If you're using the 2.5V reference (or even below), everything above 2.5V will result in maximum reading, so distortions there are ignorable.

    If the maximum spike is 10V, calculate the series resistor with (10V-VCC)/0.002A. The datasheet tells you the input resistance of the ADC, so you can calculate the linear error introduced by the resistor as a fixed precentage of thr measured value. It's the easiest and cheapest way, but not the best. You still stress the input pins, you just do not stress them beyond the allowed limit.

    Anotehr cheap solution is adding your own clamp diodes with a higher current capacity. Use schottky ones. This will shorcut the 10V to VCC to a greater extent without damaging the inputs.

    You can combine both methods, own clamp diodes and a series resistor. This allows the resistor to be smaller, thus introducing less linear error.

    Both methods have one important drawback: shortcutting excess current to VSS will actually raise VSS if the current cannot flow to GND. Most voltage regulators just limit the incoming current so the output voltage stays on the wanted level. If you add incoming current from another source to the output rail, voltage will raise and the voltage regulator cannot do anything against it. So if the current through the clamp diodes exceeds the current your circuit consumes, you'll get voltage spikes on VCC which will possibly damage the MSP too. Thsi should be carefully considered.

    The OPAMP approach is the safest one, but also the most complex and costly solution. Main drawback is the introduction of additional offset and linear error to the input signal. And of course size and costs for an opamp.

    One idea that crosses my mind is the use of a shunt regulator. The TS431 or similar shortcuts every voltage above 2.495V to GND. So when using the ADC with 1.5V reference, the TS431 shouldn't introduce any error to the reading, but as soon as the voltage exceeds 2.495V, the TS431 will shortcut up to 100mA to GND. Normally, it is used as voltage regulator, draining current until the voltage breaks down to 2.495V, so the current (and power) consumption is constant even if the load is not. But it should do the job for input limiting too. Also, it is relatively cheap, about 19 Euro-Cent@100pcs, and small (SOT23 case, others available too)

**Attention** This is a public forum