OpenDev FanEmu 2

Firmware Version

Applicable firmware versions: 2.0Z

Previous revisions:

Device modes

The device can work in two modes:

General Frame Format

Device information

Syntax

Request I\n
Reply I<firmware information>\n

Example

Request I\n
Reply IOD-FAN-EMU (CDC) 2.0Z Apr 29 2020\n

Current measured CTRL signal duty

Returns the value with the polarity reversal according to the configuration flags has been already performed.

Syntax

Request p\n
Reply p<duty>\n

Example

Request p\n
Reply p50\n

(current duty is 50%)

Current RPM value

Syntax

Request r\n
Reply r<rpm>\n

Example

Request r\n
Reply r3000\n

(SENSE channel currently outputs signal, equivalent to 3000 rpm)

Full RPM value

Returns the maximum RPM value permitted by the current configuration.

Syntax

Request R\n
Reply R<rpm>\n

Example

Request R\n
Reply R6800\n

(Current configuration value is 6800 rpm)

Calculate RPM value for the given duty value

This command computes and outputs the RPM value that would be set if the given value has been measured on the CTRL channel. It does not set or change anything. The computation is performed according the the current curve configuration.

Syntax

Request c<duty>\n
Reply c<duty>,<rpm>\n

Example

Request c40\n
Reply c40,5691\n

Device settings

Note: these are the in-memory settings. They can be changed via the respective commands listed below. In order to make them permanent, issue the 'Write settings' command.

Syntax

Request F\n
Reply F<flags>,<full_rpm>,<min_duty>\n

The device has 3 configuration parameters:

The default values are:

Example

Request F\n
Reply F0,6800,10\n

Set configuration flags

Syntax

Request L<value>\n
Reply L<value>\n

Example

Request L\n
Reply L0\n
Request L2\n
Reply L2\n

Get the curve coefficients

Given an input signal duty value, the device computes the RPM value according to the coefficients, stored in the configuration section. Each coefficients entry comprises x,a,b,c,d. The RPM value for duty values inside the (x[i]:x[i+1]) segment are computed according to the formula: S[i](duty) = a[i] + b[i] * (duty - x[i]) + c[i] * (duty - x[i])^2 + d[i] * (duty - x[i])^3

This commands returns the i-th segment contents. The segment number must be a hexadecimal 2-digit value (padded with zero if necessary). If the requested segment is not found, xx is returned.

Syntax

Request k<hh>\n
Reply k<hh>;<x>;<a>;<b>;<c>;<d>\n

Example

Request k00\n
Reply k00;10;680;68;0;0\n
Request k0a\n
Reply kxx\n

Set the curve coefficients

This command writes coefficients for the i-th segment. The segment number must be a hexadecimal 2-digit value (padded with zero if necessary) and less than 27.

Syntax

Request K<hh>;<x>;<a>;<b>;<c>;<d>\n
Reply K\n

Example

Request K00;10;1274;0;21.6373999;-3.28654\n
Reply K\n

Apply coefficients

After changing the coefficients, either this command, or a device reset must be issued.

Syntax

Request A\n
Reply A\n

Set the RPM value

Manual mode only

Valid values are 0..9000

Syntax

Request r<value>\n
Reply r<value>\n

Example

Request r1500\n
Reply r1500\n

Set the RPM percentage

Manual mode only

The previous command sets the immediate value. This command sets the rpm as a percent of the configured full rpm value. Valid values are 0..100

Syntax

Request p<value>\n
Reply p<value>\n

Example

Request p80\n
Reply p80\n

Device voltage and temperature

The temperature value is in degrees centigrade, the voltage is in millivolts. Note: these are the temperature and the voltage of the MCU core. They do not reflect the ambient temperature and the fan input voltage respectively.

Syntax

Request t\n
Reply t<temperature>,<voltage>\n

Example

Request t\n
Reply t29,3300\n

Device reboot

Syntax

Request X\n
Reply no reply

Firmware update

Puts the device in the DFU bootloader mode.

Syntax

Request D\n
Reply no reply