Electric AC compressor PWM signal

Hello everyone! Hope you all are doing well and staying safe.

I convert classic cars to electric for a living, and I use these chinese made electric A/C compressors for retrofitting air conditioning in the cars. It works wonderfully and it definitely tough enough to handle our Texas Heat.

So to turn on the compressor, I send high voltage to the power pins, using my own precharge circuit as per what the specification calls for. Then I add 12V + and - to the controller, (-) being chassis ground. Then I use the "STB" pin which is switched to GND to turn the compressor on as the start signal. Now the compressor runs at about half power, and this cooling is fine, but I would really like to be able to control the speed of the compressor and be able to turn it up to max power if I can to really get full use out of the compressor.

here's what my translated Chinese documentation says about the PWM pin, and this is all I know about it.
"PWM IN --- Air conditioning speed control signal input. The signal form is 400hz PWM duty cycle signal, low effective. Input level range: high 9~16V DC, low 0~0.8V DC, 15mA.Speed range: 1500RPM~5500RPM, corresponding PWM duty cycle 0%~80% linear change. The corresponding positive duty cycle is 20% at 1500RPM and 80% at 5500RPM."

Words that throw me off are "positive duty cycle" and "low effective".I have verified that it is running at half speed 3000RPM because power consumption is 8A at my pack voltage, which is 1.2kW, that corresponds with the rated power at 3000RPM.

I am honestly not sure if I have to have the STP pin grounded first to control PWM, or if I only use PWM pin, or if I use both. I know I can change arduino PWM frequency too via PWM library available, but I don't know what it means by low effective and positive duty cycle. Not sure if I can make this signal from the arduino pin directly or I need to use an N channel mosfet or something.

Any feedback and advice would be greatly appreciated! Thanks so much!

If I get this right, you're asking volunteers on a hobby forum for advice for your business?

If the valid duty cycle range is 20-80%, you cannot do anything wrong. Adjust the speed mapping according to the observed speed.

DrDiettrich:
If the valid duty cycle range is 20-80%, you cannot do anything wrong. Adjust the speed mapping according to the observed speed.

Yeah that part makes sense, is there any issue with using one of the Arduino PWM pins to do that directly? Since it’s 15mA, it should be a little less than doing PWM on an LED.

Last time I experimented with this, I think I was trying to do it with an N channel mosfet which could be why it didn’t work.

So what do they mean by “low effective” when describing the PWM? Or will simply wiring Arduino PWM pin to the PWM input pin on the compressor, set frequency to 400Hz, then just vary the duty cycle and see if the compressor speed changes?

The high level 9~16V is more than an Arduino pin can provide.

DrDiettrich:
The high level 9~16V is more than an Arduino pin can provide.

Oh crap you’re right, duh!

So I guess I just need a p channel mosfet? Or how does that work then? Do I have to use an n channel mosfet then use that to trigger the p channel mosfet?

I think "low effective" means inverted, if you want 20%, write:

analogWrite(pwmPin,204); // 80% 0f 255

Or:

analogWrite(pwmPin,255 - 51); // 20% of 255

I'd measure the voltage of the PWM input pin, perhaps it has a pullup to its operating voltage. If no voltage present then a power supply for at least 9V is required, and I'd use a npn transistor and a pullup resistor for switching the signal level.