![]() |
![]() |
![]() |
|
|
|||||||
| Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution. |
|
|
Thread Tools | Display Modes |
|
|
(permalink) |
|
New Member
|
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? |
|
|
|
|
|
(permalink) | |
|
Experienced Member
|
Quote:
This circuit will get the job done.
__________________
Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ Last edited by ericgibbs; 7th July 2008 at 11:22 AM. |
|
|
|
|
|
|
(permalink) |
|
Experienced Member
|
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.
|
|
|
|
|
|
(permalink) | |
|
Experienced Member
|
Quote:
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
__________________
Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ Last edited by ericgibbs; 16th December 2007 at 09:04 AM. |
|
|
|
|
|
|
(permalink) |
|
Experienced Member
|
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.
__________________
Uncle $crooge |
|
|
|
|
|
(permalink) |
|
New Member
|
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? |
|
|
|
|
|
(permalink) | |
|
Experienced Member
|
Quote:
|
|
|
|
|
|
|
(permalink) | |
|
Experienced Member
|
Quote:
__________________
Uncle $crooge |
|
|
|
|
|
|
(permalink) | |
|
Experienced Member
|
Quote:
__________________
www.dipmicro.com |
|
|
|
|
|
|
(permalink) |
|
Experienced Member
|
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. John
__________________
************************************************** ***************** |
|
|
|
|
|
(permalink) |
|
Experienced Member
|
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.
__________________
Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ |
|
|
|
|
|
(permalink) |
|
New Member
|
|
|
|
|
|
|
(permalink) | |
|
Experienced Member
|
Quote:
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?
__________________
Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ |
|
|
|
|
|
|
(permalink) |
|
New Member
|
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.
|
|
|
|
|
|
(permalink) | |
|
Experienced Member
|
Quote:
In that case do as I suggested in my 09:13 post of today. That is, a OP365 with a +5V supply or the LM358 with a +8V supply, using the pdf circuit I posted previously. Does that help?
__________________
Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ |
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Latest |
| Line Detection Robot using PIC16F877 | helmyshahryl | Micro Controllers | 0 | 28th August 2007 01:53 AM |
| Reduce 5 volts to 3 volts, suggestions? | prprog | Electronic Projects Design/Ideas/Reviews | 19 | 21st December 2006 06:02 PM |
| 12 volts from two 9 volt batteries | sandmantoy | Electronic Projects Design/Ideas/Reviews | 9 | 22nd April 2006 01:02 PM |
| Turn on and off air valves | thup | Electronic Projects Design/Ideas/Reviews | 16 | 27th December 2003 03:19 AM |
| brake light/ turn signal | andrew8485 | Electronic Projects Design/Ideas/Reviews | 13 | 11th November 2003 12:48 AM |