cancel
Showing results for 
Search instead for 
Did you mean: 

Read of postive and negative values on same ADC pin

prakash1
Associate

I have an ADC voltage ranging from +10V to -10V.

How can i read both the positive and negative value ranging from +10V to -10V on the same ADC pin.

 

 

Thanks & Regards,

Prakash

1 ACCEPTED SOLUTION

Accepted Solutions
Uwe Bonnes
Principal III

The calculation can be done with Ohms Law and Kirchoffs Rules, the basic of any EE course.

View solution in original post

5 REPLIES 5
Peter BENSCH
ST Employee

Welcome @prakash1, to the community!

MCUs can only measure voltages at their ADC pins that lie between the REF- and REF+ potentials. These potentials are always positive in relation to GND, which means that you can only measure positive voltages.

If you want to measure higher or even negative voltages, as in your case, you must first translate them into the detectable range, for which you can use opamps, voltage dividers or other suitable circuits.

Hope that helps?

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
AScha.3
Chief II

If you use "standard" VDD = 3,3V and (3v3 = VDDA=vref+ ) , ADC can convert 0...3,3V ;

most simple solution is using a divider at input, + offset , like this:

AScha3_0-1704878725298.png

But dont forget : do always "reference zero calibration" , because 0,0V input is about half of full scale at adc input.

So to get some +/- result, you have to do:   (adc_value) - (adc_value at 0 V input) = (+/- result) 

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

Hi Ascha,

Thank you for your response.

Is there any calculation or formula for the solution that you have suggested for future reference.

 

 

Thanks & Regards,

Prakash

Uwe Bonnes
Principal III

The calculation can be done with Ohms Law and Kirchoffs Rules, the basic of any EE course.

umairgist
Associate II

Hello @prakash1 

I hope you have solved this problem, can you share your voltage shifter circuit diagram with me? I have the same voltage range and I want to shift it in the range of 0-3V