Silicon ChipInfrared Remote Control Assistant - July 2020 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: The paperless office... and working from home
  4. Feature: Subtractive Manufacturing by Dr David Maddison
  5. Review: A 100kHz - 500MHz digital RF Power Meter by Jim Rowe
  6. Project: The all-new Colour Maximite 2 by Geoff Graham & Peter Mather
  7. Review: Low-cost pocket DAB+ receiver. Is it any good? by Jim Rowe
  8. Project: Ol' Timer II by Tim Blythman
  9. Serviceman's Log: Well-designed thoughtlessness by Dave Thompson
  10. Feature: Vintage Workbench by Alan Hampel
  11. Project: Infrared Remote Control Assistant by John Clarke
  12. Project: Digital/Touchscreen RCL Substitution Box, Part 2 by Tim Blythman
  13. PartShop
  14. Vintage Radio: Loewe's 1927 OE333: simplicity itself by Ian Batty
  15. Product Showcase
  16. Market Centre
  17. Advertising Index
  18. Notes & Errata: H-field Transanalyser, May 2020; Nutube Guitar Overdrive & Distortion Pedal, March 2020; Super-9 FM Radio, November-December 2019; Ultra Low Noise Remote Controlled Stereo Preamp, March-April 2019
  19. Outer Back Cover

This is only a preview of the July 2020 issue of Silicon Chip.

You can view 39 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.

Items relevant to "The all-new Colour Maximite 2":
  • Colour Maximite 2 PCB [07107201] (AUD $10.00)
  • Colour Maximite 2 front & rear panels (PCB, AUD $10.00)
  • Colour Maximite 2 software and documentation (Free)
  • Colour Maximite 2 PCB pattern (PDF download) [07107201] (Free)
  • Colour Maximite 2 front and rear panel cutting diagrams and front panel artwork (PDF download) (Free)
Articles in this series:
  • The all-new Colour Maximite 2 (July 2020)
  • The all-new Colour Maximite 2 (July 2020)
  • The Colour Maximite 2 – part two (August 2020)
  • The Colour Maximite 2 – part two (August 2020)
Items relevant to "Ol' Timer II":
  • Ol' Timer II PCB [19104201] (AUD $5.00)
  • PIC16F1455-I/SL programmed for the Ol' Timer II [1910420A.HEX] (Programmed Microcontroller, AUD $10.00)
  • DS3231 real-time clock IC (SOIC-16) (Component, AUD $7.50)
  • WS2812 8x8 RGB LED matrix (Component, AUD $12.50)
  • Ol' Timer II laser-cut case pieces and spacer (PCB, AUD $7.50)
  • Firmware and source code for the Ol' Timer II word clock (Software, Free)
  • Ol' Timer II PCB pattern (PDF download) [09104201] (Free)
Items relevant to "Vintage Workbench":
  • Tektronix T-130 LC Meter Supplemental Materials (Software, Free)
Articles in this series:
  • Vintage Workbench (June 2020)
  • Vintage Workbench (June 2020)
  • Vintage Workbench (July 2020)
  • Vintage Workbench (July 2020)
  • Vintage Workbench (August 2020)
  • Vintage Workbench (August 2020)
Items relevant to "Infrared Remote Control Assistant":
  • Infrared Remote Control Assistant PCB (Jaycar case version) [15005201] (AUD $5.00)
  • Infrared Remote Control Assistant PCB (Altronics case version) [15005202] (AUD $5.00)
  • PIC16F1459-I/P programmed for the Infrared Remote Control Assistant [1500520A.HEX] (Programmed Microcontroller, AUD $10.00)
  • Firmware and source code for the Infrared Remote Control Assistant [1500520A.HEX] (Software, Free)
  • Infrared Remote Control Assistant PCB patterns (PDF download) [15005201-2] (Free)
  • Infrared Remote Control Assistant panel artwork and drilling templates (PDF download) (Free)
Items relevant to "Digital/Touchscreen RCL Substitution Box, Part 2":
  • Touchscreen RCL Box resistor PCB [04104201] (AUD $7.50)
  • Touchscreen RCL Box capacitor/inductor PCB [04104202] (AUD $7.50)
  • PIC32MX170F256B-50I/SP programmed for the Touchscreen RCL Box (Programmed Microcontroller, AUD $15.00)
  • Micromite LCD BackPack V3 complete kit (Component, AUD $75.00)
  • Firmware (HEX) files and BASIC source code for the Touchscreen RCL Box [RCLBox.hex] (Software, Free)
  • Touchscreen RCL Box PCB patterns (PDF download) [04104201-2] (Free)
