Silicon Chip8Ch Learning Remote Receiver - October 2024 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: There are still TDM TLAs
  4. Feature: The life of Nikola Tesla, Part 1 by Dr David Maddison
  5. Project: 3D Printer Filament Dryer, Part 1 by Phil Prosser
  6. Feature: The new MIPI I3C Bus standard by Andrew Levido
  7. Project: 8Ch Learning Remote Receiver by John Clarke
  8. Review: MG4 XPower Electric Car by Julian Edgar
  9. Feature: 1-24V USB Power Supply by Jim Rowe
  10. Project: JMP012 - WiFi Relay Remote Control by Tim Blythman
  11. Project: JMP015 - Analog Servo Gauge by Tim Blythman
  12. Project: Dual-Rail Load Protector by Stefan Keller -Tuberg
  13. Subscriptions
  14. Project: Micromite Explore-40 by Tim Blythman
  15. Serviceman's Log: I got the power by Dave Thompson
  16. PartShop
  17. Vintage Radio: The New Zealand-made ZC1 MkII military transceiver by Dr Hugo Holden
  18. Feature: Mouser’s Australian Office by Tim Blythman
  19. Market Centre
  20. Advertising Index
  21. Notes & Errata: Automatic LQ Meter, July 2024
  22. Outer Back Cover

This is only a preview of the October 2024 issue of Silicon Chip.

You can view 45 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:
  • The life of Nikola Tesla, Part 1 (October 2024)
  • The life of Nikola Tesla, Part 1 (October 2024)
  • Nikola Tesla, Part 2 (November 2024)
  • Nikola Tesla, Part 2 (November 2024)
Items relevant to "3D Printer Filament Dryer, Part 1":
  • Filament Dryer Control PCB [28110241] (AUD $7.50)
  • PIC16F15214-I/P programmed for the 3D Printer Filament Dryer [2811024A.HEX] (Programmed Microcontroller, AUD $10.00)
  • Firmware and 3D printing (STL) files for the 3D Printer Filament Dryer (Software, Free)
  • Filament Dryer Control PCB pattern (PDF download) [28110241] (Free)
  • 3D Printer Filament Dryer drilling templates (Panel Artwork, Free)
Articles in this series:
  • 3D Printer Filament Dryer, Part 1 (October 2024)
  • 3D Printer Filament Dryer, Part 1 (October 2024)
  • 3D Printer Filament Dryer, Part 2 (November 2024)
  • 3D Printer Filament Dryer, Part 2 (November 2024)
Items relevant to "8Ch Learning Remote Receiver":
  • 8-Channel Learning Remote Recevier PCB [15108241] (AUD $7.50)
  • PIC16F1459-I/P programmed for the 8Ch Learning IR Remote (1510824A.HEX) (Programmed Microcontroller, AUD $10.00)
  • Firmware (ASM and HEX) files for the 8-Channel Learning IR Remote Receiver (Software, Free)
  • 8-Channel Learning Remote Recevier PCB pattern (PDF download) [15108241] (Free)
  • 8-Channel Learning IR Remote Receiver panel artwork and drilling templates (Free)
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 "JMP012 - WiFi Relay Remote Control":
  • Firmware for JMP012 - WiFi Relay Remote (Software, Free)
Articles in this series:
  • Wired Infrared Remote Extender (May 2024)
  • Symbol USB Keyboard (May 2024)
  • Wired Infrared Remote Extender (May 2024)
  • Thermal Fan Controller (May 2024)
  • Symbol USB Keyboard (May 2024)
  • Thermal Fan Controller (May 2024)
  • Self Toggling Relay (June 2024)
  • Self Toggling Relay (June 2024)
  • Arduino Clap Light (June 2024)
  • Arduino Clap Light (June 2024)
  • Lava Lamp Display (July 2024)
  • Digital Compass (July 2024)
  • Digital Compass (July 2024)
  • Lava Lamp Display (July 2024)
  • JMP009 - Stroboscope and Tachometer (August 2024)
  • JMP007 - Ultrasonic Garage Door Notifier (August 2024)
  • JMP009 - Stroboscope and Tachometer (August 2024)
  • JMP007 - Ultrasonic Garage Door Notifier (August 2024)
  • IR Helper (September 2024)
  • IR Helper (September 2024)
  • No-IC Colour Shifter (September 2024)
  • No-IC Colour Shifter (September 2024)
  • JMP012 - WiFi Relay Remote Control (October 2024)
  • JMP012 - WiFi Relay Remote Control (October 2024)
  • JMP015 - Analog Servo Gauge (October 2024)
  • JMP015 - Analog Servo Gauge (October 2024)
  • JMP013 - Digital spirit level (November 2024)
  • JMP013 - Digital spirit level (November 2024)
  • JMP014 - Analog pace clock & stopwatch (November 2024)
  • JMP014 - Analog pace clock & stopwatch (November 2024)
  • WiFi weather logger (December 2024)
  • Automatic night light (December 2024)
  • WiFi weather logger (December 2024)
  • Automatic night light (December 2024)
  • BIG LED clock (January 2025)
  • Gesture-controlled USB lamp (January 2025)
  • Gesture-controlled USB lamp (January 2025)
  • BIG LED clock (January 2025)
  • Transistor tester (February 2025)
  • Wireless flashing LEDs (February 2025)
  • Transistor tester (February 2025)
  • Wireless flashing LEDs (February 2025)
  • Continuity Tester (March 2025)
  • RF Remote Receiver (March 2025)
  • Continuity Tester (March 2025)
  • RF Remote Receiver (March 2025)
  • Discrete 555 timer (April 2025)
  • Weather monitor (April 2025)
  • Discrete 555 timer (April 2025)
  • Weather monitor (April 2025)
