💬 Rain Gauge
-
I finally finished with the update and it has been merged to the MySensors github. Here is the link: https://github.com/mysensors/MySensorsArduinoExamples/tree/master/examples/RainGauge
You will also need to download the updated Time library here: https://github.com/mysensors/MySensorsArduinoExamples/tree/master/libraries/TimeLet me know if you run into any issues.
-
Hi! I bought the rain gauge recommended in the page, put together a simplified version of the sketch which just reports the mm every hour and everything works just fine. However I did notice that during a sunny day almost every hour I have the equivalent of something between 0 and 3 interrupts happening which are clearly false positives. Do you guys suggest anything to mitigate this behavior? I don't think there is anything that can be done in software (an interrupt is an interrupt) so I was wondering if there is anything else which can do the magic :-)
Thanks -
I have been using my tipping bucket for at least 6 month now and I also noticed that the last week I got some fake interrupt. We have had a very nice week in south Sweden so it must be something with the weather that makes the interrupt
@flopp I may have noticed something similar, while testing it, indoor, I had no fake interrupts at all (even if I did test it for a short time). When outside though, under the sunshine, I had frequent fake interrupts, like there is a voltage drop in that scenario causing it to trigger. I can of course survive with it but I was wondering if there may be a way to mitigate it somehow. I may try to "debounce" it by checking the input after the interrupt but not sure would be effective since I do expect the input to be HIGH again after the interrupt. Thanks
-
My node is batteri powered, can it have something with the battery why this happens?
I have a second rain gauge powered by USB and that one doesn't give fake interruptMine is powered by USB but still I have fake interrupts. Agree with you, I guess powering it with batteries could be worse since it is more likely that the voltage would fluctuate so causing fake interrupts. Btw, I assumed the board cannot sleep for this sketch to work, am I wrong? Or are you keeping it awake but still powering it with batteries? Thanks
-
Mine is powered by USB but still I have fake interrupts. Agree with you, I guess powering it with batteries could be worse since it is more likely that the voltage would fluctuate so causing fake interrupts. Btw, I assumed the board cannot sleep for this sketch to work, am I wrong? Or are you keeping it awake but still powering it with batteries? Thanks
-
@user2684
My board is sleep and wake up every 2 hours to send battery voltage or it wake up by interrupt@flopp & @user2684 Hmm. Strange. Mine has been running for around 2 years and I have never noticed this behavior. I live in an area where we get lots of nice weather so I'm sure I would have noticed it if it were happening to me. I know that's not helpful for you but hopefully we can get this fixed...
I don't have any great ideas on how to fix this but you may want to try updating to the latest MySensors bata library. There were some updates recently that fixed some interrupt issues.
Also, since this was not happening indoors is it possible that there is something else causing this issue like wind or heat?
Lastly, did you make any changes to the code or wiring for your sensors? -
I am using version 1.5.?
I have not opened the rain-box for at least 4 month and not changed the code.
Maybe this error have been there since day one but I have not checked so often.
But now I am checking daily because of other nodes that I added recently and then I noticed this -
I am using version 1.5.?
I have not opened the rain-box for at least 4 month and not changed the code.
Maybe this error have been there since day one but I have not checked so often.
But now I am checking daily because of other nodes that I added recently and then I noticed this -
@flopp What other types of nodes is this happening on? I'd definitely suggest updating to the latest version of the Beta code if you're having interrupt issues.
-
As for myself, I'm using an over-simplified version of your code (https://github.com/mysensors/NodeManager/blob/v1.5-dev/NodeManager.cpp#L585) but the principle should be the same I hope (btw I didn't have the chance to tell you what a great project you put together!). I'm with the latest beta release but since using the arduino's attachInterrupt() in a non-sleeping board, the mysensors' library should not have an impact in my scenario I guess.
Something I want to check that may cause my issue I think is the power supply. I have a (chinese) USB wall plug connected to a (chinese) USB TTL connected to my arduino board. I wonder if a fluctuating power would generate this behavior (while indoor, it was connected to a different power supply). I'll try this way and report back.
Out of curiosity those are the logs from my controller (0.11 is 1 interrupt). So this is happening at every hour, up to 9 times per hour so the heat cannot be the issue I might say:
[2017-05-19 16:22:18] [plugin_mysensors.py:250 - process_inbound()] INFO: [serial_1][5][1] presented as S_RAIN [2017-05-19 17:22:07] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.88 [2017-05-19 19:21:45] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-19 20:21:35] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.66 [2017-05-19 21:21:25] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.33 [2017-05-19 22:21:16] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-19 23:21:07] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.66 [2017-05-20 00:21:00] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.33 [2017-05-20 01:20:53] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-20 02:20:47] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.00 [2017-05-20 03:20:41] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.00 [2017-05-20 04:20:33] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.00 [2017-05-20 05:20:28] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.00 [2017-05-20 06:20:24] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-20 07:20:18] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-20 08:20:12] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.00 [2017-05-20 09:20:04] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-20 10:19:56] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.77 [2017-05-20 11:19:48] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.22 [2017-05-20 12:19:37] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.44 [2017-05-20 13:19:23] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.22 [2017-05-20 14:19:09] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.22 [2017-05-20 15:18:55] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.99 [2017-05-20 16:18:43] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-20 17:18:31] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.00 [2017-05-20 18:18:21] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-20 19:18:12] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-20 20:18:03] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-20 21:17:55] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-20 22:17:50] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.00 [2017-05-20 23:17:44] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.00 [2017-05-21 00:17:39] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-21 01:17:32] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.00 [2017-05-21 02:17:24] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-21 03:17:16] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.00 [2017-05-21 04:17:10] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.00 [2017-05-21 05:17:05] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-21 06:16:58] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.00 [2017-05-21 07:16:52] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-21 08:16:45] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-21 09:16:38] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-21 10:16:32] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.00 [2017-05-21 11:16:25] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-21 12:16:16] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.00 [2017-05-21 13:15:53] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-21 14:15:30] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.00 [2017-05-21 15:15:15] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.00 [2017-05-21 16:15:02] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-21 17:14:47] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-21 18:14:35] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-21 19:14:23] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.00 [2017-05-21 19:14:23] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.00 [2017-05-21 20:14:11] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-21 20:14:12] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-21 20:14:12] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-21 20:14:12] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-21 20:14:12] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.11 [2017-05-21 21:14:01] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.44 [2017-05-21 22:13:49] [plugin_mysensors.py:253 - process_inbound()] INFO: [serial_1][5][1][SET][V_RAIN]: 0.44 -
I had fake interupts on my device - would work great on test bench then with a 5v dc converter that was noisey plus a longer cable to the bucket I was getting a lot of trips. My fix which solved all the issues was a 0.1uF ceramic cap from ground to the signal pin of the bucket (right at the adruino) coupled with an inline resistor 330ohm to the bucket and a 1Kohm resistor from +5v to the signal pin. This is a basic pull up and debounce system and it manages to hold the 5V via the cap with 100% reliability thus far for 3 weeks including a lot of rain over the last few days. I would draw a circuit diagram if someone could tell me the best program to use?
-
I had fake interupts on my device - would work great on test bench then with a 5v dc converter that was noisey plus a longer cable to the bucket I was getting a lot of trips. My fix which solved all the issues was a 0.1uF ceramic cap from ground to the signal pin of the bucket (right at the adruino) coupled with an inline resistor 330ohm to the bucket and a 1Kohm resistor from +5v to the signal pin. This is a basic pull up and debounce system and it manages to hold the 5V via the cap with 100% reliability thus far for 3 weeks including a lot of rain over the last few days. I would draw a circuit diagram if someone could tell me the best program to use?
-
@itbeyond cool thanks! I'll try to put together something similar and report back the results. I guess in this way you don't need INPUT_PULLUP when setting up the pin since already there right? Thanks
@user2684 Yes make the line:
pinMode(TIP_SENSOR_PIN, INPUT);I did make one other modification of installing an RF Choke and cap circuit on the input power supply but I am sure the cap & resistor mods made all the difference. Good luck and let me know how it goes!
