Sunday, 16 April 2017

Comair Rotron Fan Program Input - Control and monitoring of 4 Wire CD24R7X

Summary
This blog investigates control and speed monitoring of a 4 wire Comair Rotron fan using the Program input and Tacho output. The fan speed was controlled using a resistor then separately tested with an optocoupler driven by an external PWM signal.

Comair Fan Control Article
Tim Shafer, of Comair Roton, wrote a brief but helpful article relating to methods of fan speed control. This article is available on the Comair Rotron website or from Digi-Key as a PDF Document. The details from Tim were a start although did not clearly define methods of interfacing with the 'Program' input connection used by Comair Rotron fans. Even after reviewing the data sheet for the fan (CD24R7X) neither a suggested resistor range or recommended PWM frequency was suggested for the fan. Time for some bench testing and fan characterisation.

Comair Rotron CD24R7X
Comair Rotron CD24R7X
A test unit was purchased from Digi-Key and arrived in the Comair Rotron packaging. There was plenty of cardboard to secure the fan inside the box for transport which was a pleasant find in these times of bubble wrap packaging. The test unit was manufactured Dec 30th, 2015 with a serial number of 362.

Comair Fan Testing
Since the fan was earmarked as a test device to regulate temperature and air quality of a room, the range of fan speeds against changes in the Program input needed to be known. With the article from Tim Schafer in mind, the Program input was tested with an optocoupler driven from a signal generator then separately with a variable resistorAdditionally the effect of fan speed against variations in power supply voltage was also captured.

Comair Fan Test Setup
To perform the required tests, the fan was connected to a Rigol DP832 PSU and Function Generator, Agilent oscilloscope and vanilla multi-meter for current measurement verification.

The Comair fan tacho output connection (open collector) was pulled up to the 24VDC supply via a 220K resistor and then monitored by the oscilloscope.

The fan program input was connected to the optocoupler collector and emitter to 0VDC. To change the speed of the fan the Program input must be connected to 0VDC. The input LED of the opto was driven directly by the function generator.


Test Setup: Duty Cycle Measurements
Test Setup: Duty Cycle Measurements

Test 1: PWM Control
With a PWM frequency of 1kHz, the duty cycle was changed in fixed steps and plotted against the average fan current.


Duty Cycle against Fan DC Current
Duty Cycle against Fan DC Current

The duty cycle against the derived fan RPM was measured next. To derive the fan RPM, the frequency of the Tacho output was divided by two, since the fan produces 2 PPR - Pulses Per Revolution, then multiplied by sixty to convert into Pulses Per Minute aka RPM.


Duty Cycle against Fan RPM (Derived)
Duty Cycle against Fan RPM (Derived)

From tests performed on this fan, the speed changed from 1488 RPM at full speed down to 702 RPM at the lowest speed. This range of change in RPM equated to a change in duty cycle from 99% to 1%. 


One possible method to check the rotational speed of the fan, based on the duty cycle provided to the Program input, is the formula below which serves as a guide with a + 10% variation in the Tacho reading. A line of best fit was applied on test data from a single fan.


Estimated Fan Speed (RPM) = (7.9 x Duty Cycle) + 720

Where the duty cycle is the ON duration of the period as a percentage of the total period.

Test 2: Resistive Control
With a 100k variable resistor connected between the fan Program input and 0VDC, change in the fan tech output was recorded against changes in the resistance.


Test Setup: Resistance Measurements
Test Setup: Resistance Measurements
Again the fan speed in RPM was derived from the 2 PPR Tacho output.

Program Resistance against Fan RPM (Derived)
Program Resistance against Fan RPM (Derived)
The fan RPM varied from 1485 RPM down to 714 RPM which equated to approximately a resistance in the range of 12k to 0R. Tests were conducted with resistances over 20k with no change in the fan speed noted.

One possible method to check the rotational speed of the fan, based on a resistance between the Program input and 0VDC, is the formula below which serves as a guide with a + 6% variation in the Tacho reading. 
A line of best fit was applied on the measured data between 0 and 12k for the test fan giving the estimation below.


