Capactiors and multiple buttons

Hello everybody. I'm trying to monitor 5 push buttons over analog pin, but readings aren't very stable. They very around a certain number depending on which button is pressed. Is it possible to somehow stable that reading using capacitors or on some other way?

not really with arduino remedies. still you have some otpions:

1.The most you can do is ground the unused ADC channels (all of them, there might be ADCs on the Digi Pins as well, have a look into the pinout of your Arduino!)

2.You can shut off the unused ADCs by using Registers, that is not so easy for a beginner... then it becomes more stable.

  1. use an Arduino Micro/Leonardo, which has much more stable ADCs.

  2. use google to find out more (that's how I got my info). you are really not the only one with this problem :wink:

  3. you will get the best result if you combine all of these "solutions"

  4. http://hacking.majenko.co.uk/making-accurate-adc-readings-on-arduino

This has been discussed before, maybe try to search the forum for it.

logitech:
Hello everybody. I'm trying to monitor 5 push buttons over analog pin, but readings aren't very stable. They vary around a certain number depending on which button is pressed. Is it possible to somehow stable that reading using capacitors or on some other way?

"No" to the latter.

This has indeed been discussed before.

I have commented that this technique is somewhat unreliable and a very common cause of eventual failure in consumer items (MP3 players, computer monitors) that use it to "economise" on chip inputs.

That said, the answer is to "live with it". You clearly have written a sketch to tell you the analog value corresponding to each button. You do not attempt to have code look for that particular value. Instead, from a list of the values you have read for each button, you construct a comparison chain which uses thresholds set halfway between adjacent button values.