Analog Read for 5 Push Button Status

Hai

I have brought this board recently and trying to use this board for testing a 5 button key press using voltage diff.

My volts when measured in multimeter are Button 1 - 0.2V Button 2 - 0.4V Button 3 - 0.6V Button 4 - 0.8V Button 5 - 1.0V

I have tested this board in Seeeduino_Mega and its working fine

But when I connect the same to arduino due board i am reading

Button 1 - 0.3V Button 2 - 0.6V Button 3 - 0.9V Button 4 - 1.0V Button 5 -5.0V

Please suggest what could be the issue.

Arun

PASTE YOUR CIRCUIT DIAGRAM. ALONG WITH RESISTOR USED.

Hai

I have not made any circuit, basically i am using 100K ohm resistors for each push button

Arun

Hai

Also one more observation is , when I connect my voltage ref to 3.3 v instead of 5V The voltages are read correctly. Button 1 - 0.2V Button 2 - 0.4V Button 3 - 0.6V Button 4 - 0.8V Button 5 - 1.0V as required.

Please can anybody explain why this could be working in 3.3.V

Arun

The Arduino DUE works at 3.3V.

You should not put 5V to an input, you may burn your microprocessor. (I did by mistake once with a cheap LCD - 6 Button shield and it didnĀ“t happen, but I try not to)

http://arduino.cc/en/Main/ArduinoBoardDue

If you are calculating the voltages with the Arduino DUE thats the problem. DUE is 1023 (or 4095) at 3.3 V

Marcelo

paiarunk: I have not made any circuit, basically i am using 100K ohm resistors for each push button

Not making a circuit diagram is a typical beginners mistake. You ALWAYS need to make one other you end up with all sorts of trouble. Also 100K is way too high, the optimal total input impedance is 10K so you should be using 1K resistors for you chain. As well as all the stuff about 5V and the Due.