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.

MSP430Gxxx 10bit ADC - AC signal measurement

Hi

How to measure AC signal using ADC10 without using any external components for level shifting the signal.

The range of measurement is 1.0Volt ac peak to peak.

Thanks,

Prasadd  Aritakula

  • Prasad Aritakula said:

    How to measure AC signal using ADC10 without using any external components for level shifting the signal.

    The range of measurement is 1.0Volt ac peak to peak.

    You can't. ADC10 measures positive voltages so you need to level-shift AC signal to ADC input voltage range,  0V to Reference_Voltage.

  • Can you please suggest a simple circuit for level shifting AC signal with minimal components.

  • Just measure half (upper part, 500mV) of the AC signal and double your result. Use input resistors so that the negative current will not exceed max allowed, and/or use protection diodes. Or use an Op-Amp rectifier, search TI-analogue page.

  • Leo Bosch said:
    Just measure half (upper part, 500mV) of the AC signal and double your result.

    Well.. if input signal is sine then perhaps. Remember that not all AC signals are symmetric. If your signal is complex AC waveform like speech then you must measure whole signal, not just positive half periods of it.

  • Prasadd wants to have it ‘simple’, then goes the optimistic way and hopes the signal is not disturbed and is symmetrical as (I believe) speech normally is. And btw it doesn’t to be a sine, square wave or whatever is also Ok.

  • Leo Bosch said:
    optimistic way and hopes the signal is not disturbed and is symmetrical as (I believe) speech normally is

    Speech is irregular complex signal often having both low and high frequency components (test it by saying "sheep"). So it could be so that sometimes low power high freq component is present just during high power low freq negative period. You will miss it by clipping negative part of AC signal.

    Most ADC manufacturers including TI, have ADC buffering appnotes:

    http://www.ti.com/lit/an/sloa098/sloa098.pdf

  • Hi

    The AC signal is 50Hz sine wave derived from AC mains.

  • Diode bridge might work-

    ~L1 ---->|----\
                   >----ADC10
    ~L2 ---->}----/

    and

             /---->]---- ~L1
    GND ----<
             \---->}---- ~L2

  • Prasad Aritakula said:
    The AC signal is 50Hz sine wave derived from AC mains.

    Next time please say it from the very beginning such way saving lots of time for you and others. Is there anything else that you did not say like - that you are building energy meter?

  • Back to the original question using no external components --- Would this work if USB was not connected? And if so, would it work with the USB connected for debugging if the USB + power was cut?

  • Yes. - If you use VCC as reference for ADC and don't use two batteries but proper voltage divider (like two resistors and optionally buffer opamp).

    In case of batteries, which will have different discharge curves, you have to measure middle point using ADC - to know where your AC zero potential reference actually is.

  • Well, when AC is floating;

  • IImars:

       If I understand you correctly, then by measuring the drift of center connection of the two batteries then no external resistors would be needed.

  • Joseph Raslavsky said:
    If I understand you correctly, then by measuring the drift of center connection of the two batteries then no external resistors would be needed.

    Yes. Actually resistor center connection also shall be calibrated at least once, battery center connection you shall recalibrate more often, but not necessarily every AC measurement.

    You shall also consider that 3V reference to measure 1Vpp signal means losing 2/3 of ADC range, not to mention that supply voltage is not that clean reference.

  • Prasad Aritakula said:
    Can you please suggest a simple circuit for level shifting AC signal with minimal components.

    Asuming you have a launchpad and ground referenced 1VAC signal, I would just use two 10 k resistors.

    Connect the first resistor from 1 VAC source to any ADC pin on the launchpad. From this ADC pin connect second resistor to the VCC (+ supply).

    This setup will level shift the input to 50% of supply (and attenuate the signal by 50%).

    Use long ADC sampling time to compensate for the source resistor .

    Your ADC should use the power supply as the voltage reference.

    This setup should give you a value of about 512 for a 0 input voltage.

    Good luck.

    Peter

  • IImars:

    If the OP's signal is derived from the 50 Hz mains by transformer, couldn't he eliminate his DC power supply like so?

    Edit: Nevermind, I just realized the transformer would be reversing polarity.

  • Joseph Raslavsky said:

    IImars:

    If the OP's signal is derived from the 50 Hz mains by transformer, couldn't he eliminate his DC power supply like so?

    Edit: Nevermind, I just realized the transformer would be reversing polarity.

    Even worse. Unless your design goal is smoke from transformer or DC supply, you shall not be using such circuit.

    In this thread I already mentioned appnote:

    http://www.ti.com/lit/an/sloa098/sloa098.pdf

    There is transformer circuit for unipolar ADC.

  • Ilmars said:

    Even worse. Unless your design goal is smoke from transformer or DC supply, you shall not be using such circuit.

    It's only virtual smoke.

**Attention** This is a public forum