1. Chef

    Thread Starter New Member

    Jun 20, 2013
    9
    0
    There is an input to ADC of Micro controller, the ADC level is 0 to 3.3 V. The input is phase current signal of the motor, from the current sensor.
    The output is -1.65 to 1.65 V. Therefore, the signal has added an offset of 1.65 V by pull up to be in the proper range. After trying to varied input as sine wave, the converted digital values show that the frequency is changed as the input, but the amplitude is not really changed. How can this problem be solved? :confused: The resolution of ADC is already set to maximum (12 Bit).
     
  2. panic mode

    Senior Member

    Oct 10, 2011
    1,321
    304
    Chef likes this.
  3. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    Showing your circuit may help show the problem.

    Showing how you read the A2D may help show the problem.

    It sounds a bit like you have an op amp in the signal path that is running open loop, so all sine wave signals become huge square waves. Such a wave preserves the frequency information, but the amplitude is always the same.

    Got a scope to check the signal as it enters the micro?
     
  4. Chef

    Thread Starter New Member

    Jun 20, 2013
    9
    0
    The circuit is attached. The input V2 has been inverted before. The range of input is arround [-622 mv , 622 mv], which lead to have output of the non-inverting amplifier around [-1.65 V, 1.65 V] and then pull down voltage with -1.65 V. In the end, using the inverting amplifier and add the low pass filter and the zener diode (cut at 3.3V), before sending to the micro-controller.

    I have tried to simulate, the results shown that without zener diode, it works well. But with zener diode, the results in position region are not the same as calculated. Or this behavior happen because R at the output of the last OPAMP?? Could you please also give some comments on the attached circuit as well? Perhaps, it is the reason of the problem.
     
    • cir.JPG
      cir.JPG
      File size:
      59 KB
      Views:
      22
    Last edited: Aug 11, 2013
  5. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    The attached circuit seem very complicated for the task of Vout = 2*Vin + Voff

    Is there another stage here that inverts the signal? You really don't care what the polarity is, or if you do the software can supply the "-1."

    The value of your R2 has a max limit of the impedance the A2D wants to see, check the spec sheet of the device you use.

    As long as you have R2 then D1 is rarely necessary: there are usually ESD diodes on the input pins, and R2 along with these didoes will limit any excessive signals.

    Another note: How close is 1.65V to the maximum signal? There should be some room between max *expected* input and the max the A2D can measure, just to allow for the real world of tolerance and fuzziness to have a place to play.

    If I was doing this amplifier I would do it in one stage:


    [​IMG]
    This op amp could be a single supply amp (another reason for the "Another note" above) if voltages at the rails are not needed.

    R1 and R2 set the gain at 2.65 so .622*2.65 = 1.6483. R3 and R4 add in a 1.65V offset so a signal -.622 to .622 yields a 0 to 3.3V output.

    R5 serves the same purpose as your R2 and is subject to the same restrictions.
     
    • amp.bmp
      File size:
      96.8 KB
      Views:
      53
    Chef likes this.
  6. Chef

    Thread Starter New Member

    Jun 20, 2013
    9
    0
    Thank you very much , I will redesign it once.
     
  7. LDC3

    Active Member

    Apr 27, 2013
    920
    160
  8. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
Loading...