I have a sensor that puts out 0-5 volts. When it is putting out 5 volts though, I need 0 volts. When it is putting out 0 volts I need 5 volts. When it is putting out 4 volts I need 2 volt.
How many volts I have : How many I need
0 : 5
1 : 4
2 : 3
3 : 2
4 : 1
5 : 0
I think you guys get the point. How can I do this?
I have a sensor that puts out 0-5 volts. When it is putting out 5 volts though, I need 0 volts. When it is putting out 0 volts I need 5 volts. When it is putting out 4 volts I need 2 volt.
How many volts I have : How many I need
0 : 5
1 : 4
2 : 3
3 : 2
4 : 1
5 : 0
I think you guys get the point. How can I do this?
Eric, maybe the supply voltage should be 7V or more. The LM358 datasheet says VOH is Vcc-1.5, and the part does have a Darlington emitter follower for the pullup stage. I don't have any hands-on experience with these parts, but I believe it's a good idea to go with the datasheet.
Eric, maybe the supply voltage should be 7V or more. The LM358 datasheet says VOH is Vcc-1.5, and the part does have a Darlington emitter follower for the pullup stage. I don't have any hands-on experience with these parts, but I believe it's a good idea to go with the datasheet.
hi Ron,
On my earlier drawings of this circuit I used to state +8V as a supply voltage, to give that 'overhead' for +5V out.
However from the results/tests I find that the +6V will just allow a +5V limit or close to.
Also by using about +6V, the user cannot overdrive the PIC's ADCinp from a low impedance source.
Some of the earlier OPs stated they hadnt got the +8/+9v available on their projects, so I checked it out for +6V...
personally I would choose a +9V supply, as you say, these devices do vary.
Thanks for the feedback..[ if you will pardon the pun!.. ]
EDIT: the other reason for this choice of LM358, is it accepts input voltages down to 0Vin
The circuit is inverting so the input of the opamp never goes anywhere near ground.
The LM358 was chosen because its output can go down to near ground, and a load resistor will drive it closer to ground.
Its class-A pullup current is 50uA so its minimum output voltage is +0.05V with a 1k load resistor to ground.
You guys are so awesome! I cannot thank everyone enough. It actually should only need to go down to about +0.3V anyway so the +0.05V will give some room to spare.
So, I should still try +6V for the supply voltage first right?
You guys are so awesome! I cannot thank everyone enough. It actually should only need to go down to about +0.3V anyway so the +0.05V will give some room to spare.
So, I should still try +6V for the supply voltage first right?
If you already have a 5V supply, you can use an op amp with rail-to-rail output and get within 50mV or less to +5V and GND if your op amp output is lightly loaded. However, you probably won't find one at Radio Schlock.
The datasheet for the LM358 shows its typical output high voltage with a very low load current is about 1.2V less than its supply voltage. So with a 6V supply its max output could be +4.8V or a little more or a little less.
just what i was thinking.
Cross it over.
Still, some sensors have a common connection on the casing,
but i'm sure it could be done easily
if we could see the circuit.
hi Markley,
If the sensor cannot be reversed, consider using a Texas OP365, rail to rail opa with a +5V supply rail, thats if you really need the end limits of the 0/+5V.
Price wise, the OP365 in the UK is about £2GBP compared to a LM358 about £0.5GBP.
If you have +9V on the project board, power the LM358 with that.
hi,
Looked thru your pdf.
It looks as though its not possible to switch the sensor 'over'.
Where did you get the values of 0V and +5V out from the sensor bridge, did you measure it? or was it from a datasheet?.
As it appears to be a bridge sensor, I would expect a mid range voltage on the output?
It has a 12 volt supply. From many sources on the web it says 0V to +5V. It is possible that it could go up to +6V. If I get close to maxing it out anyway I will just increase the diameter of the pipe and that will cause a lower reading.
It has a 12 volt supply. From many sources on the web it says 0V to +5V. It is possible that it could go up to +6V. If I get close to maxing it out anyway I will just increase the diameter of the pipe and that will cause a lower reading.
The circuit design is the same for the LM358 and OP365, the amplifiers have different pinouts and are DIP and SO types.
Use the correct +Vsupply voltage to suit the amp you choose.
Sorry, typo. You do mean OPA365 right? Not OP365? After looking at the OPA365 Datasheet (**broken link removed**, page 8 Figure 1b, I would just change the Vcm to +2.5V using the ZREF25. My question is why did you list those two resistors over the OPA365 datasheets 10K for the line going from Vin to Vout?
The 10k resistor is for negative feedback. The voltage gain of the inverting opamp circuit is the ratio of this feedback resistor to the input resistor. So the gain is -10 in this example if the source resistance is zero.
hi Markley,
For your application you require a Gain of *-1 for the -Vin input pin and a Gain of *2 for the +Vin input pins of the amplifier.
Relative to their respective inputs.
The -Gain = Rfeedback/Rinput
The +Gain = 1 + Rfeedback/Rinput [this is why the +Vref =+2.5V, with a gain of *2 it gives an output of +5V]