Jump to content
Electronics-Lab.com Community

Voltage level shifting


Recommended Posts


You don't need 4 op-amps to achieve this. 2 will do it fine. You just need a circuit that will give you a zero and span calibration (this is the 1st op-amp). The zero cal will move the voltage window up or down. The span cal will widen or narrow the window, or voltage swing. You can add a span calibration with a pot in the feedback loop of the op-amp. The zero calibration adjustment can be added by connecting a vref bias to the negative input of the same op-amp. You will want to add a buffer on the output to keep other things in the circuit from effecting your calibration (this is the 2nd op-amp). The buffer is just another op-amp with no amplification. The cal can be performed by injecting 2.5V to the input and adjust the voltage reference pot at the op-amp minus input (the zero cal) until you get zero at the output. Then inject 5V into the input and adjust the pot in the feedback loop (the span cal) until you get 5V at the output. You will need to go back and forth and make the adjust a few times since the adjustments effect each other. Each time you adjust, you will notice you are shaping the output closer and closer to the shape you want. Once you see 0 out when you inject 2.5 and you see 5V when you inject 5V, then your adjustments are finished.
This is the type of circuit that has been used to shape the outputs of sensors in instrumentation for years. Most sensors are not very linear without a little help. Seems like it is almost a forgotten application since most manufacturers now scale the voltage in the source code and/or use sensors with digital outputs. Note that without a bipolar supply on the op-amp, you will not get the output to be perfect zero to five.

Is this a school project or a project for your employer?

MP

Link to comment
Share on other sites


You don't need 4 op-amps to achieve this. 2 will do it fine. You just need a circuit that will give you a zero and span calibration (this is the 1st op-amp). The zero cal will move the voltage window up or down. The span cal will widen or narrow the window, or voltage swing. You can add a span calibration with a pot in the feedback loop of the op-amp. The zero calibration adjustment can be added by connecting a vref bias to the negative input of the same op-amp. You will want to add a buffer on the output to keep other things in the circuit from effecting your calibration (this is the 2nd op-amp). The buffer is just another op-amp with no amplification. The cal can be performed by injecting 2.5V to the input and adjust the voltage reference pot at the op-amp minus input (the zero cal) until you get zero at the output. Then inject 5V into the input and adjust the pot in the feedback loop (the span cal) until you get 5V at the output. You will need to go back and forth and make the adjust a few times since the adjustments effect each other. Each time you adjust, you will notice you are shaping the output closer and closer to the shape you want. Once you see 0 out when you inject 2.5 and you see 5V when you inject 5V, then your adjustments are finished.
This is the type of circuit that has been used to shape the outputs of sensors in instrumentation for years. Most sensors are not very linear without a little help. Seems like it is almost a forgotten application since most manufacturers now scale the voltage in the source code and/or use sensors with digital outputs. Note that without a bipolar supply on the op-amp, you will not get the output to be perfect zero to five.

Is this a school project or a project for your employer?

MP


Well I actually need 5 OP amps as there are 5 currents I need to monitor so I can get away with 2 chips.

The good news is that I have got it working with LM324s.

Bad news is we are back to 5V supply and rail to rail amps.

Hopefully I will have this sorted by the end of the week. Thanks for all the help.
Link to comment
Share on other sites

Hi Windoze,
Here's an op-amp which may do you. It goes rail-to-rail on its input and output.

http://www.datasheetarchive.com/search.php?search=lt1782&sType=part

I'd like be interested in your final solution when you get it all going.
Best of luck.

Link to comment
Share on other sites


I have read them, so what have I missed?
Please read my PM.


The difference between my post and Staigen's is the addition of calibration adjustment. Also, the second op-amp is there to isolate the sensor circuit from the other electronics.

Your sensor will drift with temperature and with time. A fixed resistance might be fine if your circuit never leaves the workbench. However, if it is to be used in a real world application, you should consider serviceablility and calibrations. Although I do not know which current sensor you are using, all of the 0-5VDC current sensor data sheets that I looked at show a substantial temperature drift. Since Windoze states that no specific compensation can be added to the firmware, some kind of adjustment at the front end would be desirable. Else, this margin of error will cause a significant numeric error after the A2D conversion. Check the data sheet to see if this margin of error is acceptable.
Another concern would be if this circuit is to be duplicated. No two units would be the same with resistor tolerances and tolerances in other components unless there is some ability to calibrate the front end.

Hey, just my 2 cents worth....
Good luck with your design, Windoze!

MP
Link to comment
Share on other sites

  • 1 month later...

Hi,

I am working on a project that is using LDR's to sensor light which needs to be scaled to both 0-5v and 0-12volts with adjustable 'zero' points and scale factors depending on the ambient light mins and max's - looks like I need a similar cct...

I have only worked with op amps making simple comparators so far so this is new to me - after reading up on them I now know how to make a non-inverting amplifier with an adjustable scale factor - what I need to know is how to get the zero point ...

If I put 12 through my LDR and instead of getting a nice ~0-12volts output (from darkest dark to full on sunlight) and instead got say an 4-8volt range I would need to scale the output by 3 - easy.. but how do I make the 4volts output as zero before thnis scale ?

also I believe that op amps can be made to convert log scales to linear - I think this would be of use as I need a linear output compared to the LDR

any suggestions ?  is it a simple switch of the resistors in what has been discussed here already ?


cheers as always,
Nick

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
  • Create New...