![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| The only stupid question is the one you don't ask. You can often use a voltage divider made from resistors to reduce the voltage like that. | |
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) |
| so is it better to use a opamp instead of a voltage devider to measure sensor signals over 5v, i think they are all 5v but i want to measure battery voltage so i will have to use a opamp or voltage devider to do that as the voltage can go up to 15v when the engine is running. is there a formula to calculate the resistors to be used in the opamp circuit to get the correct inverted voltage output many thanks jason | |
| |
| | (permalink) | ||
| Quote:
Quote:
| |||
| |
| | (permalink) |
| the only problem i think i might have with just using a voltage devider is that the 12v battery feed has lots of spikes ect on it, do i just need to add a zender diode into the devider circuit or will that not work in a voltage devider circuit | |
| |
| | (permalink) |
| You can add filters, including zeners - but bear in mind the attenuator will reduce the spikes as well. and the PIC input includes protection diodes. | |
| |
| | (permalink) |
| i'v never used attenuator or filter circuits, can you recommend any good web sites to learn about them, the electronic book i read talked alittle about filters but most of it went in and back out again. but iv never even heard of attenuator. | |
| |
| | (permalink) |
| An attenuator (in this case) is simply a potential divider (two resistors). | |
| |
| | (permalink) |
| The problem with using a potential divider on car sensors is that it can alter the characteristics of the original sensor. For example a Vauxhall GTE temperature sender has a resistance of 3410 ohms at -10 degrees and 2030 ohms at 0 degrees. The PIC requires around a 2k input to the A2D converter (well the 18F series do) so your potential divider is going to have to be something like a 1k+2k resistor. This will effectively halve the sensors resistance at -10 degrees leading to a misreading. For measuring battery voltage this isn't an issue at all but for some of the more sensitive sensors it could be. | |
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) | |
| Quote:
Actually thats how I've designed the input stages for one of my new products. High resistance voltage divider for the input stage on a 1/10 divider giving me an input to an LM358DT opamp ranging from 0-1.6 volts (typical vehicle voltage range) and an X2 gain on the opamp giving me out a 0-3.2v output from the LM358DT running from a supply of 5V. The LM358 will not give out any more than around 3.5v from a 5v rail so thats the PIC protected. It will also handle up to 30v on its input pins with a 5v supply (confirmed by ST) so any spikes on the system up to 300 volts will not kill the opamp. Output from the opamp to the PIC is Opamp -> R -> C -> R -> PIC to smooth out any nasty little glitches. Works for me | ||
| |
| | (permalink) |
| Oh and the fact that I picked up nearly 5000 x LM358DT for a tenner makes it even more attractive to use as a buffer | |
| |
| | (permalink) |
| Jason - I've just had a quick browse of Nigels tutorials to see if I could find the circuit he was talking about above - you should be able to use it as it is for what you want to do. http://www.winpicprog.co.uk/pic_tuto...ogue_board.htm | |
| |
| | (permalink) |
| Notice how I neatly avoid the requirement for a rail-to-rail opamp (which don't really go fully to either rail anyway). As for a fight?, a little extra training always comes in handy! | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| Need help in my PIC project | andales | General Electronics Chat | 1 | 24th October 2007 01:50 AM |
| Uni Project Advice | 2-tone | Electronic Projects Design/Ideas/Reviews | 7 | 18th October 2007 01:11 AM |
| Can i make an Intelligent Switch by using PIC 16F84A | rukshankb | Micro Controllers | 3 | 22nd September 2007 04:58 PM |
| communication project with micro !!! | hossam mahanna | Micro Controllers | 1 | 20th July 2007 01:57 AM |
| Micro controller pinout for stand alone project????? | cubdh23 | Micro Controllers | 3 | 2nd January 2004 10:56 PM |