Interface of opamp with analog input

icebox

New Member
I have an automotive oil pressure sensor wired into a wheatstone bridge and the bridge output feeds into a difference opamp. The op amp output I can calibrate easily to give 0-100psi = 0 - 5V out into a standard multimeter. Problem is when I connect the opamp output to the analog input on a 20M Picaxe the readings on the Picaxe LCD display are either unstable or don't reach full scale (5V) depending on what resistor arrangement I try between the opamp & 20M or what drive I put into the bridge. There is no problem with the display, it works spot on using 5V input over the range of a pot fed into the 20M.
I think the problem is the impedance matching between opamp output & the 20M input, but can't figure out where I'm going wrong. Any ideas?? Have attached basic schematic.
 

Attachments

MFB

Senior Member
I suspect the problem is the supply that you’re using to power the opamp. You really need to power the opamp from the same ground and positive supply as the PICAXE, and that means using a rail-rail output device (e.g. TS922). This configuration would eliminate the possibility of the PICAXE analog input being over/reverse driven, and the need for the series resistor. With any offset and gain adjustments being made by the opamp circuitry alone.
 

Dippy

Moderator
Hello.

Which PICAXE pin?
What op-amp?

Can you do a more detailed schematic showing how you have connected grounds.

You shouldn't need a wacking great series res like that.
 

boriz

Senior Member
The Picaxe ADC does draw some current, but I don’t know how much. I think the consensus is that using a pot for the input, it must be 10K or less. That means a maximum signal impedance of 5k. Obviously the lower the better anyway. I always try to go for 1k or better.

If the problem does end up being impedance, a simple op-amp DC follower/buffer (EG: signal to non-inverting input, output fed back to inverting input, 100% feedback), should fix it.

This is one reason I favour the LM358. It’s the same 8 pin footprint as a single, but it’s a double.
 

Dippy

Moderator
Well it would have to be woos of an op-amp if (just) the ADC affected it.
But on the other hand maybe it is :)

Along the way you may also need a bit of smoothing/damping if used in a vehicle.

Ah boriz, there are more op-amps than hairs on Stan's head :)
 

boriz

Senior Member
@Dippy

An otherwise unloaded op-amp would probably have no trouble, but once you introduce feedback, some of the maximum available output current is used up driving the feedback (depending on circuit configuration). So how much of the op-amps output current is available to drive the ADC will depend on the circuit design as well as the type of op-amp. Loading the output carelessly can also result in oscillation.

A buffer would fix all that, if indeed it’s a problem.

I know there’s a lot of op-amps, but I ordered a load of LM358’s once, and now I have to use them up :)
 

Dippy

Moderator
I realise that boriz. Check out the feedback value. And the feedback to opamp loop is high impedance anyway, sut then we have the source oh well, it goes on don't it ... but I cannot believe in this case that that is an issue. If it is then oops.

Anyway, more input from icebox is needed, so lets not tangentialisify so soon ;)
 

BeanieBots

Moderator
Unfortunately, that diagram says almost nothing.
Need the FULL diagram including op-amp type and power rail voltages to be able to answer the question.
That includes how the bridge is driven. It requires a full differential amplifier if it's drive voltage is common to the PICAXE supply. I suspect that is the problem experienced when the PICAXE is connected, but can only guess without a full diagram.

(the 100k is WAY too high, 10k Max.)
 

sghioto

Senior Member
icebox,

First thing is to eliminate the 100k resistor in series with the ADC input. Next I would look at the output of the opamp using an oscilloscope to see if there is any noise or high frequency oscillations riding on the DC output. The normal integrating characteristics of a voltmeter is often sufficient to act as a filter hence a nice 0 - 5 volt output. If noise or oscillations are present then proper filtering is required.

Steve G.
 

gerrymcc

New Member
I had a similar problem, and posted a question here.

Search for my user name. Read the topic related to ADC values, dated 10 Jan 2009. All the answers posted were very helpful, and I fixed the problem. There is one very helpful attachment regarding the input characteristics of the SAR ADC used in the PICAXE. Basically, a low pass filter and some averaging fixed my problem.
 

icebox

New Member
Thanks all for your replies. Will follow up the suggestions made so far in coming days & let you know how I go. Gerrymcc, great article you included. Had thought of similar RC setups to trial but not that one.
If no luck I'll include more info and a better schematic.
 

icebox

New Member
Found the problem a while back with this circuit. I had overlooked a 5.1V zener that was connected from the picaxe input to ground from a previous experiment. Removed the zener, put in a 5k series resistor & a 0.01uF cap to ground & it worked a treat!
Needed the cap to smooth it out at the top end of the scale.
The zener leakage current was acting like a low Z input the closer it go to 5V.
 

BeanieBots

Moderator
Thanks for the update and explanation of your findings.

A nice example to all those who think a 5v1 zener won't effect a 5v0 signal:rolleyes:
 
Top