How can I count time ?

Hello Flukso.
I don't own a Flukso yet but I have one question to ask.

I need to measure one input (central heating) by counting the time the heater's electrical circuit stays on. I could do this by monitoring the analog measurement but I don't want to waste one analog input for that.

Flukso has two pulse inputs but I need one of them to count time instead of pulses. Then I need to map time to fuel units (liters of oil) and plot the result.

How can I accomplish this?

Thank you.

icarus75's picture

Hi deflux,

Do you know where and how to measure the on-state of a burner in a safe way?

Using a pulse input as a timer will require some adaptations to the current code. But it's certainly doable.

Cheers,
Bart.

deflux's picture

Hi Bart and thank you for the quick and positive reply.

Yes, I do know and I very much appreciate your cautiousness. I'll probably use an opto-isolator, an isolation transformer or a relay, or even the (though expensive) current clamp, your suggestions are welcome. I must have some of these from the past, but to do this properly I need to know the electrical characteristics of the input and the frequency of polling, if it's going to be polling.

I've been through the manual but I don't think they are mentioned there. I believe I've seen something in the forum but I can't find it now and I admit I haven't delved too much into the internals of the meter. I would very much appreciate it if you could provide me with this information.

It would be even better if Flukso provided a kit of some kind :-)
But then again, I understand very much the safety concerns and responsibilities that might exist.

Regards
Dimitrios

Stijn's picture

On the DIN4791 connecter, the B4 input measures the running hours of the burner. I want to connect this input to a relay. But what then ? Something must count the time that the B4 input is high. Can the flukso device do this or do I need something else ?

I assume that my burner has a constant fuel consumption. So when I know the running hours of the burner, I know my fuel consumption.

thanks

icarus75's picture

1/ Do you know what voltage is output on the B4 pin of the connector? Is this output isolated? I'm interested in experimenting with this myself.
2/ The sensor board inside the FLM already tracks time with a millisecond clock for calculating power in real time. So at first sight/thought, the B4 would trigger the registration of a start ms value. When B4 goes high again, the stop ms value is registered as well. Then it's just a matter of adding this walue to the counter. The meterconstant could take care of converting running hours to liters of oil burnt.
3/ Older burners indeed exhibit an on/off characteristic. Newer burners are of the modulating kind, which makes is harder to convert running hours to oil consumption.

Cheers,
Bart.

fluppie007's picture

I'm going to 'bump' this thread. Myself I have a Weishaupt WL10/1D LN oil burner.
I was measuring around and also found out I have a B4 pin output. This pin gets high when the oil pump is started. The voltage I measure is 230V AC, to drive the solenoid valve on the oil pump.

I have a 1.10 Gal/h 'verstuiver'(=atomizer?) type 60H working @ 12 bar. According to the manual I would be burning 4,6kg 'mazout' (oil) per hour.

If I can measure the 'high' time of this B4 output, I can derive the oil consumption.

icarus75's picture

Interesting component. But it will not work out of the box with the FLM's pulse input. I think it would be better to have a simple timer circuit sitting in between the relay and the pulse input.

on3ptz's picture

I need the same solution, my last idea was to use a blinking LED and a phototransistor ...

gebhardm's picture

Blinking LED sounds like a cute idea! Here in Karlsruhe gas consumption is charged per kWh. This kWh is computed from the gas volume delivered multiplied by a factor: 10,783 kWh/m³ - the flow from the gas mains is pressure reduced and its actual flow value into the heating should be taken from the heating manual. So, if I know the gas flow per time unit, I can compute the "equivalent" kWh per time unit, so kW - from that I could imply the fixed blinking frequency of a blinking LED (using the universal NE555) switched with the burner and indicating the power equivalent to be fed into the FLM via optocoupler or using an open collector outline in the first place... that's a hack-a-day for Sunday :-) Or still using an CNY70 with an amplifier to log the turning wheels of the gasometer into the FLM, or building a quantumheater that feeds itself ;-)
Oh, the question was on measuring time of operations... There was an interesting hack in the Elektuur summer edition (or Elektor in Germany and England... - www.elektor.com) - see http://www.elektor.com/magazines/2012/july-047-august/equipment-on-count... for another hack-a-day...

gebhardm's picture

Heat values for other burning products than gas may be obtained from the supplier or in first order approximation: http://en.wikipedia.org/wiki/Heat_value - so with time and flow I can directly compute the energy pushed in the air...

fluppie007's picture

So I should provide a timer circuit in-between to make 30/60 pulses per minute or something? The more pulses the more accurate I guess?
Is a simple 555 timer circuit enough? Or is the timing not reliable enough?

The number of pulses should be corresponding to the energy content of the fuel you are using; thus the accuracy is corresponding to the accuracy you want to get - indeed, the more pulses the higher the "felt" accurancy...
If I have an energy content of 10,783kW per cubicmeter of gas and I have a flow of say 20 liters per minute then I have an energy equivalent of 10,783W per liter, thus 215,66W per minute, 1pulse per watt then makes how many pulses per minute? ;-)

fusionpower's picture

So at one pulse per watt hour it would be three point five nine pulses per second or 3,59Hz. (3.59Hz for Aussies)
I imagine the Flukso would be able to handle this pulse rate?

gebhardm's picture

Right :-) - but please be aware that you need two own parameters to consider. The above energy content of the natural gas we use is as it is given by our local provider; there might be differences in different regions. The other parameter to consider is of course the actual flow rate of the gas or oil into the burner; this might be measured with a stop watch at the meter. I guess the accuracy without afterdigits is high enough (especially as the actual burner efficiency is not really taken account of and that might be lower than the theoretical capacity of the fuel used)
So, what have we learnt? Beside measuring the pure on/off time an alternative better suited to the FLM is triggering a pulse provider - a simple multivibrator - with a frequency analogous to the energy content of the fuel floating into a burner. So the actual power disrupted into heat can directly be determined...
If that isn't cute, I don't know what cute is ;-)

