Energy pulse meter + outside temperature
-
By the way - here is a typical output from Openhab where data comes in via the mqtt-gateway to a RPi controller with Razberry z-wave board. (the house is electrically heated so heaters go on and off together with all other electrical equipment so curves look a bit rough, upper curve is Kwh and the lower is W ).
-
Hi @ANZ14778!
To start you can look here: http://www.mysensors.org/build/pulse_power
-
Hi!
Would it be possible to use both of the interrupts for two LED sensors or will the interrupts then collide and effect the precision? Of course it would be better if I could use S0-outputs and then perhaps the 12-channel meter described here but in this case I only have the blinking LEDs available.
If multiple interrupts are ok, would it then also be ok to go for even more interrupts, 5 or 6 interrupt pins are available for the Mega if I'm not mistaken. Whats the limit? I guess it depends on the clock frequency and the number of tasks in the loop()?!
Thanks!
-
Hi!
Would it be possible to use both of the interrupts for two LED sensors or will the interrupts then collide and effect the precision? Of course it would be better if I could use S0-outputs and then perhaps the 12-channel meter described here but in this case I only have the blinking LEDs available.
If multiple interrupts are ok, would it then also be ok to go for even more interrupts, 5 or 6 interrupt pins are available for the Mega if I'm not mistaken. Whats the limit? I guess it depends on the clock frequency and the number of tasks in the loop()?!
Thanks!
@NickBuilder
I made this one so long ago that I do not remember the program well but (from a bad memory as well :-) ) I think that the interrupt is there for the sleep mode only which is optional and meant for a battery powered sensor.
Mine is on USB power all the time so I do not use the sleep mode at all and besides I want to follow the watt numbers which will not be available during a sleep mode operation.In principle there should be no problem using two interrupts but the program need a rewrite for that setup of course. Also it might be questionable if using sleep mode together with two power sensor leds will save anything at all (often they blink 1000 times per kW consumed).
-
I assumed you were using the example mentioned by sundberg84 and in that code it's clear that the interruption is used to increment the pulse count.
If you use a different approach I would very much like to take part of your code. Are you still monitoring your energy and power this way?
Thanks!
-
I assumed you were using the example mentioned by sundberg84 and in that code it's clear that the interruption is used to increment the pulse count.
If you use a different approach I would very much like to take part of your code. Are you still monitoring your energy and power this way?
Thanks!
@NickBuilder
I now have looked at the code and (of course) you are right, the interrupt is used for the pulse count which I think is the best way of programming this function.My sensor is based on an old version of this code but modified for use with Openhab (which does not give any start value back, this function has to be own programmed). Another modification is that same unit monitors a number of temperature sensors.
The "thing" has been in operation since my first post above and works well but I guess I should make an effort to modernize the code. Maybe a task for the long and dull autumn/winter days here.