At 10:05 PM 07/11/2002 -0500, you wrote: >I am a student using a PIC 16F877 in a project and would like to read an >analog input from an accelerometer setup that varies its output from 0-11v. >This voltage is put out by a signal conditioner made by the manufacturer of >the accelerometer so I have little control over it. Now I know there are >vref pins I can use, but some analog inputs will be in the 0-5v range and >I'd rather not lose precision on them by changing the voltage reference to >accomodate the range of the accelerometer. How can I step down the 0-11v to >0-5v? Can I use two high high value resistors to divide the voltage down? I >am considering that approach but am afraid of the effects temperature will >have on the resistors and thus the readings, since I am told that resistors >are prone to drift with temperature. The accelerometer will be used >outdoors, inside a model airplane, where temperature could vary >considerably. Also, having little background on EE, I am not sure what other >effects might follow from using the resistors. Any thoughts or other >approaches? I know little about EE, so bear with me if this is too basic. This is actually a common problem. In your specific case, this is not too tough. To ensure that you get a good output from this sensor, an op-amp is a nice way to buffer a voltage. I recommend using a voltage divider, and a rail-to-rail op-amp, configured as a voltage follower. This should look something like this (copy into Notepad or similar): Vin (0-11V) ------------+ | \ / \R1 / \ +5V / | \ | | (0-5V) Vb |\| | +-----------|+\ Vout | | | >--+-----|ADC input \ +---|-/ | | / | |/| | | \ | --- | / | /// | \ +---------+ /R2 \ | --- /// Use Vout = Vb = R2/(R1+R2) to determine R1 and R2. Hope this helps, --Brendan -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads