Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to extend the range of an ADC

Status
Not open for further replies.
That's news to me. Now you will have to go on the tangent and explain your train of thought.

Simple maths - for example if you multiply your result by 5 (to scale it) then the last digit can only be either 0 or 5. So it looks horribly messy, hence you truncate the last digit.

The same applies to all scaling factors, some are worse than others - get your calculator out and give it a try.

By doing the scaling in the attenuators, and using a final FSD reading of 102.3 (or any other variant of 1023), you get a perfect result.
 
Simple maths - for example if you multiply your result by 5 (to scale it) then the last digit can only be either 0 or 5. So it looks horribly messy, hence you truncate the last digit.

The same applies to all scaling factors, some are worse than others - get your calculator out and give it a try.

By doing the scaling in the attenuators, and using a final FSD reading of 102.3 (or any other variant of 1023), you get a perfect result.

It's either really early, or I'm still not following. Where is 102.3V coming from (other than 1/10th of 1023)? What relevance does it have on the 0-25V input signal?

I have never understood the reasonings put forth on ADC scaling to drop digits within the displayed value. I find it odd this topic only ever seems to come up on the forums. I have never had this discussion in the workplace or with any customers.

WHy do you keep mentioning 1%? Where does the 1% come from?

P.S. There are multibillion dollar companies that don't think 0 and 5 as LSD look horrible.
 
Last edited:
It's either really early, or I'm still not following. Where is 102.3V coming from (other than 1/10th of 1023)? What relevance does it have on the 0-25V input signal?

It's scaling the input to match the resolution - so make the maximum input to the analogue input equal to 102.3V at the input of the attenuator. This gives you a nice display, with no scaling required (other than inserting the decimal point in the correct place).

When you input 25V the output of the ADC will be 250, you simply stick the decimal point between the 5 and the 0 to give the correct reading. No maths involved, and it gives you 0.1V resolution.

I have never understood the reasonings put forth on ADC scaling to drop digits within the displayed value. I find it odd this topic only ever seems to come up on the forums. I have never had this discussion in the workplace or with any customers.

When you use your multimeter does the last digit only display some values? - I thought not :D

If you don't understand the basic principles it's unlikely you would be discussing it with customers, or indeed if you should be talking to customers at all?.

WHy do you keep mentioning 1%? Where does the 1% come from?

Because it's difficult to manage 1% accuracy (and calibration), and my suggestion gives better than 1% accuracy (depending on the rest of the circuit). In fact for your 25V requirement it gives 0.4% accuracy.

P.S. There are multibillion dollar companies that don't think 0 and 5 as LSD look horrible.

Pretty crappy companies then - and bear in mind that's only ONE example of poor scaling, and the most useable one - if you're scaling by other values it gets worse.

As I said before, get your calculator out and do some sample readings - as we're talking about a 10 bit conversion, try the 13 values from 500 to 512 and apply your scaling maths to them, and see what results you get - perhaps then you'll understand the issues.
 
Nigel.

Here are your 500-520 values computed based on a 5V maximum and a 25V maximum.

Count 5V 25V
500 2.441 12.207
501 2.446 12.231
502 2.451 12.256
503 2.456 12.280
504 2.461 12.305
505 2.466 12.329
506 2.471 12.354
507 2.476 12.378
508 2.480 12.402
509 2.485 12.427
510 2.490 12.451
511 2.495 12.476
512 2.500 12.500
513 2.505 12.524
514 2.510 12.549
515 2.515 12.573
516 2.520 12.598
517 2.524 12.622
518 2.529 12.646
519 2.534 12.671
520 2.539 12.695

I see exactly what I expect, very close to what I see on the bench (quick wiring, not neat, somewhat noisy). What are you talking about?

How are you defining accuracy (what vs. what)?
 
Why 20k and 20k for the unity inverting opamp? Why not 0 and 0?
0=short or a piece of wire.
20k and 20k = gain of -1 in this case. (inverting) Not 1 but -1.
The first amp inverts the signal and the second one also inverts. -1 X -1 = 1
Use any two resistor of the same value. (ok not any...) but 200k or 100k or 51k.... It is a good idea to use the same parts all over the design.

If you don like the last amp .... Do the inverting in software.
(for 8 bits; 0=5 volts and 255 = 0 volts)
 
0=short or a piece of wire.
20k and 20k = gain of -1 in this case. (inverting) Not 1 but -1.
The first amp inverts the signal and the second one also inverts. -1 X -1 = 1
Use any two resistor of the same value. (ok not any...) but 200k or 100k or 51k.... It is a good idea to use the same parts all over the design.
Oh. I haven't a problem with the last opamp. Even understand that it is gain -1. I thought there was an opamp configuration (inverting buffer) that did not have any resistors in the feedback loop.
 

Hey wait a minute. The voltage reference is -4.5V. Where I am I supposed to get that?!

I just spent the entire afternoon putting together one huge simulation of the entire system. Unfortunately, the offset is also needed in the third stage but adding instead of subtracting. I'm not sure the project managers are going to like the design very much. Crutschow's tagline pretty much hit this on the head (inside every little problem there's a big problem trying to get out). I'm dumping this on the manager to find out how far the customer is willing to push out their limits and requirements.

I also now see the "pile of resistors" that has been mentioned. I was only thinking of the resistors for creating the offset. I was not thinking of the resistors that form the differential opamp. Once upon a time, I ran into a differential opamp design and don't recall having to deal with "a pile of resistors". After nearly two hours of searching and review, I found out why. That circuit didn't use a differential opamp, is used an instrumentation opamp. No pile of resistors. Ok. Back to step 1.
 
Last edited:
The voltage reference is -4.5V. Where I am I supposed to get that?
I used -5V.
You can get that from the negative supply and a LT1634-5 shunt reference along with a resistor, as shown here.
upload_2017-8-7_20-31-24.png
Unfortunately, the offset is also needed in the third stage but adding instead of subtracting.
What does that stage do?
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top