Articles in this series:
  • Our new RCL Subsitution Box has touchscreen control (June 2020)
  • Our new RCL Subsitution Box has touchscreen control (June 2020)
  • Digital/Touchscreen RCL Substitution Box, Part 2 (July 2020)
  • Digital/Touchscreen RCL Substitution Box, Part 2 (July 2020)

Purchase a printed copy of this issue for $10.00.

Infrared Remote Control Assistant Remote controls are handy, but sometimes equipment makes their use quite clunky. Selecting between live TV, DVD/Blu-ray, pay-TV and internet streaming on a television often requires you to press several different buttons in sequence. Now, these sequences can be performed at the press of a single button using the Infrared Remote Control Assistant. By John Clarke I t’s even more annoying when the multiple steps require the use of more than one remote control. If you have several sources connected to your TV, you may need to open the ‘source’ menu and use the up or down or left and right buttons on its remote control to select the source and then press ‘Enter’ to select that input. There can be even more presses involved to access internet streaming such as from SBS On Demand and ABC iview. This may be OK for you (you probably set the TV up!), but your spouse, parents and friends probably don’t appreciate the complexity, and may well not be able to figure out how to do this. The IR Remote Control Assistant helps solve this. It vastly simplifies the procedures by recording the sequence and then replaying it whenever a button is pressed. It isn’t useful just for these complex remote control sequences either. It can also perform the same task as a single button press on multiple remotes, so you can perform common tasks without having to go to the device’s specific remote control. For example, you might want to set up the IR Remote Control Assistant to provide volume control as well as handling complex sequences. What about learning remotes? Many universal remote controls have a learning function, but they are designed to provide a single function for each button switch. They can’t store a long sequence of infrared codes. With the IR Remote Control Assistant, there are eight push button switches and each can be used to store separate infrared remote control sequence procedures in memory. It not only stores the codes required in the right sequence, but also the delay between each button press. This may be important as some sequences require you to wait until the device is ready to proceed with more button presses. 76 Silicon Chip It can typically store up to 100 separate remote control codes in each sequence (ie, up to 800 codes total). Sequences can run for up to about two and a half minutes, although the total time may be reduced if there are many complex codes involved. For example, for ten typical button presses, the maximum sequence time is two minutes and 36 seconds but for 50, it drops to about one minute and 20 seconds. In practice, you’re unlikely to require a code sequence so long in either number of codes or time duration that you run out of memory. And the unit can record eight separate sequences; each is allocated its own memory space. Presentation The IR Remote Control Assistant is housed in a remote control case that has a separate battery compartment. The eight sequence pushbuttons are on top, while at the front is the infrared (IR) LED that sends the codes to the TV or other device. There is also an IR receiver used to receive the infrared codes for recording sequences. A small switch is included to select between the record or play mode, while a visible-light LED indicates operation. The IR Remote Control Assistant is easy to use. Once it has been programmed, just press one of the eight pushbuttons to replay a stored IR sequence. The LED indicator flashes in response to the code being sent. While the IR Remote Control Assistant is playing back an infrared sequence, it can be stopped by pressing any button. Programming sequences is also quite easy; this is described below, after the construction section. Circuit description The full circuit is shown in Fig.1. It’s based around 8-bit microcontroller IC1, which is the electronic ‘brains’ behind the IR Remote Control Assistant. While we’ve often used the PIC16F88 in the past, that part is now no longer rec- Australia’s electronics magazine siliconchip.com.au Features & specifications • • • • • • • • • • • • Deep memory storage 666.66ns sampling resolution Eight separate independent selections available Up to 100 separate IR code storage possible per procedure 174s (2m 54s) maximum record time per procedure 34.4kHz to 41.66kHz modulation adjustment range, in 15 steps Easy learning or record function Automatic memory erase before recording on each selection Bulk erase of all eight selections available Indicator LED Adjustable infrared modulation frequency Battery powered, with low standby current (3.3µA typical) ommended for new designs and is becoming more expensive. The PIC16F1459 has a lot more features but despite that, it is cheaper. IC1 stores the programmed code sequences in 1Mbit serial RAM chip IC2. Remote control codes from other devices are picked up by infrared receiver IRR1 and fed straight to the RA5 digital input of IC1 (pin 2). IRR1’s 5V power supply is switched by Mosfet Q1 and filtered using a 47W series resistor and 10µF bypass capacitor, to provide clean power to IRR1; it is sensitive to supply noise. Mosfet Q1’s gate is driven directly from the RC4 digital output of IC1 (pin 6). As Q1 is a Pchannel Mosfet, IRR1 is powered when pin 6 is low, and switched off to save power when pin 6 is high. When transmitting infrared remote control code sequences, IC1 drives its RC5 digital output (pin 5) high. This forward-biases NPN transistor Q3’s base-emitter junction, with the current limited to a few milliamps by its 1kΩbase resistor. When switched on, Q3 sinks about 25mA from the cathode of infrared LED1. It does this in pulses, so the average LED current is less than 10mA during pulses and less if averaged over the whole transmission. The RC5 output is a pulse width modulated (PWM) output running at close to a 32% duty cycle. Trimpot VR1 adjusts the modulation frequency for infrared LED1. The voltage at its wiper is converted to a digital value at the AN8 analog input of IC1 (pin 8). After processing, this value provides a modulation frequency for RC5 between 34.4kHz when fully anticlockwise and 41.66kHz when fully clockwise. siliconchip.com.au Infrared remote controls tend to use a frequency of either 36kHz, 38kHz or 40kHz. The adjustment is provided to obtain the best results during use. Typically, setting the frequency to 38kHz (mid-position of VR1) will suit all IR receivers, provided the Assistant is reasonably close to the receiver. More range might be available at a different frequency setting selected with VR1. The LED indicator (LED2) lights up in response to the IR code during the recording of infrared signals and as a sending data indicator when replaying infrared signals. It is driven via the RC3 output (pin 7) via a 1kΩ resistor. The RC3 output also powers up one side of VR1 when set high, saving 0.5mA the rest of the time. Button sensing Pushbutton switches S1-S9 are connected in a 3 x 3 matrix with the RC0, RC1 and RC2 outputs (pins 16, 15 & 14) connecting to one side of the switches and the RA1, RA4 and RA0 inputs (pins 18, 3 & 19) connecting to the other side. Note that RA1 and RA0 have 100kΩ pull-up resistors to the 3.3V supply, but RA4 does not. That’s because the RA4 input of IC1 can be configured with an internal pull-up to 5V, via the software. The reason that RA1 and RA0 do not have this feature is that on this chip, they can also be used as the USB D+ and D- signal lines. These pins thus operate somewhat differently from other I/O pins when USB mode is disabled. Their pull-ups are designed to suit the USB specifications Australia’s electronics magazine July 2020  77 rather than be used as general-purpose pull-ups. The reason that the 100kΩ resistors go to the 3.3V rail rather than the 5V rail is that these USB-specific pull-ups are implemented via internal P-channel Mosfets within IC1, and their sources connect to the +3.3V rail. So if we pulled these pins up to +5V then the 3.3V supply voltage would rise, as the intrinsic reverse diodes in these P-channel Mosfets would conduct. That would cause the 3.3V supply to rise to around 4.7V. That usually would not be a problem, but we use the 3.3V supply to provide memory backup for IC2. And as we shall see later, this voltage is already near the maximum allowed for that purpose. That leaves us with the question of whether 3.3V is sufficient for the RA0 and RA1 inputs to differentiate between high and low levels. It turns out that the minimum voltage that is guaranteed to be detected as a high level for these pins is Vdd ÷ 4 + 0.8V, which for the highest possible Vdd of 5.15V, is still less than 2.1V. So the pull-ups to the 3.3V rail work fine. To detect if any switch is closed, all RC0, RC1 and RC2 outputs are taken low in sequence. The RA1, RA4 and RA0 inputs will typically be high due to the pull-ups. However, one input will be held low if a switch is pressed. The combination of which of the three sets of pins are low tells us which button was pressed. Note that if more than one switch is pressed at a time, then the first detected closed switch will be the one that’s deemed to be closed. When we require two switches to be closed, such as when clearing memory for an individual switch, switch S9 (the Mode switch) is checked for closure independently from the other switches. ing until the gate is held fully low. The reason we do this is so that IC1 does not reset due to a momentary drop in its supply voltage, which can happen if IRR1 is instantly switched on, due to its 10µF bypass capacitor and the limited current that can be supplied by the 9V battery. Once powered, IRR1 is ready to receive IR codes. Most infrared controllers use a modulation frequency of 3640kHz. This is done in bursts (pulses), with the length of and space between the bursts (pauses) indicating a code. The series of bursts and pauses are usually in a particular format (or protocol), and there are several different protocols commonly used. This includes the Manchester-encoded RC5 protocol originated by Philips. There is also the Pulse Width Protocol used by Sony and Pulse Distance Protocol, originating from NEC. If you are interested in details on all these protocols and others, see the article in SILICON CHIP from June 2019 on the Steering Wheel Audio Button to Infrared Adaptor (siliconchip.com.au/Article/11669). The output from IRR1 is a demodulated version of the infrared signal, which is high (5V) when there is no signal and low (near 0V) when a 36-40kHz modulated burst is detected. We record the level and duration of each pulse to memory when recording. The recorded sequence is reproduced during playback by modulating LED1 in bursts. It is driven as described above. Memory As described earlier, infrared receiver IRR1 is used for recording the infrared code and its power is controlled by Mosfet Q1. Before recording, the supply voltage for IRR1 is increased slowly to 5V over 13 milliseconds. This is done by applying brief low pulses (2/3ns long) to its gate, with a repetition rate starting at 66µs and reduc- The memory chip is a 1024kbit (1Mbit) memory organised as 128kbytes. The memory is accessed over a simple Serial Peripheral Interface (SPI) bus. When writing, data is sent to the SI input of IC2 (pin 5) from the SDO (pin 9) output of IC1. When reading, data is received from the SO output of IC2 (pin 2) to the SDI input (pin 13) of IC1. In both cases, the data is clocked using the signal from the SCK (pin 11) of IC1 to the SCK input of IC2, at pin 6. Communication with IC2 is enabled by a low level at the chip select (CS), driven from pin 10 of IC1 (RB7) and sensed at pin 1 of IC2. Scope1: this shows the modulation of the infrared signal from pin 5 of IC1. This drives transistor Q3 which controls infrared LED1. The modulation frequency is around 38.5kHz, as VR1 is set mid-way. VR1 can be used to set the frequency from 34.4kHz to 41.66kHz. The duty cycle is fixed at about 32%. Scope2: the top trace is a capture of an infrared signal, measured at the pin 1 output of IRR1. The lower trace shows the output at pin 5 of IC1 after that infrared coded signal shown in the top trace was stored in memory and replayed, which is shown inverted and also modulated at 34.4kHz. Recording 78 Silicon Chip Australia’s electronics magazine siliconchip.com.au S Q1 NTR4101 PTG A  TRANSMIT D 1k 1 F 1 F CERAMIC 100nF (INFRARED) CERAMIC 9V BATTERY +5V +3.3V 6 3 1  1 4 10 F 2 Vdd RA3 /MCLR RC4 VUSB3V3 AN 4/RC 0 AN5/RC1 150 AN 6/RC 2 Q3 BC337 C 1k B 5 RC5 IC1 PIC1 6F145 9 –I/P AN 1/RA1 E AN3/RA4 1N4148 LED1, LED2 K K A AN11/RB5 A A 7 1k A  AN 0/RA0 1N5819 K LED2 (VISIBLE) FREQUENCY ADJUST VR1 10k 8 100k 1 F 100k CERAMIC S3 S4 S1 16 S5 S6 S2 S7 S8 S9 MODE 15 14 18 3 19 +5V 12 S G D RC 3/AN 7 RB 7 34.4kHz 17 RA5/CK1 2 SDI/AN10/RB4 RC 6/AN 8 41.6kHz SDO/AN9/RC7 K SCK/RB6 100nF 13 1 9 2 D2 1N4148 K 47k 8 Vcc CS VBAT 7 IC2 2 3 LC V10 2 4 5 SI –I/SN NC 3 11 6 SO SCK 100 F LOW LEAKAGE Vss 4 MCP1703 (SOT-223-3) IN GND OUT BC 33 7 IRR1 Q1, Q2 TAB (GND) IR REMOTE CONTROL ASSISTANT A Q2 NTR4101 PTG 100nF 10 Vss 20 2020 A GND 10 F K RECEIVE SC  K IN 47 IRR1 TSOP4136 INDICATOR OUT G LED1 D1 1N5819 REG1 MCP1703–500 2E/DB +5V +5V D G S B 1 2 3 E C Fig.1: the circuit of the Assistant is not too complicated. It’s based around microcontroller IC1 which records infrared pulses sensed by receiver IRR1 into RAM chip IC2. It can later read these back and reproduce them by flashing infrared LED1 via transistor Q3, when triggered by a press of button S1-S8. When writing to memory (after power is applied via Q2), the memory is selected by bringing the chip select input low. Then a write instruction is sent, followed by the desired memory address from which to start. This is a 24-bit address sent as three 8-bit bytes. The seven most significant address bits are always zero, since only 17 bits are required to address the 128k bytes. Following this, data can be written. The memory powers up in sequential mode where the address automatically increments after each byte is written. The signal from IRR1 consists of a series of high and low levels. These levels are monitored at a fast rate, but we don’t store each sampled level directly into memory. That would chew up the memory too quickly. For example, sampling at a rate of 1.5MHz (ie, each 2/3µs) and storing that level in successive bits, the entire 1Mbit of memory would be full after 2/3 of a second! So instead, we sample the level each 666.66ns, but we don’t store this directly in memory. Instead, we continue siliconchip.com.au to monitor the level and record how long it remains at the same level before changing. The level and duration of each pulse are stored every time the level changes. To store this, we use two consecutive 8-bit address locations (16 bits total). The most significant bit (bit 15) stores the level while the remaining 15 bits are used to store the length of the pulse, in 666.66ns intervals. The maximum value we can store in 15 bits is 32,768, so the maximum period stored in each 16-bit memory location is 32,768 x 666.66ns, or 21.845ms. If the data level does not change within the maximum period, we continue storing the duration of that same level into the next 16-bit wide memory slot. This is a form of ‘run-length encoding’ data compression. For our project, we further divide up the memory into eight separate 16kbyte blocks. So the first 16kbyte block is reserved for the sequence stored using switch 1, the second 16kbyte block is for switch 2 and so on, up to switch 8 for the last 16kbyte block. Australia’s electronics magazine July 2020  79 NTR4101 1 F 1 F D1 5819 REG1 MCP1703-5002E/DB ra cyaJ Jaycar Version 80 Silicon Chip The 100µF capacitor is only discharged through leakage in the capacitor itself and via discharge at VBAT , at around 1µA. Power The circuitry is powered from a 9V battery that is regulated down to 5V using an ultra-low quiescent current regulator that typically only draws 2µA at low output currents. Reverse polarity protection is via schottky diode D1. There are two 1µF ceramic bypass capacitors, one at the input and one at the output of the regulator for supply decoupling and to ensuring regulator stability. The 5V supply is also bypassed with a 10µF electrolytic capacitor and a 100nF capacitor near IC1. Saving power Since we are powering the IR assistant from a battery, power draw needs to be minimised. This is done by only powering parts when they are needed and placing IC1 in a sleep state unless it is required to record or play infrared code. In sleep mode, IC1 typically draws just 0.3µA. IC1 is woken from sleep when a switch is pressed. Other parts powered off include the Australia’s electronics magazine 100nF S3 100k D2 47k IC1 S2 S1 S4 S5 100k 4148 PIC16F1459 1k FREQUENCY VR1 10k S6 Q2 1 IC2 NTR4101 23LCV1024 100 F 10 F + 9V – 9 V BATTERY To read the stored data, the CS input of the memory is taken high and then low again to select the memory, and the read instruction is sent along with the 24-bit address location. Then the data is read out in sequence. Power for IC2 is switched on or off via another P-channel Mosfet, Q2. This conserves power as the IR Remote Sequencer will be sitting dormant most of the time, so it makes sense to power off the memory. It draws around 3mA when active, but only 4µA in standby. Data stored in the memory is maintained when power is removed from IC2 by supplying a voltage to the battery backup (VBAT ) at pin 7. This derives power from the 3.3V supply from the internal 3.3V regulator in IC1 that’s intended to power its USB peripheral. This is available at the VUSB3V3 pin, pin 17. The voltage range for VBAT is 1.4-3.6V, so this 3.3V supply (3.0-3.6V tolerance range) is ideal. Power for VBAT is applied via D2 and a series 47kΩ resistor. A 100µF lowleakage capacitor holds power to VBAT for a substantial period (more than 100s) during the period while the battery is changed. D2 diode isolates VBAT from the 3.3V supply that will drop to zero when the battery is disconnected. S9 MODE (UNDER) 10 F 47 S8 S7 1k S6 1 1k S5 Q2 100 F Q1 Q3 C 2020 15005202 NTR4101 BC337 Rev.B 100nF 100nF 47k IC1 S4 1 F SMD CERAMIC CAPACITOR ON UNDERSIDE OF PCB 1 23LCV1024 10 F S3 100k 4148 PIC16F1459 1k 1k FREQUENCY 100nF IC2 D2 IRR1 150 S2 100nF 1 100nF S1 NTR4101 100k 15005201 BC337 Rev.B A A LED2 (UNDER) LED1(UNDER) S9 MODE 10 F 47 Q1 Q3 C 2020 TSOP4136 IR REMOTE ASSISTANT A LED1 LED2 150 VR1 10k Fig.3 (right): this is the PCB overlay diagram for the version which fits into an Altronics remote control case. Construction is similar to the PCB shown in Fig.2, except that LED1, LED2, S9 and IRR1 are mounted on the other side of the board, and IRR1’s leads are cranked differently. TSOP4136 IRR1 A IR REMOTE ASSISTANT 1k Fig.2 (left): use this PCB overlay diagram as a guide when building the version of the Assistant that fits into a Jaycar remote control case. Start assembly with the SMDs: IC2, Q1-Q2, REG1 and the three 1µF ceramic capacitors. Watch the orientations of IC1, IC2, D1, D2, LED1, LED2, Q3 and the electrolytic capacitors. 1 F 1 F S7 D1 5819 REG1 MCP1703-5002E/DB S8 + 9V – s cinortlA 9 V BATTERY Altronics Version infrared receiver (IRR1), memory chip IC2, indicator LED2 and trimpot VR1. Overall current drain in standby is thus 0.3µA for IC1 plus 1µA for IC2’s VBAT input and 2µA for regulator REG1. This is about 3.3µA total, although we measured 2.7µA on our prototype. If the IR Remote Control Assistant is used for one minute per day, that adds about an average of 7µA current draw over the day. Assuming a conservative 400mAh capacity for a 9V alkaline battery, we can expect the battery to last four years. That’s almost the shelf life of the battery itself, which would typically be five years. More frequent usage of the IR Remote Control Assistant will reduce the battery life a little. Construction The IR Remote Control Assistant is housed in a remote control case and built on a double-sided PCB. We’ve designed two different PCBs to suit different remote control cases. For the Jaycar HB-5610 remote control case, the PCB is coded 15005201 and measures 63.5mm x 86mm. The PCB coded 15005202 and measuring 58.5 x 86mm suits two Altronics cases, either H0342 (Grey) or H0343 (Black). siliconchip.com.au stalled, and these must be mounted with the orientations as shown. Note that D1 is a 1N5819 type while D2 is a smaller 1N4148. It’s a good idea to mount IC1 using an IC socket. When installing the socket, take care to orientate it correctly. Its notch should be positioned as shown. Then fit trimpot VR1 and transistor Q3. The capacitors can go in next, with the electrolytic types orientated with the polarities shown (the longer lead is positive). Make sure these capacitors are fitted so that their height above the PCB is no more than 12.5mm; otherwise, the case lid may not fit. Parts varied by version LED1, LED2, IRR1 and pushbutton This same-size photo matches the Jaycar PCB layout opposite (Fig.2) but the Altronics version (Fig.3) is virtually identical, albeit on a slightly narrower PCB. Make sure the battery wiring is threaded through the strain relief holes, as shown here and on the diagrams. A panel label attaches to the front face of the box in each case, so you know what the unit and its controls do. Select the correct PCB to suit your case and refer to the relevant PCB overlay diagram: Fig.2 for the Jaycar case or Fig.3 for the Altronics case. Start assembly by soldering IC2 in place. This is a surface-mounting device, best fitted by placing it in the correct position and soldering one of the corner pins to the PCB pad. Check that the IC is aligned and orientated correctly before soldering the remaining pins. If it is not aligned, remelt the solder on the pin and align the IC again. Any solder bridges between the leads can be cleared using solder wick to draw up excess solder. Solder wick works best when a little flux paste is applied to the bridge first. Fit Q1, Q2, REG1 and the three 1µF ceramic capacitors next, using a similar technique. Two of the capacitors are near REG1 while the other is on the opposite side of the PCB, underneath IC1. Install the resistors next. You can read the resistor colour code to figure out the resistor values, but it’s best to use a digital multimeter to measure each value. The diodes can then be insiliconchip.com.au S9 are mounted differently depending on the version you are building. For the version that fits into the Jaycar case, these parts mount on the top side of the PCB. Bend LED2’s leads down by 90°, 6mm back from the base of its lens, making sure the anode lead is to the left. The LED then sits horizontally with the centre of the lens 6mm above the top of the PCB. Similarly, LED1 mounts horizontally 6mm above the PCB, except its leads should be bent some 4mm back from the lens base, again ensure that the anode is to the left. IRR1 is also mounted with the centre of its lens 6mm above the PCB. Bend its leads in a dog-leg shape, so the front of its lens lines up with the LED lenses. For the Altronics version, LED1, Parts list – IR Remote Control Assistant 1 panel label (see text) 1 20-pin DIL IC socket 8 click action pushbutton switches, any colours (S1-S8) [eg, Jaycar SP0720-4, Altronics S1094-1099] 1 right-angle (RA) tactile pushbutton switch (S9) [Jaycar SP0604] 1 9V battery 1 9V battery clip lead Semiconductors 1 PIC16F1459-I/P microcontroller programmed with 1500520A.hex, DIP-20 (IC1) 1 23LCV1024-I/SN static RAM, SOIC-8 (IC2) [RS Components 803-2181] 1 MCP1703-5002E/DB 5V ultra-low quiescent current regulator, SOT-23 (REG1) [RS Components 669-4890] 2 NTR4101PT1G P-channel Mosfets, SOT-23 (Q1,Q2) [RS Components 688-9152] 1 BC337 NPN transistor (Q3) 1 TSOP4136 IR receiver (IRR1) [Jaycar ZD1953] 1 5mm IR LED (LED1) 1 3mm red LED (LED2) 1 IN5819 1A schottky diode (D1) 1 1N4148 signal diode (D2) Capacitors 1 100µF 16V low-leakage (LL) PC electrolytic 2 10µF 16V PC electrolytic 3 1µF 16V X7R SMD ceramic, 3216/1206 size 3 100nF MKT polyester Resistors (all 1/4W 1% metal film) 2 100k 1 47k 3 1k 1 150 1 47 1 10k mini top-adjust trimpot (5mm pin spacing) (VR1) Extra parts for Jaycar version 1 70 x 135 x 24mm remote control case [Jaycar HB5610] 1 double-sided PCB coded 15005201, 63.5 x 86mm 4 4G x 6mm self-tapping screws Extra parts for Altronics version 1 68 x 130 x 25mm remote control case [Altronics H0342 (grey) or H0343 (black)] 1 double-sided PCB coded 15005202, 58.5 x 86mm 4 4G x 9mm self-tapping screws 4 5mm long untapped spacers (or M3 tapped spacers drilled out to 3mm) Australia’s electronics magazine July 2020  81 LED2, IRR1 and pushbutton switch S9 mount on the underside of the PCB. For LED2, bend the leads up by 90°, 6mm, from the lens base, making sure that the anode lead is to the left. The LED then mounts horizontally with the centre of the lens 4mm below the bottom of the PCB board. LED1 is also mounted horizontally but 3.5mm below the PCB, with its leads bent some 4mm back from the LED base, again ensuring that the anode is to the left. IRR1 should also be mounted with the centre of its lens 4mm below the bottom of PCB. Insert its leads from the top and then bend them down by 90° so that the body swings beneath the PCB. A cutout is provided for its leads to pass to the other side of the PCB without sticking out. The back of the lens should be in line with the front edge of the PCB. More common parts Switches S1-S8 are mounted orientated as shown, with the flat side to the bottom edge of the PCB. We used four white-topped and four black-topped switches, although any colour or colour combination can be used. For the Jaycar case, the battery snap is inserted from the battery compartment side first, with the leads passed through to the PCB. For both versions, the leads from the battery snap pass through wire stress relief holes that are on the PCB. First feed the wires through the outside 3mm hole, then under the PCB and up through the next 3mm hole. Then solder the ends directly to the plus (red wire) and minus (black wire) pads. cleared by pressing any of the S1-S8 switches. If cleared, LED2 will just flash momentarily. Finishing the case Drill out the end panel for the LEDs, IR receiver and switch. A drill guide is available and is provided with the front panel label that’s included with of the front panel artwork. This can be downloaded from the SILICON CHIP website (www.siliconchip.com.au). For the Altronics case, it is essential to place the drilling template onto the end panel with the correct orientation before drilling. The top panel of each case can then be drilled out for the eight switches using the drilling template that’s a part of the front panel label artwork. Again, make sure the top panel is orientated correctly before drilling. Drill a small hole first and gradually enlarge the holes with a reamer. As you enlarge the holes, regularly check that each hole is located correctly and is not too large by placing the panel over the assembled PCB and switches. Countersinking the inside of the holes can help locate the switches better as the panel is brought up to meet the switches. The front panel artwork includes Testing Apply power and check that there is 4.75-5.25V between pins 20 and 1 of IC1’s socket. If that is correct, disconnect power and insert IC1. Check that LED2 lights when the Mode switch (S9) is pressed. Press the Mode switch again so that LED2 goes off. Then press one of S1S8. The LED should light up. Stop the playback of whatever random data was in the memory chip by pressing any of S1-S8. Next, clear the memory by pressing the Mode switch (LED2 will light) and holding this switch closed for 10 seconds until the LED flashes to indicate that all memory has been cleared. You can test if the memory has been 82 Silicon Chip rectangular blank labelling borders for each switch. This can be written onto using the ‘fill and sign’ option on a PDF reader before printing. Alternatively, use a fine-point permanent marker on the label itself to indicate what each switch is programmed for. More space is provided for switches S2, S4, S6 and S8 than for S1, S3, S5 and S7. A front panel label can be made using overhead projector film, with the label printed as a mirror image so the ink will be between the enclosure and film when affixed. Use projector film that is suitable for your printer (either inkjet or laser) and affix using neutralcure silicone sealant. For black cases, use a light-coloured silicone. Light-coloured cases can use clear silicone, such as the roof and gutter type. Squeegee out the lumps and air bubbles before the silicone cures. Once cured, cut holes in the film for the switches with a hobby or craft knife. Other labels and for more detail on making labels, see www.siliconchip. com.au/Help/FrontPanels Mounting the PCB The PCB attaches to the base of the Jaycar case using four self-tapping screws into the integral mounting bushes. The PCB for the Altronics case is mounted on the lid section using 5mm spacers and 9mm self-tapping screws. If the spacers are M3 tapped, they will need to be drilled out with a 3mm drill to allow the self-tapping screws to enter freely. Finally, attach the lid to the case using the four screws supplied with the case. Programming it Orientate the Remote Control As- The assembled PCB inside the case. Note how some of the components must be tilted to allow the case to close. Australia’s electronics magazine siliconchip.com.au Looking at the top of the Jaycar case version – it’s simply a matter of “point-n-shoot” – press the button for the previously programmed action required. sistant with the front end of the case with the LEDs and IR1 facing you and placed near the audiovisual items you are using. To record the IR sequences required, place the Assistant in record mode by pressing the “Mode” switch using a small probe such as a ballpoint pen. The indicator LED lights, and you then press the button you wish to record a sequence for. The indicator LED flashes in acknowledgement. The IR Remote Control Assistant is then ready to record a series of infrared codes from one or more infrared remote controls. Ensure that these are aimed at the infrared receiver on the Assistant as you press each button to broadcast the required codes. Recording does not start until a remote control signal is received. That way, on playback, the code sequence begins straight away. Any pushbutton (S1-S8) can be pressed to end the recording. Further sequences can be stored by pressing the Mode switch again and a using a different pushbutton switch (S1-S8) for each new recording. At the start of recording, the memory allocated for that pushbutton switch is cleared, ready for a fresh recording. That means that the new recording overwrites any previous recording for that pushbutton switch. Note that when the IR Remote Control Assistant is first placed in the record mode, record mode will end after ten seconds if one of the S1-S8 switches are not pressed within that time. Similarly, after record mode is initiated and a switch is pressed, it will abort if an infrared code is not received within ten seconds. If you want to clear the memory for one switch without making a new recording, press and hold the mode siliconchip.com.au you want to clear. The memory is first cleared, and then the IR Remote Control Assistant waits for the receipt of an infrared code. Press any switch to end the recording. The memory will stay cleared since no IR code was received. Hints and tips switch and then press and hold the switch for the memory to be cleared and hold both for ten seconds. The acknowledge LED will initially flash out the pushbutton number (from 1 to 8) before clearing the memory associated with that switch. Another method of clearing an individual memory is to press and release the Mode switch and then press the switch associated with the memory You can record just about any infrared code sequence, but be aware that sequences could get out of synchronisation if you are not careful. For example, if you program the unit to change from one source to another, the source you select might depend on what source was selected originally. Also, if one of the receivers misses a code during playback, the following codes could have no effect or the wrong effect. So you will need to position the transmitter LED in a location where all the receivers will pick it up reliably before playing back a complex sequence, and avoid moving the unit too much during playback or blocking the IR signals. SC Quick instructions Modes There are three modes: Playback, Record and Erase. Playback is the default mode, and the unit is normally in this mode. Record mode is invoked when the Mode switch is pressed and released, after which the indicator LED (LED2) lights. It will automatically return to Playback mode unless a recording is started within 10 seconds. Bulk erase Full erasure is performed by pressing and holding the Mode switch alone for 10 seconds. Individual sequence erase Press and hold in the Mode switch (S9), then while holding that, press and hold in the pushbutton switch (S1-S8) required for memory erasure. Keep pressing both pushbuttons for 10s until the indicator LED (LED2) flashes out the switch number. Release the switches; the selected sequence has been cleared. LED should now only flash momentarily when that pushbutton is pressed. Recording a sequence Place the Infrared Remote Control Assistant near the audiovisual equipment with the front end facing toward you. Press the Mode switch (S9) and release. The indicator LED will light. Press the pushbutton (S1-S8) required for the recording. The indicator will flash off and then on again. Point the audiovisual remote control(s) toward the audiovisual equipment, making sure it also faces the infrared receiver on the Assistant. Start the sequence by pressing a remote control button for the operation first required within ten seconds. Continue to run through the sequence using the remote control to perform the tasks. The indicator will flash at the infrared encoding rate. Press any pushbutton (S1-S8) to end the recording. Sequence playback Playback mode is the default mode, and in this mode, the indicator LED is off. Point the Infrared Remote Control Assistant toward the audiovisual equipment, then press the required switch (S1-S8). The recorded sequence will be reproduced via the onboard infrared LED. Australia’s electronics magazine July 2020  83