4-Channel IR Remote Relay Switch with ATTINY85

Introduction

In this modern era of automation, remote control systems have become an integral part of our daily lives. The advancement of technology has made our lives easier and more convenient in various ways. Being able to control electrical appliances wirelessly not only enhances convenience but also ensures safety. Building such systems on your own can be an exciting and rewarding project. In this article, we will guide you through the process of making a 4-channel IR remote relay switch using the ATTINY85 microcontroller and the TSOP1838 IR sensor. This project will allow you to control up to four different electrical appliances using a single remote control. So, let’s dive into the world of DIY electronics and learn how to make this incredible device.

Introduction to Major Components:

ATTINY85:

The ATTINY85 microcontroller is a powerful and versatile chip that can be programmed to perform a variety of functions. It is a member of the AVR microcontroller family and comes with 8KB of programmable flash memory, 512B of SRAM, and 512B of EEPROM. Despite its small size, it offers impressive capabilities, making it an ideal choice for low-power applications.

With the ATTINY85, you can control multiple devices and add intelligence to your projects. Its compact size also makes it suitable for small-scale applications where space is a constraint. It can be easily programmed using the Arduino IDE, making it accessible to beginners and advanced users alike.

TSOP1838 IR Sensor:

The TSOP1838 is an infrared sensor module that can receive signals from an infrared remote control. It operates at a carrier frequency of 38kHz, which is commonly used by most remote controls. The TSOP1838 not only detects infrared signals but also decodes them, allowing you to use different codes for different functions. This enables you to differentiate and control multiple devices using a single remote control.

It consists of a photodetector, a preamplifier, a band-pass filter, and an automatic gain control block. The photodetector converts incoming infrared radiation into an electrical signal, which is then amplified and filtered by the preamplifier and band-pass filter respectively. The automatic gain control block ensures that the module can handle a wide range of infrared intensities.

BC547 Transistor:

The BC547 is a versatile general-purpose NPN transistor commonly used in electronic circuits. It is designed for low-power applications and can handle currents up to 100mA. The transistor consists of three layers of semiconductor material, namely the emitter, base, and collector.

When a small current is applied to the base terminal, it controls a larger current flowing from the collector to the emitter. This characteristic makes the BC547 ideal for switching and amplification applications. It can be used as a switch to control the flow of current through the relay coils in our 4-channel IR remote relay switch circuit.




How to Make 4-Channel IR Remote Relay Switch with ATTINY85
4-Channel IR Remote Relay Switch with ATTINY85

Circuit Diagram of 4-Channel IR Remote Relay Switch

This project can be designed using a few basic components. The circuit diagram of this project is shown below.

How to Make 4-Channel IR Remote Relay Switch Circuit Diagram
4-Channel IR Remote Relay Switch Circuit Diagram




More Circuit Layouts






Components List of 4-Channel IR Remote Relay Switch

Following is the list of all components used in this project:

  • 1 X ATTINY85
  • 1x TSOP1838 IR Sensor
  • 1X BC547 Transistor
  • 4X 1N4148 Diodes
  • 5X LED
  • 5X 100 Ohm Resistors
  • 5X 10K Resistors
  • 4X 5V Relays
  • 2x 2 Pin Terminal Blocks
  • Arduino UNO:
  • Remote Control
  • 1X PERF BOARD
  • JUMPER WIRES

URL for ATTINY Arduino IDE:
Project Zip File:




Explanation of 4-Channel IR Remote Relay Switch

Building the Project:

To build the 4-channel IR remote relay switch, you will need the all material, is listed above in the Components List section. Gather all the material required to build this project.

The circuit should be assembled as follows:

  1. First connect ATTINY85 microcontroller and a 2-pole terminal block on a board for 5v power supply. Connect pin-8 to +5v and pin-4 to ground of the microcontroller.
  2. After that Insert TSOP1838 IR Receiver and connect its pin-1 to pin-3 of microcontroller, pin-2 to ground and its pin-3 to +5v.
  3. Connect a 10k resister between pin-1 of microcontroller and +5v.
  4. Now insert a first BC547 transistor and first 5v relay on board. Connect pin-3 of transistor to groun and pin-1 to the coil pin-2 of the 5v relay and also connect coil pin-1 of the relay to +5v.
  5. Now take a 1n4148 diode and connect its cathode to coil pin-1 and anode to coil pin-2 of the 5v relay.
  6. Now take an LED and connect its cathode to pin-1 of the transistor and anode to a 100 ohms resister, while the other side of 100 ohms resister will be connected to +5v.
  7. Now take a 2-pole terminal block and connect its one pin to normally open pin of the relay an the other pin to the common pin of the relay.
  8. Now as you can see that steps 4, 5, 6 and 7 has completed a one set of the relay function. Now repeat these four steps from 4 to 7 three more times to complete four sets or 4 channels.
  9. Now you can that all four BC547 transistors pin-2 are still empty. Take four 10k resisters and connect them to the pin-2 of all BC547 transistors. Now connect first transistor’s resister to pin-2 of microcontroller. Second one to pin-7, third one to pin-6, fourth one to pin-5 of the ATTINY85 microller.
  10. Now take an LED and connect its cathode to ground and anode to a 100 ohms resister while the other side of resister to +5v.




Programming the ATTINY85:

To program the ATTINY85, you will need an Arduino Uno or any other compatible Arduino board to act as a programmer. To program the ATTINY85 with an Arduino UNO, follow these steps:

  1. Gather the necessary components: Arduino UNO board, ATTINY85 microcontroller, breadboard, jumper wires, and a USB cable.
  2. Install the Arduino IDE software on your computer if you haven’t already. This can be downloaded from the Arduino website.
  3. Connect the Arduino UNO to your computer using the USB cable.
  4. Open the Arduino IDE software.
  5. Go to “File” > “Examples” > “ArduinoISP” from the menu to open the ArduinoISP sketch.
  6. Select the appropriate board and port under the “Tools” menu. For the Arduino UNO, the board should be “Arduino/Genuino UNO”, and the port can be found in the “Ports” list.
  7. Upload the ArduinoISP sketch to the Arduino UNO board by clicking the “Upload” button.
  8. Once the sketch is uploaded, disconnect the USB cable from the Arduino UNO.
  9. Connect the ATTINY85 to the breadboard. Align the pins of the ATTINY85 with the breadboard, with pin 1 on the top left.
  10. Connect the Arduino UNO and the ATTINY85 as follows:
  • Connect Pin 10 (SS) of the Arduino UNO to pin 1 (reset) of the ATTINY85.
  • Connect Pin 11 (MOSI) of the Arduino UNO to pin 5 (MOSI) of the ATTINY85.
  • Connect Pin 12 (MISO) of the Arduino UNO to pin 6 (MISO) of the ATTINY85.
  • Connect Pin 13 (SCK) of the Arduino UNO to pin 7 (SCK) of the ATTINY85.
  • Connect the 5V and GND pins of the Arduino UNO to the respective power rails on the breadboard.
  • Connect the VCC pin of the ATTINY85 to the 5V power rail on the breadboard.
  • Connect the GND pin of the ATTINY85 to the GND power rail on the breadboard.
  1. Reconnect the USB cable to the Arduino UNO.
  2. Select the ATTINY85 as the board under the “Tools” menu. Choose “ATtiny25/45/85” as the processor and the appropriate clock speed.
  3. Go to “Tools” > “Programmer” and select “Arduino as ISP”.
  4. Click “Burn Bootloader” to set the appropriate fuses and bootloader on the ATTINY85.
  5. After the bootloader is burned, you can upload your code to the ATTINY85 by opening your sketch in the Arduino IDE, making any necessary modifications (e.g., pin numbers), and clicking the “Upload” button.
  6. Your code should now be successfully uploaded to the ATTINY85 microcontroller.

Note: Make sure to remove the connections to the Arduino UNO from the ATTINY85 before using it in standalone mode.

Conclusion of 4-Channel IR Remote Relay Switch

In conclusion, the process of creating a 4-channel IR remote relay switch using an ATTINY85 microcontroller and a TSOP1838 IR sensor is a fun and rewarding project for DIY enthusiasts. By following the step-by-step instructions outlined in this guide, you can successfully build your own remote-controlled switch that can control multiple electrical appliances. This device not only adds convenience to your daily life but also showcases the power of technology and creativity. So, unleash your inner electronics hobbyist and start building your very own 4-channel IR remote relay switch today.

More projects, You may like:



For more project and circuit diagrams, you can go through the Schematics in the main menu where you can find many interesting projects and circuit diagrams like audio amplifier circuits, voltage booster circuitbattery charger circuit and timer circuits etc., which are all beginner circuit projects. Feel free to check them out!

Thanks for visiting the article and watching the video.

(Visited 1,043 times, 1 visits today)

Leave a Reply

Your email address will not be published.