Estimated Fan Speed (RPM) = (0.068 x Resistance in Ohms) + 720 


Test 3: Power Supply Fluctuations
Lastly the DC supply to the fan was varied with PWM to determine the stall speed of the fan for a 1% duty cycle. It should be noted that when the supply was raised above 29VDC the fan speed became erratic. The recommended 28VDC limit listed on the unit by the manufacturer should not be exceeded.

DC supply Voltage against Fan DC Current
DC supply Voltage against Fan DC Current

For the tests conducted with the fan the operational voltage range was found to be 16V to 28VDC with a stall voltage of approximately 6VDC.

Additional Measurements
The PWM frequency was varied in the range from 100Hz to 10kHz with some minor difference in the current drawn by the fan. A difference of 2% was noted between some of the duty cycle readings which may be attributed to instrumentation and or user measurement error.

As a matter of completeness the Tacho output was captured when the Program input was shorted to 0VDC, as shown below. This equated to approximately 717 RPM.


Program Input Shorted to 0V
Tacho Output: Program Input Shorted to 0V
The Tacho output shown below was captured when the Program input was connected to a 100k potentiometer to 0VDC. The pot setting was at the highest resistance. This setting equated to 1428 RPM.

Program Input with 100k Resistor to 0V
Tach Output: Program Input connected to 100k Potentiometer

Operating Specifications for the 
Comair Fan (Suggested) 
For the fan under test in this blog, the Comair Rotron CD24R7X, the suggested operating parameters are as detailed by the manufacturer with some additional information below.

Supply Voltage: 16 - 28VDC, Nominal 24VDC

Supply Current: Max 1.22A at 24VDC (Full Speed)

Fan Speed: 700-1490RPM + 5%

Program Input Resistance: 0R to 12k equating to slowest to fastest fan rotation. Estimated Fan RPM = (0.068 x Resistance in Ohms) + 720 

Program Input Frequency: PWM of 1kHz, duty cycle 1% to 100%. Estimated Fan Speed (RPM) = (7.9 x Duty Cycle) + 720

Tach Output: 2 PPR (Non-Isolated Open Collector) 28VDC at 20mA

Connections: Red           - 24VDC
                      Black         - 0VDC
                      Blue/White - Tacho Output
                      Yellow        - Program Input

Saturday, 15 April 2017

Beta Layout Reflow Controller (V2) Teardown

Summary
Even though the Beta Layout Reflow Controller (V2) has become obsolete, I wanted to perform a teardown of the unit for those planning on building a similar reflow oven controller looking for design inspiration.

There are numerous Reflow Oven controllers based on Arduino, Raspberry Pi and similar based hardware platforms. Most of these designs are Open Source hardware and software allowing for improvements not available on a commercially manufactured product.

Beta Layout Block Diagram
As a basic representation the block diagram below shows the Beta Layout V2 controller.


Beta Layout V2 Controller Block Diagram
Beta Layout V2 Controller Block Diagram

Opening the Controller
The Beta Layout plastic case does not use fixing to hold the two part enclosure together. Instead there are a pair of opposing plastic clips on the lid and base, hidden by the ventilation holes, which were released using a screwdriver to gain access to the controller.

Beta Layout V2 Controller
Beta Layout V2 Controller
Inside the Case (Power Board)
Upon opening the case the power and logic boards are exposed. These are board names which I have assigned for the ease of this blog, not the manufacturer. Both boards are solder masked, immersion gold plated, untented vias and without component overlay possibly making servicing difficult.
The power board, shown in the lower part of the image above, features two IEC connections, AC transformer for logic board power, Solid State Relay (SSR), female 9 pin D connector and Thermocouple connector.

Beta Layout Power Board
Beta Layout Power Board
The IEC connection (oven side) and SSR are protected with an M205 250V 8A ESKA sand filled fuse. Power for the logic board is provided from a 230V to 6V transformer with 300mA capability. The AC supply feeds a full wave bridge on the logic board.

Performing the control of the oven heating is the now obsolete Sharp SSR S216S02. This AC SSR was rather solidly rated at 240VAC 16A featuring zero crossing. For those in need of repairing a failed SSR, there were no direct replacement from Sharp at the time of writing this blog.

