Stop the Bouncing
This is the first of what hopefully will be several posts that are focused on electronics projects. I have been developing an interest in electronics, and Arudino in particular, along side the model trains. As described in a recent post about building an odometer for the train , when including a switch care must be taken to avoid " switch bounce " or the mechanical rapid bouncing as the switch is triggered or released. If the program is fast enough, these bounces will be seen as separate events when you are expecting it to be a single event. This can be addressed either in the software or through circuit design. Since I wanted to use an interrupt for the trigger and am not sure of how fast the railcar might go, I decided to use the circuit approach. I had three circuit design alternatives and wanted to test them out for their effectiveness. Option #1 : Simplest (and winner) In the Garden Railroad story that inspired the odometer, he uses a 10 nF capacitor in parallel with t...