cancel
Showing results for 
Search instead for 
Did you mean: 

Differential ADC

luke514
Senior

If this is not the right section of the forum to ask this question, I kindly ask you to move it to the correct one. Thank you!

I need an ADC with differential input but I only have STM32F407 (which doesn't have it).

 I was thinking of sending the differential signal (2 wires) to 2 inputs of the ADC... and then doing the subtraction via software. In this way I should have "created" the differential ADC I need.

 But I don't think the 2 ADC ports work exactly  at the same time! So maybe I could have problems with this "coarse" solution of mine and therefore produce an untrue result from the ADC.

 What do you think? Does this make sense?

 The differential input signal is a sinusoid (not perfect!) of a few Hz whose frequency can vary from 0.5Hz to 4Hz

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

Yes, your intuition is correct--two channels on the same ADC do not sample at the exact same time. But even so, that measurement should get you close.

You can use ADC1 and ADC2 in dual mode to sample at the same time and subtract values that way.

For a signal of 4 Hz and less, taking samples at the exact same time is probably not critical.

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

View solution in original post

3 REPLIES 3
TDK
Guru

Yes, your intuition is correct--two channels on the same ADC do not sample at the exact same time. But even so, that measurement should get you close.

You can use ADC1 and ADC2 in dual mode to sample at the same time and subtract values that way.

For a signal of 4 Hz and less, taking samples at the exact same time is probably not critical.

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

"dual mode" is a setting that I set in the .ioc file during ADC initialization?

Yes. Enable ADC1 and ADC2 and set the dual mode in ADC1 settings.

I don't use CubeMX for ADC much, but I'm sure it's one of the settings in there. There should be dual mode examples in CubeMX repository.

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