Connection for the RS232 was made with a panel mount D socket connector. The Thermocouple connector uses a two part design with what appeared to be standard hook-up wire, type TR-64, not dedicated Thermocouple wire. For reference regarding the proper cable see the IEC/ANSI details on this Omega sensor site.

Inside the Case (Logic Board)
The logic board is of a double sided design with the buttons, LEDs and crystal oscillator populated on the side facing the enclosure lid.


Beta Layout Logic Board
Beta Layout Logic Board
6VAC from the power board transformer is rectified and DC regulation is achieved with a 78L05. There appears to be an option on the connector with the AC power to drive the logic board from 5VDC directly. A single diode on one of the unused connector pins supplies the 5V rail on the board directly. At the brains of the operations is an Atmel 32A microcontroller. The thermocouple interface is made with an SPI K type thermocouple converter from Maxim - MAX6675. Lastly the TTL to RS232 is handled with a jellybean level translator from Maxim - MAX232.

Temperature Measurements
Out of curiosity the Beta Layout controller case was left open and a reflow cycle was performed. Close to maximum temperatures of some of the devices were captured. Firstly is the SSR which peaked a little over 65C however was captured using the Flir Camera when marginally cooler.


Beta Layout V2 Controller SSR Temperature
Beta Layout V2 Controller SSR Temperature
The second device measured was the AC transformer which hovered at a steady 37C.

Beta Layout V2 Controller AC Transformer
Beta Layout V2 Controller AC Transformer
Lastly and unexpectedly the bridge rectifier rounded off the three warmest devices between the logic and power boards.

Beta Layout V2 Controller Rectifier Temperature
Beta Layout V2 Controller Rectifier Temperature
The bridge like the SSR had temperature peaks depending on what part of the reflow cycle was active at the time.

Summary
As was shown in a previous blog, the Beta Layout V2 Controller does the business for reflow soldering with off the shelf ovens. Some tuning of the reflow profile was required. From a hardware perspective the design would be considered outdated now, possibly the V3 controller with LCD interface addresses issues with controller connectivity and upgradeability.

The RS232 interface was possibly the only oversight at design time. USB 2.0 had been released in 2000 and this board was purportedly designed in 2008. Regardless with new technology there is an easy way to upgrade the Beta Layout V2 RS232 to USB using an Adafruit - CP2104, more in a coming blog.

Sunday, 26 March 2017

Noctua 120mm fan testing (NF-F12 PWM) 7 x PWM using Teensy 2.0

Summary
This blog covers the replacement of a number of Cooler Master fans with Noctua PWM fans. Both fans were 120mm in size, to fit standard PC cases. Some measurements relating to PWM and current were taken as a comparison. PWM control was performed using a Teensy 2.0 programmed using Arduino.

Cooler Master Fan
Cooler Master Fan

Fan Replacement
The Cooler Master fans (A12025-12CB-3EN-F1) used in a tower of RAID drives, mentioned in this blog, were lacking the airflow to keep the temperature of the drives below 40 degrees Celsius. Noctua fans (NF-F12 PWM) were trialled with PWM control. 

It should be noted that the Cooler Master fans are rated at 2000RPM compared to the Noctua 1500RPM.
Noctua NF-F12 PWM
Noctua NF-F12 PWM

Fan PWM Control
Since PWM fan control from the existing motherboard was not possible, a Teensy 2.0 board was utilised. This board has seven PWM outputs and libraries for Arduino were already written. Image courtesy of PJRC.


Teensy 2.0 Pinouts
Teensy 2.0 Pinouts

When using the PWM outputs on the Teensy there was a difference in the frequency between some of the PWM output frequencies due to the timers. This turned out to be of no consequence as the Noctua fans worked across a large range of PWM frequencies. Even with the PWM frequency set in the low Kilohertz no clicking or other audible noises were heard from the Noctua fan.



Teensy 2.0 with Noctua NF-F12
Teensy 2.0 with Noctua NF-F12
For the fan connections, pinouts were referenced from the site All Pinouts. Power was applied to the required two relevant power pins. A common 0VDC connected was required between the fan and the GND pin on the Teensy. 


