Peter Washington wrote: > I believe Ralph has offered to introduce my previous narrow > circulation emails into the mix.
Here's the content. > Hi Ralph and Terry, > > I've been following the conversation fairly carefully and I've read > the RasPi and Ganssle "Debounce" links and in my humble opinion you > have two options :- > > 1. *Firmware Solution* : > Ask Eben Upton to find out what the Hysteresis values are, (min & max > values on BOTH thresholds), and use a pair of resistors to force the > Bias Voltage, (as opposed to Pull Up / Down), to exactly the mid point > of the hysteresis so that the Pi can do the full debounce in it's > hardware, then turn Python's Debounce OFF. > > 2. *Hardware Solution* : > Use the Ganssle Fig 3 configuration with the diode and two resistors > of near equal value, (just the Diode Volt drop to take into account). > Modern Resistors are available for around o.05 to 0.10 GBP in pretty > much ANY value and to within +/- 1% > > I can't confirm whether either of these approaches are guaranteed to > work because I don't have a setup ready to try it myself, but I know > enough about electronics to be hopeful. > > Another suggestion for testing is to take your Arduino, and programme > a "Staircase Waveform Generator" to start at 0.4 Volts and step to 1.0 > Volts in .1 Volt increments, then jump to 1.6 Volts and then step to > 2.1 Volts. This can then be used to test the Pi's Hardware Hysteresis > circuitry. I would suggest using 1+ second per step into a DVM > initially, just to make sure that the DAC works as anticipated, then > reduce the step time to either 100 ms or 500 ms if you want to check > the Python code Firmware Debounce. > > If Eben Upton can find out what Hysteresis Values are then that is the > solution to use because you can limit the external hardware to a > single 100 Ohm series from the switch to the input pin, not forgetting > to ensure that the Input Voltage for most of the Pi's pins *MUST NEVER > exceed* 3.6 Volts, (3.3 V would be even better) !! > > I hope this helps 😉, if there is anything unclear just ask ! > > -- > > Cheers Peter -- Next meeting: Bournemouth, Tuesday, 2017-04-04 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread: mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING Reporting bugs well: http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR