Scaling and inverting voltages

Thread Starter

Local H

Joined Feb 16, 2018
7
I am trying to scale one range of input voltages to another output voltage range for a small side electrical project I have going on at a textile manufacturing floor. I think this can be done with a differential amplifier and some voltage dividers for input reference points, but am having some issues getting the wheels turning.

We are using an actuator pedal that provides a 0-10V DC output signal. The pedal is bidirectional, with the system set to idle at 5V (center). I would like to take this signal as an input to a circuit that converts the range to 0-10V in either direction. So:
5V to 10V should output as linearly as possible to 0 to 10V. (farthest away from neutral = 10V.)
5V to 0V should output as linearly as possible to 0 to 10V. (farthest away from neutral = 10V.)

Throughout some of the range, it seems like a differential amplifier would work. I keep thinking of a simple Vo=AVi basic op amp transfer function, such as gain in the form of (10V-0V) / (10V-5V) = 2 for the gain, but I don't know if it's that simple, nor understand how the resistor arrangement should work.

On the low end of the voltage range, I feel like the same thing applies, but am inexperienced in inversing/negating voltages in circuits.

Any reference material or solutions one could recommend?

Danke,

H
 

crutschow

Joined Mar 14, 2008
34,408
5V to 10V should output as linearly as possible to 0 to 10V. (farthest away from neutral = 10V.)
5V to 0V should output as linearly as possible to 0 to 10V. (farthest away from neutral = 10V.)
That's not completely clear.
So do you want +10V to give +10V and 0V to give +10V with 5V giving 0V?

What is "neutral" voltage?
 
Last edited:

Thread Starter

Local H

Joined Feb 16, 2018
7
Crutschow, everything you asked is correct:

10V paddle = 10V out.
0V paddle = 10V out.
5V paddle = 0V out,
... with "neutral" position on paddle being 5V, which would ideally provide 0V output at idle.

Actuating the paddle in either direction creates a linear 0 to 10V output, starting at 0V (neutral).
 

crutschow

Joined Mar 14, 2008
34,408
Okay, here's the LTspice simulation of a circuit, that should do what you want.
It uses a precision full-wave rectifier with a 5V offset to generate the desired signal.
The 10k pot U5, allows adjustment of the U4, 5V Vref voltage, which sets the 0V output point, to compensate for the output from the pedal likely not being exactly 5V when in the neutral position.

It requires a single +12V to +15V supply for operation.

upload_2018-2-17_13-34-8.png
 

Attachments

Last edited:

crutschow

Joined Mar 14, 2008
34,408
Does the middle RRO serve as a buffer?
Yes, you need a high impedance at that point when the input becomes more positive than Vref and the signal must pass through R1 and R2 without any attenuation, where it is then buffered by the U2 follower.
 

Thread Starter

Local H

Joined Feb 16, 2018
7
That makes sense; figured that was the purpose. Does free LTS let you import 6132s? I can't seem to find any in the component list.
 

crutschow

Joined Mar 14, 2008
34,408
Here they are:
I included the TL431a files since they are also not standard.

The LM6132A.ASY file goes in the LTC\LTspiceIV\lib\sym\Opamps directory (or LTspiceXVII) for LTspice version XVII).

The tl431a.asy file goes in the LTC\LTspiceIV\lib\sym\References directory.

The .lib files go in the LTC\LTspiceIV\lib\sub directory.

You may have to close and reopen LTspice to make them visible.
 

Attachments

Thread Starter

Local H

Joined Feb 16, 2018
7
Thanks! Got everything in there but the shunt regulator, though I just replaced it with a voltage divider off V+. Using 6.45k and 4k, I get 5V, which seems a little higher than it should be (~4.6V?) After such, it skews my output, particularly throughout Vref and Vout. I did not expect any relatively low impedance when Vpedal ramps up.
 

Attachments

Thread Starter

Local H

Joined Feb 16, 2018
7
The circuit is pretty clever -- I'm working through the nodes for each pedal voltage and can validate each Vout, so at least I know my feedback current calculations for voltage drop are checking out. The behavior of the waveform through the 2 opamps seems to define the "rectifier" nature of this circuit. Does that name have anything to do with the use of the 4148? If so, how?

Would this solution work for adjustments to the scale of voltage? i.e., 0-5V pedal with a 2.5V midpoint, then a 0-5 Vout?I guess I could run through some iterations of that in LTS, but the waveform just doesn't seem to like not having the shunt regulator. I couldn't get any of the parts to show up in the library after adding them.

Are these widely used circuits? History?
 

crutschow

Joined Mar 14, 2008
34,408
The behavior of the waveform through the 2 opamps seems to define the "rectifier" nature of this circuit. Does that name have anything to do with the use of the 4148? If so, how?
The 1N4148 allows U1 to operate as an inverter when the input is negative with respect to Vref (giving a positive voltage at the output), but blocks its output when the input goes positive.
This allows the positive input to go through R1 and R3 directly to the output.
The diode is inside the feedback loop so its offset is essentially cancelled (the reason it's called a "precision rectifier").
Would this solution work for adjustments to the scale of voltage? i.e., 0-5V pedal with a 2.5V midpoint, then a 0-5 Vout?
Yes, you just adjust Vref to 2.5V.
the waveform just doesn't seem to like not having the shunt regulator.
Vref needs a low impedance, so if you buffer your Vref resistors' output with a follower op amp, it should work fine.
The variation you see is from the Vref varying load due to R4's changing current with output voltage.
I use a regulator so that the Vref value is not affected by any supply voltage variation.
If you are not concerned about that, then you don't need the shunt regulator.
I couldn't get any of the parts to show up in the library after adding them.
Did you completely close LTspice and then open it again?
Are these widely used circuits? History?
There are many versions of a precision rectifier circuit.
I just used the simplest one I knew of and added the offset for your application.
 
Last edited:

AnalogKid

Joined Aug 1, 2013
11,036
A small note to Wally's reliably tight work - When Vpedal is less than Vref, the gain of the active rectifier is dependent on the source impedance of Vpedal. If, for example, Rpedal varies from 0 to 4K, this is a 0-to-2K resistance that is added to R1, a peak error of 10%. This will show up in the output waveform as an asymmetrical curve in the slope of the output voltage for "below neutral" pedal positions, but not for above neutral positions because D1 is reverse biased.

If you use an LM6134, the fourth opamp can be a buffer (like U2) between the pedal input and R1.

ak
 
Last edited:

crutschow

Joined Mar 14, 2008
34,408
- When Vpedal is less than Vref, the gain of the active rectifier is dependent on the source impedance of Vpedal.
Good point.
If the pedal output impedance is high enough to be a problem, then its output can be buffered by an opamp follower.
There's a spare op amp available in the package.

Edit:AK, I think I was writing my response while you were doing your edit. :)
 
Last edited:
Top