Teensy 2.0 Close Up
Teensy 2.0 Close Up

The image above has only PWM1 connected. A series 2.2k resistor for current limiting was connected between the PWM output of the Teensy to the PWM input of the fan.

Arduino Program
To control the duty for each PWM output, a simple program was written using Arduino. The code allowed each output to be individually changed. Only basic error checking was performed in the software, something to be aware of.

From a terminal program the number of the PWM output (1 to 7) followed by the duty cycle in percent (PWM ON time) was entered with a new line (enter key) to process the change. For example:

     Set PWM 1 to 75%: 175

     Set PWM 6 to 10%: 610

     Set PWM 7 to 100%: 7100

Example of working code below.


int PWM1 = 4;    /* PWM Output 1 */
int PWM2 = 5;    /* PWM Output 2 */
int PWM3 = 9;    /* PWM Output 3 */
int PWM4 = 10;   /* PWM Output 4 */
int PWM5 = 12;   /* PWM Output 5 */
int PWM6 = 14;   /* PWM Output 6 */
int PWM7 = 15;   /* PWM Output 7 */
int PWM = 0;
int PWM_Serial = 0;
int percent = 0;
char buffer[] = {' ',' ',' ',' '};

/* Start fans at full power then run down to approx 10% */
void setup() {
      Serial.begin(115200);
      pinMode(PWM1, OUTPUT);
      pinMode(PWM2, OUTPUT);
      pinMode(PWM3, OUTPUT);
      pinMode(PWM4, OUTPUT);
      pinMode(PWM5, OUTPUT);
      pinMode(PWM6, OUTPUT);
      pinMode(PWM7, OUTPUT);
      analogWrite(PWM1, 255);
      analogWrite(PWM2, 255);
      analogWrite(PWM3, 255);
      analogWrite(PWM4, 255);
      analogWrite(PWM5, 255);
      analogWrite(PWM6, 255);
      analogWrite(PWM7, 255);
      delay(2000);
      analogWrite(PWM1, 26);
      analogWrite(PWM2, 26);
      analogWrite(PWM3, 26);
      analogWrite(PWM4, 26);
      analogWrite(PWM5, 26);
      analogWrite(PWM6, 26);
      analogWrite(PWM7, 26);
}


/* Main to parse serial commands, no error handling */
void loop() {
  if (Serial.available() >0) {
    PWM_Serial = Serial.read() - '0';
    switch (PWM_Serial) {
      case 1: PWM = PWM1; break;
      case 2: PWM = PWM2; break;
      case 3: PWM = PWM3; break;
      case 4: PWM = PWM4; break;
      case 5: PWM = PWM5; break;
      case 6: PWM = PWM6; break;
      case 7: PWM = PWM7; break;
      default: break;
    }
    while (!Serial.available());
    Serial.readBytesUntil('n', buffer, 4);
    percent = ((atoi(buffer)) * 255)/100;
    analogWrite(PWM, percent);
  }
}

The terminal application TeraTerm, was used to send the commands to the Teensy. As there was no feedback provided by the Arduino code, the actual PWM signal was monitored using an oscilloscope. The Tacho output was also connected to the oscilloscope.

Power supply current and oscilloscope frequency measurements were taken for the duty cycle range of 10% to 100%.

Measurements
To determine what current (mA) the Noctua fans would consume, the duty cycle of the PWM was varied with a single fan connected and the current measured using a multimeter.


Noctua Current vs Duty Cycle
Noctua Current vs Duty Cycle

Undoubtedly the Noctua fans Tacho output against duty cycle, as seen below, has been recorded before however for completeness this was also measured.


Noctua Tacho Output vs Duty Cycle
Noctua Tacho Output vs Duty Cycle

Measurements were performed with the PWM duty starting at 10%, as the fan stall speed occurred at a duty between 7-10%.

Cable Assemblies
As a side note, Noctua provide a number of adapter cables with the fan. These range from an extension cable, Y adapter and a Low Noise adapter. Regarding the low noise adapter the Noctua cable features what appears to be a single 82R resistor, meaning that low noise is simply a by-product of limiting the total current to the fan. The same result could be implemented by adjusting the total power to the fan.


