ADC Converter

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

A quick question. When putting a voltage to the ADC input, does any current limiting precautions need to be put in place, or do I just place the input voltage directly to the ADC input (unfortunately the datasheet doesn't seem to say)?

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

The datasheet says dont apply more than 5V. That's excellent advice.

Imagecraft compiler user

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

Quote:

The datasheet says dont apply more than 5V.

It says that, Bob? That would be new to me. Any particular "the" datasheet, since OP did not mention a particular model? Could you give me a reference for that assertion that you stated as fact?

I suspect, without opening a datasheet, that I >>will<< find references to not apply more than Vcc + a diode-drop to any pin except /RESET, in the Absolute Maximums. In the ADC, I think the min-max are Gnd & Aref.

Does your biblical 5V apply universally to my 3.6V as well as my 5.5V designs? Sheesh.

Lee

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

He asked a general question. I gave a general answer. Lets ask him: Hey Salgat! Are you running on 5V?

Imagecraft compiler user

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

It's a crap answer, and you know it. The datasheet says no such thing, EVEN IF OP IS RUNNING AT 5V. And is the magic "5V" you are referring to Vcc or Vref or what?

Don't make a pontifical pronouncement, presented as dogma, unless you actually >>are<< the Pope speaking ex-cathedra.

I repeat: Point me to your datasheet reference, and I'll apologize and quietly slink away, tail tucked. But don't pull the Rush Limbaugh bluster on me and not answer the question but change it to >>another<< question.

Lee

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

Salgat was asking about current limiting. NO, you do not need current limiting. Connect the input voltage directly to the ADC pin. HOWEVER, your input voltage must not exceed the supply voltage to the AVR.

(what's 0.5V between friends, theusch?)

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

Thanks for your input guys. I was a bit confused since AVR beginners talks about current limiting, although that didn't seem to make sense unless the thing was an analog ammeter that measured on a scale of 1mA.

http://www.avrbeginners.net/arch...

Thanks for clearing up the confusion :)

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

Quote:

(what's 0.5V between friends, theusch?)

It's because of the protection diodes. Let's say a system using AVcc for Vref. One would like the A/D to measure "rail-to-rail" from Gnd to AVcc. Now, you tell me a real world signal that is going to obey all the rules and stop at exactly AVcc+0.00V and/or Gnd-0.00V. It ain't gonna happen in the real world; chances are that if you'd want to ensure that you'd no longer have rail-to-rail range.

Now, is the drop of the protection diode EXACTLY 0.500V? Probably not.

But the point here is that a proclamation about 5V is not serving anything. Is it that much more difficult to state something like "ensure that the range of the input signals does not exceed that given in the Absolute Maximum Ratings section of the datasheet. If your signal may roam outside that range, ensure that it is current-limited such that the ratings of the protection diodes will not be exceeded." Yes, I know, my simple-minded approach would require someone to dig into the datasheet to find the section. It is SO much easier to proclaim "Thou shalt not kill"--errr, thou shalt not exceed 5V--and totally ignore the fact that it applies only to one of two halves of a specific configuration.

As you mentioned, only indirectly when exceeding Gnd-Vcc/AVcc voltage range by enough to cause the protection diodes to conduct will current-limiting come into play with the flat "5V" statement.

If your signal comes from the real world and poking fingers can get at it, it is well to try to protect the AVR from static and miswiring and surges and the like. Our typical scheme is a pair of diodes that dump to/from the supply rails; a series-R, and a small cap near the pin.

Lee

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

Mr. Salgat.... are you using VCC=5V on your AVR?

Imagecraft compiler user

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

That's what I usually use.

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

Salgat wrote:
I was a bit confused since AVR beginners talks about current limiting

The current limiting resistor in that diagram protects the AVR in the event that your input voltage to the ADC goes higher than the supply voltage. If it is possible to have this happen in your project (the ADC input comes from an external source), you should include the limiting resistor or you may blow up the AVR.

Lee - My 0.5V between friends comment was a light-hearted way of saying you've overengineered your answer. Not everyone needs to know everything about everything to get an answer they're happy with :P

Quote:
Fry: It's crazy! How could they even know about a show from a thousand years ago?
Farnsworth: Well, Omicron Persei 8 is about a thousand light years away. So the electro-magnetic waves would just recently have gotten there. You see-
Fry: Magic. Got it.

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

Quote:
Mr. Salgat.... are you using VCC=5V on your AVR?

Bob, i think u're the very funny guy! :).
In general, i think it's right. What uP of AVR on earth can run with 6V,7V or 12V? If there is, it's for special purpose...
So, if you running on 3,3V. And of course you dont put the voltage input 4V. 4V < 5V right? :lol:

But, actually, i think it's base on Vref of ADC. And, the Vref of ADC base on what they configure with the register. And, "in general" they're point to Aref.

So, with the answer the input voltage not exceed to the AVref. Can it be "in general"?

It's the same with you, bob. But more detail!

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

But every day some guy comes here and asks why he gets bad a/d readings and he is trying to read +-15V with the a/d. First item to check is that voltage on pin doesnt exceed allowable range. But I'll let Lee Theusch field the questions about a/d converters from now on.

Imagecraft compiler user

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

No, Bob, I'll retire since your random nuggets of wisdom are apparently the gold standard. (pun intended)

Lee

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.