Simple Fan Speed Control with the 21v3

The 21v3 may be overkill for this application, but the analog input tailoring abilities seem somewhat counter-intuitive.

All I need is the motor forward duty cycle to vary smoothly from an RX dc voltage of 3.3 to 4.6 volts (or any voltage range from 0-5) without any need for reverse direction support.

It seems that no matter what, the duty cycle seems to vary from 0-100% over a very narrow range. It should be a simple fix, but I’m missing something.

Any assistance would be welcome.

Hello,

What you describe is definitely possible with the jrk. Can you tell us what you have tried so far and post your configuration file?

-Paul

Sorry, I’ve not saved config files.
Feedback is always turned off.
Input mode is analog.
PWM freq. is 20K

Analog samples 64-1024 (wouldn’t matter).
Full Range.
Full Range with Neutral Max set low
Learned values (doesn’t seem to matter).
Different degree settings (cubic seems to work better).

Motor Reverse Duty Cycle set to 0 (no difference).

I don’t understand why all the different combinations I’ve tried have yielded the same very narrow input voltage rage for wide variances in forward duty cycle. I have 7 of these, and they all seem to work the same, so it’s not possible it’s a singular defect of some sort.

I should also explain that I am not driving a motor directly with this. Rather, it is being used to drive several IR4426 gate drivers off of the “A” motor connection.

Why do you not want to save a configuration file? It would really help me figure out what you are doing.

Anyway, the source of your problem could just be that the 0-100% duty cycle range occurs from target values of 2048 to 2648, as described here. You should set up your values in the Input tab so that your maximum forward input gives a target of 2648, etc.

What you plan to connect to it later is irrelevant if you do your debugging first with nothing but USB and your input device, using the configuration utility to make sure it is working as expected before you add more complexity.

-Paul

Here is the config file that seems to work the best. Note that all I am trying to do is get less delta of forward duty cycle with a given input variance. This should be a simple change.

INITIALIZED 0
INPUT_MODE ANALOG
INPUT_MINIMUM 0
INPUT_MAXIMUM 3750
OUTPUT_MINIMUM 0
OUTPUT_NEUTRAL 2024
OUTPUT_MAXIMUM 2624
INPUT_INVERT 0
INPUT_SCALING_DEGREE 0
INPUT_POWER_WITH_AUX 0
INPUT_ANALOG_SAMPLES_EXPONENT 8
INPUT_DISCONNECT_MINIMUM 0
INPUT_DISCONNECT_MAXIMUM 3800
INPUT_NEUTRAL_MAXIMUM 2975
INPUT_NEUTRAL_MINIMUM 2975
SERIAL_MODE USB_DUAL_PORT
SERIAL_FIXED_BAUD_RATE 9600
SERIAL_TIMEOUT 0
SERIAL_ENABLE_CRC 0
SERIAL_NEVER_SUSPEND 1
SERIAL_DEVICE_NUMBER 11
FEEDBACK_MODE NONE
FEEDBACK_MINIMUM 0
FEEDBACK_MAXIMUM 4095
FEEDBACK_INVERT 0
FEEDBACK_POWER_WITH_AUX 0
FEEDBACK_DEAD_ZONE 0
FEEDBACK_ANALOG_SAMPLES_EXPONENT 5
FEEDBACK_DISCONNECT_MINIMUM 0
FEEDBACK_DISCONNECT_MAXIMUM 4095
PROPORTIONAL_MULTIPLIER 0
PROPORTIONAL_EXPONENT 0
INTEGRAL_MULTIPLIER 0
INTEGRAL_EXPONENT 0
DERIVATIVE_MULTIPLIER 0
DERIVATIVE_EXPONENT 0
PID_PERIOD 10
PID_INTEGRAL_LIMIT 1000
PID_RESET_INTEGRAL 0
MOTOR_PWM_FREQUENCY 0
MOTOR_INVERT 0
MOTOR_MAX_DUTY_CYCLE_WHILE_FEEDBACK_OUT_OF_RANGE 600
MOTOR_MAX_ACCELERATION_FORWARD 600
MOTOR_MAX_ACCELERATION_REVERSE 600
MOTOR_MAX_DUTY_CYCLE_FORWARD 600
MOTOR_MAX_DUTY_CYCLE_REVERSE 600
MOTOR_MAX_CURRENT_FORWARD 81
MOTOR_MAX_CURRENT_REVERSE 81
MOTOR_CURRENT_CALIBRATION_FORWARD 37
MOTOR_CURRENT_CALIBRATION_REVERSE 37
MOTOR_BRAKE_DURATION_FORWARD 0
MOTOR_BRAKE_DURATION_REVERSE 0
MOTOR_COAST_WHEN_OFF 0
ERROR_ENABLE 2
ERROR_LATCH 0

Hello,

These settings make it look like you are trying to get the target to go from 0 to 2624 instead of 2048 to 2648 like I suggested.

Please set the range in the “Target” column on the Input tab is set as follows:

Minimum = 2048
Maximum = 2648
Asymmetric = NOT checked

Then, click the “Learn…” button to reset your input range. The result should be that if your input is at its minimum, you get a target of 2048, and when your input is at its maximum, you get a target of 2648.

If that is not what you get, please post your latest configuration and tell me what target and input values you do get with the input device at its minimum and maximum. A screenshot of the graph window displaying those variables would be an easy way to show me what is happening.

-Paul

The target settings were what I was missing. Thank you; it works perfectly now.

Great!

-Paul