Reliable use of Wake_on_ pin with Deepsleep shield

  • Hello
    I try to integrate a raincounter sensor, which generates an impulse after a certain amount of rain. The LoPy sleeps usually and wake_up_on_pin as soon an edge of the raincountersensor is detected.

    I tried to use the wake_on pin P17 or P18 functions of the deepsleep shield. Unfortunately it is impossible to build a reliable wake up function on pin by raising or falling edge.

    In parallel, there is as well a timer wake_up launched, so that the LoPy sends a message every hour as a heartbeat.

    Within 24 hours usually, I have at least one PIN_WAKE situation even the pins are either hardly wired pullup or pulldown. I tried as well with external pullups and pulldowns. Build up an external filter with a diode and lowpass filter network, but nothing changes.

    Sometimes the LoPy detects a pin_wake even there were no changes on the pins.

    Any ideas? Did someone out there the same experience?

  • General question to the community: Does anybody use reliable the Wake_on_pin function over more than 24 hours? I can imagine that the other DeepSleepshield issues, as unstable timer wakeup, might be related to this Wake_on_pin problem. Any comments to this?

  • @jcaron I'm using the Lopy / Deepshield together with the expansion board. Apparantly the PIC cuts the power from the LoPy completely. This is the reason why the levels are directly from the supplies on the expansion board. The 3V3 voltage converter seems to be part of the LoPy.

  • @affoltep What are the levels you actually see? If you take them from USB then you have 5V when I believe the inputs are supposed to be 3.3V.

    Not sure how changing the LoPy could change anything, the wake-on-pin is driven by the PIC on the deep sleep shield.

  • @jcaron Yes, I used first the internal pullups. They take the voltage from the supply, either from the USB or the battery, (not the 3V3, which are just during LoPy running available). Then I changed to pulldown (GND) and took for the impulse the supply (batt or USB). I as well tried with external pull_ups. Finally there is no difference in reliability. Once every 24 hours you get a wrong wake_up reason, independent on any settings. I tried as well on 3 different LoPy, all shows the same effect. One seems to be a little bit more reliable.

  • @affoltep Have you checked the voltage you get on the pin for high and low signals, both with the LoPy running and sleeping?

Log in to reply

Pycom on Twitter