Infrared remote controls are all around us. The majority of home appliances are controlled using infrared remote controls. In this article/video, we will learn how to build a device that can decode (almost) any IR remote and use the instructions to switch relays (loads). We will be able to use this feature in a variety of applications without buying a new infrared remote control and expensive hardware, such as turning on/off lights, opening/closing blinds, etc. I used an ATTiny85 microcontroller as the basis of the circuit. The device can register up to three IR codes in the EEPROM and switch 3 separate devices. Each relay can handle currents up to 10 amperes. The user can program the load switching mechanism (play/pause, toggle,..etc). I used Altium Designer 21.4.1 and the SamacSys component libraries (SamacSys Altium Plugin) to design the schematic and PCB. I also used a Siglent SDS2102X Plus / SDS1104X-E to analyze the IR signals. The device works stably and reacts well to transmitted infrared signals. So let’s get started and build this pup! Circuit analysis Figure 1 shows a schematic diagram of the device. Obviously, the decoding and switching tasks are only performed by the 8-pin ATTiny85 microcontroller. Figure 1: A schematic diagram of the REG1 infrared remote control/switching module is the popular 7805 thru-hole regulator. [1] A chip that sets a constant +5V for the relays. C4 and C5 were used to reduce noise. FB1 and C11 block the peaks of the input noise. IC2 is a TS2937CW-5.0 . regulator [2] which is a +5V constant source for U1 and IC1. D8 indicates good supply and C8 and C9 have been used to reduce regulator output noise. U1 is the VS1838 . infrared receiver module [3]. This unit is sensitive to noise supply, so R7 and C6 build a low-pass RC filter to further reduce U1 source noise. The output of U1 is connected to the PB3 pin of IC1 and the gate pin of Q4 Mosfet. Q1 is a MOSFET at the level of P channel logic FDN360P [4] that was used to supply the D7. D7 is a SMD LED that indicates good reception of infrared signals (blinks). R8 limits the D7 current. SW1 is an SMD tactile push button and the C10 cancels mechanical contact of the push button. IC1 is an ATTiny85 . microcontroller [5]. ATTiny85 Nice slide! Which provides 8K flash memory and can run up to 20MHz with an external crystal oscillator. In this project, I set the clock to 8MHz internal. C7 is a bypass capacitor and has been used to reduce supply noise. Q1, Q2 and Q3 are SI2303 N-Channel Mosfets [6] which are used to switch relays K1, K2 and K3. R4, R5 and R6 are pull-down resistors and D1, D2, and D3 are protective diodes. D4, D5 and D6 are the relay activate indicator LEDs and C1, C2, and C3 are used to reduce the noise of the inductors. The ISP is a 5-pin male header used for programming IC1 using an AVR-ISP programmer. P1, P2, and P3 are right-angle pinned phoenix connectors. Figure 2 shows the PCB layout of the PCB layout for the IR remote control switch. It is a 2-layer PCB board and the majority of component packages are SMD. Figure 2: PCB layout of the IR remote control switchboard as mentioned in the abstract, I used Altium Designer software [7] For schematic design and PCB. It is an elegant program that offers an easy-to-use design environment and many useful features. I didn’t have the schematic code, PCB footprint, and 3D model for many of the components in this project. So, instead of wasting my time designing the libraries from scratch and increasing the risk of errors and component mismatches, I used the free, IPC-branded ScacSys component libraries and imported them directly into an Altium PCB project using the SamacSys Altium plugin [8]. SamacSys has provided plugins for the majority of computer-aided design software, not just for the Altium Designer. Figure 3 shows the CAD software for the supported electronic design. Figure 3: Design of electronic CAD software supported by SamacSys extensions Specifically, I used the SamacSys libraries for IC1 [9], IC2 [10], REG1[11], Q1…Q3[12], and Q4 [13], which you can check the links in the references. Another option is to download the component libraries from componentearchengine.com and import them manually. It’s up to you. Figure 4 shows the components identified in the SamacSys Altium plug-in. Figure 4: Component libraries selected in the assembly and testing of the SamacSys Altium plugin Figure 5 shows an assembled PCB board. The PCBs are manufactured by PCBWay and I can say the quality is fine. I have no problem soldering the components. So I recommend you to look for quality and not choose cheap prices only to save a few dollars! Figure 5: The assembled PCB board for the IR remote control switch I used the Arduino IDE to write the code, but you don’t need to use the Arduino board for this. You can install the custom ATTiny panel manager and export the compiled binary file (HEX file). Then program your chip using an AVR-ISP programmer or similar outside of the Arduino IDE. You don’t need to program the bootloader either. #include
[1]: L7805 datasheet: https://www.st.com/resource/en/datasheet/l78.pdf
[2]: TS2937CW-5.0 Data Sheet: http://www.taiwansemi.com/products/datasheet/TS2937_E15.pdf
[3]: VS1838 IR Receiver Module Data Sheet: https://www.elecrow.com/download/Infrared%20receiver%20vs1838b.pdf
[4]: FDN360P Datasheet: https://www.onsemi.com/pdf/datasheet/fdn360p-d.pdf
[5]Datasheet: ATTiny85-20SUR: http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-2586-AVR-8-bit-Microcontroller-ATtiny25-ATtiny45-ATtiny85_Datasheet.pdf
[6]: Si2302 data sheet: https://www.vishay.com/docs/63653/si2302dds.pdf
[7]: CAD software for electronic design from Altium Designer: https://www.altium.com/altium-designer
[8]: SamacSys Altium Plugin: https://www.samacsys.com/altium-designer-library-instructions
[9]: ATTiny85 schematic code, PCB fingerprint, 3D model: https://componentsearchengine.com/part-view/ATTINY85-20SUR/Microchip
[10]: TS2937-5.0 Schematic symbol, PCB trace, 3D model: https://componentsearchengine.com/part-view/TS2937CW-5.0%20RP/Taiwan%20Semiconductor
[11]: Schematic code L7805, trace PCB, 3D model: https://componentsearchengine.com/part-view/L7805CV/STMicroelectronics
[12]: SI2302 schematic code, PCB trace, 3D model: https://componentsearchengine.com/part-view/SI2302DDS-T1-GE3/Vishay
[13]: FDN360P Schematic Code, PCB Trace, 3D Model: https://componentsearchengine.com/part-view/FDN360P/ON%20Semiconductor
[14]: ATTinyCore: https://github.com/SpenceKonde/ATTinyCore
[15]: IRremote library: https://github.com/Arduino-IRremote/Arduino-IRremote
[16]: Siglent SDS2102X Plus Oscilloscope: https://siglentna.com/products/digital-oscilloscope/sds2000xp-series-digital-phosphor-oscilloscope
[17]Siglent SDS1104X-E Oscilloscope: https://siglentna.com/digital-oscilloscopes/sds1000x-e-series-super-phosphor-oscilloscopes.
0 Comments