thunderace7
New Member
Hi, again.
I need to read an analogue input of 10 discrete levels (approx 0.5 volt spacing) and I intend to use a rotary switch and resistor chain. I have a few questions, however.
1. Is it OK to use direct 0v and +5v as inputs or should they be protected by an additional resistor (making a chain of 12 resistors)? If protection is needed, could I add a resistor in series with the input from the rotary switch wiper instead (leaving the resistor chain at 10 and making calculation of voltage levels easier)? If I go for a series resistor, what value would you recommend?
2. I had intended to use 10K resistors in the chain, is this too large (making the chain 100K across the power line). It depends on the current drawn by the input, I suppose. What current is an analogue input likely to draw?
3. Would I be better using readadc10 rather than readadc or is it not important for only 10 levels?
Thanks for your help. I should be ready to post a diagram and programme soon.
I need to read an analogue input of 10 discrete levels (approx 0.5 volt spacing) and I intend to use a rotary switch and resistor chain. I have a few questions, however.
1. Is it OK to use direct 0v and +5v as inputs or should they be protected by an additional resistor (making a chain of 12 resistors)? If protection is needed, could I add a resistor in series with the input from the rotary switch wiper instead (leaving the resistor chain at 10 and making calculation of voltage levels easier)? If I go for a series resistor, what value would you recommend?
2. I had intended to use 10K resistors in the chain, is this too large (making the chain 100K across the power line). It depends on the current drawn by the input, I suppose. What current is an analogue input likely to draw?
3. Would I be better using readadc10 rather than readadc or is it not important for only 10 levels?
Thanks for your help. I should be ready to post a diagram and programme soon.