This is an old revision of the document!
DNS-323 Case Fan: Hardware Version A1
Fan Photos - In Context:
Variable-Speed Fan Details:
Specification
Model | ADDA AD0405HB-G73 |
---|---|
Dimensions | 40mm x 40mm x 10mm |
Voltage | 5 volts dc |
Current | 0.25 amperes |
Bearing Type | Ball |
Blades | 7 |
Wires | 3 wires (black -?),(red-?),(white-?) |
Motor Protective circuit & third lead wire by IC w/ speed sensor (FG)
Source: ADDA Model Numbering Scheme.
Guessed Specifications
Speed | 6000 rpm (revolutions per minute) |
---|---|
Airflow | 6.7 or 6.8 cfm |
Pressure | 0.100 in (inches) |
Sound | 25dB/A |
Weight | 24 grams |
Power | ~1.25 Watts (* see calculation below) |
Source: Guessed values extrapolated from: ADDA Fan Specification Chart. Guessed, because the AD0405HB-G73 model is not listed.
*Power (Watts) = Current(Amperes) x Volts (So, at full-rated standard power) Power = 0.25 Amperes (Current) x 5.0 Volts == 1.25 Watts.
Fan/Cooling Hacks/Mods
- Cut out the protective piece of plastic from the back plate, enlarged the opening, added some padding. After that the unit is MUCH more quiet
ondro727's Fan Hack
Fan/Cooling Forum Posts
Related Software/Commands
fanspeed
Query and set the FAN Speed control Usage: fanspeed [function] Functions: h show this help w rpm, set fan speed(rpm range:1935~30000) g get fan speed
Examples:
fanspeed g
Returns the fan's current speed in rpm (revolutions per minute).
fanspeed w 2500
Sets the fan's speed to 2,500 rpm.
fanspeed w 0
Sets the fan's speed to 0 rpm (Stops the fan). The fancontrol process appears to restart the fan within a minute if it's running.
fanspeed w 30000
Not recommended! What happens!? Does anyone have the courage to report? : )
Questions:
- What are the best ways to detect if the hard drive is in sleep mode (for use in a script)?
- Does anyone have the source?
File Location:
\sys\crfs\sbin\fanspeed
temperature
Query and set the temperature sensor Usage: temperature [function] Functions: h - show this help w [1,2] degree - set temperature degree in register 1:Thyst 2:Tos g [0~2] - get temperature in register 0:temperature 1:Thyst 2:Tos
Examples:
temperature g 0
Returns the current temperature. Anybody know where the temperature probe is located?
temperature g 1
Returns the hysteresis Thyst register value/limit. Default setting = 75 degrees C / 167 degrees F.
temperature g 2
Returns the Overtemp shutdown Tos register value/threshold. Default setting = 80 degrees C / 176 degrees F.
Questions:
- Does anyone have the source? (reverse engineered code: http://www.inreto.de/dns323/utils/)
- Is documentation essentially right?: Thyst & Tos Information - found by @galf
- Does anyone know whether 'temperature g 0' ever reports in Celsius? The wiki's first script seems to think so, but reports so far seem to point to the usage of Fahrenheit as standard.
File Location:
\sys\crfs\sbin\temperature
fancontrol
Appears to be a daemon, running all the time by default.
Questions:
- It appears to query the temperature and set appropriate fan speeds approximately every 60 seconds.
- Does anyone know what it does, exactly?
- Does anyone have the source? (reverse engineered code: http://www.inreto.de/dns323/utils/)
File Location:
\sys\crfs\sbin\fancontrol
Sample Fan Control Scripts:
Simple steps to install fan control script
Thought this can be useful to you as it would to me as a newbie who is technically challenged. This is a feature that should have been set from the factory, as it makes no sense to have the fan running all the time. I'm new at this so please feel free to fix/edit.
- Get a text editor like Notepad++ to save text files in linux format (LF).
- Create a new text file called fun_plug (no extensions), with the following line:
/mnt/HD_a2/ctrl_fanspeed.sh
save the text file with linux format (LF) to the root directory of your DNS-323 drive (e.g. X:/). Alternatively you can get fonz's fun_plug pack and add the above line at the end of the included fun_plug file.
- create another text file, copy and paste the "hands-on" version of the fan-control script below. Adjust the parameters to your liking (description in comments), though it works fine without any modification. Save the file as ctrl_fanspeed.sh at the root directory (e.g. X:/) of your DNS-323 drive, same location as the fun_plug file.
- Reboot the DNS-323 using D-Link's control page and you are done!
You should notice that immediately after booting (when the power light stops flashing) the fan stops. That is if your drive is cooler than the lower limit set in the script (default 108F or 42C). Also make sure your DNS-323 unit reports temperature in F and not C by default (Important! You don't want 108C as lower limit!), something you can do with simple telnet commands.
Is it safe to assume US models are all reporting in Fahrenheit?
ctrl_fanspeed.sh
This simple script changes the speed of the fan based on the reported temperature. Note that this script only works if the temperatures are reported in Celsius! By running temperature g 0 you can see what temperature-unit your box uses. The script will be update with a more general solution asap. The parameter-values are only given as examples. Make sure that the temperature of your box remain reasonable under different loads.
The script can be run in the background where it will remain active and periodically update the speed of the fan. To avoid clashes with the fancontrol process, it is probably best to kill it before this script is run.
#!/bin/sh # # ctrl_fanspeed.sh Script for controlling the speed of the fan on an DNS-323 # #At temperatures below T1 it sets the fan to RPM1, while at temperatures above T2 it sets it to RPM2. #At temperatures between T1 and T2 it linearly interpolates the speed of the fan from RPM1 at T1, to RPM2 at T2. #The temperature is checked every INTERVAL seconds. INTERVAL=15 T1=40 T2=60 RPM1=1000 RPM2=6000 while [ 1 ] do T=`temperature g 0|sed -n ' s/<temperaturertc>: get temperature =//p'` NEW_RPM=`expr \( $T \> $T2 \) \* $RPM2 \| \( $T \< $T1 \) \* $RPM1 \| $RPM1 + \( $RPM2 - $RPM1 \) \* \( $T - $T1 \) \/ \( $T2 - $T1 \)` fanspeed w $NEW_RPM sleep $INTERVAL done
A polished ctrl_fanspeed.sh example
This script automatically kills the factory fancontrol process and loads the script into RAM disk, so to avoid periodic disk spin-ups. You can also comment-out (adding # in front of) the 3 lines following # Create a logfile on the RAM-disk
as well as every line that starts with echo
to turn off logging.
A more “hands on” example of a script to control fanspeeds. As with the one above, make sure that the parameters of the temperature and fanspeeds correctly corresponds to your box. Please read through the thread Fan does run all the time before you install this script.
#!/bin/sh # # This script was created at http://wiki.dns323.info by FIB, # it has been slightly modified by leper (with help from # fonz). It sets the fanspeed of the device depending on # the temperature, which is measured in Fahrenheit. If # your box measures temperature in Celsius, you need to # edit it to work. # Additional changes by gartylad. # Set the path to use RAM-disk instead of harddrive, to # execute from. This is done so that the disks will go # into sleep mode, while the script is running. PATH=/usr/bin:/bin:/usr/sbin:/sbin # Create a logfile on the RAM-disk. LOGDIR=/log FANLOGFILE=${LOGDIR}/fan_ctrl.log mkdir -p ${LOGDIR} # Kill the old fan controller. kill -9 `pidof fancontrol` echo "Fancontrol killed. Installing fan_ctrl.sh" >${FANLOGFILE} # With temps between T1 and T2, the script automatically # lowers/raises the fanspeed between RPM1 and RPM2. This # it does every update_interval seconds. update_interval=60 T1=108 T2=140 RPM1=2300 RPM2=4500 while [ 1 ] do T=`temperature g 0` T=${T##*=} # Check if temperature has fallen below T1 value if [ $T -lt $T1 ]; then # Temp below T1 fan stops CALCTEMP=`expr 0` else # Temp above T1 fan starts CALCTEMP=`expr \( \( $T2 \< $T \) \* $RPM2 \) \| \( \( $RPM1 + \( $RPM2 - $RPM1 \) \* \( $T - $T1 \) \/ \( $T2 - $T1 \) \) \& \( $T \>= $T1 \) \)` fi CONVFTOC=`expr \( \( $T - 32 \) \* 10 + 9 \) \/ 18` newRPM=${CALCTEMP} fanspeed w $newRPM echo `date`" ::CURRENT::" $T"F" ${CONVFTOC}"C -- fanspeed:" $newRPM "(written to "${FANLOGFILE}")." >>${FANLOGFILE} # wait for next cycle sleep $update_interval done