Interfacing of RGB with IR sensor

June 1, 2021

Interfacing of RGB with IR sensor

June 1, 2021

Created By

Roshan Baig

My name is Roshan; I am 13 years old and I am in 7th standard. My hobbies are horse riding, robotics, and computer programming.

About This Project

Interfacing of RGB with IR sensor objective is to On, Off and fading RGB led from remote place using IR Remote.



The TSOP 1738 is one type of receiver which receives IR. It consists of a PIN diode and a pre amplifier which are embedded into a single package. The output of TSOP is active low and it gives +5V in off state. When IR waves, from a source, with a centre frequency of 38 kHz incident on it, its output goes low.

Components Required

  • Arduino UNO
  • RGB Diffused Common Cathode
  • IR receiver
  • Breadboard
  • Resistor 1K Ohm

Schematics

In this image all the components with the connections are given

Code Of Project

   # 
 include 
 <IRremote.h> 
 
 int 
red = 
 11 
 ; 
 int 
green = 
 10 
 ; 
 int 
blue = 
 9 
 ; 
 int 
RECV_PIN = 
 8 
 ; 
IRrecv irrecv 
 ( 
RECV_PIN ) 
 ; 
decode_results results ; 
 void 
 setup 
 ( 
 ) 
 { 
 pinMode 
 ( 
red , 
 OUTPUT 
 ) 
 ; 
 pinMode 
 ( 
green , 
 OUTPUT 
 ) 
 ; 
 pinMode 
 ( 
blue , 
 OUTPUT 
 ) 
 ; 
 Serial 
 . 
 begin 
 ( 
 9600 
 ) 
 ; 
irrecv . 
 enableIRIn 
 ( 
 ) 
 ; 
 } 
 void 
 loop 
 ( 
 ) 
 { 
 if 
 ( 
irrecv . 
 decode 
 ( 
 & 
results ) 
 ) 
 { 
 Serial 
 . 
 println 
 ( 
results . 
value , 
HEX ) 
 ; 
irrecv . 
 resume 
 ( 
 ) 
 ; 
 if 
 ( 
results . 
value == 
 0xFD08F7 
 ) 
 { 
 digitalWrite 
 ( 
red , 
 HIGH 
 ) 
 ; 
 digitalWrite 
 ( 
green , 
 LOW 
 ) 
 ; 
 digitalWrite 
 ( 
blue , 
 LOW 
 ) 
 ; 
 } 
 if 
 ( 
results . 
value == 
 0xFD8877 
 ) 
 { 
 digitalWrite 
 ( 
red , 
 LOW 
 ) 
 ; 
 digitalWrite 
 ( 
green , 
 HIGH 
 ) 
 ; 
 digitalWrite 
 ( 
blue , 
 LOW 
 ) 
 ; 
 } 
 if 
 ( 
results . 
value == 
 0xFD48B7 
 ) 
 { 
 digitalWrite 
 ( 
red , 
 LOW 
 ) 
 ; 
 digitalWrite 
 ( 
green , 
 LOW 
 ) 
 ; 
 digitalWrite 
 ( 
blue , 
 HIGH 
 ) 
 ; 
 } 
 if 
 ( 
results . 
value == 
 0xFD28D7 
 ) 
 { 
 analogWrite 
 ( 
 11 
 , 
 255 
 ) 
 ; 
 analogWrite 
 ( 
 9 
 , 
 255 
 ) 
 ; 
 analogWrite 
 ( 
 10 
 , 
 0 
 ) 
 ; 
 } 
 if 
 ( 
results . 
value == 
 0xFDA857 
 ) 
 { 
 analogWrite 
 ( 
 11 
 , 
 0 
 ) 
 ; 
 analogWrite 
 ( 
 9 
 , 
 255 
 ) 
 ; 
 analogWrite 
 ( 
 10 
 , 
 255 
 ) 
 ; 
 } 
 } 
 delay 
 ( 
 100 
 ) 
 ; 
 } 
  
 
A person is using a laptop computer next to a robot.
By Siddhartha Kumar January 5, 2022
Robotics: Blessing and Curse? Robots have improved healthcare , surveillance, delivery of goods (drones), spacecraft, travel, logistics, etc.
A man is wearing a virtual reality headset and touching a screen.
By Tahreem Jamadar December 28, 2021
Is it time for 3D Printing to Adopt Blockchain Technology? Research has already shown 3D printing has a growing need for cybersecurity.
A group of children are sitting at a table making a robot.
By Dr. Heath Kirby-Miller December 25, 2021
Why STEM Education in Australia The Australian industries to be benefited from STEM include advanced information and communication technology
A red rc truck is sitting on top of a remote control.
December 12, 2021
Arduino IR remote controlled Car The project is arduino based project. the Links pf the projects are given below
A laptop computer is on a tripod on a table.
November 30, 2021
Animation Studios Mechatron Robotics project uses an Arduino uno R3 a LCD and push buttons. It is based on the concept of arduino and LCD
A young boy wearing headphones is using a laptop computer.
By Kiran Gupta November 30, 2021
Machine Learning for Disables can help those disabled people to improve their lives. With the marvel of machine learning doctors
A man wearing a virtual reality headset is working on a robotic arm.
By Kiran Gupta November 7, 2021
What are the Consequences of Not Embracing Robotics & AI? We won’t be able to go ahead as these are the next big things.
A person is holding a remote control in a living room.
November 4, 2021
Home Automation System is made because today's light bulbs tend to heat and this can cause blast in the house.
A close up of a bottle of vaccine with a virus in the background.
By Rajesh Sharma November 1, 2021
Robotics and the Pandemic 2020. This is where Robotics can come in, robots can help reduce the human contact.
A person is playing with a robotic head on a table.
By Siddhartha Kumar November 1, 2021
Key Elements Most of the Schools are Missing. Everyone has different criteria but one key element remains the same:” The quality of teaching
Show More
A person is using a laptop computer next to a robot.
By Siddhartha Kumar January 5, 2022
Robotics: Blessing and Curse? Robots have improved healthcare , surveillance, delivery of goods (drones), spacecraft, travel, logistics, etc.
A man is wearing a virtual reality headset and touching a screen.
By Tahreem Jamadar December 28, 2021
Is it time for 3D Printing to Adopt Blockchain Technology? Research has already shown 3D printing has a growing need for cybersecurity.
A group of children are sitting at a table making a robot.
By Dr. Heath Kirby-Miller December 25, 2021
Why STEM Education in Australia The Australian industries to be benefited from STEM include advanced information and communication technology
A red rc truck is sitting on top of a remote control.
December 12, 2021
Arduino IR remote controlled Car The project is arduino based project. the Links pf the projects are given below
A laptop computer is on a tripod on a table.
November 30, 2021
Animation Studios Mechatron Robotics project uses an Arduino uno R3 a LCD and push buttons. It is based on the concept of arduino and LCD
A young boy wearing headphones is using a laptop computer.
By Kiran Gupta November 30, 2021
Machine Learning for Disables can help those disabled people to improve their lives. With the marvel of machine learning doctors
A man wearing a virtual reality headset is working on a robotic arm.
By Kiran Gupta November 7, 2021
What are the Consequences of Not Embracing Robotics & AI? We won’t be able to go ahead as these are the next big things.
A person is holding a remote control in a living room.
November 4, 2021
Home Automation System is made because today's light bulbs tend to heat and this can cause blast in the house.
A close up of a bottle of vaccine with a virus in the background.
By Rajesh Sharma November 1, 2021
Robotics and the Pandemic 2020. This is where Robotics can come in, robots can help reduce the human contact.
Show More