Items relevant to "JMP015 - Analog Servo Gauge":
  • Analog Servo Gauge face artwork and cutting diagram (Panel Artwork, Free)
Articles in this series:
  • Wired Infrared Remote Extender (May 2024)
  • Symbol USB Keyboard (May 2024)
  • Wired Infrared Remote Extender (May 2024)
  • Thermal Fan Controller (May 2024)
  • Symbol USB Keyboard (May 2024)
  • Thermal Fan Controller (May 2024)
  • Self Toggling Relay (June 2024)
  • Self Toggling Relay (June 2024)
  • Arduino Clap Light (June 2024)
  • Arduino Clap Light (June 2024)
  • Lava Lamp Display (July 2024)
  • Digital Compass (July 2024)
  • Digital Compass (July 2024)
  • Lava Lamp Display (July 2024)
  • JMP009 - Stroboscope and Tachometer (August 2024)
  • JMP007 - Ultrasonic Garage Door Notifier (August 2024)
  • JMP009 - Stroboscope and Tachometer (August 2024)
  • JMP007 - Ultrasonic Garage Door Notifier (August 2024)
  • IR Helper (September 2024)
  • IR Helper (September 2024)
  • No-IC Colour Shifter (September 2024)
  • No-IC Colour Shifter (September 2024)
  • JMP012 - WiFi Relay Remote Control (October 2024)
  • JMP012 - WiFi Relay Remote Control (October 2024)
  • JMP015 - Analog Servo Gauge (October 2024)
  • JMP015 - Analog Servo Gauge (October 2024)
  • JMP013 - Digital spirit level (November 2024)
  • JMP013 - Digital spirit level (November 2024)
  • JMP014 - Analog pace clock & stopwatch (November 2024)
  • JMP014 - Analog pace clock & stopwatch (November 2024)
  • WiFi weather logger (December 2024)
  • Automatic night light (December 2024)
  • WiFi weather logger (December 2024)
  • Automatic night light (December 2024)
  • BIG LED clock (January 2025)
  • Gesture-controlled USB lamp (January 2025)
  • Gesture-controlled USB lamp (January 2025)
  • BIG LED clock (January 2025)
  • Transistor tester (February 2025)
  • Wireless flashing LEDs (February 2025)
  • Transistor tester (February 2025)
  • Wireless flashing LEDs (February 2025)
  • Continuity Tester (March 2025)
  • RF Remote Receiver (March 2025)
  • Continuity Tester (March 2025)
  • RF Remote Receiver (March 2025)
  • Discrete 555 timer (April 2025)
  • Weather monitor (April 2025)
  • Discrete 555 timer (April 2025)
  • Weather monitor (April 2025)
Items relevant to "Dual-Rail Load Protector":
  • Dual Rail Load Protector PCB [18109241] (AUD $5.00)
  • Hard-to-get parts for the Dual Rail Load Protector (Component, AUD $50.00)
  • Dual Rail Load Protector PCB pattern (PDF download) [18109241] (Free)
Items relevant to "Micromite Explore-40":
  • Micromite Explore-40 PCB [07106241] (AUD $2.50)
  • Pico BackPack stereo jack socket adaptor PCB [07101222] and connectors (Component, AUD $2.50)
  • PIC32MX170F256B-50I/SO and PIC16F1455-I/SL programmed for the Micromite Explore 28 or Explore 40 (Programmed Microcontroller, AUD $25.00)
  • Micromite Explore-40 kit (Component, AUD $35.00)
  • Software for the Microbridge (Free)
  • Firmware (HEX) file and documents for the Micromite Mk.2 and Micromite Plus (Software, Free)
  • Micromite Explore-40 PCB pattern (PDF download) [07106241/07101222] (Free)

Purchase a printed copy of this issue for $13.00.

