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 Simple Voltage Polarity Converter

Status
Not open for further replies.

DrOC

New Member
Sorry for the wordiness, but I figured it is easier to describe all of it rather than just bits and pieces.

Situation:
Have a Oil Temp sender (automotive) that outputs resistance as function of temperature. As temp increases, resistance decreases. This is to be used as the input to an LED display using LM3914s.
I can easily convert the resistance output of the sender to voltage using a voltage divider. However the "other" dividing resistor has to be between the sender and the voltage supply i.e. I can not connect the "other" resistor between the sender ground and the actual ground.
This obviously leaves the voltage output decreasing as temp increases.

The LM3914 lights the corresponding LEDs in an ascending manner as the signal voltage is increasing but the sender output actually goes the opposite way - hence the need for a voltage polarity converter ciruit.
Output voltage from the sender varies from 5V (0 resistance) to 0.78V.
I do not need any gain from the sender - just need an exact polarity reversal for any of possible sender voltages.

Once I have the inverted voltages, then I can sum them with the 5V supply (using LM741) to get my increasing voltage as temperature increases.

Need:
Is this the best way to handle this scenario in general?
Is there a simple circuit that would do the polarity inversion? I've looked at several designs elsewhere on the web but most need at least 1.5V min input.

Thanks for any help.
 

MikeMl

Well-Known Member
Most Helpful Member
A 741 will not work for your application unless you can obtain a negative voltage to connect to it's neg supply pin. When used as an inverting amplifier with its neg supply pin grounded, its inputs cannot go below ~1.5V, and neither can its output pin, meaning that you will have trouble because your input is less than 1.5V.

A much better alternative for your application is an LM358 or a modern opamp like a TL072, or a TLV2272.

You might get some ideas for your project by reading this thread.
 

DrOC

New Member
I was wondering how I was going to get a neg supply voltage and I've seen the limitation with the 1.5V min - ugh!

I checked out the thread you posted - thanks.

I have already generated the voltages/resistance for various temps so I'm all set there. I also have the board with the LM3914 and associated circuitry - just have to take care of inverting the input voltage.
 
Last edited:

crutschow

Well-Known Member
Most Helpful Member
Remember that when you invert a positive voltage, it will want to go negative (below ground) which is not allowed for a single supply amp. Thus you need to add some positive offset at the positive input so that the maximum negative going signal (for the maximum positive signal to the inverting input) is still positive.
 

MikeMl

Well-Known Member
Most Helpful Member
Give me a two-point fit of the function that you want; i.e. A Vin=X Vout and B Vin=Y Vout, and I will generate a single-supply opamp circuit.
 

audioguru

Well-Known Member
Most Helpful Member
Your circuit will not work because the opamps are inverting and not biased properly for a positive input voltage.
Your first opamp is inverting so if its input is +5V then its output tries to be -5V. But without a negative supply its output stops at close to 0V.
 

MikeMl

Well-Known Member
Most Helpful Member
Another question: what biases the sender so that it puts out 5V hot, and 0.78V cold? Is it a resistor tied from the sender input to +5V, or is it tied to the vehicle's battery? What is the resistor value?
 

MikeMl

Well-Known Member
Most Helpful Member
OK:
Vin +5.0 : Vout 0
Vin 0 : Vout +5.0

That's trivial. A single LM358 configured as an inverting amplifier (R1=R2) with 2.500V at its non-inverting input will do that. I'm inferring from the schematic that you linked to that there is a 5V regulator, so just put a voltage divider (with two equal resistors) across the 5V, and tie the tap to the amplifier's non-inverting input.

Note that the LM358 will not pull quite all the way to 0.000V, but it will get within 10mV, or so. So that the LM358 can pull it's output all the way to +5V, you will have to power it from the unregulated vehicle's voltage(12 to 14.5V), presumably from where you are powering the 7805. Remember that even a crummy opamp like an LM358 has a Power Supply Rejection Ratio (PSRR) of ~95db, so some noise on the vehicle's electrical bus will not introduce any disturbance to the LM358's output.
 

Attachments

  • TempGauge.gif
    TempGauge.gif
    48.5 KB · Views: 316

DrOC

New Member
The sender is a resistance device - as temp rises, resistance falls.
At room temp, it's resistance is approx 1.2K. At 300 F, it is 20 ohms.
Because the LM3914s expect VDC signals, I mounted the sender in a voltage divider where the other resistor is 100 ohms. I can't switch the placement of the sender and the 100 ohm resistor since the resistor body is ground and there is no physical way to connect a resistor between it and ground. (That would have made this whole discussion moot.)

Here's the actual values:
Temp (F) Volts
75.95805885 4.411105697
99.38811075 4.178817414
103.4905373 4.131298914
108.6509062 4.06847612
113.1891353 4.010380743
116.7294946 3.963193856
121.446127 3.897779991
129.8503198 3.774030566
148.0312684 3.47587523
152.5678207 3.395428119
165.6902423 3.150974375
172.5294622 3.017662463
173.1341782 3.00571271
184.352917 2.780216073
195.0464098 2.560833184
199.367952 2.471714595
208.3383018 2.287215993
215.6816466 2.137809847
217.988014 2.091373056
226.5830976 1.921094391
234.3402248 1.772093932
241.9148636 1.631845558
253.7005746 1.425688655
255.7584758 1.391336252
265.1715596 1.240856925
278.1551202 1.051915642
294.0334575 0.850717827
300 0.783454764

I can send you the Excel sheet with the complete setup if you'd like.
 

MikeMl

Well-Known Member
Most Helpful Member
The sender is a resistance device - as temp rises, resistance falls....

Ok, 100Ω is tied to an 7805 regulator?
 

MikeMl

Well-Known Member
Most Helpful Member
Voltage variation as function of temperature

I see I'm not the only one that uses EXcel for things like this... Looks linear enough. You seem to have found the sweet point where the pull-up resistor value gives optimum linearity. I derived that equation once...

Now go find the LTSpice schematic and sim I posted...
 
Last edited:

DrOC

New Member
Not sure what you mean by tied (I'm not an EE) but the sender is one resistance of a voltage divider where the other resistance is 100 ohms. A 5VDC regulated supply is used (it is a 7805)
R2 is the sender.
 

Attachments

  • VoltageDividerWithVoltage.gif
    VoltageDividerWithVoltage.gif
    1.6 KB · Views: 163

DrOC

New Member
I see I'm not the only one that uses EXcel for things like this

I just messed with R1 until I got a decent linear fit.

Got the schematic - looks simpler than the mess I had - I'll try breadboarding it just to double check.

Thanks for all your help.
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top