Using 'Input Only' GPIOs for push buttons

ChrisHill
Posts: 9
Joined: Fri Jan 06, 2023 12:57 pm

Using 'Input Only' GPIOs for push buttons

Postby ChrisHill » Fri Jan 06, 2023 1:30 pm

Hi - I'm developing a PCB that uses nearly all of the available GPIO pins on a WROOM32 module (9 push buttons, a 16x2 LCD display without I2C with PWM pins for brightness and contrast (8 pins in total), an IR receiver, a Tx/Rx serial port - 20 pins in total), so I'm investigating whether I can use the 'Input Only' GPIOs with some of my push buttons. I know that pins 34, 35, 36 and 39 don't have internal pull-up or pull-down resistors, so I have breadboarded my circuit using external pull-up resistors for these pins. I'm using a NodeMCU-32S development board. It seems to work, but I have some questions:

1) What resistor values should I be using? I started off with 100k, but one of the buttons is used for my power switch, and the device powered off fairly randomly, as though the button is being pressed. So I swapped to a 33k resistor value, and the random power-offs happened less frequently, but they still happened. So now I've switched to a 3k9 resistor, and so far this seems to have eliminated the random power-offs. 3k9 seems to be rather a low value (my board will be mains powered, so the odd milliamp of current draw through these pins will not be an issue) - I thought that 33k was already towards the lower end of what's suggested for a pull-up resistor. So am I missing something specific about these pins, or is 3k9 suitable? How low can I go? Could there be something about the NodeMCU-32S board that means these pins behave differently compared to a raw WROOM module?

2) Does the addition of a pull-up resistor turn an 'input only' pin into an 'input/output' pin? Could I use these pins instead as the data pins for my LCD display?

3) Is there anything else I should be aware of regarding these pins?

Thanks
Chris

Who is online

Users browsing this forum: No registered users and 121 guests