Pages: [1]   Go Down
Author Topic: Quick question about using a simple toggle switch  (Read 221 times)
0 Members and 1 Guest are viewing this topic.
Saskatchewan
Offline Offline
Sr. Member
****
Karma: 19
Posts: 364
When the going gets weird, the weird turn pro. - Hunter S. Thompson
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I want to enable selecting between two different modes in my project. Basically one is a long period and the other is shorter. I want to use a simple spst switch on a digital pin with the internal pullup resistors. This works well because it will keep the correct mode even if reset.

I have a slight concern about leaving the switch on all the time. Is that a potential problem?

I think it's probably a non-issue but I'm experienced enough to know that assuming things is less reliable than checking with people who know better.

Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17301
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I want to enable selecting between two different modes in my project. Basically one is a long period and the other is shorter. I want to use a simple spst switch on a digital pin with the internal pullup resistors. This works well because it will keep the correct mode even if reset.

I have a slight concern about leaving the switch on all the time. Is that a potential problem?

I think it's probably a non-issue but I'm experienced enough to know that assuming things is less reliable than checking with people who know better.

It's a non-issue, just microamps flow if the switch is closed with the internal pull-up enabled, and no current flow if the switch is open.

Lefty


Logged

Offline Offline
Edison Member
*
Karma: 36
Posts: 1338
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That's no problem at all!

With the switch on and the input pulled to ground, there is a small current through the internal pull-up resistor.

Of course if the switch is on 90% of the time, you can reverse your logic  and make "off" the "normal" condition.    But as far as reliability, it doesn't matter.
Logged

Saskatchewan
Offline Offline
Sr. Member
****
Karma: 19
Posts: 364
When the going gets weird, the weird turn pro. - Hunter S. Thompson
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks guys. That's what I thought but now it isn't an assumption.
Logged

Pages: [1]   Go Up
Jump to: