Hi, I hope somebody can help me understand the structure of what I'm trying to achieve. I have a liquid flowmeter with a bad flow sensor. The flow sensor generates a 50% duty cycle variable frequency pulse output from a rotating vane in the liquid flow. The flow pulse output can be static high or low when there is no liquid flow.
The original flow sensor is faulty and obsolete, but I can find similar flow sensors and condition their output voltage levels to those required by the sensing head. I can determine the characteristics of the sensor input by measuring the flow meter with a pulse generator. I expect the flowmeter will be designed with an adaptation curve matching the sensor response used with it. In case anybody thinks designing the flowmeter to match the sensor is a solution, my flowmeter does more including accumulated total volume and other calculated values it logs in its NV internal memory.
In my head, I'm reading the time duration of input pulses, applying a variable to reduce (or increase?) that time then output a modified pulse sequence, changing the variable to match the law of the flowmeter. I'm not looking for huge accuracy and 10 corrected segments for the total expected flow (pulse frequency) range would be a sufficient curve approximation. Only low frequencies are involved from zero up to about 10Khz corresponding to maximum flow. The other idea is to sample and divide the relatively low speed input from the flow sensor into 1uS chunks, time how many in a (or half) cycle, then drop or add to create a modified output pulse stream? But this has to be done in near real time.
When I have characterised what the original sensor was doing for different flow (pulse frequency) rates I can then flow test my subsitute sensor and map it's charactersistics, corrected to follow the original sensor design curve.
Can anybody tell me what I am trying to do is called in the instrumentation world, or suggest a sketch resource that might help me?