Skip to main content
Visitor II
January 2, 2025
Solved

STM32 Nucleo- L4A6ZG differential ADC input Error.

  • January 2, 2025
  • 2 replies
  • 890 views

Hi there.

 

I am testing my circuit with a 3.3V sine wave that has a 1.65V DC offset. 

PC01 has the Signal Input

PC02 has the 1.65V.

Looking at the output file from the ADC, I am not getting the total signal. 0-4096. My wave is between 1000 and 3000 approx.

 

Is there a reason why the signal is attenuated 50%? 

I signal on the input has a 3.3V amplitude on a scope at the PIN.

 

Any help would be appreciated!

 

Thank you

    This topic has been closed for replies.
    Best answer by TDK

    > I have rewired the -ve Diff input to ground PC2

    Both the positive and negative must be in the range [0, 3.3]. You are seeing clipping due to the protection diodes when the signal below ground.

    The only way to get 0 counts out of the differential ADC channel is to have the positive input at 0 and the negative input at 3.3.

    Similarly, the only way to get max counts is to have the positive input at 3.3 and the negative input at 0.

    2 replies

    Super User
    January 2, 2025

    The total range of a differential input is [-3.3, +3.3]. Your signal is only half of that, hence the half-range output.

    The range of a single ended signal is [0, +3.3], so half the range and twice as sensitive compared to a differential signal. Sensitivity is halved when you switch to differential mode.

    nafisAuthor
    Visitor II
    January 2, 2025

    OK... I just re did the test. That was my thought as well, but it seems to be missing half the signal.

    [-3.3, +3.3] signal.

    I have rewired the -ve Diff input to ground PC2

    But I am not getting the whole signal. (Attached the output)

     

    Thanks for the quick reply.

    TDKAnswer
    Super User
    January 3, 2025

    > I have rewired the -ve Diff input to ground PC2

    Both the positive and negative must be in the range [0, 3.3]. You are seeing clipping due to the protection diodes when the signal below ground.

    The only way to get 0 counts out of the differential ADC channel is to have the positive input at 0 and the negative input at 3.3.

    Similarly, the only way to get max counts is to have the positive input at 3.3 and the negative input at 0.

    nafisAuthor
    Visitor II
    January 10, 2025

    Thanks. 

    I rewired the +Vref to get a full signal swing for my needs.