Skip to main content
Associate
January 10, 2024
Solved

Read of postive and negative values on same ADC pin

  • January 10, 2024
  • 4 replies
  • 4656 views

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

Best answer by Uwe Bonnes

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

4 replies

Peter BENSCH
Technical Moderator
January 10, 2024

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
Super User
January 10, 2024

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""."
prakash1Author
Associate
January 10, 2024

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
Uwe BonnesBest answer
Chief
January 10, 2024

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

Associate II
July 31, 2024

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