Skip to main content
Associate
Jan 2, 2025 8:39 PM UTC
Solved

STM32 Nucleo- L4A6ZG differential ADC input Error.

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.
TDK
TDKBest answer
Jan 3, 2025 12:04 AM UTC

> 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.

"If you feel a post has answered your question, please click ""Accept as Solution""."

4 replies

TDK
Jan 2, 2025 8:50 PM UTC

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.

"If you feel a post has answered your question, please click ""Accept as Solution""."
nafisAuthor
Associate
Jan 2, 2025 9:11 PM UTC

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.

TDK
TDKBest answer
Jan 3, 2025 12:04 AM UTC

> 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.

"If you feel a post has answered your question, please click ""Accept as Solution""."
nafisAuthor
Associate
Jan 10, 2025 9:00 PM UTC

Thanks. 

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