By John Clarke 8-Channel Learning IR Remote Receiver This eight-channel relay board can have its outputs switched on and off using almost any remote control, including universal types. Each output can be set to toggle on or off, switched on for a fixed period, or on while the button is held down. The outputs can be controlled by an onboard reed relay or a transistor; the latter can switch external relays. W ith so many appliances operated using infrared (IR) remote controls, you are bound to have at least one remote that is not used anymore. With our 8-Channel Learning IR Remote Receiver, it can be put back in service to provide control over eight separate relay outputs to control low-voltage DC or AC devices. Many different kinds of remote control can operate the Receiver; you can even use it with multiple remotes. It learns the remote control code to switch each of its eight outputs. You could use a different remote control unit for each output if you wanted to. Most people would use a single remote control, though. Remote controls transmit signals using specific IR protocols. These are usually transmitted using an infrared LED that is modulated on and off at between 36kHz and 40kHz. The modulated signal is switched on and off in a pattern with a start code, followed by address and command codes (visible in Scopes 1 to 4). The address determines what appliance the code is to control, such as a TV, satellite decoder, DVD player, amplifier etc. The command code indicates what function is to operate. This can be power on or off, channel selection, volume up, volume down, mute etc. Our Receiver can be used with remotes that produce signals in the NEC, Sony, RC5 and RC6 remote control protocols. More information about these is in a panel overleaf titled “Infrared Coding”. Many remotes will use one of those protocols. The controller has eight separate outputs, and each one can be switched using a separate code. Each channel can either be controlled by a reed relay (normally open contacts) or an open-collector transistor. Reed relays can be used for all channels, open Fig.1: driving an external LED from an open-collector output. With a 12V supply, the 390W resistor will limit the current to around 25mA. Fig.2: an opto-coupler’s outputs are triggered by an internal LED, so driving them is basically the same as driving LEDs. Fig.3: no series resistor is required if the coil is rated at 12V DC when driving an external relay from an open-collector output. 44 Silicon Chip Australia's electronics magazine siliconchip.com.au Features Learns infrared remote control codes from a handheld IR remote Supports four different IR protocols 1-8 output channels controlled by reed relays or open-collector transistors Can be used with external relays (12V DC coil types) Eight LED channel status indicators Momentary or toggle operation on each output Adjustable timer for momentary outputs (125ms to 32s) Timer settings are shown on an 8-LED dot bargraph Specifications IR reception range: typically 10m Power supply: 12V DC at 150mA+ (external relays may require more current) Output switching: up to 24V <at> 500mA IR codes supported: learns NEC, Sony and Philips RC5/RC6 remote protocols Momentary mode: 16 timer values, from 125ms to 32 seconds Output toggle rate: minimum cycle time of 600ms Oscillator frequency adjustment: ±6% in 128 steps Power-on indication: dimmed LED collector outputs for all channels or a mixture of the two. Both output types can switch LEDs or other low-current loads. Alternatively, the transistor outputs can drive relays with 12V DC coils and contacts that can handle higher voltages and/ or currents. You don’t need to build the controller with all eight outputs if you don’t need them; just make it with fewer if that’s all you need. Outputs The reed relays are ideal for switching low voltages (up to 24V maximum) and currents up to 500mA. They can be used to trigger pushbutton switches on equipment by wiring the reed relay contacts across the switch. A reverse-biased diode should be connected across the relay’s contacts if switching inductive loads. Never use the onboard reed relays to switch mains voltages directly. Neither the relays nor the PCB tracks can handle that. If you need to switch higher voltages, use the open-collector transistor outputs to switch appropriately-rated external relays. Any external relays used for mains switching must be built to comply with mains voltage safety standards, including using correctly rated wire of the right colour and adequate insulation. Figs.1-4 show a few different ways you can use the eight outputs when they are driven by open-collector transistors. Fig.1 shows how you can drive an external LED, Fig.2 shows how an external opto-coupler can be switched, Fig.3 shows how to drive an external relay and Fig.4 shows how you can switch off or control the direction of a motor. With the motor, you can use the channels with the outputs set for momentary or toggle operation. In the momentary mode, pressing (and holding) the button for open-collector output X activates RELAY 1 and causes the motor to rotate one way, while pressing the button for output Y activates RELAY 2 and causes the motor to rotate the other way. With both outputs set for toggle operation, the motor will be stopped until one of the outputs is toggled. Its direction of rotation will depend on which output is switched on. The motor can then be reversed by toggling both outputs, or stopped by toggling either output. Scope 2: an oscilloscope capture of the output of IRD1 when receiving a Philips RC5-coded signal. Scope 3: an oscilloscope capture of the output of IRD1 when receiving a Sony-coded signal. Remote control protocols Scope grabs 1-4 show captured waveforms for decoded IR signals transmitted in the RC6, RC5, Sony and Fig.4: a simple method to control the direction of a motor using two external relays, driven from two of the Receiver’s outputs. siliconchip.com.au Scope 1: an oscilloscope capture of the output of IRD1 when receiving a Philips RC6-coded signal. Australia's electronics magazine Scope 4: an oscilloscope capture of the output of IRD1 when receiving an NEC-coded signal. October 2024  45 A panel on Infrared Coding Most infrared controllers switch their LED on and off at a modulation frequency of 36-40kHz in bursts (pulses), with the length of and space between each (pauses) indicating which button was pressed. The series of bursts and pauses is in a specific format (or protocol) and there are several commonly used. This includes the Manchester-encoded RC5 and RC6 protocols originated by Philips. There is also the Pulse Width Protocol used by Sony and Pulse Distance Protocol, originating from NEC. For more details, see application note AN3053 by Freescale Semiconductors (formerly Motorola): siliconchip.com.au/link/aapv NEC protocols, respectively. These waveforms were taken from the output of IRD1. The 36-40kHz modulation was removed by the receiver; its output is low during the modulated burst and high when there is a pause in modulation. Scope 5 shows the repeat pulses for the NEC protocol that follow the initial main code if the remote control button is held down. For the remaining protocols (RC5, RC6 and Sony), holding down the remote control button simply repeats the code that is initially sent. More details are provided in the “Infrared Coding” panel. Momentary & toggle modes Each output can be set for momentary or toggle operation. With the momentary selection, an output and its associated LED switch on when the remote control button is pressed, then off again after a set period from ⅛th of a second (125ms) to 32 seconds. The timer period can be elongated by holding down the remote control button, in which case the timer starts when the button is released. In toggle mode, the output switches on with one press of an IR remote button, and it remains on until the same button is pressed again, whereupon it switches off. During the IR code learning procedure, a pushbutton switch on the controller board selects momentary or toggle operation for each output. For channels set to momentary mode, the on-time period is set at the same time, using a trimpot, with the front panel LEDs indicating the period selected. 46 Silicon Chip Philips RC5 (Manchester-encoded) (36kHz) For this protocol, the 0s and 1s are transmitted using 889µs bursts and pauses at 36kHz. A ‘1’ is an 889µs pause then an 889µs burst, while a ‘0’ is an 889µs burst followed by an 889µs pause. The entire data frame has start bits comprising two 1s followed by a toggle bit that could be a 1 or 0. More about the toggle bit later. The data comprises a 5-bit address followed by a 6-bit command. The most significant address and command bits come first. When a button is held down, the entire sequence is repeated at 114ms intervals. Each repeat frame is identical to the first. However, if transmission stops, then the same button is pressed again, the toggle bit changes. This informs the receiver as to how long the button has been held down. That’s so it can, for example, know when to increase volume at a faster rate after the button has been held down for some time. Sony Pulse Width Protocol (40kHz) This is also known also as SIRC, which is presumably an acronym for Sony Infra Red Code. For this protocol, the 0s and 1s are transmitted with a differing overall length. The pause period is the same at 600µs, but a ‘1’ is sent as a 1200µs burst at 40kHz, followed by a 600µs pause, while a ‘0’ is sent as a 600µs burst at 40kHz followed by a 600µs pause. The entire data frame starts with a 2.4ms burst followed by a 600µs pause. The 7-bit command is then sent with the least significant bits first. The address bits follow, again with least significant bits first. The address can be five bits, eight bits or 13 bits long to make up a total of 12, 15 or 20 bits of data. Repeat frames are the entire above sequence sent at 45ms intervals. NEC Pulse Distance Protocol (PDP) (38kHz) For the NEC infrared remote control protocol, binary bits zero and one both start with a 560µs burst modulated at 38kHz. A logic 1 is followed by a 1690µs pause while a logic 0 has a shorter 560µs pause. The entire signal starts with a 9ms burst and a 4.5ms pause. The data comprises the address bits and command bits. The address identifies the equipment type that the code works with, while the command identifies the button on the remote control which was pressed. The second panel shows the structure of a single transmission. It starts with a 9ms burst and a 4.5ms pause. This is then followed by eight address bits and another eight bits which are the “one’s Australia's electronics magazine siliconchip.com.au complement” of those same eight address bits (ie, the 0s become 1s and the 1s become 0s). An alternative version of this protocol uses the second series of eight bits for extra address bits. The address signal is followed by eight command bits, plus their 1’s complement, indicating which function (eg volume, source etc) should be activated. Then finally comes a 560µs “tail” burst to end the transmission. Note that the address and command data is sent with the least significant bit first. The complementary command bytes are for detecting errors. If the complement data value received is not the complement of the data received then one or the other has been incorrectly detected or decoded. A lack of complementary data could also suggest that the transmitter is not using the PDP protocol. After a button is pressed, if it continues to be held down, it will produce repeat frames. These consist of a 9ms burst, a 2.25ms pause and a 560µs burst. These are repeated at 110ms intervals. The repeat frame informs the receiver that it may repeat that particular function, depending on what it is. For example, volume up and volume down actions are repeated while the repeat frame signal is received but power off or mute would be processed once and not repeated with the repeat frame. Codes learned are stored in non-­ volatile flash memory. This ensures that the IR codes and other settings like momentary/toggle and the timer period are not lost if the power is cycled. All outputs are initially off when power is applied to the Receiver. The 8-Channel Learning IR Remote Receiver fits neatly into a compact instrument enclosure. An acknowledge (ACK) LED and the eight channel status LEDs are mounted on the front, while the power input and channel output connections are at the rear. A 12V DC plugpack or similar supply powers the Receiver. Circuit details Philips RC6 (Manchester-encoded) (36kHz) 0s and 1s are transmitted using 444μs bursts with 444μs pauses at 36kHz. The entire data frame has start bits comprising a 2.666ms burst followed by a pause for 889μs, then a ‘1’ bit. After this, there is a 3-bit mode value, typically 000. The toggle bit comes after that; it uses an 889μs burst and 889μs pause instead of the 444μs used for the Mode, Address and Command bits. The data is an 8-bit address followed by an 8-bit command, with the most significant bits first. The same sequence is repeated at 106ms intervals when a button is held down. If transmission stops and the same button is pressed again, the toggle bit changes state. This lets the receiver determine how long the button was held down. Referring to the circuit diagram, Fig.5, an infrared receiver (IRD1), sends signals to a PIC16F1459 microcontroller (IC1), which drives reed relays, NPN transistors or a combination of both, depending on how you configure the PCB. IRD1 includes an infrared detector, amplifier, bandpass filter (typically centred around 38kHz) and an automatic gain control (AGC). IRD1’s output is normally high (5V) but goes low (near 0V) when it receives a 38kHz IR signal. This means that the infrared receiver removes the 38kHz modulation, with the output staying low for the duration of the frequency burst. The supply for IRD1 is derived via a 100W resistor from the 5V rail and it is decoupled by a 100µF electrolytic capacitor. This is to keep electrical noise out of the supply for IRD1; it requires a steady supply as it contains a sensitive, high-gain amplifier. The infrared signal is modulated so that the detector will ignore other infrared sources, such as halogen lamps, bar radiators and the sun. Bar Scope 5: the repeat code sent by an NEC-style remote control when you hold down a button. siliconchip.com.au Australia's electronics magazine October 2024  47 Fig.5: the main part of the circuit comprises microcontroller IC1, infrared receiver IRD1, a few LEDs and pushbuttons and a simple linear power supply. While there are eight output sections, only two are shown; the other six are identical. Each section can either have a reed relay (as shown in the boxes in the middle) or a transistor and diode (as shown on the right). radiators and halogen lamps produce a modulated signal at 100Hz (for 50Hz mains), while the sun produces a constant level of infrared that can vary slowly over time. These are all removed by the bandpass filter within IRD1. Many general-purpose IR detectors centre the filter at 38kHz, allowing a frequency range from 36kHz to 40kHz to be received without too much attenuation from the bandpass filter. There may be a small amount of attenuation that reduces the reception range slightly, but not to any significant extent. RC5 and RC6 encodings use 36kHz modulation, NEC uses 38kHz and Sony uses 40kHz. These varying frequencies mean we have to compromise with the infrared detector for it to work with all these protocols, with 38kHz being the best bet as it’s in the middle of the range. 48 Silicon Chip IRD1’s output goes to the RA0 digital input of microcontroller IC1 (pin 19), which decodes the demodulated signal pulses and drives the outputs according to the infrared code sent by the handheld remote. Each output channel includes an indicator LED, driven via a 1kW resistor, and either a 100W resistor to drive a reed relay or a 470W resistor going to the base of an NPN transistor. If a reed relay is used, a reverse-­ biased diode (D11-D18) clamps the back-EMF voltage from the relay’s coil as it switches off. If an output transistor is used instead, a diode (D1-D8) clamps the back-EMF produced by any external relay coil it might be driving. Whenever the transistor is turned on, the external relay will be on. The circuit shows one output driven by the RC6 digital output (pin 8) and one driven by the RA5 digital output Australia's electronics magazine (pin 2), but six other outputs are also available, for a total of up to eight. Any output configured as an open-collector type provides a +12V terminal suitable for driving an external 12V DC coil relay. This comes from the power input socket (CON9) via reverse-polarity protection diode D9. The acknowledge (ACK) LED, LED9, is driven from IC1’s RC2 digital output and flashes whenever an infrared signal is received. LED9 doubles up as a power indicator by glowing at about 6% brightness when an IR signal is not being received. The ACK LED also provides indications during the process of learning infrared codes; more on that later. Pushbutton switches S1, S2 and S3, connected to IC1’s RB5, RB6 and RA1 digital inputs, are used during the learning process. Those three inputs are held high (at +5V) unless pulled siliconchip.com.au A bird’s eye view of the Learning Remote Receiver. The CON1-CON4 outputs are driven by transistors in this case, and CON5-CON8 by relays. The board allows either style to be used to drive any of the eight outputs. to 0V when the corresponding button is pressed. The RA1 input is pulled high via a 10kW resistor to the 5V supply, while the RB5 and RB6 inputs are held high by pullup currents provided internally by IC1. Trimpots VR1 and VR2 provide adjustments for the timer and IC1’s oscillator. These connect to the AN5 and AN4 analog inputs, and IC1 converts the voltage at the wiper of each trimpot to a digital value. VR1 allows the timer for each channel to be adjusted from ⅛th of a second to 32 seconds. Frequency adjustment VR2 allows IC1’s internal oscillator to be trimmed. Typically, it is set to its mid position so IC1’s internal oscillator runs at the factory calibration rate (usually within 3% of nominal at 25°C). This oscillator is used as the siliconchip.com.au time base for decoding the IR codes. Having an accurate time base provides reliable IR code detection. While handheld IR remotes should transmit according to timing specifications, the timing can vary between remotes because many use a relatively inaccurate ceramic resonator for timing. These are used since they are cheaper than crystals and also smaller. The accuracy for low-cost versions is typically ±5%. While IC1’s decoding of IR signals does have some tolerance, having the adjustment allows for extra variation. VR2 can be adjusted to accommodate variations in IC1’s oscillator as well as the IR remote control’s. It allows IC1’s frequency to be adjusted by ±6% in 128 steps. The 5V supply for IRD1 and IC1 comes from REG1, a 78L05 regulator. A 100µF electrolytic capacitor bypasses Australia's electronics magazine its input, while a 10µF capacitor filters its output. IC1’s supply is also bypassed by a 100nF capacitor close to its supply pins. Construction All parts are installed on a PCB coded 15108241 that measures 130 × 101.5mm. This can be housed in a 140 × 110 × 35mm plastic case, with optional panel labels affixed to the front and rear panels. Fig.6 shows the layout of the parts on the PCB with all eight reed relays fitted. In contrast, Fig.7 shows the identical layout but with open-­ collector transistor outputs suitable for driving external 12V DC relays or other 12V loads. You can mix and match the two output types, and you don’t have to populate all eight outputs. As shown in the photos of our prototype, we installed open-collector October 2024  49 Fig.6: the PCB populated with eight reed relays. With these relays, the outputs are not polarised. You don’t need to install all eight relays if you need fewer. transistor outputs for the first four channels and relays for the last four channels. Regardless of whether you populate all eight outputs, you should fit LED1 to LED8 and their associated 1kW resistors. As well as showing activated channels, they display the selected timeout period during the learning procedure. Begin assembly by fitting the resistors. The parts list shows the resistor colour codes, but you should also check their values using a DMM before soldering them to the PCB. Be sure to fit the correct values for resistors R1-R8: 100W for reed relays or 470W for open-collector transistor outputs. Keep the lead off-cuts, as you may need them later. The diodes can go in next. D11-D18 are 1N4148 types, while D1-D9 are 1N4004s. Take care that the diodes are all orientated correctly. Next, install the 20-pin DIL socket for IC1 (notched end to the lower edge of the PCB). The capacitors can then be soldered in place, ensuring that the three electrolytics are orientated correctly. The 100nF capacitor can be fitted either way around. Follow by installing the DC socket (CON9) and switches S1, S2 and S3. After that, fit transistors Q1-Q8 and/ or relays RLY1-RLY8 with the notched ends downwards. Be sure to place REG1 (78L05) in the correct position. It has the same TO-92 body as the transistors. Jumper wires JP1-JP8 can now be installed in any channels where a transistor is fitted. These only need to be very short (less than 5mm) and can be fashioned from resistor lead off-cuts bent in a ‘U’ shape. Trimpots VR1 & VR2 can be installed now, along with screw terminals CON1-CON8. Ensure that the terminals sit flush against the PCB and that their wire entry holes are toward the board’s top edge before soldering their pins. LEDs & infrared detector Fig.7: this is like Fig.6 but all eight output sections have been populated with transistors. They can drive external loads directly or be used to control external relays. You can also mix and match relays and transistors. The wire links feed 12V to the left side of the terminals (marked +). 50 Silicon Chip Australia's electronics magazine LED10 can be installed with its body a millimetre or two above the PCB. Be sure to install it with the correct polarity: the longer anode lead goes to the left, as indicated on the overlay diagrams. Mount the remainder of the LEDs, as shown in Fig.8. Their leads must be bent down by 90° 6mm from their bodies. That’s best done using a 6mm-wide cardboard siliconchip.com.au Fig.8: bend LED1-LED9 like this so they will reach the holes in the front panel. Make sure you bend the leads in the right direction so that the longer (anode) leads will be on the left when mounted on the PCB, as shown in Figs.6 & 7. Fig.9: similarly, by bending the IR receiver leads like this, it will reach the associated hole in the front panel. Using Figs.8 & 9, and this photo as a reference, the LEDs and IR receiver need to bent so they fit into the front panel. template. Make sure that each LED’s cathode (K) lead (the shorter of the two) is towards you before bending it as shown. That way, the LEDs go in with the correct polarity, with the anode to the left-most hole in the PCB. Don’t solder the LEDs to the PCB at this stage. We’ll do that later, with the PCB in the case. Having prepared the LEDs, you can now bend the infrared detector’s leads as shown in Fig.9. Solder it in place with the centre of its lens 9.5mm above the PCB. need to drill 6mm diameter holes for the nine LEDs and their bezels, as well as for the infrared receiver, IRD1. The holes in the rear panel are for cable glands and the DC socket. We used two glands, but the total number can be increased if you can’t fit all the output wiring through just two glands. Their holes should be at least 22mm apart in the region shown. The 12mm holes for the glands are best made using a small pilot drill to begin with, carefully enlarged to size using a tapered reamer. Drilling the case Final assembly The next step is to drill the front and rear panels of the enclosure. The drilling template, Fig.10, shows where the holes are located and their sizes. You Once all the holes have been drilled, the PCB can be placed into the case. The nine LEDs can then be adjusted by cutting the leads shorter if they hit the base of the case. Next, insert the LEDs into the front panel holes (without the LED bezels initially) and fit the PCB and front panel into the enclosure. Check that each LED is correctly orientated and that it protrudes through its front panel hole before soldering its leads on the top of the PCB. Once they have all been soldered, remove the board and also solder them on the underside of the PCB, then trim the leads further. Now check that the infrared detector’s lens aligns correctly with its frontpanel hole. If not, bend its leads until it’s centred. Testing Apply power using a 12V DC plugpack and check that the voltage Fig.10: the front and rear panel drilling details. These diagrams can be printed/copied at actual size and used as templates. We drilled two 12mm holes for cable glands, but you can have up to four if needed. Ensure they’re in the specified zone and a minimum of 22mm apart. All dimensions are in millimetres. October 2024  51 between pins 1 and 20 of IC1’s socket is close to 5V (4.85-5.15V). If no voltage is present, check diode D9’s polarity and the polarity of the 12V DC supply (the centre of the plug should be positive). Also ensure that REG1 is correctly orientated and all leads have been correctly soldered to their PCB pads. If the supply checks out, switch off the power and install IC1, ensuring that its notched end faces toward the front and all its pins correctly go into the socket. Set VR2 to its mid position. VR1 can be set fully anti-clockwise initially, for a 125ms timeout, so it is easier to check the momentary and toggle operations for the channel outputs. Learning codes The 8-Channel Learning IR Remote Receiver can learn infrared codes matching NEC, Sony, RC5 and RC6 protocols. These are commonly used in many handheld IR remote controls. Each channel should be programmed using a different button on the handheld remote. You don’t have to use the same remote to operate each channel. You can use different remote controls, provided they produce one of the supported protocols. Once you start the learning mode, you have 20 seconds to finish this procedure before it times out and returns to the normal operating mode. To program each channel, press the Program switch (S1). This will fully Parts List – 8-Channel IR Remote Receiver 1 double-sided PCB coded 15108241, 130 × 101.5mm 1 140 × 110 × 35mm plastic case [Jaycar HB5970, Altronics H0472] 2 panel labels, 131 × 28mm (optional) 1 12V DC plugpack rated at 150mA or more (see text) 3 SPST vertical tactile switches with ~0.7mm actuators (S1-S3) [Jaycar SP0600, Altronics S1122] 8 2-way screw terminals, 5.08mm pitch (CON1-CON8; as required) 1 2.1mm or 2.5mm inner diameter PCB-mount DC socket to suit plugpack (CON9) 2 10kW mini top-adjust trimpots (VR1, VR2) [Jaycar RT4360, Altronics R2480B] 2 cable glands for 3-6.5mm cable [Jaycar HP0720, Altronics H4380] 1 20-pin DIL IC socket 9 5mm LED bezels 4 No.4 self-tapping screws Semiconductors 1 PIC16F1459-I/P microcontroller programmed with 1510824A.HEX (IC1) 1 TSOP4838 or similar 36-38kHz IR receiver (IRD1) [Jaycar ZD1952/ZD1953, Altronics Z1611A] 1 78L05 5V 100mA regulator (REG1) 8 high-brightness 5mm red LEDs (LED1-LED8) 2 high-brightness 5mm green LEDs or other colour (LED9, LED10) 1 1N4004 1A diode (D9) Capacitors 2 100μF 16V PC electrolytic 1 10μF 16V PC electrolytic 1 100nF 50V MKT polyester or MLCC Resistors (all ¼W, 1% axial) 1 10kW 11 1kW 1 100W Extra parts for reed relay outputs (per output, up to 8 total) 1 SPST DIP 5V reed relay (RLY1-RLY8) [Jaycar SY4030, Altronics S4100] 1 1N4148 75V 200mA diode (D11-D18) 1 100W ¼W 1% axial resistor (R1-R8) Extra parts for open-collector transistor outputs (per output, up to 8 total) 1 BC337 65V 100mA NPN transistor (Q1-Q8) 1 1N4004 1A diode (D1-D8) 1 470W ¼W 1% axial resistor (R1-R8) 52 Silicon Chip Australia's electronics magazine light the ACK LED on the front panel. One of the channel LEDs will also be lit, showing the currently selected channel. Initially, this will be channel 1, but other channels can be selected by pressing the Channel switch (S2). Each press will choose the next channel; after 8, it will return to channel 1. The Momentary/Toggle (MOM/ TOG) LED will indicate the current selection for that channel. It lights for 125ms every second to show the momentary selection, or lights solid to show the toggle option is selected. Pressing S3 selects between momentary and toggle action. When momentary is selected, the time the channel is on (once programmed) is set by the timer. The timer value for the selected channel is adjusted using VR1. Timer values range from 125ms to 1s in eight 125ms steps, then options of two, three, four, five, six, eight, 16 and 32 seconds. To set the timer, press and hold the MOM/TOG switch for at least 600ms. This will change the channel LEDs from showing the selected channel to displaying the chosen timer period instead. If VR1 is fully anti-clockwise, none of the channel LEDs will light, but the ACK LED will be fully lit. For other timer periods, the ACK LED will be off, and the 8-channel LEDs will show the timer setting as per Fig.11, like a dot bargraph. Adjust VR1 for the timer period required. When S3 is released, the channel display and ACK LED will siliconchip.com.au return to showing the selected channel and fully lit ACK LED to indicate that it is still in the programming mode. The MOM/TOG LED will flash to show that momentary action is selected. If you decide to change to toggle, press S3 again and the LED will stay lit, indicating toggle mode. In this case, the timer for that channel is inactive. Once the channel has been selected and the timer adjusted (or toggle enabled), press S1. This makes it ready to receive an infrared signal from the handheld remote. The ACK LED will flash in readiness, with the LED lighting for 125ms every two seconds. A lack of flashes indicates that the Receiver hasn’t accepted the code as valid. It will flash at 1Hz with a 50% duty cycle. Point the handheld remote toward the receiver and press a button on the handheld remote. If the IR code is valid, the ACK LED will flash once for an NEC code, twice for a Sony code, three times for an RC5 code and four times for an RC6 code. If you are sure that the code from the remote should be valid, try adjusting the VR2 frequency adjustment trimpot to check if the code becomes valid. You will need to select the learning mode (S1) each time to test this. Use small changes over the full range of VR2 before rejecting the remote as unsuitable. If the code is accepted as valid, the channel LED will light when the programmed button on the handheld remote is pressed again. For toggle mode, the channel will be on with one press of the handheld button and be off on the next press. For momentary operation, the channel will be on for the timer’s duration. In momentary mode, if the handheld Up to four cable glands can be fitted for the wiring to CON1-CON8 although we found two sufficient. remote button is continuously pressed, the channel will remain on until after the button is released, plus the timer period. If you find that the unit doesn’t operate reliably or only works with certain orientations of the remote, it may be due to reception frequency tolerances. In that case, it’s just a matter of altering IC1’s frequency with VR2 to improve the IR code detection. Panel labels Assuming it’s all working correctly, all that remains now is printing out and fitting the front and rear panel labels. They are shown in Fig.12 but are also available as a PDF download from siliconchip.au/Shop/11/468 Information on making front panel details is available on the Silicon Chip website at siliconchip.com.au/Help/ FrontPanels Once you have made the labels, affix them in position and cut out the holes using a sharp hobby knife. For the front panel, insert the LED bezels from the front and insert the LEDs from the rear. The PCB is held in place with No.4 self-tapping screws into the four integral mounting posts at the bottom SC of the case. Fig.11 (left): as you adjust VR1 to set the timing for a momentary output, the LEDs will show the current setting like this. Rotate VR1 while holding S3 until the LEDs show your desired output ontime, then release S3. Fig.12 (right): the front and rear panel labels. These can also be downloaded as a PDF from siliconchip.au/ Shop/11/468 siliconchip.com.au Australia's electronics magazine October 2024  53