Toggle switch/pulled-up pin extremely basic Q

This is an embarressingly simple question, but I thought I'd ask rather than remain in the dark...

I'd like to connect a basic flick-switch to an arduino, using the internal pullup to prevent floating. It's to act as a mode switch for a lamp, so will be in either state for long periods, hence the question:

Is there any problem leaving a pulled-up pin with a high input for long periods? Overheating? Weird electronic-y things of which I'm unaware?

Or am I just pondering needlessly and it's totally fine and a standard thing to do?

Wokstation: Is there any problem leaving a pulled-up pin with a high input for long periods? Overheating? Weird electronic-y things of which I'm unaware

As long as the voltage and current are within limits, should last forever.

codlink: As long as the voltage and current are within limits, should last forever.

But with an internal pullup, which is what OP's getting at, we have no control over that. Have to assume that the power rating of the resistor is sufficient and that the (little) heat doesn't do any harm.

If it makes it more reliable, I can go the external pullup route instead (in which case, reccomendations on which value resistor to use would be extremely welcome).

The specific board in question is actually a clone - a Nano one, which I believe has 22k pullup resistors, but I'm not sure.

Many thanks for the help!

Unless someone tells you a horror story from their experience, I'd say you're ok tbh

P = V2/R = 25/22000 ~ 1mW.... no problem at all I'm sure.

Wokstation:
Is there any problem leaving a pulled-up pin with a high input for long periods? Overheating? Weird electronic-y things of which I’m unaware?

Absolutely none. It is specifically designed to do this, just like any other aspect of the microcontroller.

Wokstation:
Or am I just pondering needlessly and it’s totally fine and a standard thing to do?

To reiterate. It is the standard thing to do.

Brilliant, thank you very much! Time to dig out the maths exercise book! (I use the grid to represent pin holes on perfboard ;) )

If the switch is close to the input pin, internal pullup should be OK. However, note that some switches specify a minimum DC switching current to operate reliably (could be 1mA). In this case, a lower value external pullup resistor is required.

If the switch has longer wires and/or located close to the lamp, then a lower value external pullup resistor is required to make a stronger signal and reduce noise pickup through the cables. If the lamp is AC, filtering or debouncing of the signal might be required.

P = V2/R = 25/22000 ~ 1mW… no problem at all I’m sure.

Internal pullups are 50k. :

P = V2/R = 25/50000 = 0.0005 W = 500uW… no problem at all I’m sure.

Internal pullups are not actually resistors, they are actually FETs that behave like resistors, you can rely on the value being between 20k and 50k, you cannot rely on them being very linear (but why would you care).

For externally mounted hardware this is too weak a pullup - use 5k...1k sort of range (a few milliamps).