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.

Need 5 to 0 to 5 volt ref

Status
Not open for further replies.

kinarfi

Well-Known Member
Here's what I have come up with so far and was wondering if there was a better way to covert a 0 to 10 signal to 5 to 0 to 5 signal, < 30 Hz. The absolute value circuit actually worked on a bread board, but not in Spice.
 

Attachments

  • Interface.PNG
    Interface.PNG
    22.6 KB · Views: 196
Here's what I have come up with so far and was wondering if there was a better way to covert a 0 to 10 signal to 5 to 0 to 5 signal, < 30 Hz. The absolute value circuit actually worked on a bread board, but not in Spice.

hi,
This is a 12V to 0V >> 0 to 5V I did recently.
 

Attachments

  • AAesp06.gif
    AAesp06.gif
    23.7 KB · Views: 193
  • Lev12to0a.asc
    2 KB · Views: 165
Thanks, modified your .asc a bit Untitle2 yellow trace is about right for what I want. Just need the right zeners.
Thanks Again,
Kinarfi
 

Attachments

  • untitled5.png
    untitled5.png
    9.9 KB · Views: 165
  • Absolute Value.asc
    2.8 KB · Views: 167
  • untitled2.png
    untitled2.png
    9.7 KB · Views: 168
Last edited:
Here's my final and it worked perfectly
 

Attachments

  • untitled.PNG
    untitled.PNG
    12.7 KB · Views: 167
Here's my final and it worked perfectly

hi,
If your posted circuit is correctly drawn, it does not work.?
For example the +5Vref OPA outputs 0V.
The main output on U5 pin #1 just follows whats input on Vin.

Have you posted the wrong circuit.?
EDIT:
The error in your drawing is the +5Vref circuit.
 

Attachments

  • AAesp01.gif
    AAesp01.gif
    22.1 KB · Views: 162
  • AAesp02.gif
    AAesp02.gif
    24.3 KB · Views: 164
Last edited:
I'm a bit confused here.

So you need to convert 0V to 10V to 5 - 0 - 5V?

What does that mean exactly?

I assume that input of 5V needs to output 0V but what should the output be with an input of 0V? -5V?

I've read all the posts and looked at the graphs but it still isn't clear to me.

EDIT:
I've had another look at the schematic and graph posted by Eric and it seems clear now.

Vout = absolute(Vin-5)

Seems like an unusual thing to do.

Perhaps there's a simpler way.
 
Last edited:
I'm a bit confused here.

So you need to convert 0V to 10V to 5 - 0 - 5V?

What does that mean exactly?

I assume that input of 5V needs to output 0V but what should the output be with an input of 0V? -5V?

I've read all the posts and looked at the graphs but it still isn't clear to me.

EDIT:
I've had another look at the schematic and graph posted by Eric and it seems clear now.

Vout = absolute(Vin-5)

Seems like an unusual thing to do.

Perhaps there's a simpler way.

hi,
I think what he is after is making the +5V point of the 0V to +10V input signal his 0V output reference voltage, also he wants to output the absolute values of the 0V to +10V input.
So he will get +5V thru 0V thru +5V, for a 0 to +10V input.

Why, I can only guess.
 
Some answers and reasons, I have a strain gauge feeding an instrument amplifier and the output was from about 2 to 12 with a 14.4 supply and a 50% reference, power is from the alternator of a vehicle and drops to about 12 when the engine is off, so I basically have an unstable power supply to contend with. I am using an LM317 to provide a stable 10 v and need a 0 - 5 to control the out put of another controller, so I'm using a 5.00 ref for the strain gauge amp and another 5.000 ref for voltage manipulation to achieve an absolute 10 - 5 - 10 then subtract 5 for my 5 - 0 - 5 to feed the controller and flipping an h bridge with the out to NFETs which feeds PFETs with a small dead band.
Eric was correct about having some incorrect wiring, I replace spices 5 v supply with the voltage divider as I developed the schematic and didn't run/check it. I have corrected it and included it, hope this clears up some questions about why I wanted this. If you have any suggestions, I'm listening.
Thank for the help,
Kinarfi
 

Attachments

  • untitled1.png
    untitled1.png
    28.4 KB · Views: 164
  • Absolute Value#1.asc
    4.9 KB · Views: 158
A tad more info, on the graph, 1.0 seconds in neutral / no input. as you push or pull, left or right, Vin goes up or down.
tnx
kinarfi
 
That looks pretty complicated.

Is it not possible to reconfigure the controller and do it in software?

All those op-amps are just going to introduce more errors into the reading.
 
Actually, It's working very good. As I put 0 - 10 into it I get a very good +5 to 0 to +5 out. It's 10 to 5 to 10 after the absolute value, 5 to 0 to 5 after the "subtraction". Presently waiting for the interface to controller. It's supposed to take 0 to 5, but it's only taking 1 to 1.7 as is. Hopefully it can be reprogrammed.
It is just 2 quad op-amps and an instrument amp chip + resistrors & diodes.
Kinarfi
 
Last edited:
Actually, It's working very good. As I put 0 - 10 into it I get a very good +5 to 0 to +5 out. It's 10 to 5 to 10 after the absolute value, 5 to 0 to 5 after the "subtraction". Presently waiting for the interface to controller. It's supposed to take 0 to 5, but it's only taking 1 to 1.7 as is. Hopefully it can be reprogrammed.
It is just 2 quad op-amps and an instrument amp chip + resistrors & diodes.
Kinarfi

Hi,
Ran your asc file in LTspice, OK.
Is that overlap on the N FET drive output going to be aproblem.?
 
Actually, It's working very good. As I put 0 - 10 into it I get a very good +5 to 0 to +5 out. It's 10 to 5 to 10 after the absolute value, 5 to 0 to 5 after the "subtraction". Presently waiting for the interface to controller. It's supposed to take 0 to 5, but it's only taking 1 to 1.7 as is. Hopefully it can be reprogrammed.
It is just 2 quad op-amps and an instrument amp chip + resistrors & diodes.
Kinarfi
Have you actually built it yet or have you just simulated it?

Don't expect the real thing to work as well as the simulator says it will.
 
Last edited:
Hero, Yes, built it, ran it, tested it with DVM, Probably ought to put a scope on to see if I'm getting any of the oscillations your rightfully worried about. But it does seem to be doing exactly as spice shows it.
Eric, You caught me again, swap the input on U7 & U8 and you get separation instead of over lap. I will say I did draw it correctly on my schematic and as I built it, just not in spice.
Thanks,
kinarfi
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top