Olimex Support Forum

Others => UEXT => Topic started by: giancaos on May 30, 2016, 04:39:58 PM

Title: MOD-IO Analogue input
Post by: giancaos on May 30, 2016, 04:39:58 PM
Hi,
I saw that MOD-IO board not have the R20,R22,R24 and R28 resistor. I think bacause the user can do adjust the preferred voltage. Now I need to use this ports in digital mode to read 12-15 Volt input signal.
To do this I think to put these resistors, I think 30 ohm but I not sure If is a good idea.

Any comment? Thank you

(http://s33.postimg.org/eh3occrn3/Screenshot_2016_05_30_15_34_37.png)
Title: Re: MOD-IO Analogue input
Post by: LubOlimex on May 31, 2016, 11:00:40 AM
Hey,

Yes. By default the board would work with up to 3.3V analog input. In order to use higher input voltage we have provided the option to make a simple voltage divider by placing the R20, R22, R24, R26 resistors. However, in your case the voltage is a bit high and you would probably need to change the 100R resistors also!

How to select proper value of the resistor when you know the input voltage?

You can see the formula for R2 here: https://en.wikipedia.org/wiki/Voltage_divider - https://upload.wikimedia.org/math/4/2/8/428be3e4819c6325e57c462fe7dc75a8.png

In order to be lower than 3.3V you must chose the lower closes resistor value - 30 Ohms is NOT ok, you need to use 27 Ohms. However, I would not recommend it - there would be too much power over that resistor (~0.4W) that is in small package (0603).

I would recommend changing both resistors of the voltage divider - first change R19, R21, R23, R15 - instead of 100R place 1K - then calculate R2 again and place respective one.

Best regards,
Lub/OLIMEX
Title: Re: MOD-IO Analogue input
Post by: giancaos on May 31, 2016, 02:20:55 PM
Thank you very much LubOlimex, very helpful.