Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Level shifting a voltage.

Status
Not open for further replies.

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
I'm crap when it comes to analogue electronics..

I need to interface a voltage from a angular output to an older system.

The system provides 8v, BUT!! there are two 100 ohm resistors on the 8v rail and the 0 volt rail.
The inclinometer needs 5v... Said output ranges from 0.6v ( -80°) up to 4.4v (+80°)..

I will sit the device so I get a nice 90° output... The system requires a 3 ~ 4v input 3 being 90° and 4 being 0°..
with a bit of playing space 1 have chosen 3.15V = 90° and 3.85 = 0°..
upload_2017-6-14_14-48-56.png

The 100 ohm resistor causes the output of the LM79L05 to be 2.85v. No matter how attenuate the output I cannot get a clean 90° output between 3 ~ 4 volts.. If I use a 220ohm resistor from the output to the system and place a diode to"prop" it up I get somewhere near, but diodes aren't the best when it comes to temp stability.

upload_2017-6-14_14-54-53.png

Can someone help??
 
Please excuse my quick scribble, but I would do something like this using a 5v rail to rail op-amp, I suggest an MCP6042.

Level shifting.png

I would put the regulator in the +ve supply line, if only because my brain works better that way.
The voltage divider across the 5v supply could be made adjustable to set the correct "zero" point.
The resistors around the opamp could be used to set the gain, and/or a potentiometer on the output could be used to reduce gain to give the desired span.

As with most things, the devil is in the detail.
Whether this would work in your application I do not know.

JimB
 
I must admit I was also steering towards a 7805 as the 7905 doesn't really do what I want.

There is little room but I have little smd mcp602 5 pin devices, its the whole host of resistors I'll need to fit in!!
 
Sorry, but I got a little lost.
What exactly are the inputs with respective outputs that you want?
 
The angle sensor is 5v.... The swing is +80 ~ -80 degrees... 0.6v to 4.4v... 160 degree total.

The old system (not mine ) requires a 90 degree ( calibratable ) 3 ~ 4v input...

The old system gives 0v and 8v BUT!! two resistors ( for shorting out purposes ) on the outputs..
 
Still confused. :confused:
If the angle sensor only goes to 80 degrees, how will you get 90 degrees?
 
Sorry... The angle sensor has 160 degrees When tilted at -25 degrees you can the turn the thing to +65 degrees to represent the full 90 degrees needed. You can ( basically ) tilt from -45 to +45 for better linearity with an output of 1.25v to 3.75v respectively..

I am going to try the positive reg tomorrow and try to attenuate with a resistor potential divider... As long as I get a 90 degree movement within 3.15 to 3.85v It'll be useable..
 
Here's the LTspice simulation of a circuit that (I think) gives the offset and gain that you want.

upload_2017-6-14_12-43-33.png
 

Attachments

  • Non-Inverting w +Offset.asc
    1.4 KB · Views: 112
I don't think I can get away without the opamp.
You possibly could if the system load resistance is high enough and the inclinometer output can drive a lower impedance version of the three resistors (say each one reduced to 5% to 10% of the values shown).
 
Can you tell us which angle sensor you are using? If not, is its output natively a voltage or something else? By that I mean, some of the angle sensors I have used have a "native" output of a PWM at 100 Hz. That can be converted to a voltage with a low-pass filter (R=10 k, C= 1.0 uF). Obviously, input impedance for the next stage has a marked effect on the voltage range.

I agree about using a high impedance op-amp to tailor the output to what you need.

John
 
Messing with Carls equation... I finished up with this..

upload_2017-6-15_11-14-5.png

It gives a margin of error so I can give them a elongated slot to reproduce the old one.. I have asked them to send one of the old boards as I don't think I need to buffer with an opamp as there is a voltage follower on their board..
 
What point is used for common for the output?
If you use 0V then the output will shift with the 8V voltage value.
Is that acceptable?

Using a 78LO5 would not have that problem.
 
Using a 78LO5 would not have that problem.
It was harder to get anything that way... I knew I was nearly there... Your answer was a potential divider across the (now) 5v rail.. It works out 2.85v to 7.85v with reference to ground..

upload_2017-6-15_17-36-40.png


Labelled the parts so you get more of a feel.. I will test this on a system as soon as I get it ... I'm more than confident it will work.. Just to stop any 0v confusion... I only have access at points A , B and OUTPUT so there is no 0v.. This is to replace an existing angle sensor that is now defunct!
 
It was harder to get anything that way... I knew I was nearly there... Your answer was a potential divider across the (now) 5v rail.. It works out 2.85v to 7.85v with reference to ground..

View attachment 106494

Labelled the parts so you get more of a feel.. I will test this on a system as soon as I get it ... I'm more than confident it will work.. Just to stop any 0v confusion... I only have access at points A , B and OUTPUT so there is no 0v.. This is to replace an existing angle sensor that is now defunct!
So which point is signal common for the existing circuit?
If it's 0V or point B then you have the problem I noted with the level shifting due to any voltage change at point A.
 
So which point is signal common for the existing circuit?
If it's 0V or point B then you have the problem I noted with the level shifting due to any voltage change at point A.
Tell me about it.... The original angle sensor was cmos so a smight easier to interface... This device is 5v ±0.25v, so causes problems..
The first one
upload_2017-6-16_7-13-0.png


And now
upload_2017-6-16_7-18-0.png


Even the first had issues, but this is next to impossible..
 
My point is, I believe you need to use a positive regulator, such as the 7805, so that the ground reference is the 0V line, and then use a circuit similar to what I posted.
Otherwise your level shift voltage will be affected by the 8V voltage level.
 
My point is, I believe you need to use a positive regulator, such as the 7805, so that the ground reference is the 0V line, and then use a circuit similar to what I posted.
Otherwise your level shift voltage will be affected by the 8V voltage level.
Fortunately for me the 8 v is the more stable... and as 3v is the low ACD reference point a LM7905 gets me closest! If I use a LM7805 the high voltage will be about 1.4 v above the high ADC reference point.. And you keep forgetting... I have no 0v..

Either way I'll get some issues, The equipment has arrived so testing will commence..
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top