Battery life for Motion Sensor
-
- https://www.mysensors.org/build/battery
- OK
- This is a standard sketch. Cannot see anything wrong.
@alexsh1 Indeed, I saw the batteries life page but I did not want to cut into my Pro Minis (and I believe that the LED provides a good info as to the sensor is well powered).
Even if I make this modification, that does not explain the 3V to 1V instead of 3V to 0V phenomenon. Does it?
-
@alexsh1 Indeed, I saw the batteries life page but I did not want to cut into my Pro Minis (and I believe that the LED provides a good info as to the sensor is well powered).
Even if I make this modification, that does not explain the 3V to 1V instead of 3V to 0V phenomenon. Does it?
@popsyann I de-soldered power LEDs and power regulators. You do not need them for battery powered nodes and this is reversible. Otherwise you wont get low uA.
This is about power.Talking about voltage - did you measure it? How do you know if goes to 1V?
Did you double-triple check all wires and everything is correct?FYG - HR-SR501 has to be modified as well for 3.3V (remove regulator)
http://www.instructables.com/id/Convert-a-5v-PIR-Motion-Sensor-to-33v-for-ESP8266/ -
@popsyann I de-soldered power LEDs and power regulators. You do not need them for battery powered nodes and this is reversible. Otherwise you wont get low uA.
This is about power.Talking about voltage - did you measure it? How do you know if goes to 1V?
Did you double-triple check all wires and everything is correct?FYG - HR-SR501 has to be modified as well for 3.3V (remove regulator)
http://www.instructables.com/id/Convert-a-5v-PIR-Motion-Sensor-to-33v-for-ESP8266/@alexsh1 Noted for the de-soldering info. I get it.
For voltage measurements, yes I did measure the voltage between the ground and the output pin of the motion sensor: when the pin is not connected to Arduino, I get 3V when motion is detected and 0V when no motion.
Then I connect the output pin of the PIR to the Arduino (pin 3) and I measure on Arduino pin 3: I get 3V when motion is detected and 1.2V when no motion.
As for the modification of the PIR: noted. But I mainly use the mini PIR, where such modification cannot be applied (as the circuitry is very different and very simple).For the cabling: when I load on the Arduino the Serial Gateway sketch, everything works well, the Gateway starts properly, meaning the radio is well connected.
When I load the motion sensor sketch, it start properly, finding the right "parent" and immediately after this, there is a flow of info going out of the Arduino+sensor, sending 0s or 1s, constantly (like if there was an issue with the interrupt process).
And what I do not understand is that this (these) sensor(s) has(have) been working well for a while.
-
@alexsh1 Noted for the de-soldering info. I get it.
For voltage measurements, yes I did measure the voltage between the ground and the output pin of the motion sensor: when the pin is not connected to Arduino, I get 3V when motion is detected and 0V when no motion.
Then I connect the output pin of the PIR to the Arduino (pin 3) and I measure on Arduino pin 3: I get 3V when motion is detected and 1.2V when no motion.
As for the modification of the PIR: noted. But I mainly use the mini PIR, where such modification cannot be applied (as the circuitry is very different and very simple).For the cabling: when I load on the Arduino the Serial Gateway sketch, everything works well, the Gateway starts properly, meaning the radio is well connected.
When I load the motion sensor sketch, it start properly, finding the right "parent" and immediately after this, there is a flow of info going out of the Arduino+sensor, sending 0s or 1s, constantly (like if there was an issue with the interrupt process).
And what I do not understand is that this (these) sensor(s) has(have) been working well for a while.
@popsyann said in Battery life for Motion Sensor:
When I load the motion sensor sketch, it start properly, finding the right "parent" and immediately after this, there is a flow of info going out of the Arduino+sensor, sending 0s or 1s, constantly (like if there was an issue with the interrupt process).
And what I do not understand is that this (these) sensor(s) has(have) been working well for a while.
Please search for sleep() function - it has changed the way it works at some stage in MySensors 2.*
https://forum.mysensors.org/topic/1088/battery-powered-pir
https://forum.mysensors.org/topic/5807/interrupt-and-sleep/26
https://forum.mysensors.org/topic/5552/pin-change-interrupt-not-firing-with-mysensors/28Another reason could you that your PIR is not settling properly - this is why it sends out 1s and 0s to the GW. Try to insert sleep(20000); into void setup() at the end to settle the PIR