Hardware switch debouncing vs deep-sleep current

  • In my battery powered device based on L01 I would like to implement several micro-switches - for reset and device control as well.

    I used the same de-bouncing circuit as Pycom used in their OEM baseboard design for RST pin - 20k pull-up resistor and switch with capacitor towards GND in parallel:


    I measured quiescent current through pullup resistor using uCurrent tool. It seems to be in sub-uA region.

    Then I used the same circuit connected to Pxx pin (will be used for device control in the code) and the quiescent current seems to be at the same level.

    Should I expect any issues with increase deep-sleep current with this approach?
    Maybe better idea would be to pull Pxx pins to GND and switch towards VDD?

  • @robert-hh
    Thanks for confirmation. With the uCurrent tool I measured current in order of tens of nA but I was not sure if measurement of such small currents makes sense.

  • @danielm The circuit above should not consume any current, if the PIN is set to input and the button is not pressed, besides some leakage. The ep32 data-sheet specifies an input leakage current of max. 0.05µA. The leakage of the capacitor should be almost Zero too. In a real set-up the leakage caused by dirt plus humidity may be higher.

Log in to reply

Pycom on Twitter