any chance of an all pulse flukso v3? meters with pulse outputs are so cheap now (and so much more accurate), i'd love to have 5, 6 or more pulse inputs. the clamp inputs are no use to me at all.
Im also using 2 of my 2 pulse inputs.
Can the clamp inputs be reconfigured to pulse on FLM2?
Bazzle
gebhardm |
You may alter the code to get the alternative pulse vs analog config ;-) (the only electric issue may be the voltage devider in the path of the inputs - check the source section for details)
With respect to the original statement I regard "cheap" as a relative expression, especially when it comes to the fact that you have to put the pulse counters into the power circuits; that, of course, should only do who is able to do so... (and it is not only the law that provides some regulations on this)
But there are also pure pulse input alternatives that belong to the huge "energy management community" - see, for example, http://wiki.volkszaehler.org/ - it is a German site, but you may get the ideas presented there.
Regards, Markus (who is rather pleased to have the clamps available)
frumper |
thanks markus, do you know if anyone has converted the flukso v2 clamp inputs to pulse via software? my 1 din solar meter cost less than 20 euro and took about 15 mins to install, the 4 din consumption meter was about 50 euro and took less than an hour. i also have the LED outputs on the meters hooked up to currentcost envirs via optismarts so i have some redundancy and lcd display available in the house too. regards, rik
gebhardm |
Hi Rik,
there has been no conversion of the software to my knowledge so far. But let's shortly think what would be needed to be done:
1) In the Flukso sensor board software an extension of the main.c is necessary: Pulses are currently counted via interrupts, so this must be supplied for the ADC-ports also - a config toggle would be required to switch between the current way of analog reading and a reconfiguration to use the PCINT-signals (Pin Change Interrupts of the ATmega168) to count pulses instead.
2) On the server side the configuration then is to be set: This requires to allow changing the sensor class for sensors 1 to 3 from analog to pulse; if pulse is chosen, then, of course, a type declaration as "electricity", "water", "gas", "oil" ;-) would be nice (so a toggle between the analog parameters and the pulse parameters). This config should then be passed together with the sensor active flag to the Flukso, thus the sensor board.
So from the software side it should not be that much of an effort, Bart, what do you think?
BUT: The tricky part is indeed the current design with the voltage dividers (the 1k91 resistors) that bring the ADC port pin levels to ground unloaded and allow a max voltage of 1.1V. If a pin change is to be detected I guess the voltage has to be higher for a true change against logical "0"... - so, I guess a pure software solution won't be possible...
Best regards
Markus
frumper |
markus wrote:
"I guess a pure software solution won't be possible"
i have a soldering iron, and i'm willing to use it! :)
icarus75 |
@markus:
A conversion of ports 1-3 to pulse ports would indeed require the de-soldering of the 1k91 resistor and swapping the 1uF for a 100nF one. Although leaving the 1uF unchanged should work for slow pulses as well.
Since the sensor board would require a different component loading, a hardware version bump to 2.2 would be appropriate. See the AVR makefile, lines 53 and 54. We could then have a different AVR firmware initialization depending on the hardware version.
As for the sensor configuration aspect, we could have this depend on the sensor board hardware version as well, either at first boot or each time we load the sensor page. (I'd go for the former option). Some checks would need to be added to the syncing code as well so that it can cope with both 2.1 and 2.2 hardware.
All in all, it's quite feasible. But as always, it requires some coding and, especially, testing effort.
bazzle |
Now that I have used my 2 pulse inputs for Electricty measurements I assume the only way for me to measure my gas usage later would be to modify one of the Analog inputs as above?
Or is there a way to have a hall effect etc use an analog input?
Is there a pic of the circuit board posted anywhere you know of?
Thanks Bazzle
frumper |
if someone is willing to do the coding, i'm willing to do the de-solder/soldering and testing ...
gebhardm |
@Bart: I again need some private lessons ;-) The ATmega168's ADC port can convert 0 to Vcc or 0 to Vtg; so with a clamp from 0-5V for 0-xA either the ATmega is on Vcc=5V or a voltage divider resistor is still required?!
Ah, I see, the ATmega runs on 5V, so my analog-to-pulse converter question for the intentional use of the voltage divider was not too stupid in the first place ;-)
We might raise a competition who's first willing to write the V2.2 code for the switchable FLM... Prize: Two beer at the next elektrocamp :-) (I guess you'll win)
jgysenbergs |
I would also be interested in a conversion from clamp to pulse input. I think I have fairly standard configuration here at home: the solar panels' pulses are measured from the SO + and - connectors on the PV power meter, amount of water is measured from a KIWA (Kent, now Elster) PSMT C water counter with a cheap reed switch from an old bicycle speed meter. I still have to figure out the gas meter but since I have no more pulse connectors left on the Flukso, I'll have to wait. And - as 'Frumper' mentioned - I'm willing to do the (de)soldering and testing but coding: that's an whole other kettle of fish. - JG
luitwit |
I am considering to buy a Flukso meter but I need four pulse inputs (pv-solar, energy, gas and water consumption) and I was wondering if there are any updates on this topic. If this is not going to happen I should wait for Flukso v3 I guess?
gebhardm |
This actually raises a fundamental discussion on the FLM as hardware and web site...
I chose the FLM in the first place as it exactly provides what it promises - just to quote the "About"-page: It determines your total electricity consumption from a current clamp attached to one of the power cables. - for me the current clamps where the argument to actually buy a FLM; otherwise I surely would have chosen an alternative, e.g. www.volkszaehler.org that connects to a Pollin AVR NetIO board that is even cheaper than the FLM... (as kit for just 20 Eur of which I have some on my shelf; another one is http://openenergymonitor.org that also works with clamps as primary measuring sources)
So, well, I do understand that there is a demand for certain (sic!) flexibility, but I am not sure whether to change the foundational intent of a product (another question: what is the product: the FLM with web offering, the web site with a hardware offer, both in a balanced bundle?); we already had a discussion on a solution for the alternative utilization of ports for analog and pulse input (hey, it's open source, so feel free to contribute) - that would raise a need for re-certification of the hardware and what I see as even more risky, an increased complexity of the FLM in total; this especially when I recognize all the installation questions that arise from the current "simple" version already...
Note, I am also "just a user", so, above is my personal opinion and feeling...
Let Bart decide.
Best regards
Markus
peterj |
Hi,
Perhaps it can be done without modifying the board. Make an extra subroutine on ports 1,2,3 like a 'schmitt trigger'. Define 3 extra virtual port (e.g. 1a, 2a, 3a) with a user adjustable trigger level (e.g. 1.5V).
When voltage on port 1 < 1.5V ->1a = '0', or when voltage on port 1> 1.5V -> 1a = '1'. This way you will have 3 extra (virtual) ports positive triggered. The only thing to do is bring Vcc outside the box.
If you want, you can combine functionality. Clamp on port 1 for current measuring and trigger on port 1a for heavy using current (e.g. > 25A) on port 1a. (Perhaps e-mail notification at this triggers?).
Another example: an temp sensor on an analog port with triggering above a special temp (monitoring server room temp?)
The reason I ordered the Flukso is the possibility of clamps. My electrical meter has a disk turning 96x a KWh. And that is very slow.
My advice: more analog ports with this option. More flexibility.
Peter.
gebhardm |
This is a nice and simple idea! With a series resistor of 5539 ohms at 5V or 2292 ohms at 3,3V pulses you can reach ADCmax at the analog inputs (Vref=1,1V) that could be interpreted as logic "1" in an alternative software solution... But yet again "someone" needs to get hands on the software ;-)
Halsey |
However would this work for a "fast" pulse? I'm not sure how quick pulses generally are, but it is mentioned above that "A conversion of ports 1-3 to pulse ports would require [...] swapping the 1uF for a 100nF one." Also if these pins are not using an interrupt routine on the ATmega168, is the chip quick enough with polling or could it miss some pulses?
gebhardm |
The clamps have a response time of 300ms, so no worry about speed; at least not from the controller side... See spec for details. I shift clamp measurement each 40ms, so have a round-trip every 120ms for three clamps. I don't want to argue on accuracy of the whole system (therefore I actually switched to a DIN-rail meter for PV measurement) and must admit that clamp measuring is just the second best choice (first, of course, if you don't want to fiddle around with mains installation)
gebhardm |
BTW: The actual solution Bart has in mind switches the pin input behavior with corresponding switched software behavior - see sensorboard 2.2 for what is about to be implemented.
Halsey |
The software-controlled analog switches via the Atmega GPIO ports are clever indeed!
Im also using 2 of my 2 pulse inputs.
Can the clamp inputs be reconfigured to pulse on FLM2?
Bazzle
You may alter the code to get the alternative pulse vs analog config ;-) (the only electric issue may be the voltage devider in the path of the inputs - check the source section for details)
With respect to the original statement I regard "cheap" as a relative expression, especially when it comes to the fact that you have to put the pulse counters into the power circuits; that, of course, should only do who is able to do so... (and it is not only the law that provides some regulations on this)
But there are also pure pulse input alternatives that belong to the huge "energy management community" - see, for example, http://wiki.volkszaehler.org/ - it is a German site, but you may get the ideas presented there.
Regards, Markus (who is rather pleased to have the clamps available)
thanks markus, do you know if anyone has converted the flukso v2 clamp inputs to pulse via software? my 1 din solar meter cost less than 20 euro and took about 15 mins to install, the 4 din consumption meter was about 50 euro and took less than an hour. i also have the LED outputs on the meters hooked up to currentcost envirs via optismarts so i have some redundancy and lcd display available in the house too. regards, rik
Hi Rik,
there has been no conversion of the software to my knowledge so far. But let's shortly think what would be needed to be done:
1) In the Flukso sensor board software an extension of the main.c is necessary: Pulses are currently counted via interrupts, so this must be supplied for the ADC-ports also - a config toggle would be required to switch between the current way of analog reading and a reconfiguration to use the PCINT-signals (Pin Change Interrupts of the ATmega168) to count pulses instead.
2) On the server side the configuration then is to be set: This requires to allow changing the sensor class for sensors 1 to 3 from analog to pulse; if pulse is chosen, then, of course, a type declaration as "electricity", "water", "gas", "oil" ;-) would be nice (so a toggle between the analog parameters and the pulse parameters). This config should then be passed together with the sensor active flag to the Flukso, thus the sensor board.
So from the software side it should not be that much of an effort, Bart, what do you think?
BUT: The tricky part is indeed the current design with the voltage dividers (the 1k91 resistors) that bring the ADC port pin levels to ground unloaded and allow a max voltage of 1.1V. If a pin change is to be detected I guess the voltage has to be higher for a true change against logical "0"... - so, I guess a pure software solution won't be possible...
Best regards
Markus
markus wrote:
"I guess a pure software solution won't be possible"
i have a soldering iron, and i'm willing to use it! :)
@markus:
A conversion of ports 1-3 to pulse ports would indeed require the de-soldering of the 1k91 resistor and swapping the 1uF for a 100nF one. Although leaving the 1uF unchanged should work for slow pulses as well.
Since the sensor board would require a different component loading, a hardware version bump to 2.2 would be appropriate. See the AVR makefile, lines 53 and 54. We could then have a different AVR firmware initialization depending on the hardware version.
As for the sensor configuration aspect, we could have this depend on the sensor board hardware version as well, either at first boot or each time we load the sensor page. (I'd go for the former option). Some checks would need to be added to the syncing code as well so that it can cope with both 2.1 and 2.2 hardware.
All in all, it's quite feasible. But as always, it requires some coding and, especially, testing effort.
Now that I have used my 2 pulse inputs for Electricty measurements I assume the only way for me to measure my gas usage later would be to modify one of the Analog inputs as above?
Or is there a way to have a hall effect etc use an analog input?
Is there a pic of the circuit board posted anywhere you know of?
Thanks Bazzle
if someone is willing to do the coding, i'm willing to do the de-solder/soldering and testing ...
@Bart: I again need some private lessons ;-) The ATmega168's ADC port can convert 0 to Vcc or 0 to Vtg; so with a clamp from 0-5V for 0-xA either the ATmega is on Vcc=5V or a voltage divider resistor is still required?!
Ah, I see, the ATmega runs on 5V, so my analog-to-pulse converter question for the intentional use of the voltage divider was not too stupid in the first place ;-)
We might raise a competition who's first willing to write the V2.2 code for the switchable FLM... Prize: Two beer at the next elektrocamp :-) (I guess you'll win)
I would also be interested in a conversion from clamp to pulse input. I think I have fairly standard configuration here at home: the solar panels' pulses are measured from the SO + and - connectors on the PV power meter, amount of water is measured from a KIWA (Kent, now Elster) PSMT C water counter with a cheap reed switch from an old bicycle speed meter. I still have to figure out the gas meter but since I have no more pulse connectors left on the Flukso, I'll have to wait. And - as 'Frumper' mentioned - I'm willing to do the (de)soldering and testing but coding: that's an whole other kettle of fish. - JG
I am considering to buy a Flukso meter but I need four pulse inputs (pv-solar, energy, gas and water consumption) and I was wondering if there are any updates on this topic. If this is not going to happen I should wait for Flukso v3 I guess?
This actually raises a fundamental discussion on the FLM as hardware and web site...
I chose the FLM in the first place as it exactly provides what it promises - just to quote the "About"-page: It determines your total electricity consumption from a current clamp attached to one of the power cables. - for me the current clamps where the argument to actually buy a FLM; otherwise I surely would have chosen an alternative, e.g. www.volkszaehler.org that connects to a Pollin AVR NetIO board that is even cheaper than the FLM... (as kit for just 20 Eur of which I have some on my shelf; another one is http://openenergymonitor.org that also works with clamps as primary measuring sources)
So, well, I do understand that there is a demand for certain (sic!) flexibility, but I am not sure whether to change the foundational intent of a product (another question: what is the product: the FLM with web offering, the web site with a hardware offer, both in a balanced bundle?); we already had a discussion on a solution for the alternative utilization of ports for analog and pulse input (hey, it's open source, so feel free to contribute) - that would raise a need for re-certification of the hardware and what I see as even more risky, an increased complexity of the FLM in total; this especially when I recognize all the installation questions that arise from the current "simple" version already...
Note, I am also "just a user", so, above is my personal opinion and feeling...
Let Bart decide.
Best regards
Markus
Hi,
Perhaps it can be done without modifying the board. Make an extra subroutine on ports 1,2,3 like a 'schmitt trigger'. Define 3 extra virtual port (e.g. 1a, 2a, 3a) with a user adjustable trigger level (e.g. 1.5V).
When voltage on port 1 < 1.5V ->1a = '0', or when voltage on port 1> 1.5V -> 1a = '1'. This way you will have 3 extra (virtual) ports positive triggered. The only thing to do is bring Vcc outside the box.
If you want, you can combine functionality. Clamp on port 1 for current measuring and trigger on port 1a for heavy using current (e.g. > 25A) on port 1a. (Perhaps e-mail notification at this triggers?).
Another example: an temp sensor on an analog port with triggering above a special temp (monitoring server room temp?)
The reason I ordered the Flukso is the possibility of clamps. My electrical meter has a disk turning 96x a KWh. And that is very slow.
My advice: more analog ports with this option. More flexibility.
Peter.
This is a nice and simple idea! With a series resistor of 5539 ohms at 5V or 2292 ohms at 3,3V pulses you can reach ADCmax at the analog inputs (Vref=1,1V) that could be interpreted as logic "1" in an alternative software solution... But yet again "someone" needs to get hands on the software ;-)
However would this work for a "fast" pulse? I'm not sure how quick pulses generally are, but it is mentioned above that "A conversion of ports 1-3 to pulse ports would require [...] swapping the 1uF for a 100nF one." Also if these pins are not using an interrupt routine on the ATmega168, is the chip quick enough with polling or could it miss some pulses?
The clamps have a response time of 300ms, so no worry about speed; at least not from the controller side... See spec for details. I shift clamp measurement each 40ms, so have a round-trip every 120ms for three clamps. I don't want to argue on accuracy of the whole system (therefore I actually switched to a DIN-rail meter for PV measurement) and must admit that clamp measuring is just the second best choice (first, of course, if you don't want to fiddle around with mains installation)
BTW: The actual solution Bart has in mind switches the pin input behavior with corresponding switched software behavior - see sensorboard 2.2 for what is about to be implemented.
The software-controlled analog switches via the Atmega GPIO ports are clever indeed!