Boosting an analog signal

MORA99

Senior Member
I have a US module, that I would like to read using readADC, but its output is much too little for picaxe to detect changes precise enough.

For the range I need it will output 0.2 - 0.5V, so I need to boost this x10, but also make sure picaxe dont get fried, since the sensor can (and will at some time) output op to the vcc, which should not be multiplied.

Any ideas/links as to how this can be done ?
I keep hearing "OpAmp" but dont find any useful guides on google :(
 

MFB

Senior Member
will 10-bits do?

An opamp will do it for you and the following site has lots of practical circuits, www.discovercircuits.com/list.htm. If you plan to operate it from your PICAXE supply (the best way to avoid damaging the ADC input) then you will need to use a rail-to-rail input/output opamp. The 8-pin dual ampTS922IN is a good example.

However, how much resolution do you really need? Taking a 10-bit ADC reading will still give you about 1% over the input range you mention and many sensors/components are unable to offer better accuracy than this anyway. You could therefore save on the opamp, depending on your application and input noise level.
 

gengis

New Member
http://www.national.com/an/AN/AN-20.pdf basic op amp circuits and page one and two should get you started.

Op amps are good for a variety of things: amplification, logarithmic amplification, attenuation, impedance shifting, signal inversion, integrating a fast moving signal into an average, creating a ramp signal, sample and hold, re-zero (putting the baseline back to some value), applying a signal offset, etc.. Ubiquitous and more fun to learn about.

http://www.national.com/appinfo/amps/0,2175,967,00.html The fount of knowledge about op amps - or more than you ever wanted to know.

Walt Jung's book "The Op Amp Cookbook" is an invaluable reference and your library should have it or buy a copy or used copy. Very easy to understand with little or no math.

There ought to be some secret poke command that would reset the internal reference for the 'axe A/D but that programming stuff is outside my ken.

What say you digital gurus?
 

sghioto

Senior Member
I agree with MFB, probably don't need the opamp. However another good opamp choice is the LMV321ILT, a single rail to rail amp in a 5 pin surface mount. You won't damage the pic because the output of the opamp cannot exceed the supply voltage.
 

Attachments

hippy

Ex-Staff (retired)
There ought to be some secret poke command that would reset the internal reference for the 'axe A/D but that programming stuff is outside my ken.
In a perfect world there'd be a bit to set to do anything and everything :)

Unfortunately there's only usually one Vref on-chip and that's usually fixed ( the power rail or an actual reference voltage ) and no way to alter it. The theory no doubt being that if you wanted an alternative reference you would just wire it up and configure the chip to use it.

With Vref being the power rail, it's easy enough to run the PICAXE at less than 5V and ( with the magic of Einstein's invention of relativity ) the incoming signal increases; 0.5V is just 10% when run at 5V, but 16% at 3V.

There was a thread recently about supplying an alternative Vref for X1's, not sure what came of that.
 

MORA99

Senior Member
I could lower the voltage to get better res, but I still need the feed the US module 5V or it will just send a lower value.

I dont know how precise I need it, its just for fun, but my DMM shows the readout pretty precise, wheres the picaxe will only change about 10steps over the short range. (at 8bit readings)

I agree with MFB, probably don't need the opamp. However another good opamp choice is the LMV321ILT, a single rail to rail amp in a 5 pin surface mount. You won't damage the pic because the output of the opamp cannot exceed the supply voltage.
Thanks for the schematic, I will get some opamps after the hollidays and try it.




Thanks for all the surgestions and merry xmas :D
 

moxhamj

New Member
I agree, Google is easy to find lots of answers but hard to find the right answer. One day I must scan in a book I have on op-amps. It is out of print and the company that printed is out of business so copyright should be ok.

Anyway, you want to ampify a voltage from 0.2V to 0.5V by 10. Actually what would be really handy would be to amplify that voltage range to take advantage of the full 0 to 5V range of the picaxe ADC. This requires a differential amplifier, which does two things, it amplifies the voltage and it also translates the level.

So we want 0.2V to come out at 0V and we want 0.5V to come out at 5V. Difference amplifiers amplify the difference between the two voltages with a gain you can change, and also translate the level with a centre point you can define. The difference between these voltages is 0.3V and the gain therefore is 5/0.3 or 16.667. The centre point is 0.2+ (0.3/2)=0.35V.

See the schematic below. The gain is the ratio of 1M/100k =10 as you requested. You could make the 1M resistors 1.5M if you like and get a gain of 15 which is getting close to the required 16.667.

The trimpot is set for the midpoint - 0.35V. You could set this with discrete resistors if you like. The trimpot value (5k) is 1/20th of the 100k imput impedence so it is low enough that it won't upset the value at the + pin of the op amp.

The CA3140 is a rather nice op amp in that it can swing its outputs between 0V and the supply voltage. More common op amps are the 741 or its 4 opamps-in-a-package equivalent the 324. These ones can only go from 1.5V to 3.5V on the outputs with a 5V supply. Not a major issue with picaxes especially on readadc10.

Actually any op amp will work- it is just that some don't quite go from supply rail to supply rail.
 

Attachments

wapo54001

Senior Member
The August 2006 issue of Nuts & Volts has the circuit you need on page 27. I have a PDF of the page, but don't know if it's legal to post it here (I will if it's OK). The circuit uses an LMC662, with the first amplifier removing the offset and the second amplifier used to set total gain with precision. With this circuit you can remove the .2V offset and then amplify the ground-based voltage range by any value you want up to the 5V limit of the power supply.

If, as in some cases, you need a circuit that also inverts the output because a sensor outputs a higher voltage for a lower "value," you can simply connect the output of the first amp to the inverting input of the second amp and still set the gain to whatever you need. Of course, you can also do this in programming the Picaxe.

If you do a search on "expanded scale meter" on Google, you will find many hits with the circuit I think you're looking for.
 
Last edited:
Top