.5 sec is too long to get speed reading, you may be able to timer/counter 1 pulse duration to get speed ref faster .
PID itself is hard to tune. Isn't each correction just how-much and how fast ? and slowing-down and reducing each correction until there is no overshoot ? I made an alternator/regulator controller that self-tuned by jointly reducing correction amount and slowing corrections (longer pauses) until there were no more overshoots. The output was the PWM to MOSFET. You could also adjust up/down the gain/time with a pot input ref.
Are you interested in PID discussion ?
don
amgen