Hi Terry, Ralph, et al, First of all I need to apologise for sending information to just Ralph and Terry, and not including everybody who is involved in this project, so I'm replying to the "DLUG" mailing list this time, I believe Ralph has offered to introduce my previous narrow circulation emails into the mix.
Now on to my response to Terry. > 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. > > This will have to go on the back burner for the moment, because I have no > guarantee that Eben will be able to help and as you acknowledge you can't > say > whether it will work. It is now only just over two weeks to opening day, > so > I'd rather go with a solution which has been suggested as working by lots > of > people. > OK, that makes sense, so I'll ignore the Software Solution for now. > Besides, I can understand how the hardware solution works.... :-) > Yes, I can sympathise with that. > > 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% > > Yes. I'm looking into using a couple of resistor packs to replace the > discrete resistors that I'm currently using to pull-down each pin. That > way I > can simply build a new board as a drop in replacement for the current one. > That would be a good solution, those resistors would be much more tightly matched than discrete ones, so you will more consistent results. > Also, the diode isn't necessarily needed, but I can make provision for it > on > the board and add one for each channel if needed. The Diode IS needed if you want to achieve symmetrical timing performance, and until you can ignore the Kernel / Python code that is firing on both edges that *could* possibly be a problem, so I would *definitely* layout space for them, 1N4148's would be entirely satisfactory as long as you're using resistors above about 10K. Are you switching to ground through a pull UP resistor ?? If so then as long as you lose the Firmware Debounce code I would recommend using a 0.1 uF capacitor and calculating your resistors to suit a 20 - 50 ms delay as suggested by Ganssle. i would *still* recommend using R2 set to iK, (to stop drawing too much current from the Pi and possibly damaging it), and R1 as the Timing Resistor, minus the the 1K of R2. You could use a separate, (4 parallel Resistors in 8 pins), resistor pack for R2 to keep space down and have the batter matching performance too. I think that just about covers it all, good luck 😊. > 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. > > Unfortunately, my Arduino is a bought in dedicated scope and can't generate > the signals that you suggest. > I have a couple of Arduino boards that I can lend you if that helps, but since we're ignoring the Software Solution for now that probably isn't relevant. However other people on the list as well as yourself might find the suggestion useful at some weird time in the future. As i said before, (in my '*secret*' email), if there are any questions, 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:[email protected] / CHECK IF YOU'RE REPLYING Reporting bugs well: http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

