Silicon ChipFan Controller & Loudspeaker Protector - February 2022 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Be wary of devices that require apps to work
  4. Subscriptions
  5. Review: Radio Girl by Nicholas Vinen
  6. Feature: All About Batteries – Part 2 by Dr David Maddison
  7. Project: Dual Hybrid Power Supply – Pt1 by Phil Prosser
  8. Feature: Low-noise HF-UHF Amplifiers by Jim Rowe
  9. Project: Fan Controller & Loudspeaker Protector by John Clarke
  10. Product Showcase
  11. Project: Solid-State Tesla Coil by Flavio Spedalieri
  12. Review: TL866II Universal Programmer by Tim Blythman
  13. Project: Remote Gate Controller by Dr Hugo Holden
  14. Serviceman's Log: The accordion job by Dave Thompson
  15. Vintage Radio: Tasma 305 'rat radio' by Fred Lever
  16. PartShop
  17. Market Centre
  18. Advertising Index
  19. Outer Back Cover

This is only a preview of the February 2022 issue of Silicon Chip.

You can view 35 of the 112 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Articles in this series:
  • All About Batteries - Part 1 (January 2022)
  • All About Batteries - Part 1 (January 2022)
  • All About Batteries – Part 2 (February 2022)
  • All About Batteries – Part 2 (February 2022)
  • All About Batteries, part three (March 2022)
  • All About Batteries, part three (March 2022)
Items relevant to "Dual Hybrid Power Supply – Pt1":
  • Intelligent Dual Hybrid Power Supply PCB set (AUD $25.00)
  • Intelligent Dual Hybrid Power Supply regulator PCB [18107211] (AUD $7.50)
  • Intelligent Dual Hybrid Power Supply front panel control PCB [18107212] (AUD $2.50)
  • DSP Crossover CPU PCB [01106193] (AUD $5.00)
  • DSP Crossover LCD Adaptor PCB [01106196] (AUD $2.50)
  • PIC32MZ2048EFH064-250I/PT programmed for the Intelligent Dual Hybrid Power Supply [0110619A.HEX] (Programmed Microcontroller, AUD $30.00)
  • 128x64 Blue LCD screen with KS0108-compatible controller (Component, AUD $30.00)
  • Hard-to-get parts for the Intelligent Dual Hybrid Power Supply regulator board (Component, AUD $100.00)
  • Hard-to-get parts for the Intelligent Dual Hybrid Power Supply CPU board (Component, AUD $60.00)
  • LCD panel bezel for the Dual Intelligent Hybrid Power Supply (PCB, AUD $5.00)
  • Intelligent Dual Hybrid Power Supply firmware [0110619A.HEX] (Software, Free)
  • Intelligent Dual Hybrid Power Supply PCB patterns [18107211/2] (Free)
  • DSP Active Crossover/DDS/Reflow Oven PCB patterns (PDF download) [01106191-6] (Free)
Articles in this series:
  • Dual Hybrid Power Supply – Pt1 (February 2022)
  • Dual Hybrid Power Supply – Pt1 (February 2022)
  • Dual Hybrid Power Supply, part two (March 2022)
  • Dual Hybrid Power Supply, part two (March 2022)
  • Intelligent Dual Hybrid Power Supply, part one (June 2025)
  • Intelligent Dual Hybrid Power Supply, part one (June 2025)
