How to determine correct PWM settings for an exhaust fan?

I’m helping my son with an IoT project - he needs to control an exhaust fan that uses PWM signaling for speed control. TL/DR: I need to figure out how to determine the correct PWM settings for the fan control without any manufacturer’s documentation (and I’m new to trying anything with PWM).

At first I thought the fan only used variable voltage (0-2.5V) for speed control. It has a manual dial control that appears to be a potentiometer with three posts but only two connected leads (used in rheostat mode?). When I measured the voltage drop between the two connected leads (and when connected to the fan), my VOM showed 0V DC when “off” and 2.5V DC when turned to “Max”. Easy peasy, right? Replace the analog potentiometer with a DS3502 digipot and instant remote control. Or so I thought…

Using the DS3502 digipot I couldn’t get the fan speeds under control. Dropping the wiper voltage to 0 didn’t turn the fan off, and increasing the voltage by any amount (up to 2.5V DC) only increased the fan speed by one step that never changed.

I figured the fan speed wasn’t related to the actual DC voltage, so I started reading the forums and found several posts about using PWM to control a fan. I then ditched the ESP-32 and DS3502, grabbed a RPi Pico W and loaded up a demonstration PWM project in Micropython - which sort of worked…

With the frequency set to a SWAG value of 1000, I could get the fan to actually turn off with a duty cycle of 0. By increasing the duty cycle I could gradually increase the speed of the fan. So I guess that’s a win, but in the words of the immortal Joe Bonamassa, “Just because you can don’t mean you should…

I’m worried about using incorrect PWM settings and damaging the fan because I could easily push the fan much harder with PWM than the max speed allowed by the analog control it came with.

Which leads me to the question behind this post: Is there an easy way to figure out what the actual PWM settings are that are being controlled by the manual controller that came with the fan? I’m having nightmares of needing an oscilloscope or something similar to figure this out.

I guess the values I need to come up with are the frequency setting to use, and the min/max range setting for duty cycle (which can be from 0 to 64k).

And, for what it’s worth, the fan appears to be a knockoff of an AC-Infinity 4" exhaust fan (we got it second-hand from a “cultivator”, so there’s no telling what brand it is).

Sorry for the long post - hopefully someone can help me figure this out.

Have a look see at this, looks like its a bit complicated?
DIY Fan Controller for PWM Fans - Overclockers