icarus75's picture

The pulse inputs on the FLM can already be configured with a specific meter constant. So a simple 1Hz timer circuit hooked up to an appropriate sensor will do the job. When the sensor detects that the burner is active it activates the timer. The latter has to drive the open-collector transistor at a 1Hz rate.

@gebhardm: You measure the flow rate with a stop watch. Since flow is a volume divided by time, I'm with you on the time part of the equation. But how do you measure the oil volume used during this timed interval?

gebhardm's picture

At least for our gas burner I assume the flow to be constant (as there is only a magnetic valve and a pressure reducer in the inlet and there is no change in the "frequency" of our gasmeter during operation) Might be naive, but assuming constant flow with constant pressure through a constant cross-section of the inlet I also get constant volume per time unit. During stop watching I also look at the gasmeter, of course, how many turns, i.e. volume, it let through... O.K. I neglect temperature, etc., but as I wrote, the Stadtwerke charge with a constant energy content per volume, thus my assumption holds at least in a not too wide error range (counting reflections of the turning wheel is more accurate, of course, but boring, as others had this idea beforehand ;-))
See you in Leuven...

icarus75's picture

I thought you were talking about an oil burner. Not a gas one.

See you on Friday!

gebhardm's picture

Just to complete the info: For oil burners the flow is given with the nozzle used. See Nozzle knowledge for more details - yet again I assume, the flow, and by that the volume may be regarded constant (are there highly sophisticated burners that have a variable flow - I would say, such are too error prone)

fluppie007's picture

Where can I find a simple/reliable 1Hz timercircuit? Or maybe we can use the AC's 50hz as a time reference?
I've read that a simple 555 becomes inaccurate after a few minutes.

Bart, are you willing to develop a "sensor" for a 230V AC on/off input to a 1Hz pulse output circuit? Because all oil burners have this DIN4791 connector with B4 output. Maybe something with a optocoupler?

gebhardm's picture

There is actually nothing to develop; see for example 1Hz standard digital clock; G__gle provides a lot more alternatives...
An optocoupler is "just" an LED driving a phototransistor in the same package; so any circuit with an LED can also drive an optocoupler, e.g. a CNY-17.
Alternative, indeed is locking in the 50Hz signal to a by-50-divider - that is also a standard TTL utilization (good old 74LSsomething)...
Such circuits should be available also as kit; ask the electronics shop dealer of your trust; those should be pleased to provide you such or "develop", thus solder, it for you (at least the older ones)...

fluppie007's picture

Soldering is no problem at all, developing a PCB myself is.
Why I ask this is because the Fluksometer is build around plug and play parts. So a readymade "sensor" fits in the line.

fluppie007's picture

I quickly made a 1Hz pulse generator with a Arduino Uno. 100ms 'on' / 900 ms 'off', so a 10% duty cycle.
Pin 13 is connected to the base of a BC556B transistor. Collector to Arduino's ground and Flukso's input 5 "-". The emittor is linked to the Flukso's input 5 "+". Choose pin 13 as there is a led on the Uno's board.

Anyway, this part is working, when the oil burner is burning the led starts to blink. As stated, 100ms on 900ms off. Only the Flukso isn't registering a thing. I activated sensor 5, oil with a meter constant of 0.0015121630506246 [l/s]. Anyone a clue?

gebhardm's picture

Try an NPN transistor, BC547, common ground of arduino and FLM on emitter, collector of transistor on '+' of the FLM's port; this is the "usual way" also of S0-buses with optocoupler; I truely never heard of an "open collector" with PNP-transistor, but you'll never know...

fluppie007's picture

Will try it out tonight! Thanks.

fluppie007's picture

I think it's kinda working. Only one thing is weird. My water sensor measures 0V when there's no consumption. When it gets its pulse, I measure 5V.
The thing with the oil/gas sensor is that's it's the whole time 5V and when the Arduino gives a pulse it becomes 0V. I also changed the duty cycle to 50%. In other words: 500ms on, 500ms off.

I also think the meter constant of 0.0015121630506246 isn't reliable and Flukso has difficulties with these small constants. I changed it now to 1512.163 for more resolution. It means the actual consumption is only 1/1000000 of what the dashboard indicates in litres.

fluppie007's picture

Bart, how long should the pulse be? Is 100ms enough? Or is 200ms better?

icarus75's picture

Typical pulse lengths for kWh meters are 20-50ms. But note that the FLM's pulse inputs are edge triggered on the downward slope. So even a sub-1ms pulse will register fine.

fluppie007's picture

I've set the meter constant to 1 and it seems that my weird graphs are gone. Bart, check my graphs from 'bout 18h00 yesterday till now, they're fine. Al previous graphs have gaps (day view).
Can you adjust the graph parser or firmware to work well with meter constant values like 0.0015121630506246 [liter/second]. if I go for a pulse every minute, I think my accuracy goes down and it already is 'guessing'

icarus75's picture

1/ You do not need so many significant digits. They do not make your measurements more accurate. So just round the meter constant to max 3 significant digits, e.g. 0.00151.
2/ We have to use fixed point calculations in the AVR. It's now limited to a minimal meter constant of 0.001.
3/ I did receive a bug report on certain fractional meter constants not working as expected. TBI.
4/ As a work-around for 2 & 3, set the meter constant to 1.51 and let me know the result. You'll have your readings in ml.