Noctua Low Noise Adaptor
Noctua Low Noise Adaptor
Adding the low noise adapter in series with the power supply to the Noctua fan, reduces the fan speed. The current drawn by the fan is reduced to around 40mA.


Noctua Low Noise Adapter Unsheathed
Noctua Low Noise Adapter Unsheathed

Operational Temperature
In relation to the heat generated by the fan itself, a thermal camera was used to measure the Noctua fan motor which was running at full speed in free air. After several minutes, with an ambient temperature of 24C, the temperature of the fan motor was approximately 28C.

Noctua Fan Temperature
Noctua Fan Temperature
Testing
For testing the effectiveness of the Noctua fans, the RAID system inside a server was kept running using Caffeine on Linux Mint Cinnamon. The system (RAID) did not spin the drives down.


Caffeine Package
Caffeine Package
The server was left powered and running the application Caffeine for 60min to stabilise the internal temperature without fans. The temperature of the drives was taken from the Smart data available under the Disks app. The highest drive temperature was 41C.


RAID No Cooling
No Cooling RAID Temperature
A single the Cooler Master fan was tested first. After 60min the temperature of the warmest drive was 37C.

Single Cooler Master RAID Temperature
Single Cooler Master Fan - RAID Temperature
For the second test the original fan was removed and the RAID was allowed to reach 41C again. A single Noctua fan was then tested. After 60min the temperature of the warmest drive was 38C. 

Single Noctua Fan - RAID Temperature
Single Noctua Fan - RAID Temperature
For the next test the Noctua fan was stopped and RAID was allowed to reach 41C again. Dual Noctua fans were tested. After 60min the temperature of the warmest drive was 32C.

Twin Noctua Fans - RAID Temperature
Twin Noctua Fans - RAID Temperature
Three fans were tried although no difference in RAID temperature was noted when compared to two Noctua fans.

Final Thoughts
There is little doubt the Noctua NF-F12PWM fan performs extremely well, almost as well as a fan running 15% faster, for the limited tests conducted above. It shall be noted however that at the time of writing this blog, the Noctua fan was four times more expensive than a Cooler Master fan or a nearest equivalent non PWM fan. This cost may be prohibitive to some looking to move to PWM. 

Additionally if large airflow is all that is required then a fast, reliable, non-PWM fan may be the more cost effective solution. Mass air flow fans manufactured by Delta or Orion may be more suitable for some installations. Orions models such as the OD1238-12HBXJ10 have an airflow of 250CFM compared to the Noctua's 56CFM however the Orion fan has an ear drumming 69dBA, compared to the Noctua almost inaudible acoustics at 23dBA.

For alternate installations such as a media centre, bedroom computer, home cinema or similar installation were low noise is paramount, then a PWM fan would be an ideal solution.

Sunday, 19 March 2017

Testing PC Computer Fans, Cooler Master, with Multimeter or Oscilloscope (A12025012CB-3BN-F1)

Summary
Cooler Master towers have usually been my computer case of choice for several years. The latest tower used four removable SSD's in the top bay using an Icy Doc adaptor with a separate four Western Digital red drives in RAID for mass storage. Needless to say on occasions the drives in the tower generated some heat which required the three Cooler Master internal fans for some airflow!


N300 Cooler Master Case
N300 Cooler Master Mid Tower Case

Cooler Master Fan Type
Shipped with the Cooler Master tower were three 120mm fans - A12025012CB-3BN-F1. Spinning at 1200RPM the fans were not particularly noisy so when one or two failed for different reasons this was initially not recognised. For those running Linux (Ubuntu in this box) lm-sensors is strongly recommended to prevent such issues.

Fan Testing Digital Multimeter
After removing the fans the 3 pin connector was verified using site All Pinouts


Cooler Master Fans
Cooler Master Fans
As described, on the All Pinouts site, the connections were:
  1. 0VDC
  2. 12VDC
  3. Tacho
