I created a PCB to track my water usage in home assistant. It is mounted to my water flow meter and uses a strobing led and 3 light sensors to track the position of the rotating needle on the meter that indicates the flow of water. The PCB can be powered by battery or USB and connects to wifi for home assistant Energy integration.
I would love to hear what people think about the concept and also if you would be interested to install such a device to track your water usage in home assistant. I am considering selling the PCB at a low price point if there is interest. Estimation is around 9-12 Euro
#Non Bulky High Precision sensor to readout the Water Flow Sensor
165 messages Β· Page 1 of 1 (latest)
Awesome! I like the simplicity! It looks like there is some RFID coil sensor under the red dial? No magnet on it? I used a hall effect sensor between the top counter mechanism and the lower metal part of my water meter but it requires breaking the seal usually to get the hall effect close enough.. The meters I used I purchased on ebay.. not owned by utilities.
Tried it with a hall too, but that didn't work. This works amazingly good 0.1L even
I cannot open the water flow meter, so I can only add my custom PCB on it.
Have you tried different wavelength LEDs including IR? How do you calibrate it? Is battery power feasible for remote meters?
I have chosen the green led so red becomes black looking. Batterij powered is an option for the second version. It does automarical calibration. After 1L of water it actually works better
Cool! ya I was more just curious what that PCB coil looking thing in the dial is! If it's RFID or something else..
Yeah I think coil with a capacitor to swing with the waves
Hmm yeah like an inductive trigger device... So you could potentially use your own resonant coil to detect it too.. not that your way with the LEDs isn't perfectly fine too. Maybe the inductive way can even be read through the cover or something..
I don't use RF magnetic technology, only an LED and 3 light sensors. This allows me to achieve 0.1L accuracy using phase shifting in the calculation. My sensor is cheaper and more accurate than inductive sensors, I'm not sure why others haven't adopted this approach. The inductive sensor cannot read through a cover and need to be just as close. I think they have chosen RF antenna because its cheaper to make than adding a piece of metal, and lowers the weight for higher precision in those water sensors.
Yes that makes sense now that the weight could be lower this way. I like your approach too I was just curious about the water meter designers choices.
seen this? https://github.com/jomjol/AI-on-the-edge-device esp32 with cam and ocr basically
yes saw it, but for me this is overkill
I see you have a water meter from Vitens so i think you are in the Netherlands, if you want to sell the print i would be interested.
Non Bulky High Precision sensor to readout the Water Flow Sensor
Good innovation here instead of the normal magnetic sensors. So you have 3 photo sensors, and one goes dark when the needle passes over it?
and what if the LED strobes at the wrong time? Wouldn't it be better leave the LED on constant? (apart from power consumption)
I enable the LED and wait for x time to warmup the LED and than take a measurment
using auto-corrolation you can than priciesly know where you are and more robust agaist noise. If one LED has a lot of reflection from the needle this will be ignored by the other two thus stable tracking of position
I kind of understand. Can you please make yaml available - I'd like to see how you coded it.
I am just in the progress to do convert the code to ULP assembly. I wrote everything with a friend mostly in C. I am waiting on a order with the new ESP chip and finishing the second Proto PCB. I am going to test the new LED if that gives enough light.
follow this thread for updates!
I would buy one for 9-12 Eur
Without shipping cost that will be the price, yes
saw for a person in sound afrika it cost amost 40 euro
We need a compatibility spec, what kind of meters are supported.
Currently one meter only, i am trying to find some meters to be able to test it out, but slow process
Currently i am trying to make the code more stable:
I am also creating some datasets to test different methods with, after that i am going to support multiple meters and test them
In this figure, there is a rotating red circle disk Light output shown, accompanied by a differential signal displayed below it. The orange is the raw signal with the filtered signalrepresented by the yellow line.
Small update:
Working now on the ESP32-S3 ULP code. I am not sure yet how to connect this with ESPHome, but lets see
Update 24-05-2023:
We are working on Rust implementation. This brings more code safety to the table and efficiency
How does it detect initial value?
Basically it took quite some work to make a minima crossing work. The minima crossing is needed for the algorithm to know where it is, and as soon it has a good starting point it immidiate starts measuring.
I'm also interested. I tried a hall sensor but that gives no signal om my meter. I am also in the Netherlands. Where can I find more about your project? I use Node-Red for home automation BTW. And I have a different watermeter.
Its almost done (implementation). Which do you currently have? https://martijnvwezel.com/blogs/watersensor/
I am still working on the blog itself, its now a bit messy :/
Plan is having the first version before summer. This will have support for 2 water meter versions with only USB powered. After that I will work on a battery version.
Currently improving the way it handle light from surrounding and other potenional effects on the measurments.
Update blog post how it is now robust:
https://martijnvwezel.com/blogs/watersensor_innerworking/
What tests have you done with battery power ? does it have a constant consumption value ?
No test with the battery yet. Currently, having some issues with the S3 of the ESP32 chips. The ADC performance way worser than its excepable.
What do you mean by "performance"?
Discord has added automatic blocking of swearing. π Did it tell you that it did that?
Had some issues responding on that messages. But only I named the full chipname and that was swearing too :/
and I would swear about the S3 adc it really ::::::::: compared with any other adc
using a digital pin makes more sense than you just know its not zero XD
In what way?
It wasn't the chip name, it was the other word you were using. π (We get a message when it happens.)
Ahhh I see now the message, lel I didn't notice :p
But it did not tell me what was wrong just your message is not accepted
What's wrong with the S3 adc?
the noise is extreemly bad will show you image
this is the moment where the adc just went up and down without water flowing
very high noise level
signal goes up and down with 100mV
I can't tell what the time scale is, but could you use a filter?
timescale each halve a second you will see one sinus period
what means one liter of water
First ORDER IS OUT, soon I will make it avalible for others to be orderd
Would this sensor work with a dial that has a metal part instead of red?
Your pcb design is for a different meter so it would need to be changed, but i am wondering if the sensing method would work..
Should work the height of the values will differ probably but it could easily work
You probably need to make a small 3d printed bracket for it
Dont know your cat skills
I have a 3d printer and can make something with freecad. Maybe i will order a board.
New serie arrives next week, however I am going for work to the otherside of the world start of august I can start delivering
still fighting to get it in esphome, my own written code with mqtt works but not yet in homeassistant with esphome
any updates on a battery powered version? (maybe limit battery power by publising data over BLE using BTHome?)
very cool, what are the 3 light sensors detecting? whether the red rotating arrow is covering them?
So basically just detecting 1 liter (0,5~0.3) would be possible if light conditions stay the same, what essentially not happening. Than you need 2 for comparision. I added the 3th one to just auto-corrolation thechnique (someting being used in 3-fase electronics), now essentially you can go very accurate in mililiters.
Its basically now finished, second focus is the external component thingy but do this after my holidays
First bash arrived, going to work on some esp32 fixes with esphome
First batch arrived and successfull tested!
would you have space to thicken up the holding tabs ? You could use a slot instead of a hole so allow for the small differences in the hole positions between different meters.
@sly dagger looking verry nice! But any progress on a battery powered version?
maybe use BTHome protocol to periodically send the measurement? That way I suppose it will be battery efficient
or maybe use this:
https://github.com/afarago/esphome_component_bthome
Yes, some starts without any battery managment and wifi turned on it uses around 20mA- sending 80mA. Tomorrow or even tonight I am going to work on the battery powered version. The first part is the
Do you have experience with the bluetooth low energy method?
Don't really follow what it helps, the stiffness of the holders are quite stiff, there are 4 holes for 2 version of meters. On is just above the usb-c power
wait you mean for alligment π
smart trick yes
Are there hardware designers, that can help me creating an 3d design for a gas-sensor?
@sly dagger very nice project! Any chance, that you will share the Schematics / Gerber files? For my water meter I would need other mounting options
@sly dagger I am away but when home I will check my water meter in Australia to see if it might be compatible with your project⦠I just looked at your source code link on tindie - you are using custom component - any plans to convert to a real esphome component
Actually, I am currently working on that. I think today or tomorrow its even online
Which meter do you have
@rain marsh
I know I have chat with Martijn
It probably will work but you need some tie wraps or custom bracket
hmm if it does not fit perfectly, I won't use it. You did not answer to the schematics / layout questions. So I guess it will be closed source hardware, right?
Will make it in the future opensource when its 100% finalized
glad to hear this - if you need any PCB review, I can offer you some assistance (electrical engineer / FPGA / microelectronics here) π
(but I never did anything with 3D stuff...)
Thank you for giving your help
yes
For the people that are still interesting in knowning the bug I had to solve, if you have an esp32-c3 and you enable the logger it will not boot normally in esphome
This looks to be using Seeed's XIAO? I recently learned that Seeed got a model assistant and they offer a solution for visually recognizing water meter degrees, what do you think?
I have one like this so there are no premade holes. Would it work? and can I mount it without using self tapers as I do not want to risk any discussions with utility company
The biggest advantage to me seems to be that it will always get the meter value and not just count impulses so the value will be correct even if something goes bad. But the installation is probably harder.
I think using a camera is a solution for some sensors. However, its a costly solution that needs quite some bulky construction. where you need to put the camera on top and make sure the readout keeps correct. Also you need to get the light conditions good. My goals was just to keep track of my daily usaged and see when I use more and when less. Also I want to know when there is a leakage. This all can be done with the camera, however I like the complexity of a camera less. I though for some camera solution you need an external service to convert the tekst to numbers, so I dislike htat approach alot. I like a simple device that does the job and is cheaper in the end!
The utility company does not care actually as long as you can read the black part of the numbers. I actually think your sensor could work! Never tested that exact model!
So, in the end, not choosing XIAO as the master direct patch was also too costly? Seems like C3 is pretty cheap.
But the enclosure can get costly to build around it. To maken it dark for the sensor. If you want to order the 3d peinted version or print on you own depends ofcourse, for me ordrering and the shipment was quite expensive. There is also quite some power usaged and if you choise for an external service to convert pictures to text can be that you need to pay for thst
What if it's just as a master, and use your program?
That looks really nice π Congratulations.
Thank you π‘
https://www.tindie.com/products/30901/
its for sale again
I just saw you post, very cool that you build something similair. However, I saw you had calibration complexity issue. I have actually made this automatically
Nice one! Looking good @sly dagger !
ben ook voor de V2 met een (platte inductie sensor) bezig.
Vind het erg interessant hoe je deze ontwikkeld hebt en heb de posts graag doorgelezen π !
Zag dat je voor de losse sensor ringen problemen had met tape vinden?
Kan eventueel kijken of ik een batch voor je kan snijden?
Groetjes!
Bought one! Easy to install and just works!
induction sensor are having lower resolution and less preciese
Makes sense, thanks for the info!
If you are interesting in a matter or thread version please tell me
Hi @sly dagger this is awesome piece of hw. We you thinking about the version used in shaft uner the ground? There are a lot of water meter installations in slovak houses under the ground.
Can you explain me more about it
Water meters are in outside of the house in the garden in shafts made for it. It is due to water company can access it freely and do manual check of meter and second reason is due to not freeze during the winter. Conditions at the bottom of that shaft are harsh for electronic devices so I was thinking to make reading sensor sealed and esp32 with baterry to put above the ground on a pole. Will your reading sensor (only sensor not esp32) work connected to esp32 over 2m long cable? Could you imagine to make sealed sensor?
Yeah, this is real useful use case for your meter if it handles so hash environment. I would like to test and help if you want to.
Yeah lets ping eachother on private to discuss further
@sly dagger ?
It looks like the placement of the gauge and its shape are different for yours. I imagine the board and code could be adapted to work for yours, but I don't think it would work unchanged.
I am each time soo suprised to see soo many different watermeter versions. This needs maybe some change in code and calibration, could work but wouldnt have my hopes up too much
Hi, when the schematic will be open source? It's a good way to the community collaborate.
It's an esp32 + one led and three sensors - what collaboration do you imagine doing ?
yeah what do you suggest?
yeah hardware is simple stuff, software is the hard part
Make different boards with the same circuit for other gauges.
This board already supports many meters, for unique meters I also created the diy version muino.nl you can find it
I didn't know. I will check it
Hi, Does this work with this meter? This model is Sensu Residia.
I don't think so, it need some facy algorithms or special lenses
Thank you.π₯
@sly dagger Did you see how homewizzard fixed the mounting issue? Maybe interesting to do something similar for a future version π
https://helpdesk.homewizard.com/en/articles/6287701-does-the-watermeter-work-with-my-analogue-water-meter-and-how-do-i-install-it
Could work yes
@sly dagger now ESPhome has matter over thread/zigbee support, would that be an option for a battery powered version?
Or BLE with an NRF52 CPU?
no matter or zigbee yet. Just Thread.
Would that also have a lower battery consumption? For instance on the NRF52?
yes