
I had to do some experimenting as I found out that the sensitivity of the CNY70's detector decreases considerably when the distance to the reflecting object increases only by a few millimeters.
By experimenting with the values of some resistors I managed to get a reasonably well working circuit that outputs a pulse every time the digit '6' on my gas-meter comes around.
The circuit I built is a very simple voltage comparator, based on an LM324, a BC547 and some resistors. As soon as the voltage level on pin 3 is larger than the voltage level on pin 2 (adjustable by turning R1), the output of the LM324 will jump from 0 to 5V. The output of the transistor will then go from 5V to 0V. This is a trigger for the DS2423 to count a pulse (The counter in the DS2423 is triggered by a low-going signal).
I also found out that the CNY70 is very susceptible to daylight. If I open/close the fuse box the counter is increased by one. Also the exact positioning in front of the gas-meter is very important. A little off-center and the DS2423 does not count or increases by random numbers.
What do you think of this schematic:

Do you think there is room for improvement? Although I built a lot of electronic circuits, I am not very good at designing them ...
I am not measuring gas usage yet. First I will turn the experiment in something more definitive design. Then comes the rest (Counting / graphics).
24-4 edit: Changed schematic
Als het niet gerepareerd kan worden dan is het niet kapot!