I hope this is the correct place to ask this question, but it's a very basic one. I am trying to build a device with two push buttons each connected to different GPIO pins. Each button connects to the 5V bus and has a 10K pulldown resistor to ground. When I push button 1, the correct GPIO pin get's 5V -- Yay!, but the OTHER GPIO pin gets +4V !?!? The ONLY places the two connect is at the +5V rail and the ground rail (have checked continuity and no cross feeding is evident). Am very confused.
So that it is clear how your circuit is wired please post a schematic showing all components, how they are connect and powered. A photo of a hand drawn circuit is good enough
What sketch have you got running on the Arduino, which Arduino are you using and how are you measuring the voltage on the pins ?
I hope this is the correct place to ask this question, but it's a very basic one. I am trying to build a device with two push buttons each connected to different GPIO pins. Each button connects to the 5V bus and has a 10K pulldown resistor to ground. When I push button 1, the correct GPIO pin get's 5V -- Yay!, but the OTHER GPIO pin gets +4V !?!? The ONLY places the two connect is at the +5V rail and the ground rail (have checked continuity and no cross feeding is evident). Am very confused.
Posted the best schematic I could come up with. Checking with a volt meter on the two screw terminals. The 'correct' one shows +5V, the 'other one' shows +4V and it works both ways.
So verify the "4V" circuit. You have bad connection somewhere or wrong resistor value.
If you have multimeter, measure the actual resistance of that pull-down.
What Arduino pins do the screw terminals connect to and which Arduino are you using? Some pins have other circuitry on the board.
But 4V should actually work! With the regular 5V Arduino with the ATmega chip, anything higher than 3.5V is read as logic high and anything less than 1.5V is read as logic low. In-between is undefined and my be read as high or low.
FYI - The Arduino has built-in pull-up resistors that can be optional enabled - INPUT_PULLUP.
That way you can skip the external resistors.
You have to change the switch/pushbutton connections so the switch "overpowers" the pull-up resistor, pulling the input down, rather than the other way around.
And of course, you'll have to reverse the logic in your program/sketch because pushing the button forces the input pin low.
I guess my description is somewhat vague. When I press button 1,terminal 1gets +5V AND AT THE SAME TIME the other terminal gets +4V... so BOTH show HIGH
When I press button 2, the terminal 2 gets +5V and terminal 1 get's +4V, so again BOTH show high..
Thank you for the replies. I moved one of the inputs to a different pin and the problem went away. They were on adjacent pins originally. Now each terminal only gets +5V when the appropriate button is pressed.
Makes me think a slightly conductive blob of solder resin was left on the board after the pins were soldered on. But, we have no idea what board(despite multiple requests...), so...
Agreed, but I suspect it's internal to the board since I didn't change any wiring otherwise. I do have another identical board that I will test, it's possible that the one I am using is not working properly. Here is a link to the board I am using.
Thanks for the heads up. I will switch to the 3.3V rail instead...
The processor puts out both 5V and 3.3V
Sending in the 5V may have been what damaged the board. Fortunately, I have another one that has not been used. Will switch the 3.3V and test again. Thanks for the info. Will have to pay more attention to online tutorials... They recommended the 5V for the buttons..
It came as part of a kit with components (like an LCD display) that I wanted to use. Like I said, this is my first foray into electronics hardware. I was a computer programmer for over 40 years, but never built anything like this before..
A lot of the tutorials are for boards such as the Arduino UNO that have a processor that operates at 5V. The ESP32 board is generally powered by 5V from the USB cable, but has a voltage regulator to supply 3.3V to the processor. Since you bought it as part of a kit, hopefully the parts in the kit will be compatible with the 3.3V logic.
It is helpful to have a spare board, with this type of hobby you get in the habit of buying a few extra whenever you order something.