Tach limiter with pwm out plus deadband

Ok so I'm really green. And learning.

nano. Here's the prob. Need to limit rpm. Given: X number of neg edge pulses per rev. Fixed Y rev/minute pulses achieved yields 50% duty cycle out on Nano D9 at 10hz rate for set limit rpm plus 5 rpm. Over limit plus 6 rpm yields 100% output on D9. D9 pulled High externally for safety, driving npn darlington base. Operating at around 500-600 rpm so we're pretty slow.

I'm lost and learning. Any direction? Anyone?

Be gentle.

Given: X number of neg edge pulses per rev.

Hopefully, this means falling edges, not negative edges. Negative voltage is not good for the Arduino.

Fixed Y rev/minute pulses achieved yields 50% duty cycle out on Nano D9 at 10hz rate for set limit rpm plus 5 rpm.

I have no idea what this means. It suggests that you have an Arduino (a Nano) with something connected to it (on pin 9) and that it is running some code (that you didn't post), getting data from some unknown device on some unknown pin, and that it generates a PWM output value based on unknown data and an unknown algorithm.

Over limit plus 6 rpm yields 100% output on D9.

How? What is over what limit?

Any direction?

North it that way. I think. My compass is acting up.