Can I power arduino (or other mcu) from PIR output?



  • Hello.
    Most PIR sensors provide 5 volts on their outout pin when they detect motion. I was guessing if I can use that pin to power an arduino or any other micro controller and have an auto power on/off mechanism that way.
    I can't find any example doing that, so I guess there must be something wrong on that idea. Why?

    Regards


  • Mod

    @danielo-rodríguez using interrups and sleeping the microcontroller is more efficient.

    If the microcontroller is powered down, it will need to boot (which takes 0.5 - 1 seconds on most Arduinos), and all peripherals (radio, sensors) need to be reinitialized which takes additional time. All this time the microcontroller and the peripherals will consume power.

    When sleeping, a microcontroller can become operational in 1-2 milliseconds.



  • Thanks for your answer. Is the boot up time the only limitation? There are situations where it matters, but some others don't.



  • @danielo-rodríguez using interrupts is the normal way of handling such sensors and both the PIR and MCU are design to work this way. Doing it the other/wierd way is asking for trouble. What problem You want to solve by powering off the MCU ?


  • Hero Member

    The OP should find out what the current maximum is on the PIR's pin that he wants to connect to. If it can only handle a milliamp or two, then you risk wrecking it when the arduino does an RF transmission.

    Sleeping the arduino is the preferred approach. It wakes up faster that way rather than going through a cold boot, and that equals power savings.



  • I was just curious if this would have better performance in terms of battery saving.
    I saw some circuits doing this with button presses and mossfets.
    I suppose that, for most PIR applications the delay defeats the purpose.
    Thanks for all your answers!


  • Hero Member

    Sleep current is just 100na if you are doing it right.



  • @danielo-rodríguez I would argue that this approach has better better parformance in terms of battery saving. The PIR must be powered all the time and it consumes an order of magnitude more current than the sleeping MCU. In MySensors, when the node is sleeping and it wakes up to send a report to the controller, it sends just one message. But when the node is starting from poweroff it sends multiple messages like presentation etc. This would for sure cause actually more battery drain than the sleeping node. Propably You could design a protocol in which the node just sends a single message after power on, but I don't know if it is possible with MySensors. Implementing Your own protocol just to fit this wierd setup sounds like a really bad idea. The other issue with using PIR as a power on/off to the MCU is reporting that the PIR is no longer detecting motion. When PIR output goes off, the MCU also goes off and You cannot send the report to the controller. How You would solve that ? You would need some king of timing circuit that will hold on the power for some time. This just adds complexity to the design and probably the power consumption which after all is the thing You want to imporove instead of make worse.



  • It might be possible to power the Arduino off the output pin. Since they are dirt cheap I would just test it.
    But like the others I would suggest to use the interrupts of pin 2 and 3.
    For my battery powered 3.3v pro mini I use 3.3v pir sensors without the voltage regulator. The standard 5v pir needs at least 4.5v just to step it down internally to 3.3V. On these I had problems with voltage stability because I stepped it up to 5V. Also the battery lifetime was poor.
    With the 3.3v pir version this thing runs for months. With the solar panel on top maybe forever.


Log in to reply
 

Suggested Topics

15
Online

11.4k
Users

11.1k
Topics

112.7k
Posts