Scaling a PWM signal

I am using a PWM hall sensor to output a pwm signal to a Clearpath servo motor. I want to be able to adjust the duty cycle without moving the sensor or magnet. Is there a device that can receive a PWM signal input and scale it to 0-100% of the input signal? I need to be able to adjust the speed of the motor with a potentiometer but the sensor still needs to influence the signal. I have seen PWM Led repeaters that repeat the duty cycle at 100% of the input, I cant find anything that makes this adjustable? I would prefer to find a plug and play solution as i dont want to use a full arduino board on this

Pulse stretching is easy enough to do with a 555 timer but shrinking a pulse is more complicated since you need the original pulse to terminate to determine what your output pulse will look like. Off the top of my head, I don’t know of any drop in solution to your scenario. If it were my project, I would throw a small microcontroller at the problem (your Arduino is certainly suitable). Use a potentiometer being sampled by an analog channel to set your change percentage. Capture the pulse coming from your hall sensor, calculate your new timing, and output your desired result. Ultimately you will lag the output of your sensor by a full period but that shouldn’t be too significant assuming your PWM frequency is relatively high.

-Bill

A small correction. Assuming you have a fixed PWM frequency, your output will lag by the duty cycle of the original signal plus the processing time to calculate your new pulse.

-Bill