Tacho PID

Hi,

I am working on a project that uses a pump to drive an ink test rig. The pump has a 24V supply voltage and also has a 0-5V control voltage. I have successfully coded it for pressure PID but I would eventually like to have the option to control the RPM of the pump with a PID. The pump is fitted with a hall effect tacho output and this outputs 4 pulses per rev. The running range of the pump would likely be 800-1800 RPM.

I have been looking at previous posts and have obtained some code but I can’t seem to get it to work for my application.

I feel that I must also add that I am not a coding expert. This is a project I am working on whilst in lockdown but it will hopefully prove useful once I return to work.

Tachometer_Final_with_Self_Test_ONE_PPR.ino (5.43 KB)

i'm curious why you're using PID.

my experience with PID (timing, position) is to control a variable (e.g. speed, pulse period) to achieve another (e.g. position, frequency).

is there a lag between pressure and RPM that explains the use of PID or are you using the PID between the 5V control voltage and RPM?