Select Page

I moved in January from my student house to an apartment.
As result of this, I need to pay for all kinds of services and products which were included in the price before. Things like water, energy, gas, trash cans, etc. IoT is an excellent solution to get more insight in my consumption and creates possibilities to filter out unnecessary cost.

My energy and gas are connected to the grid – I have a smart meter – so I can monitor that with the Oxxio app. I can see my consumption per hour, which gives me more insight in what devices use a lot of power and how to manage it better.
Since the introduction of Diftar this year, I’m also able to monitor how many times I’m putting my 140L curbside dustbin. In the Diftar project the municipality of Enschede has chipped every curbside dustbin in order to invoice the households based on their waste production. Currently, my counter of the waste bin shows 1. Last week I needed to empty my dustbin, this was the first time in 6 months. I see this project as a huge improvement, it makes me more aware of my waste production (especially the amount of plastic waste I produce. Puuu, it is so bad for the environment).

Edit: In 2017 my curbside dustbin is emptied two times in total.

Water meter pulse sensor

Alright, here is the thing, my water meter is an old school analog meter Sensus 620 from Vitens. I don’t want to write down every day or even every hour what my consumption is. There are some water meter pulse sensors for this on the market, but they are ridiculous expensive for what you get. The next step in my mind was, how can I build it? I did some research and found out they use a LED in combination with a photosensitive sensor to capture the number of rounds of the rotating disc in the water meter. The disc would rotate exactly one round per liter. The disc is visible in the blue circle on the picture.

I got my inspiration from the Circuits Online forum here, where people had the same idea to build a water meter pulse sensor. They use a CNY70 and arduino to create a pulse sensor. I can build that, no problem. so I bought a CNY70, a reflection sensor using infrared light. I adapted a prototype board to fit my water meter and attached the CNY70 on this board. After soldering some resistance, I attached the sensor to my Arduino and start measuring the analog voltage of the sensor.

The problem

Unfortunately, from the 1024 counts available, only 10 counts difference was measured. Crap, the reflection difference is smaller then expected. Why? How? The rotating disc was made of plastic red part and a metal reflecting part. The deviation should be bigger.

I saw some similar problems arising on the internet, and people started to add op-amps to the circuit. Blehh, more work to do. And above all, it was not logical, the disc should reflect better.

So I started a different approach. What causes this small deviation? What does it mean?

First of all, my voltage measure was around the 700 +- 10 counts. This means that I did measure reflection, because I made sure the LED was the only light source around. What could reflect? The plate behind the rotating disc maybe, but my alignment of the sensor was right.

Wait, there is a transparent plate on top of the water meter, but I pressed my sensor against that plate, so it should not reflect, right? Normally, this would be right (neglecting refraction in the transparent material), however the edge of the housing is extended with 1 mm, hence the LED and reflection sensor where located 1 mm from the transparent plate (see article image). This 1 mm of free space was enough for reflection of the light into the sensor.

The solution

With some rubber, I created a small wall between the LED and sensor, which would make sure no reflection could happen in that 1 mm. As result, my measurements are now fluctuating between the 300 and 700 counts depending on the angle of the plate. By implementing a simple threshold in my code, I created an incremental encoder for my water meter.

The next step is to my water meter pulse sensor to one of my IoT devices. I think I will go for the Wemos D1 R2 or a stand-alone ESP8266 by hacking the firmware (which is a whole new kind of project on its own).