Measurement Frequency

Depending on your application, you may not need to measure the temperature continuously if for example it doesn't change quickly. You can specify the EMC2101's temperature conversion/measurement rate which will affect the power usage of the EMC2101; more frequent measurements will use more power.

Python - Documentation

Arduino - Documentation

Arduino - Example

Internal and External Temperature

The EMC2101 supports measuring both the temperature of the EMC2101 itself as the internal temperature, as well as the temperature of an externally connected "diode".

adafruit_products_npn_pnp_diagram.png
Taken from the EMC2101 Datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/2101.pdf

I've put diode in quotes above because we've only been able to successfully measure external temperature using a NPN BJT transistor with the collector and base tied together which acts like a diode. PNP BJT's should also work with the base and emitter connected. The diagram from the datasheet above shows how connecting the pins of a BJT lets it act like a diode.

Python - Documentation

Python - Example Code

Arduino - Documentation

Arduino - Example

Note: The DAC output is not meant to directly drive a Fan! The output current is limited to 1mA, well below what any fan will need. Instead, the DAC output should be used as an input signal to other control circuitry.

Look Up Table Support

As an alternative to adjusting the speed directly with your code, the EMC2101 allows you to set up a Look Up Table (LUT) that specifies how fast the fan should spin for a given temperature. One important note is that the LUT only works automatically based on the external temperature.

Python - LUT Documentation

Python - LUT Example

Arduino - Documentation

Arduino - LUT Example

LUT Hysteresis

If the current temperature is very close to a LUT temperature, the fan may "thrash" by changing the fan speed excessively as the temperature fluctuates between above and below the LUT temperature.

To prevent thrashing, the EMC2101 applies a hysteresis value to the measured temperature which is an additional number of degrees below the LUT temperature that the measurement must be before switching to the lower LUT entry.

Python - Documentation

Arduino - Documentation

Arduino - LUT Example

Forcing a Manual Temperature

For testing the LUT, the EMC2101 allows you to set a temperature that the LUT will use instead of the external temperature. Each time you set a forced/manual temperature, the EMC2101 will consult the LUT to find the corresponding fan speed. The keen eyed may notice that you can use this to hack LUT support for other values than the external temperature sensor by regularly updating the forced temperature based on another measurement.

Python - Documentation

Python - LUT Example

Arduino - Documentation

Arduino - LUT Example

PWM Tuning

It can sometimes be necessary to adjust the PWM frequency to suit your application or prevent a motor from making audible noise. These features allow you to specify the base PWM clock, divisor and frequency.

Python - Documentation

Python - PWM Example

Arduino - Documentation

Arduino - Example

PWM vs DAC Output

By default the EMC2101 sets the speed of the fan by outputting a PWM signal compatible with 4 and 3-pin fans. A transistor in the fan uses this signal to change the amount of its operating voltage.

The EMC2101 can alternatively be configured to output a steady DC voltage instead of a pulsed signal, should your application require it. The voltage range is from 0 to approximately 3.24V with the same 6-bit resolution as the PWM output.

Fan Spinup Drive and Time

The EMC2101 allows you to specify how the fan should be started from a stop by specifying a spinup speed and time. Sometimes fans have to build up momentum before slowing down to a lower speed, and these settings help with that. Fortunately the default settings are good enough for most cases.

Python - Documentation

Arduino - Documentation

Fan Minimum Speed

This setting allows you to specify the minimum speed of your fan. 4-pin fans will often still report a small speed on their tach output when stopped, and this setting allows you to say "anything below this speed is off" so you don't think the fan is still on when it is not.

Python - Documentation

Arduino - Documentation

Arduino - Fan Tuning Example

NOTE: PC fan behavior below 20% duty cycle is undetermined. Some fans may not fully stop.

Per the Intel specification "4-Wire Pulse Width Modulation (PWM) Controlled Fans", fan response to a PWM signal below 20% duty cycle is undetermined. As a result, some PC fans may not fully stop, even with 0% duty cycle.

This can vary from fan to fan. Ideally, this information will be given in a fan's datasheet. For example, this if from the datasheet for a Delta Electronics AUB0912VH fan:

As can be seen, the RPM never goes to 0, even with 0% duty cycle.

This guide was first published on Dec 15, 2020. It was last updated on Oct 26, 2020.

This page (Additional Features) was last updated on Dec 15, 2020.

Text editor powered by tinymce.