Articles in this series:
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • A Gesture Recognition Module (March 2022)
  • A Gesture Recognition Module (March 2022)
  • Air Quality Sensors (May 2022)
  • Air Quality Sensors (May 2022)
  • MOS Air Quality Sensors (June 2022)
  • MOS Air Quality Sensors (June 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Heart Rate Sensor Module (February 2023)
  • Heart Rate Sensor Module (February 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • VL6180X Rangefinding Module (July 2023)
  • VL6180X Rangefinding Module (July 2023)
  • pH Meter Module (September 2023)
  • pH Meter Module (September 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 1-24V USB Power Supply (October 2024)
  • 1-24V USB Power Supply (October 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)
Items relevant to "Fan Controller & Loudspeaker Protector":
  • 500W Amplifier Module PCB [01107021 RevD] (AUD $25.00)
  • Hard-to-get parts for the 500W Amplifier (Component, AUD $180.00-200.00)
  • Parts collection for the 500W Amplifier (Component, AUD $235.00-250.00)
  • 500W Amplifier Module PCB pattern (PDF download) [01107021] (Free)
  • Cooling Fan Controller & Loudspeaker Protector PCB [01102221] (AUD $5.00)
  • PIC16F1459-I/P programmed for the Cooling Fan Controller & Loudspeaker Protector [0110222A.HEX] (Programmed Microcontroller, AUD $10.00-15.00)
  • 4-pin PWM fan header (Component, AUD $1.20)
  • Cooling Fan Controller & Loudspeaker Protector firmware [0110222A.HEX] (Software, Free)
  • Cooling Fan Controller & Loudspeaker Protector PCB pattern (PDF download) [01111211] (Free)
Articles in this series:
  • Fan Controller & Loudspeaker Protector (February 2022)
  • Fan Controller & Loudspeaker Protector (February 2022)
  • Amplifier Clipping Indicator (March 2022)
  • Amplifier Clipping Indicator (March 2022)
  • 500W Power Amplifier, Part 1 (April 2022)
  • 500W Power Amplifier, Part 1 (April 2022)
  • 500W Power Amplifier, Part 2 (May 2022)
  • 500W Power Amplifier, Part 2 (May 2022)
  • 500W Power Amplifier, Part 3 (June 2022)
  • 500W Power Amplifier, Part 3 (June 2022)
Items relevant to "Solid-State Tesla Coil":
  • Solid State Tesla Coil driver PCBs [26102221-2] (AUD $7.50)
  • Solid State Tesla Coil driver PCB patterns (PDF download) [26102221-2] (Free)
Items relevant to "Remote Gate Controller":
  • Driveway Gate Controller PCB [11009121] (AUD $20.00)
  • Remote Gate Controller PCB pattern (PDF download) [11009121] (Free)

Purchase a printed copy of this issue for $11.50.

Cooling Fan Controller M This board controls up to three cooling fans, switching them on at a preset temperature and ramping their speed up as it increases, preventing overheating while minimising noise. It can also protect loudspeakers from damage while also preventing power switch-on and switch-off thumps. It isn’t just useful for amplifiers; this board is ideal for any device that needs cooling fans. SPECIFICATIONS & any devices need forced-air cooling when working hard but do not need fans to be running (or perhaps only running slowly) when they are idle or under light load conditions. This includes large power supplies, audio amplifiers, motor speed controllers – just about anything that gets hot under load. Even devices for which passive convection cooling is adequate can have their lifespans extended if they are fitted with fans that switch on once things start heating up. Those fans might only need to run during summer, when ambient temperatures are high. Ideally, the fans stop or spin slowly when only a bit of cooling is required, to prevent the annoyance of constant fan noise (and dust collection). One simple method to provide cooling fans is to have a thermostat connected to the heatsink that switches on the fan(s) whenever the temperature exceeds a certain threshold. But, when switched on, the fan(s) run at full speed and make considerable noise. That is especially bad for an audio amplifier as it can ruin the listening experience. A less obtrusive method is to adjust the speed of the fan(s) so that there is a gradual rise in speed as temperature rises. Once the heatsink passes a certain temperature, the fan(s) run slowly to start with; this usually provides DC offset reaction time: 75ms Temperature setting range: 0-100°C (273-373K) Fan PWM control frequency: 25kHz Over-temperature hysteresis: 4°C (4K) Amplifier DC offset detection: < -2V or > +2V AC loss detection threshold: 9V AC Relay power-up delay: typically 6s after fans are detected Fan disconnect/failure audible alarm: 264ms burst of 3.875kHz at 1Hz Trimpot voltage/temperature conversion: 10mV/K (2.73V = 273K = 0°C) Over-temperature or DC fault audible alarm: 264ms burst of 3.875kHz at 0.5Hz NTC thermistor range: 0-100°C (responds to highest temperature when two are used) Trimpot adjustments: three – fan switch-on threshold, fan speed range & over-temperature alarm 44 Silicon Chip Australia's electronics magazine siliconchip.com.au Loudspeaker Protector By John Clarke sufficient air movement to bring the amplifier back to a lower temperature. If the temperature continues to rise, the fan will run at a progressively faster rate, up to full speed. By choosing the right fans, they will be extremely quiet at slow speeds, and the temperature can usually be controlled without making noise. Here, we’re using PWM-controlled computer fans with brushless motors. They are readily available at a range of prices, start at just a few dollars each, and generally are silent at low speeds. Some can still move a lot of air at full speed, though. As this board is especially suitable for power amplifiers, we’ve added several extra features to it. Power amplifiers should include loudspeaker protection to disconnect the speakers if the amplifier fails. Power amplifier failures can destroy the speakers and even start a fire, especially if it’s a highpower amplifier. That’s because one common failure mode involves one or more of the output transistors failing short-circuit, possibly resulting in the entire supply rail DC voltage (up to perhaps 80V) being applied to the speaker. Given their low DC resistance, any loudspeaker connected will be quickly destroyed by this. At best, the loudspeaker coil will burn out without any further damage. But a worse scenario is that the speaker cone could catch fire, burning the speaker box and anything else that’s in the vicinity. The built-in Loudspeaker Protector Controller averts speaker damage by disconnecting the loudspeaker from the amplifier should the amplifier exhibit this type of fault. Since there is the ability to disconnect the loudspeaker from the amplifier, we can provide de-thumping features. At power-up, an amplifier can generate a brief, uncontrolled voltage excursion until its power supply stabilises. This will produce a thump sound from the loudspeaker(s). We eliminated it by adding a delay from power-up before connecting the loudspeaker. A similar thump can occur at switch-off. Therefore, we disconnect the loudspeaker as soon as the AC supply is lost, before any voltage excursions from the amplifier can cause a thump sound. PWM fan control Our Controller works with 4-pin PWM fans. These fans have internal pulse-width modulation (PWM) speed control, where the duty cycle of the waveform at a control pin is adjusted to change the fan speed. At low duty cycles, the fan runs slowly and increases in speed as the duty is increased. Our Controller can drive up to three fans. PWM fans have four connections: two for power (+12V and 0V), one for speed adjustment and one for speed feedback (RPM sensing). These are labelled as the Control and Sense terminals. The sense terminal produces two pulses per fan revolution when the terminal has a pull-up resistor connected to a 5V supply. These pulses provide information about the speed of the fan, and in particular, whether the fan is running. If the pull-up resistor is not included, the fan will always run at full speed when power is applied. The fourth pin is the Control terminal and is for the PWM signal to set the fan speed. The applied PWM signal only needs to supply a small amount of current as it does not directly drive the fan motor. Internally, each fan includes a motor driver circuit that operates based on the PWM signal applied. Scope 1 shows the 25kHz PWM signal that is applied to the fan. The top yellow trace is a low duty cycle (16.7%) waveform, and when this is applied, the fan runs slowly. The lower white trace shows the PWM waveform when the duty cycle is increased to around 70%. With this higher duty FEATURES Suits mono & stereo audio amplifiers, or any other device which needs thermal fan control Onboard loudspeaker protector controller with de-thumping at switch on & off Loudspeakers are disconnected with over-temperature fault One or two thermistors for temperature sensing PWM control for one to three cooling fans Over-temperature and fan failure alarms Temperature control range of 0-100°C Fan detect and relay-on LED indicators siliconchip.com.au Australia's electronics magazine February 2022  45 cycle, the fan runs faster but still not at full speed. That requires a continuously high signal. You can find more details on this style of PWM fan control in the PDF document at siliconchip.com.au/link/ abc3 Features As we wrote earlier, this board is applicable to a wide range of situations, but as it’s ideal for audio amplifiers, the following description will concentrate on that usage. The Controller can be used with a mono or stereo amplifier with one or two heatsinks. The loudspeaker switching relay is selected to suit the amplifier power rating; it will need a high current rating for use with highpower amplifiers (100W or more). This is discussed in a section below titled “Relay choices”. Any relay that is used must have a double-throw contact (ie, SPDT or DPDT). We will describe why that is necessary a bit later. The Controller is presented as a bare board and is designed to be housed within the amplifier enclosure. It runs from a 12V DC supply, with a current draw possibly approaching 750mA depending on the type of fan and how many are used. While this 12V could be derived from an existing amplifier supply, a separate supply is probably warranted, especially when more than one fan is used. Note that you can use the Controller without using all the features. You can leave one thermistor disconnected if you don’t need both, or both can be disconnected if you are only using the loudspeaker protection and dethumping features. If you don’t want to connect the AC detection input for dethumping, it can be connected instead to the 12V DC input. If you aren’t using the loudspeaker protection features or only have a single channel to protect, connect the unused sense inputs to the 0V terminal. Finally, if you want to use the speaker protection/dethumping features but not the fan control, use a jumper shunt to bridge pins 3 and 4 of one of the fan connectors. That prevents the Controller from showing a ‘fan disconnection/failure’ error that would otherwise prevent operation. Circuit details The entire circuit of the Controller is shown in Fig.1; it is based around microcontroller IC1. It monitors several inputs, including two NTC thermistors for temperature measurement, two amplifier output voltages and an AC input from a power transformer. The AC input is used to sense when the amplifier is switched on or off. It also has three analog inputs connected to the wipers of trimpots to set the temperature control parameters, plus three frequency-sensing digital inputs for monitoring the fan speeds (RPMs). IC1 produces output signals for driving the alarm piezo, LED indicators for each fan and a relay driver/ LED indicator. Under normal circumstances, the relay will switch on after about six seconds from power-up. This connects the amplifier output(s) to the loudspeaker(s). In more detail, the NTC thermistor inputs are at CON5. Thermistor TH1 connects to the analog input at pin 7 of IC1 and pin 8 for TH2. Each thermistor connects between ground (the 0V rail) and the input pin with a 10kW pull-up resistor to the +5V supply. As the name suggests, negative temperature coefficient (NTC) thermistors decrease in resistance with increasing temperature. For the thermistors used, the resistance at 25°C is 10kW, so in conjunction with the 10kW pull-up resistor, they give 2.5V DC at 25°C. As temperature rises, this voltage falls. The resistance and hence voltage-versus-­ temperature is not linear; it follows an exponential curve. The thermistor beta value is 3970, which allows us to calculate the expected resistance and thus voltage at various temperatures. You can use an online calculator like the one at siliconchip.com.au/link/ aaj1 to calculate the expected values at any temperature. We have stored a pre-calculated table of values from 0 to 100°C within the memory of microcontroller IC1. IC1 converts the voltages to 8-bit digital values using its internal analog-­ to-digital converter (ADC) and then Scope 1: two PWM fan control waveforms, with a low duty cycle at the top in yellow (so the fan runs slowly) and a high duty cycle below in white, for a higher fan RPM, but short of full speed. Fig.1: there isn’t a great deal to the ► Controller circuit since most of the functions are handled by the firmware (software) loaded into microcontroller IC1. At upper right there is signal conditioning so the amplifier output signals can be fed into the micro’s ADC, with the relay driving circuitry below. The components at lower right are for the PWM fan interface while the thermistor inputs, adjustment trimpots and indicator LEDs at left. 46 Silicon Chip Australia's electronics magazine siliconchip.com.au uses the lookup table to convert them to temperatures. Temperatures below 0°C are treated as 0°C and similarly, temperatures over 100°C are treated as 100°C. When two thermistors are connected, the highest temperature of either thermistor is used. That way, for a stereo amplifier with two heatsinks, the fan speed and other aspects will be determined by whichever is hotter. If only one thermistor is used, the unused input is left open, and the pull-up resistor holds the input at 5V. That ensures that the unused input will have a lower temperature reading. Trimpot adjustments Trimpots VR1, VR2 and VR3 are for setting how you want the fans to be controlled. The voltage setting at siliconchip.com.au the wiper of each trimpot is directly related to temperature in Kelvin (K). A difference in 1K is equivalent to 1°C, but 0°C = 273.15K. So to convert °C to K, simply add 273.15 and to convert K to °C, you subtract that same value. The conversion from voltage to temperature in our circuit is 10mV/K. So a voltage setting of 2.73V sets a temperature of 273K, which is 0°C. For other temperatures, add the °C value required to 273, divide by 100, then adjust for that voltage. For example, for a 50°C setting, you need to achieve 3.23V ([273 + 50] ÷ 100) at TP1, TP2 or TP3. VR1 adjusts the threshold setting, which is the lowest temperature where the fans start running. Test point TP1 can be used to check this setting. The voltage at pin 9 of IC1 is converted Australia's electronics magazine to a 10-bit digital value and then to a temperature value in °C. VR2 sets the temperature range over which the fans run from minimum through to maximum duty cycle. For example, if you set a threshold of 50°C and a range of 10°C (VR2 adjusted for 2.83V at TP2), the fans will start to run at the minimum duty cycle when the thermistor temperature reaches 50°C. The duty cycle will increase linearly as temperature increases, up to and above 60°C, where they will be running at full speed. As VR2 sets a temperature range, you don’t need to readjust VR2 if you change the threshold temperature setting with VR1. VR3 sets the over-temperature alarm threshold, and you can monitor this setting at TP3. Whenever the measured February 2022  47 temperature is above this setting, it will set off the piezo alarm and switch off the relay(s) that connect the loudspeaker(s). The speaker disconnection allows the amplifier to cool off as it is no longer loaded. When this alarm goes off, the fans are set at maximum speed (if they aren’t already) to cool down the amplifier, and regular operation does not resume until the temperature drops by 4°C. Typically, this over-temperature setting would be set at least as high as the threshold temperature plus the speed range. Amplifier connections The Controller monitors the AC side of the amplifier power supply as well as amplifier output offset voltage. These are wired to CON4; the AC supply voltage goes to IC1’s AN4 analog input at pin 16, while the amplifier outputs go to AN5 (pin 15) and AN6 (pin 14). AC detection is done by half-wave rectifying the voltage from the transformer’s secondary. Diode D5 rectifies the AC, and the resulting voltage is fed through a low-pass filter comprising a 47kW resistor and 2.2μF capacitor. Without any AC voltage, the AN4 analog input at pin 16 of IC1 is held at 0V via the 47kW pull-down resistor. When at least 9V AC is applied, the voltage at pin 16 will exceed 2.5V. This voltage is limited to 4.7V by zener diode ZD3. The time constant for the filtering has been chosen to ensure sufficient ripple voltage is removed from the rectified AC while minimising the detection period for loss of AC. The amplifier outputs are monitored via pairs of 47kW resistors which limit the current fed into the circuit. They also act to level-shift the output signals from the amplifier to an average DC level of 2.5V. Two 10μF capacitors, in combination with these resistors, filter out the AC signal from the amplifier, leaving only the DC level. We have set the speaker output over-voltage detection threshold to be 2V on either side of 0V. Since the pairs of 47kW resistors divide the signal level by two and add 2.5V, the normal range of voltages at pins 14 & 15 of IC1 is between 1.5V and 3.5V. Anything outside this indicates a DC fault in the amplifier. Note that the 10μF capacitors are only truly effective at removing the AC for signal frequencies above about 100Hz. Below that, more and more of the AC voltage will be present at the micro inputs. The AC voltage level is also dependent on the amplifier output level, so at low frequencies close Scope 2: the yellow trace shows a high-level 20Hz signal from a 500W amplifier and the cyan trace below shows the signal at pin 14 of IC1. While this is an extreme case, it demonstrates how the signal can go outside the 2V detection window (dashed lines) even without a DC fault. Therefore, the software has been designed to detect and ignore this case and only respond to genuine DC faults. 48 Silicon Chip Australia's electronics magazine to 20Hz, it can exceed the offset detection threshold, especially with a highpower amplifier. This is shown in Scope 2. The top yellow trace is the output from a 500W amplifier at 20Hz, with an RMS voltage of about 49.1V and 142V peakto-peak. The lower blue trace is the waveform as presented to the AN5 input of IC1. The AC voltage is 2.36V peak-to-peak, riding on a half-supply DC level of 2.56V. The horizontal lines represent the 1.5V and 3.5V thresholds. This shows that at low frequencies and high amplifier output levels, the waveform can exceed the offset threshold limits at the waveform peaks. Any standard offset detector circuit using transistors to detect the offset will switch off the relay whenever the AC signal exceeds the limits. To circumvent this, the filtering would need to be increased by using a capacitor larger than 10μF. However, increasing the filter capacitor will also increase the delay from the initial detection of offset from the amplifier and the relay switching off. This is not ideal as the speakers need to be disconnected by the relay as quickly as possible if there is a fault. Instead, we use software logic to determine whether there is a DC fault or just a high-level AC voltage. The waveform is sampled about 1000 times per second, and whenever the offset voltage threshold is exceeded, a 75ms timer is started. If the detected offset voltage drops to within the offset voltage threshold boundaries during this period, there is no DC offset, so the relay is not switched off. A genuine DC offset would continue being detected as exceeding the offset threshold. If DC offset is still seen at the end of the timeout period, it will switch the relay off and the alarm will sound. Zener diodes ZD1 & ZD2 limit the voltages across the possibly 16V-rated capacitors. This can happen if the circuit is connected to an amplifier when IC1 is not inserted into its socket. When IC1 is in-circuit, the internal protection diodes will limit the voltage at the input to 0.3V above the 5V supply and 0.3V below 0V. ZD1 & ZD2 provide extra protection by limiting the voltages across the capacitors to a maximum of 15V and -0.6V. The 2.2kW series resistors further limit the current to the protection diodes within IC1. siliconchip.com.au We are using a 15V zener rather than 4.7V despite the supply being 5V due to the leakage current. A 15V zener diode with up to 5V applied will only conduct about 0.05μA compared to 100μA or more for a 4.7V zener diode at only 1V. That leakage current would drastically affect the half-supply voltage set by the pairs of 47kW resistors that only cause a 53μA current flow under quiescent conditions. Note that if one of these two inputs is not connected to an amplifier (eg, your amplifier has a single channel), that input must be tied to 0V or else it will be detected as a DC fault. Piezo alarm The external piezo transducer for the alarm is driven via the RB6 output of IC1 (pin 11) via a 220W resistor. This resistor is part of a low-pass filter to reduce the harshness and volume to a less piercing level. The filtering utilises the capacitance of the transducer to filter out some of the harmonics from the square wave. The driving frequency is around 3.9kHz and is produced in bursts of 264ms every two seconds for both the over temperature and amplifier offset alarms. The fan fault alarm rate is 1Hz. Relays There is the option to connect two relays, RLY1 and RLY2. These are driven in parallel and via transistor Q1. A high level from the RB7 output of IC1 applied to the base of this transistor switches on the relay or relays. Diode D6 prevents high-voltage backEMF excursion when the relay coil switches off, thus preventing damage to the transistor. The amplifier’s positive speaker output connects to the normally open (NO) relay contact of the relay while the plus side of the speaker connects to the relay wiper or common (COM) with the normally closed (NC) contact connecting to the negative speaker output (usually Earth) on the amplifier – see Fig.3. When the relay switches on, the amplifier output is connected to the speaker’s positive terminal. If the amplifier is working correctly, the contacts will disconnect the speaker without any problems when the relay is switched off. However, it is not so easy when there is an amplifier fault and the speaker output from the amplifier has a high positive or negative DC voltage. siliconchip.com.au Parts List – Fan & Loudspeaker Protector 1 double-sided plated-through PCB coded 01102221, 95 x 74mm 1-3 4-pin PWM fans to suit heatsink dissipation requirements● 1-2 lug-mount NTC thermistors, 10kW at 25°C, beta 3970 (TH1, TH2) [Altronics R4112] OR 1-2 dipped NTC thermistors with separate securing clamps (TH1, TH2) [Jaycar RN3440] 1-2 high-current 12V SPDT or DPDT relays (see text) 1 piezo transducer (PIEZO1) [Jaycar AB3442, Altronics S6109] 3 4-way polarised PWM fan headers, 2.54mm pitch (CON1-CON3) [SC6071, Digi-Key WM4330-ND, Mouser 538-47053-1000] OR 3 4-way polarised headers, 2.54mm pitch, modified (CON1-CON3; see text) [Jaycar HM3414, Altronics P5494] 4 3-way screw terminals, 5.08mm pitch (CON4) 2 2-way screw terminals, 5.08mm pitch (CON5) 4 6mm-long M3-tapped spacers 5 M3 x 6mm panhead machine screws 1 M3 hex nut 4 PCB stakes/pins (optional) 1 20-pin DIL IC socket (optional; for IC1) ● We used EZDIY 120mm PWM fans purchased from Amazon for our prototype (search for B07X25CJT5). These are inexpensive (we paid $23 for three) and quiet, although they are not the most powerful we’ve tested. Try Corsair ‘maglev’, Noctua or BeQuiet 4-pin PWM fans for applications that require faster air movement or higher pressure. All computer stores should sell suitable fans. Semiconductors 1 PIC16F1459-I/P programmed with 0110222A.HEX, DIP-20 (IC1) 1 7805 5V 1A linear regulator, TO-220 (REG1) 1 BC337 500mA NPN transistor, TO-92 (Q1) 4 3mm high brightness red LEDs (LED1-LED4) 3 1N5819 40V 1A schottky diodes (D1-D3) 3 1N4004 400V 1A diodes (D4-D6) 2 15V 1W zener diodes (ZD1,ZD2) 1 4.7V 1W zener diode (ZD3) Capacitors Resistor Colour Codes 2 100μF 16V PC electrolytic 2 10uF 16V PC electrolytic 1 2.2μF 16V PC electrolytic 6 100nF MKT polyester Resistors (all 1% 0.5W axial metal film) 6 47kW 5 10kW 3 2.2kW 3 1kW 1 470W 1 220W 3 10W 3 10kW top adjust multi-turn trimpots (VR1-VR3) Because of the high DC voltage, trying to break the speaker connection by opening the contacts can cause an arc to develop, and current continues to flow through the speaker. This is where the NC contact comes into play. This contact closes to short out the speaker, typically breaking any arc. If the arc remains and current continues to flow through the relay, the amplifier DC supply fuse will blow. Fan control There is considerable logic involved Australia's electronics magazine in driving the fans. This is because many PWM fans require a minimum duty cycle to be applied before they spin. Specifications for these fans give a minimum figure of 20% duty cycle, although most will run at lower duty cycles than that. In fact, the fans we used to test our prototype run at a slow 540rpm when the duty cycle is 0%. We believe this is a feature to improve the LED backlighting on the fan blades, so they become a blended wall of light as the blades spin. February 2022  49 Non-LED-lit fans are likely to stop at 0% duty cycle. (We didn’t look specifically for the LED lighting feature, it was just ‘part of the package’ for these low-cost but otherwise good fans.) The fan(s) connect to CON1-CON3, and at least one fan needs to be connected for the circuit to work. However, the circuit can be tricked into believing a fan is connected with a bridging shunt between the Control and Sense terminals (pins 3 & 4). Power for each fan is supplied from the 12V supply via a Schottky diode (D1, D2 or D3), and their 12V rails are bypassed with 100nF capacitors. The diodes are for reverse supply polarity protection. The common PWM output from pin 5 of IC1 is applied to each fan’s Control input via a 10W resistor. Pull-up resistors are provided for the Sense pin on each fan, and these pins connect to the RA3, RA0 and RA1 inputs on IC1 so it can check if each fan is running. Indicator LEDs driven via the RC4, RA4 and RA5 digital outputs of IC1 via 1kW resistors show which fan is connected and flash if no fans are connected. The micro determines the minimum duty cycle for the PWM signal that will cause all connected fans to run the first time the circuit is powered up. Once found, this minimum duty and the number and positions of connected fans are stored in flash memory, so the Controller starts up faster subsequently. The stored settings are used, provided the fans run at the stored minimum duty cycle on each power-up. A check to find the minimum duty where all the fans will run is only done again if the number of fans connected changes, the connection position for the fans changes or if one of the fans does not run when the stored minimum duty cycle is applied. The setup procedure first applies PWM signals at about 80% duty cycle to the fans for 10 seconds, then checks which fans register as spinning. At this stage, all fan LEDs will flash at 1Hz. If no fans are detected, an error is indicated by all fan LEDs flashing and the piezo alarm sounds. The relay(s) stay off until a working fan is connected. If fans are found, it determines the minimum duty cycle that will cause all fans to spin. After that, the LEDs associated with any connected fans are lit. The number of fans, their positions 50 Silicon Chip and the minimum duty cycle are stored in memory, and this is indicated by all the lit fan LEDs briefly blinking off. The program then continues with the usual six-second delay before switching the relay(s) on, but only if the checks for temperature, amplifier offset and AC power all pass. Subsequently, when the circuit is powered up, it will start the six-second delay almost immediately, provided the fan connections have not changed. The connected fan or fans are usually detected within one second. Power supply The circuit requires a 12V DC supply which is applied to the fans via reverse polarity protection diodes D1-D3. The supply also goes to 5V for IC1 by regulator REG1 via diode D4, also for reverse polarity protection. The 5V supply also functions as a 5V reference for the trimpots. Construction The Controller is built on a double-­ sided, plated-through PCB coded 01102221 that measures 95 x 74mm. Fig.2 shows the assembly details. Begin by fitting the resistors. There is a resistor colour code table in the parts list, but you should also check each lot using a digital multimeter (DMM) before installation, as the colour bands can be misleading. With these parts in place, mount the diodes, taking care to orientate these as shown in Fig.2. D1, D2 and D3 are 1N5819 schottky types, while D4, D5 and D6 are standard 1N4004 diodes. Zener diodes ZD1-ZD2 are 15V 1W types while ZD3 is 4.7V, 1W. You can fit the optional socket for IC1 now; be sure it is orientated correctly before soldering. Next, insert the capacitors, taking care with the electrolytic types that must be positioned with the longer leads towards the + symbols. Follow assembly with the trimpots. These are all multi-turn types and should be orientated with the screw adjuster positioned as shown. Then install transistor Q1. The four 3-way screw terminal blocks making up CON4 need to be joined first by fitting each side-byside by sliding the dovetail mouldings together. Make sure the wire entry side is toward the nearest edge of the PCB before soldering. Similarly, the two 2-way screw terminals for CON5 must Australia's electronics magazine be connected and mounted with the wire entry to the edge. If you are using standard 4-way polarised headers to connect the fans, rather than the special Molex parts listed, they need to be modified so that you can insert the fan plugs. This involves cutting the polarising backing tab to remove the section behind pins 3 and 4. We used side cutters to snip the plastic out. When mounting CON1-CON3, be sure to orientate these headers correctly, with the polarising tab piece away from the PCB edge. The LEDs can now be fitted, with the longer leads inserted into the anode (A) holes. Mount them such that the tops are about the same level as the adjacent header for LED1-LED3, and the screw terminal for LED4. You can now install PCB stakes/pins at test points TP1-TP3 and TP GND, or simply leave them off and use the multimeter probes directly to the PCB pads. We used a PCB pin at the GND test point but left them off TP1-TP3. Regulator REG1 is mounted horizontally on the board. First, bend its leads to pass through their mounting holes, then secure its tab to the PCB using the M3 x 6mm machine screw and nut, after which the leads can be soldered. Before installing IC1, check the regulator output voltage by applying 12V to CON4’s +12V and 0V terminals. Check that the voltage between the regulator metal tab and the right-hand output pin is close to 5V. Typically, these regulators are well within 100mV of 5V. If the voltage is incorrect, check that the input voltage at the left lead of REG1 is at least 6V. If you got your PIC from our Online Shop, it will come programmed. Otherwise, if you have a blank PIC, download the HEX file (0110222A.HEX) from our website and load it into the chip using a PIC programmer. Now switch off power and mount or plug in IC1, after checking its orientation. Setting up With power applied, adjust VR1, VR2 and VR3 for suitable temperature settings while monitoring the voltages TP1, TP2 and TP3 respectively. We recommend starting by adjusting VR1 to get 3.03V at TP1, giving a 30°C (303K) fan starting temperature. Then set VR2 (Range) for 2.83V at TP2, providing a 10°C ramp range. That way, siliconchip.com.au the fans will be at full speed by 40°C. You can initially set the over-temperature setting for VR3 to 50°C. That’s 323K, so adjust VR3 for 3.23V at TP3. These settings may need adjusting to optimise the way the fan speed varies with temperature. Consider that with a starting temperature of 30°C, the fans will start to run as soon as you power the device up on a hot day if the device is not in an air-conditioned room. On a sweltering day where it reaches 40°C, the fans will run at full speed all the time (which might be necessary!). It depends on the device you are cooling and how sensitive it is to temperature. Keep in mind that, as it’s an external device, the thermistor will be measuring a lower temperature than the semiconductor junctions that are presumably generating the heat. You could raise the switch-on threshold temperature considerably if the device adequately cools via convection when it isn’t running at maximum power; the fans would then only need to run at higher loads and temperatures. When adjusting the range, we don’t suggest you go too much lower than 10°C as the fans will appear to operate in an on/off manner, particularly with a range setting below 2°C. If the temperature cannot be controlled using these settings, or if the fans run at full speed most of the time, you might need more fans (up to three maximum for this Controller), larger fans or fans that run at a higher speed at 100% duty cycle. Keep in mind that there are flow-optimised fans and pressure-optimised fans (with different blade shapes). Fig.2: assembly of the Controller is straightforward; fit the components as shown here, starting with the lower-profile axial parts and working your way up to the taller devices. Watch the orientations of IC1, the diodes (including LEDs), trimpots and electrolytic capacitors. Accuracy Note that temperature setting accuracy is dependent on the 5V supply rail being close to 5.00V. If it is only a few tens of millivolts different, the setting accuracy will not be affected too much. If you need precise temperature settings, you can multiply the required temperature voltage (ie, the 10mV/K value) by the actual supply voltage, then divide by 5. Then adjust the trimpot to get that calculated voltage. For example, if the supply is 4.95V, multiply the required temperature voltage by 4.95 and divide by 5 (or multiply by 0.99 [4.95 ÷ 5]). For example, if you want to set the threshold to 330K (57°C) but the supply voltage siliconchip.com.au Fig.3: here’s a guide on how to connect one of the speaker protection relays. If you have two amplifier channels, you can use a DPDT relay, in which case the wiring is similar but you duplicate the speaker & amp wiring for the second set of relay contacts, and connect the second SPEAKER + terminal to the other AMP1/AMP2 terminal. For two separate SPST relays, do the same but connect the second relay coil back to the other pair of relay terminals on the controller board. Australia's electronics magazine February 2022  51 are also available in smaller sizes like 80 x 80mm or 92 x 92mm, as well as larger sizes like 140 x 140mm. If your device requires lots of cooling, use the largest fans that will fit into its case and check their air movement specification in litres per minute (L/ min) or CFM (cubic feet per minute). Make sure there are ventilation holes in the case so that the air movement is not restricted going past the heatsink fins. Note that if you are not using the fan control section of the Controller, pins 3 and 4 of either CON1, CON2 or CON3 must be bridged with a shorting block. Only one such shunt is required. A single Protector board can control up to three fans, as used in our upcoming 500W Amplifier. is 4.95V, set it to 3.267V (330 × 0.99) instead to get it spot-on. Relay choices The choice of relay depends on the amplifier power and whether you are using the circuit with a mono or stereo amplifier. In all cases, the relay must be a double-throw type. That means having a normally open and a normally closed contact for each pole. For stereo amplifiers up to 200W, you could use the Altronics S4310 12V coil, 10A DPDT contacts cradle relay with their S4318A base, or the Jaycar SY4065 12V coil 10A DPDT contacts cradle relay and SY4064 base. For a mono amplifier up to 200W, you could still use the DPDT relay but parallel the contacts or just use one set. For higher power amplifiers, up to about 600W, you can use the Altronics S4211 12V 30A SPDT relay for a mono amplifier, or use two of them for a stereo amplifier (you can also use the Altronics S4335A). analog electronics like amplifier input stages and preamps, as it may radiate some EMI (although it shouldn’t be too bad as it is shielded). Fan choices There are many 4-pin PWM fans available (mainly designed for cooling computers), and you can choose to use up to three with our Controller, even mixing different types if desired. Typically, larger diameter fans move more air with less noise, as do multiple fans when compared to a single fan. See the parts list for some suggestions. These fans are often available in multi-packs at quite reasonable prices. The most common size for PWM fans is 120 x 120mm, although they Finishing up Mount the board in a suitable spot in your amplifier case using threaded standoffs and machine screws (we’ve specified 6mm spacers to keep it compact, but you could use other lengths). Wire up the power supply, including the AC sense line from the transformer secondary, or short the AC input to +12V if you are not using that feature. Next, wire up the thermistor(s) to CON5 (they are not polarised so can be wired either way around) and the relay(s), piezo transducer and amplifier outputs (if present) to CON4. Plug the fans in, power up the board and check that it behaves as expected. You can heat a thermistor with a hot air gun and verify that the fans start, spin faster, then slow down and stop someSC time after you stop heating it. Power supply choices If your amplifier supply already has a 12V DC rail, you could consider powering this board from it. You need to test how much current it draws with the fan(s) at maximum speed and verify that the amplifier supply can safely deliver that much current. A good alternative is to use a separate enclosed switchmode supply such as the Jaycar MP3296 (or Altronics M8728), rated at 12V and 1.3A (shown above). This is mains-powered, and it should be switched on and off with the same power switch as the amplifier itself. Keep it away from sensitive 52 Silicon Chip Fig.4: if you only need the fan speed control, you can leave off some components as shown. The insulated red wire link is needed so that the AC detection circuitry will allow normal operation whenever power is applied. Australia's electronics magazine siliconchip.com.au