Hi all,
I am experimenting with input circuits for microcontrollers.
I am trying to combine protection / clamping diodes and switch debounding for a 24V pushbutton input. I am trying to figure out whether to first do the clamping and then the deboucing or first the debouncing and then the clamping. I am espectially interested in the case where the switch is on the +24V.
(This is kind of a follow-up of this thread where I did the same using an optocoupler but several told me galvanic separation does not make sense in that case and a designer would typically not use an optocoupler. Most other sources seem to recommend external protection / clamping diodes so I am now looking into this.)
Both cases seem to have disadvantages:
- first clamp then debounce (first two scematics): R1 needs to be large to limit the current through D1 with offsets the voltage, it seems to be difficult to select correct resistor values.
- first debounce then clamp: debouncing in 24V works fine but the input to the Schmitt trigger is then clamped at 5 of the 24V which seems to be incorrect, at least the schmitt trigger does not switch at the same point in time as if the waveform would be scaled.
My questions:
1/ Is this the correct solution for this problem assuming I want to do hardware debouncing?
2/ If yes, are these circuits correct?
2/ If no, what is the "standard" solution for combining protection / clamping diodes and switch debouncing?
3/ I also came across the last circuit in this Maxim app note. Is it correct? It seems it is missing a connection from the C to the Schmitt trigger input? Why are the zener diode and 220 resistor needed?
Many thanks in advance,
Ares
I am experimenting with input circuits for microcontrollers.
I am trying to combine protection / clamping diodes and switch debounding for a 24V pushbutton input. I am trying to figure out whether to first do the clamping and then the deboucing or first the debouncing and then the clamping. I am espectially interested in the case where the switch is on the +24V.
(This is kind of a follow-up of this thread where I did the same using an optocoupler but several told me galvanic separation does not make sense in that case and a designer would typically not use an optocoupler. Most other sources seem to recommend external protection / clamping diodes so I am now looking into this.)
Both cases seem to have disadvantages:
- first clamp then debounce (first two scematics): R1 needs to be large to limit the current through D1 with offsets the voltage, it seems to be difficult to select correct resistor values.
- first debounce then clamp: debouncing in 24V works fine but the input to the Schmitt trigger is then clamped at 5 of the 24V which seems to be incorrect, at least the schmitt trigger does not switch at the same point in time as if the waveform would be scaled.
My questions:
1/ Is this the correct solution for this problem assuming I want to do hardware debouncing?
2/ If yes, are these circuits correct?
2/ If no, what is the "standard" solution for combining protection / clamping diodes and switch debouncing?
3/ I also came across the last circuit in this Maxim app note. Is it correct? It seems it is missing a connection from the C to the Schmitt trigger input? Why are the zener diode and 220 resistor needed?
Many thanks in advance,
Ares