Configuring a 10-bit ADC for 0-12V DC Voltage Measurement

Ya’akov

Joined Jan 27, 2019
10,274
I've made my best to define the requirements for a better understanding of the ADC configuration settings.

How would you define the requirements to measure the voltage between 0 to 12 volts DC using a 10-bit ADC in a microcontroller?
Once again, your problem is making up naïve scenarios based on things you are pulling out of... nowhere... and then demanding people answer questions that don't make sense.

Once again, I strongly recommend you try to build something real. This will constrain your requirements to the bounds of reality and make your questions sensible and not just grammatical nonsense.

You are not going to understand things better if you don't have a reason to question your own half-baked assumptions. You do realize you ask a question, then you argue with the answer. You either know or you don't—can you guess which one applies?
 

Thread Starter

MTech1

Joined Feb 15, 2023
181
Once again, I strongly recommend you try to build something real. This will constrain your requirements to the bounds of reality and make your questions sensible and not just grammatical nonsense.
I appreciate the suggestion you've provided. Unfortunately, my hardware was damaged during the experiment, so I won't be able to proceed until I acquire a new microcontroller.

I was waiting your response to the question I asked in post 15, and I'll be sure to continue once I have the necessary hardware.
 

Ya’akov

Joined Jan 27, 2019
10,274
I appreciate the suggestion you've provided. Unfortunately, my hardware was damaged during the experiment, so I won't be able to proceed until I acquire a new microcontroller.

I was waiting your response to the question I asked in post 15, and I'll be sure to continue once I have the necessary hardware.
…so you are going to fall back on wasting the time of people who are trying to help?

I really can’t understand your obtuseness when it comes to interacting with people who are trying to help you. Whatever it is, you‘ve certainly worn out my interest. I don’t decide how other people feel about your “style”, so maybe you have some fans.

I’ll be done now though. Good luck.
 

Thread Starter

MTech1

Joined Feb 15, 2023
181
I’ll be done now though. Good luck.
You mentioned that you believe the specification is ill-defined, and I genuinely respect your opinion. To address this concern and improve the specification, I have kindly requested on three separate occasions that you share your specific points or explanations regarding what you find unclear or lacking in the current specification. However, I haven't received your input on this matter as yet.

Please take a moment to provide your thoughts, This will help me make the necessary adjustments and ensure that we have a well-defined set of requirements.

I believe that when we make claims, it's important to offer clarification on the specific points in question. Other may share their viewpoint on this
 

ericgibbs

Joined Jan 29, 2010
21,517
Hi MT,
When are you going to grasp the concept, that it is not possible to define any specific parameters for a project that does not have a complete specification for its purpose, operation and application.

Just defining it is an ADC project for 0V through 12Vdc is not a specification.

E
BTW: are you a student.?
 

Thread Starter

MTech1

Joined Feb 15, 2023
181
Hi MT,
project that does not have a complete specification for its purpose, operation and application.
I apologize, but it appears we're not making any progress. You both have mentioned that my requirements is poor, and I acknowledge that but when I asked multiple times to show your requirement, you both haven't shown your well defined requirment yet.

Anyways thread purpose is changing. I want to create new thread to understand difference between poor requirements vs well defined requirment with few of examples. Please lock this thread
 

Irving

Joined Jan 30, 2016
5,195
Hi MT,

Some folks around here can be a little twitchy. They like a full problem statement upfront because all too often we get a long thread of ideas and then the TS says "oh, i forgot to mention...." which invalidates the whole thread.... :rolleyes:

In answer to your question a more complete spec would have been:

"I want to measure the voltage of a nominal 12v battery (in a car) using a (PICxxxx) ADC operating at 5v. The voltage will be constant or vary slowly over a few seconds. The output will be a binary number representing the voltage, with a resolution of 100mV."

The use of the word 'nominal' shows that its understood that a 12v battery is rarely 12v (eg 14.4v on charge). The bits in brackets add useful info - if its in a car, for example, then a whole lot of voltage conditioning is needed to avoid damaging spikes - a good example of an important upfront spec which would change things if left out. A good spec says what you want to achieve completely and what your desired outcome is, but generally it shouldn't say how to do it, that is a different responsibility. However, if there are prerequisites, like the use of a specific controller, then that should be stated.

Hope that helps.
 

MrChips

Joined Oct 2, 2009
34,984
You cannot set the ADC reference voltage to 12V. You will destroy the device.
I said this back in post #6.

The sensible thing to do is to reduce your 0-12V input signal range by a factor of 3 to 0-4V.
Now you can set your ADC reference voltage to 4V.
Hence full scale input range of 0-12V still gives 0-1023 ADC counts.

If you set the ADC reference voltage to 5V, then 0-15V input converts to 0-1023 counts.
 
Top