Timeline for How should I connect 5 buttons to arduino so that I can use the least number of inputs all the buttons are connected to ground
Current License: CC BY-SA 4.0
25 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 17, 2020 at 8:21 | history | edited | CommunityBot |
Commonmark migration
|
|
Jan 10, 2020 at 18:26 | comment | added | Dave Tweed | And yet you accepted Andyaka's answer, which requires you to generate an analog voltage to control the PWM chip. Do you have a real concern about noise, or are you just being superstitious? Anything involving switches is going to have to deal with debouncing (a form of noise) anyway. | |
Jan 10, 2020 at 10:52 | comment | added | Shakti Phartiyal | @Juraj I do not want to use analogue due to possible noise and voltage fluctuations that may arise. | |
Jan 10, 2020 at 10:12 | comment | added | Juraj♦ | please explain why you don't want to use an analog pin and accepted a solution which allows to read analog value with a digital pin | |
Jan 9, 2020 at 19:47 | comment | added | Maple | @Nick How is this Arduino question more then EE? It is pretty valid for any MCU with limited pins available. | |
Jan 9, 2020 at 19:07 | answer | added | Dave Tweed | timeline score: 2 | |
Jan 9, 2020 at 17:52 | vote | accept | Shakti Phartiyal | ||
Jan 9, 2020 at 17:50 | history | migrated | from electronics.stackexchange.com (revisions) | ||
Jan 9, 2020 at 17:50 | comment | added | Nick Alexeev | @Shakti Don't cross-post the same question to multiple stacks. I'm migrating this copy to Arduino.SE . | |
Jan 9, 2020 at 17:49 | answer | added | Andy aka | timeline score: 2 | |
Jan 9, 2020 at 17:38 | answer | added | Maple | timeline score: 2 | |
Jan 9, 2020 at 17:25 | comment | added | jsotola | is this a school assignment? | |
Jan 9, 2020 at 16:10 | answer | added | user_1818839 | timeline score: 5 | |
Jan 9, 2020 at 15:12 | comment | added | Bimpelrekkie | @ShaktiPhartiyal you make our and your own life difficult by adding restrictions like the ground connections and no analog input. You will get more suggestions if you leave things as open as you can, so ask: "How to detect which (of 5) button is pressed while using as few pins as possible on my microcontroller." Then you might get some suggestions. Look at the suggestions and see if that suits your needs. If you have restrictions then make clear why they are there, you will need to have a good reason. An "I don't like analog inputs" for example isn't a good reason. | |
Jan 9, 2020 at 15:03 | comment | added | winny | @MarcusMüller I sense XY problem. | |
Jan 9, 2020 at 15:01 | comment | added | Shakti Phartiyal | @MarcusMüller I added them, ok what is I remove that restriction ? I still do not want to use an analogue input. | |
Jan 9, 2020 at 14:58 | comment | added | Marcus Müller | @ShaktiPhartiyal is that "one terminal always connected to ground" an actual restriction or did you add that restriction hoping to make the solution easier? Because without that restriction (and a few diodes), two digital IO pins are totally sufficient, with that restriction, you need an analog input pin, or extensive external logic circuitry, or one pin for every button. | |
Jan 9, 2020 at 14:48 | comment | added | Shakti Phartiyal | @Andyaka can you please elaborate / illustrate how and what exactly you mean | |
Jan 9, 2020 at 14:47 | comment | added | Andy aka | Arrange the buttons with a pulse width modulation circuit such that your digital input can read the pulse width and determine which button that has been pressed. | |
Jan 9, 2020 at 14:44 | comment | added | muyustan | @ShaktiPhartiyal it did not change anything.. | |
Jan 9, 2020 at 14:39 | comment | added | Shakti Phartiyal | @Bimpelrekkie what I mean by "buttons connected to ground is" that out of the two terminals of a button (switch) will be connected to the common ground. I don't know if this comment make it simpler or even more complicated. | |
Jan 9, 2020 at 14:37 | comment | added | Shakti Phartiyal | @Andyaka yes, only one at a time | |
Jan 9, 2020 at 14:36 | comment | added | Andy aka | How many can be activated simultaneously? If only one button is active at a time then it's easier. | |
Jan 9, 2020 at 14:36 | comment | added | Bimpelrekkie | Look at the schematics of almost any keyboard (just Google: "keyboard schematic" and select the images tab). Are any of them using switches that are grounded on one side? There are "matrix" type solutions but your "buttons connected to ground" throws all those solutions out of the window. A one pin solution is possible if you would allow using an analog input and some resistors. | |
Jan 9, 2020 at 14:29 | history | asked | Shakti Phartiyal | CC BY-SA 4.0 |