5v analog signal into 3.3v Analog In?

06 Dec 2010

I have a simple question for you experts. I have a sensor that outputs a signal up to 5V, but the mbed spec only reads up to 3.3v on the analog ins.

Can I simply scale down the voltage using a resistor and diode, or do I need a more elaborate solution? If so, what would you recommend?

06 Dec 2010

No diode, but yes, scale with a two resistor voltage devider, minding the load placed on the source (resistory value selection)

06 Dec 2010

Normally I place a potenciometer of 10K of 10 turn  and adjust the top level 3.3V

06 Dec 2010

Thanks for the responses guys. I will try some resistor combinations and see how it works out. Also, I found this document after some searching.

 

http://www.microchip.com/stellent/groups/techpub_sg/documents/devicedoc/en026368.pdf

06 Dec 2010

Don't forget to account for the mbed input impedance while calculating the divider values.

08 Dec 2010

I ended up using a 20K resistor in r1 and 39k in r2, seems to be a pretty good combo.