ADC input voltage greater than AREF but less than Vcc?

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Allowed?

Can't see anything in the (m168) data sheet, but looking at "Figure 23-1. Analog to Digital Converter Block Schematic Operation" it looks like it should be OK...and I will presumably get 0xFF (8 bit ADC) all the time that ADCin >= AREF?

Thoughts?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That would be my guess.

If you are expecting it to be higher than AREF, why not set the reference to AVCC?

--greg
Still learning, don't shout at me, educate me.
Starting the fire is easy; the hardest part is learning how to keep the flame!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think that the data sheets on many/most AVRs say that the 10-bit output will be 0x03ff when the input exceeds Vref. I don't see that on the M168 data sheet but would expect that to be the case. If so, then the 8-bit result would, indeed, be 0xff.

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gregsmithcts wrote:
If you are expecting it to be higher than AREF, why not set the reference to AVCC?
'cos I'm trying to measure the AVR's own supply (indirectly via a potentially divided input voltage to the upstream regulator - don't ask)and to get the resolution I need to compare with 2.5v reference voltage on AREF.

At high input voltages the potentially divided regulator input voltage is greater than 2.5v (but less than 5v)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You mean you are trying to measure the pre-regulated supply voltage? Intriguing.

--greg
Still learning, don't shout at me, educate me.
Starting the fire is easy; the hardest part is learning how to keep the flame!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would add a Schottky diode between the ADC input and the processor's Vcc. Thee WILL be times, as your system turns on, that that the divided input voltage will exceed Vcc and this diode will keep uglies from happening, Cathode to Vcc.

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

You mean you are trying to measure the pre-regulated supply voltage? Intriguing.

Quote:

I would add a Schottky diode between the ADC input and the processor's Vcc. Thee WILL be times, as your system turns on, that that the divided input voltage will exceed Vcc and this diode will keep uglies from happening, Cathode to Vcc.


I'd say a fair percentage of our production AVR apps "watch" the raw voltage in this manner. Watching the regulated Vcc for a drop is far too late to do anything useful in racing powerdown.

Jim, I can't recall any protection diodes in any of our schematics. On real-world signals, yes. And I can't think of any problems.

Now, remember that the voltage divider usually has quite high ohm values, and resulting current will be quite low.

Also, tell me how what you described helps--all this will do is put another diode in parallel with the internal protection diodes right? That will start conducting >>sooner<<. Won't that make it worse?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Use VCC as the Ref and set the multiplexer to read the internal VREF. You now know what VCC is.

So using VCC as the Ref will enable you to read any voltage between 0V and VCC.

If you discover the voltage you are trying to read is below 1.1V, you just change the ref to 1.1V.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Use VCC as the Ref and set the multiplexer to read the internal VREF. You now know what VCC is.

Ummm--that isn't the task. The task is to read the "raw" voltage before regulation.

Many of my production apps use AVcc as Vref for this. The divider is sized so that even high raw voltages don't exceed Vcc. And the higher the raw voltage, the more ohms in the top leg of the divider so the current is quite small even if it were to be exceeded.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, the relatively high resistance divider helps to protect the input and an additional catch diode may not be warranted. However, if the resistors are lower or and if there might be turn-on spikes, then a diode might be useful insurance. I think that I remember reading that the built-in protection diodes can tolerate a few ma. That should be the criterion as to whether an internal diode is sufficient or not.

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!