Program for oil consumption of heating

Hello everybody,

I need your help.
I am a beginner in the microcontroller technology and work slowly into the topic. That's why I need your help now.

Follow the problem.

I have an oil counter on my oil heater which emits a pulse per 0.02 liter. Now I would like to try the whole with the Arduino Starter Kit. Is it possible to write a program that picks up the impulses and recalculates them every 24h and converts them into liters for a certain amount of time? In addition, it would be great if I could get the daily values on the Arduino directly on the display.

I would be very happy about an answer.

Sorry for my bumpy English

If your tank = 1 liter, it sends 50 pulses.
What happens after it sends the 50 pulses. Is it quiet?



It sounds doable, but you will need some supporting circuity.

First thing I would do is try and determine the characteristics of the pulses. Hopefully the manufacturer has specifications to give you that information. If not, an oscilloscope may be needed, probably with storage capability since I suspect the pulses will fairly infrequent.

After you get the pulse characteristics you will probably need some kind of level converter as it’s likely the pulse voltage will be too high for direct connection to the Arduino. Direct connection is probably not advisable in any case because there may be damaging spikes occasionally. I would suggest some kind of optoisolator circuit although that also may need some protection circuitry. Maybe this thread can help.

Thank you for your answers so far.
The oil meter gives no impulses but has a reed contact. That means I can build up the impulses over a circuit so that I can connect these directly with the Arduino. Now I would need your help with a suitable program for the arduino. During the day, the program should convert the impule count to liter and save it at 12pm.


I’m surprised to hear that there is an available, unused reed switch that you can use.

Anyway, if you Google “Arduino counter program” I’m sure that you will find lot’s of helpful information.