Bumper Switches and making things complicated…

Microswitch
Microswitch

One of the simpler inputs to add to a microcontroller is a switch, I have chosen to use the ones I have added to KiCad for my Swarmbot.

Most people who add microswitches normaly use something like the following circuit on a Digital in Pin.

When the Switch is open there is no current flow; and when the switch is closed there is a flow of about 5 mA.

While this is good for a simple status switch, on short leads.

When you want to know more information about the state of the switch, you can move to the following circuit:

With a small change of resistor values, and adding a forth resistor you can detect the curent status of the switch, regardless of if it is open, closed or missing. Adding a small capacitor gives a small amount of EMC resilience and limits contact bounce.

KiCad SwarmBot Bumper Buttons
KiCad SwarmBot Bumper Buttons

Leave a Reply

One thought on “Bumper Switches and making things complicated…”

%d bloggers like this: