How necessary is a buffering opamp?

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

Having a looksee at the specs on the megas, they seem to have a respectable ADC. I have a client who's looking for a dirt-cheap logging solution to cram in a very small area.

Does anyone have any experience with just using some resistors and a low pass filter on the adc?

I've always put a buffering amp inline, but perhaps that is overkill for this situation.

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

avr a/d wants to see 10k or less out the a/d pins. An rc right to the a/d pins is ok if the volts doesnt go > 5

Imagecraft compiler user

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

If you just want low frequency response then an LP filter is fine. The circuit only has to supply a 10k impedance for a few microseconds.

Ralph Hilton

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

Agree with Bob and Ralph with a few more comments.

Adding an op-amp CAN have some advantages, especially if the signal source has a particularly high output impedance. Piezo-effect sensors come to mind. On the other hand, there are some penalties that can be pretty large. Power consumption is one. The fact that, even with rail-rail inputs and outputs, op-amps will only swing within a 100mv or so of ground and the positive power supply is another. Also, op-amps have offset; it CAN be small with respect to one bit of a 10-bit ADC, but rail-rail op-amps tend to be somewhat worse than others in this regard. Op-amps also add noise, but, again, the rail-rail ones generally are not as good as possible. And, of course, there are the issues of board space and cost.

Some sensors will need buffers. Many won't. It depends on what you need to do.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

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

Yet another line of comments:

A buffer is not necessary in all applications, it depends on the bandwidth.

If you need the full bandwidth of the ADC, then the source must be low impedance (< 10k). This is because the sample/hold capacitor must track the signal before the next conversion.

For low-frequency signals higher impedance is fine.

The ADC input resistance (for mega16 and a few others) is 100Mohm typ.

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

The term "ADC Input Resistance" is a bit misleading. When the sample/hold switch is open, it is, indeed, high. But, during those few nanoseconds when it is closed, it is a LOT lower, effectively. For this reason, transient behavior of the signal source is important. This is one of the reasons why an RC (lowpass) input filter works - the shunt C of the filter provides the input current to the ADC when it samples.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

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

ka7ehk wrote:
Agree with Bob and Ralph with a few more comments.

The fact that, even with rail-rail inputs and outputs, op-amps will only swing within a 100mv or so of ground and the positive power supply is another.
Jim

The OPA2350 gets quite a bit closer with very low noise but that's about the only one I know of.

Ralph Hilton

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

Hi

Curious on the input resistance have to be less than 10K.
How is this factor is determine ?
Where do one find the actual details or reference ?

I can understand the 100M from the electrical characteristic in the datasheet.

Ken

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

It is my understanding that it is based on error measurement on the ADC. When the input resistance is higher than 10K, the error specifications cannot be guaranteed.

For the Mega16, just as an example, you will find it discussed in the "Analog to Digital Convwerter" chapter in the section with title "Analog Input Circuitry", second paragraph.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

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

Hi Jim

I had a look at the Mega16 datasheet page 210 & saw the schematic on the next page.
I do not have that chip, so I wouldn't have know about it.
A pity these information are sometime mention or not in other datasheet eg (ATtiny26).
Yeah I know this is the flavour of the month.

Ken

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

I use a zener diode (=Vcc) across the ADC port to avoid over-voltage - seems to work.

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

Quote:

I use a zener diode (=Vcc) across the ADC port to avoid over-voltage - seems to work.

Since this topic seems to mostly deal with low-drive signals, be aware that zeners (and other protection-diode schemes) >>can<< have leakage that may be significant. We especially need to be careful in battery apps when uA are important. Not all diodes are created equal.

From AVR port diagrams in the datasheets, it >>appears<< that the built-in protection diodes of the AVR are active on analog signals. Whether the diagrams reflect how the chips are really built...

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

All I'm interested in would be a very well-defined signal @ effective DC, maybe ~10hz update times tops. I suspect the required low-pass network would deal with the impedance drop issue nicely.

Interesting tidbit about the protection diodes. Worth testing sometime. I suspect, IIRC, they are bypassed by the ADC when port A has the ADC initialized.

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

If the data logger is going to be portable and moved to a number of different monitiring points, it would be a mistake to NOT include input protection - diodes or otherwise. Spent the extra two or three dollars on a couple of resistors, diodes and Op-amp. Else, you'll not only have a dirt cheap datalogger, but a dirt cheap datalogger that becomes a paper weight, and a boss that will smear the egg on a little thicher every time he slides a peice of paper out from under it.

If it's worth doing, it's worth doing right - the first time!

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

Last Edited: Wed. Nov 30, 2005 - 04:49 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As always (well, almost always) I agree with Carl. Our typical scheme for real-world signals coming into the AVR is a series resistor, double-diodes to the rails, and a cap to ground near the pin.

Quote:

Interesting tidbit about the protection diodes. Worth testing sometime. I suspect, IIRC, they are bypassed by the ADC when port A has the ADC initialized.

Certainly not in the Mega88 datasheet diagram in the very first section on I/O Ports. That diagram shows the diodes in front of any "logic". Remember that just because the ADC is enabled and doing a conversion on a pin doesn't mean that PINx or PORTx for that pin are not valid.

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

Reliability is not as important as price in this application. Large volume fixed installation.

I'll have to see about doing some more testing. Initially the setup seems very robust, but I haven't hit it with the BBQ ignitor yet.

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

Quote:
Reliability is not as important as price in this application.

So are we talking about 1,000 units, 10,000 units, 100,000 units or 1,000,000 or more units?

A resistor cost about 1.5 cents U.S. Two 1N4148 diodes cost about 8 cents each. so, negating the Op-Amp, you're talking about 17.5 cents. So, just how cheap do you expect to get before you run the "High" risk of completely compromising the integrity and reliability of your product?

For a large volume product, you'll probably find that the cost of the three components costing 17.5 cents becomes insignificant compared to the cost of the development and maintenance of the product through out it's lifetime.

I deal in volumes of less then 10, mostely. For the sake of reliability, I'd gladly spend a couple of extra dollars per unit as insurance of reliable operation.

Then too, where is this product going? Is it consumer? Is it industrial? I'd like a dollar for every time I installed some new-fangled product that just couldn't deliver reliable operation out on the manufacturing floor. But then too, it is overcoming the neglegence and incompetence of the cheapskates that give me the edge in the industrial setting.

My company loses about $68.00 per minute when a given production line goes down. Even a little glitch that temporarlly disrrupts production usually measures out to more then 30 minutes of recovery time. So your milisecond glitch just cost my company $2, 040.00. If this glitch happens every 30 minutes or so, that basically means we run at about 1/2 production line rate. In industry, embedded control systems must operate reliably, day in, day out, 24/7, without malfunction.

Spend the 17.5 cents and save the reputation of your product and your company!!!

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

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

Don't let your customer or your boss fool you. Reliability is never important until you build something that doesn't work.

How much do you lose when one comes back for warranty repairs? On 100 of them you "save" $17.50.

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

Easy, easy. Production is not my department on this particular piece nor is this my product per se. Cost isn't the only factor, size is as well.

The resistor and required diode protection is obvious and not a serious problem. However, testing will reveal if the internal AVR diodes are sufficient in combination with the low pass network already present. My question was specifically about the need to buffer the signal with an opamp, not the requirement for protection.

A dollar per unit on something that might cost $5 is a large percentage of the price. Especially if it is not necessary, which is something that has not been resolved yet.

We'll see what the atmel guys say about the internal diodes.