I want to use the "wake from halt" with my raspberry pi to keep it down must of the time and waking up using external stimuli when need. But I am not sure why, sometime it wakes up from halt although I haven't touched the gpio 6. It seems that other changes are waking up the pi. For example, I have a moisture sensor on gpio3 and if I put it in water (thus sending a 1 on gpio3) the pi wake up.

I have no idea what's wrong and any thought is welcome.

  • 1
    GPIO3 has special powers :p see raspberrypi.stackexchange.com/questions/22524/… - though, from what I read, pulling GPIO3 LOW is what triggers wake from halt – Jaromanda X Mar 11 '19 at 23:11
  • 1
    I'd try a different GPIO for your humidity sensor - is that possible? – Jaromanda X Mar 11 '19 at 23:22
  • Yes I will try other GPIO for the humidity sensor thanks. And sorry I said humidity but it's moisture sensors, so it can goes low or high given if its humid or not, so whatyou say makes sens. – Simon C. Mar 12 '19 at 6:06
  • Ok so I just change gpio3 with gpio17 and it looks that you were right! no more unwanted wake up from halt! if you want to write an answer that I could accep @JaromandaX ? – Simon C. Mar 12 '19 at 6:39

It is almost impossible to halt a Pi running Raspbian with current firmware, so "wake from halt" is meaningless. See https://raspberrypi.stackexchange.com/a/66401/8697

You can boot by pulling pin 3 low, after a shutdown - using poweroff (or similar) - I know of nothing using GPIO6.

It is always possible that a power glitch is causing the Pi to reboot.

Why do you want to shut the Pi down anyway? What are you hoping to achieve?

  • if I put it in water (thus sending a 1 on gpio3) the pi wake up - seems like OP has determined the humidity sensor triggers the wakeup - i.e. not a power glitch – Jaromanda X Mar 11 '19 at 23:21
  • @JaromandaX it is unlikely the sensor would be causing an restart, as pin3 (SCL) is an output from the Pi if I²C is in use. I use I²C RTC on my Pi without problem. I also use DHT22 but on pin 7. There is little reason to use pin 5 as reboot, when the Pi has a dedicated reset pin (labelled RUN) - this is a hangover from the early model Pi (with 26 pin headers) – Milliways Mar 12 '19 at 0:35
  • You're assuming the sensor is i2c. I doubt it is because an i2c device does not drive scl at all – Jaromanda X Mar 12 '19 at 0:39
  • I want to halt the pi because it's battery powered and the battery is charged by a solar panel. I just need to run some script during a short period, shutting down the pi during the time I don't need it (90% of the time) will ensure that I can fully charge the battery . – Simon C. Mar 12 '19 at 6:04
  • and yes no i2c involved. And What you mena by power glitch? I don't think the pi reboot because if I stay logged in the pi stays up up until the battery fall without power. – Simon C. Mar 12 '19 at 6:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.