Electric IMP connecting with EKM Metering sensors, Pulse Counting, RS485, and capabilities questions

Hello all,

I am currently selecting all the hardware to create a data logging system for my works industrial autoclave. I did a very simple version that just logged the temperature, but now I am working on a complete system. We want to log the water and electricity consumption of the machine.

I am planning on using the Imp002, so I will have 12 IO pins.

I was originally looking at these two sensors from EKM


I am hoping I can connect them both to the imp and log them at the same time. But I am a little worried. The water sensor is very simple and just pulses once for each 1/10 of a cubic foot of water. I saw that I can use pin.configure to set the pin in pulse counting mode. But it says that this is only available on Pin 1 and you have to set a duration for it to be counting? I will need to do other things as well as counting the pulses.

The universal smart meter is used for measuring the electric use. It also can output pulses and will probably be 800 pulses per kWh. Would I be able to count the pulse from both of these sensors at the same time? Or is that too much for the imp to handle?

The smart meter can also communicate on RS485, so that might be an option. I will want to be able to connect to two analog outputs on our machine to read in the temperature and pressure of the machine, and several digital outputs to track various states of the machine. But all of these will not be sampled very quickly. I expect around once every 30 seconds or so. The final step is to push the data to data.sparkfun.

Anyone have any suggestions about how to wire these things up and if it is possible to do everything that I want to with this board? Or am I just asking for too much from this awesome little board.

Thank you,

What’s the fastest pulse rate you expect, in pulses per second? If it’s only, say, a few tens or hundreds, then you should be OK with a normal GPIO interrupt. If it’s much faster than that, you’d want to look into using the sampler, though then you’d have to know how wide each pulse is (the sampler won’t, of course, register pulses that are narrower than the rate that it samples at).


How about coverting pulses to analog? You would have to create a flow curve calibrating flow to voltage.

I am not 100% sure how fast the pulses will be coming. But my estimate is that it will be fairly slow. I know that it is 800 pluses per kWh, and 10 pluses per gallon of water. But I dont know how much the machine uses yet. That is the whole reason to add these meters on. So it is kinda of a circular problem. That being said my gut estimate is that we are talking 10 gallons per hour, which is less than 4 pulses per minute. The machine is rated to have a 3kW heater. So rough guess is 40 pulses per minute.

With pulse rates this slow will I be able to do this with the GPIO interrupts?

Thanks for the advice all,

Less than one pulse a second? GPIO interrupt. Easy-peasy.


Awesome! That is what I was hoping to hear. Thank you for you help everyone.