Power was connected to both fans pin 1 and 2. A Digital Multimeter 'DMM' with a frequency function was used to measure the tacho output. This measurement was performed between the tacho output and 0VDC with a 220k pullup resistor fitted between the tacho output and 12VDC. 

DMM Measuring Fan Tacho
DMM Measuring Fan Tacho

The second fan did not register any frequency.

Fan Testing Oscilloscope
Using an Oscillscope whether top of the range Yokogowa, or a pocket SeedStudio device, to sight a waveform, regardless of the novelty of the signal, can yield useful information that a traditional DMM cannot provide.

Below are the two captures of the tacho outputs for each fan.

Cooler Master Fan 1
Cooler Master Fan 1

Cooler Master Fan 2
Cooler Master Fan 2
From the two captures shown above, fan 1 was running below its rated speed and the tacho output on fan 2 appeared to be damaged. Both fans were replaced with a newer model, as shown below.

Cooler Master Replacement Fan
Cooler Master Replacement Fan
As a reference, the same pullup resistor was fitted to the tacho output of the new fan, with expected results shown below.


Cooler Master Replacement Fan Tacho Output
Cooler Master Replacement Fan Tacho Output
Summary
Diagnosing a faulty fan can be achieved with the requisite hardware support on a PC motherboard and a suitable application, a DMM with frequency input or an oscilloscope of some variety. All methods provide diagnostic methods for fans with tacho feedback.

Thursday, 16 March 2017

Asko W6342 Tripping Circuit Breaker - Hot Wash

Summary
Quick repair of an Asko W6342 that was tripping the earth leakage circuit breaker (safety switch) only during hot washes. Blog includes a tear down of the front panel electronics.


Asko W6342
Asko W6342

Symptoms

Following a decade of hard work washing, the ever reliable Asko was tripping the 40A safety switch in the house power box. Changing the wash to cold prevented the tripping.

Diagnosing
Knowing that the internal heater or associated circuitry may be faulty, the rear panel of the Asko machine was removed and the heater element checked. Using the ohms range the element measured 25R which appeared to be acceptable. Time to take a peek under the hood at the electronics.

Removing the top metal cover on the Asko, a ten year single page machine electrical schematic was found inside the machine.


W6342 Original Machine Electrical Schematics
W6342 Original Machine Electrical Schematics
Checking online for some keywords shown on the electrical diagram a manual was found for the WM25 at Appliance Diagnostic. Pages 16 to 20 of the manual contained a plethora of detail regarding the operation of the Akso and the operational cycle.

Front Control Panel
The front panel is removed with a screwdriver and levering some well-placed clips. Once the cables are unplugged from the unit the control panel comes out as a single assembly.


ASKO W6342 Control Panel
ASKO W6342 Control Panel


ASKO W6342 Control Panel Rear
ASKO W6342 Control Panel Rear

Removing the buttons from the front control panel and opening the unit shows two PCB's.

ASKO W6342 Control Panel Internals
ASKO W6342 Control Panel Internals

Pulling the two boards out from the housing a visual inspection was performed and basic measurements of the relays and SCR shown to the right on the PCB below.
 
ASKO W6342 PCBs
ASKO W6342 Logic and Power PCB's

For those interested the Asko W3642 used a Freescale MC68HC908AP32 processor as the brains for the operation.

Asko Freescale CPU
Asko Freescale CPU

With no visible issues on either PCB or apparent faults with the parts it was back to the heater element.

Heater Element Insulation Testing
Both the power connections to the heater element were removed however the earth connection was left connected. A Honeytek A60B Insulation Tester was used to check between the internal heater element and the outside earthed casing. 

Honeytek A60B Insulation tester
Honeytek A60B Insulation tester

The measurement shown on the tester was markedly below the Kilohms region indicating there was some breakdown of the insulation. After a decade of washing this was not surprising. Below is an image of the old element.

Asko Heater Element
Asko Heater Element

A new element was ordered from Nation Wide Spares and changed for the damaged element. A great reference video for replacing the element is available at RepairClinic.

Once the Asko was reassembled a warm wash was performed to ensure that the safety switch did not trip and to verify there were no leaks from the newly installed heater element.