#garfield Logs

Oct 12 2020

#garfield Calendar

05:12 AM polprog: nice welding helmet rue
08:58 AM rue_mohr: hehe
09:13 AM aandrew: rue_mohr: yeah TWI is what people who don't want to pay the Philips tax call I2C. ridiculous
09:14 AM rue_mohr: I knew that once I dont know what happened
07:36 PM rue_shop1: ok, I have to know what the logic thresholds are of the avr for this debounce thing
07:38 PM Tom_L: https://www.avrfreaks.net/forum/input-pin-voltage-threshold-and-hysteris-statement
07:39 PM Tom_L: what voltage?
07:39 PM rue_shop1: no I need real-world data
07:39 PM rue_shop1: gonna put a triangle into a pin with software that forwards it to an output pin and see
07:40 PM Tom_L: i programmed one at 1.7v once
07:40 PM rue_shop1: need to know what the high/low thresholds really are for debouncing
07:41 PM Tom_L: 7 weeks tomorrow. something better happen fairly soon
07:44 PM rue_shop1: hmm
07:44 PM rue_shop1: where was it comming in from?
07:45 PM rue_shop1: ok the going-low threshold is 1.3V and the going-high is 1.65
07:45 PM rue_shop1: so I have 350mV of schidtt
07:46 PM rue_shop2: ok, next I need to know a reasonable speed for turning a knob
07:51 PM Tom_L: 40-50ms
07:52 PM Tom_L: 20-30 is typical for a button iirc
07:52 PM rue_shop2: ok, encoder knob
07:52 PM rue_shop2: 20 pulse
07:53 PM rue_shop2: I'm thinking 3 rev/sec is a safe high limit for how fast a person can turn a knob
07:53 PM rue_shop2: ?
07:54 PM rue_shop2: 180 rpm
07:54 PM Tom_L: not if you crazy flip it
07:54 PM rue_shop2: these aren't easy to do that
07:55 PM rue_shop2: 8ms, given 50% duty on the wave
07:55 PM rue_shop2: in 8ms, I want to move no faster than 350mV
08:06 PM rue_shop1: need to center on the difference
08:07 PM rue_shop2: center on 1.475V
08:28 PM rue_shop1: ok, this is comming out crazy
08:28 PM rue_shop1: where is my drill...
08:46 PM rue_shop1: ok,
08:46 PM rue_shop1: the answer is
08:46 PM rue_shop1: pullup the button directly with a 1k
08:47 PM rue_shop1: then, take off with a 150k to the microprocessor, with a 0.01F cap to ground
08:47 PM rue_shop1: (or vcc)
08:52 PM Tom_L: yeah, hardware debounce
08:58 PM rue_shop1: I keep thinking I should write some kinda software debounce, but
09:00 PM Tom_L: 4-5 samples over a given time averaged
09:24 PM rue_mohr: I could shift in 8, and look for 0x00 or 0xFF
09:24 PM rue_mohr: but there is that whole matter of kinda needing a virtual io layer for the debounced stuff