Gas Meter Reading Using a Magnetometer
-
@dpcr Thanks, yes i read how you did it with locating the sweet spot, but I was thrown off by the 'no magnet' statement.
'connecting' my meter is also still in the cards, no idea if it has a magnet or not (in which case i may use a Hall sensor), otherwise i may try the magnetometer -
@Ed1500 Good luck on on your project, keep us updated on your progress. I'm also thinking about trying to measure our electricity consumption using CT's rather than at the meter.
@dpcr thanks, indeed, I am using a CT as well, adding a dc bias, still balancing between just measuring the amplitude of the sinus, or measuring all along the sinus. I think i will have an attiny 25 or ideally an attiny13 do this as a dedicated I2C slave and have that read by an ESP8266. Ofcourse there is the sonoff Touch, but thats a tadd too much to put on a large number of devices.
-
@dpcr thanks, indeed, I am using a CT as well, adding a dc bias, still balancing between just measuring the amplitude of the sinus, or measuring all along the sinus. I think i will have an attiny 25 or ideally an attiny13 do this as a dedicated I2C slave and have that read by an ESP8266. Ofcourse there is the sonoff Touch, but thats a tadd too much to put on a large number of devices.
-
@Ed1500 the ic used in the sonoff pow (HLW8012) costs less than $1 and can do it all for you. Maybe that's an idea...
-
@dpcr the more steps you choose of course the more accurate it gets. At this moment I have divided the Total cycle in 20 steps. I have made this a parameter in my code.
@dynamite indeed, that is why i was looking at yr code. On the other hand, if the frequency is known and you know the amplitude, you can make a calculation.... but then again, in order to know the amplitude you need a series of measurements.
Thats why i was thinking to let a dedicated attiny do that: all it needs to do is to measure and put the result in its I2C registers. The esp8266 then can do a hoist of other things and just pull the powerparameters when needed -
@dynamite indeed, that is why i was looking at yr code. On the other hand, if the frequency is known and you know the amplitude, you can make a calculation.... but then again, in order to know the amplitude you need a series of measurements.
Thats why i was thinking to let a dedicated attiny do that: all it needs to do is to measure and put the result in its I2C registers. The esp8266 then can do a hoist of other things and just pull the powerparameters when needed@Ed1500 The amplitude is quite simple it is just measuring the (max) top and (min)bottom if the direction of your signal changes.This is quite consistent during the readings and if due to temperaturen or whatever cause it is changing the max and min are adjusted. However the period / frequency of the curve is not consistent as this is directly related to the consumption.
I think the linear approach to the curve is already quite accurate. But if you have a better routine in mind I love to hear. Basically I just have to adjust the array in which the different steps are calculated.I like the idee of having a dedicated attiny as I know from my sketch that in case of high volume the changes is the y are quite fast and the is (almost) no time to communicate with the gateway etc.
-
@Ed1500 The amplitude is quite simple it is just measuring the (max) top and (min)bottom if the direction of your signal changes.This is quite consistent during the readings and if due to temperaturen or whatever cause it is changing the max and min are adjusted. However the period / frequency of the curve is not consistent as this is directly related to the consumption.
I think the linear approach to the curve is already quite accurate. But if you have a better routine in mind I love to hear. Basically I just have to adjust the array in which the different steps are calculated.I like the idee of having a dedicated attiny as I know from my sketch that in case of high volume the changes is the y are quite fast and the is (almost) no time to communicate with the gateway etc.
@dynamite yes i do not see a problem in measuring the amplitude. I am not sure if, when measuring current through a CT, the frequency will change, as that is just the grid frequency, but probably you were referring to its use in measuring gas flow.
My idea to use a dedicated attiny is simply so the ESP will be freed of the burden of calculation/measuring, as this will be a rather continuous process. The code will probably fit an attiny13, but I have never tried i2c on an attiny13, but I have on an attiny85, so i am pretty sure it will work on the 25 and 45 as well. The 13 I still have to try
-
-
-
@pihome I power mine with an adapter as well. This node sends too much information to be battery powered. I was researching solar because the sensor sits outside on the south side of our home but never followed up on it. Maybe for another day.
I was thinking to have it powered with battery and solar charger but lot can go wrong with this setup, may be best to have it powered via proper power supply, i have ordered sensor and i will build this once i get that delivered and report back, i was thinking to calculate co2 footprint as well for gas usage.
@dpcr said in Gas Meter Reading Using a Magnetometer:
@pihome I power mine with an adapter as well. This node sends too much information to be battery powered. I was researching solar because the sensor sits outside on the south side of our home but never followed up on it. Maybe for another day.