Ks0027 keyestudio Digital IR Transmitter Module: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
 
(24 intermediate revisions by the same user not shown)
Line 1: Line 1:
<br>
==Introduction==
==Introduction==
R Transmitter Module is designed for IR communication which is widely used for operating the television device from a short line-of-sight distance. The remote control is usually contracted to remote.
IR Transmitter Module is designed for IR communication which is widely used for operating the television device from a short line-of-sight distance. The remote control is usually contracted to remote. <br>
Since infrared (IR) remote controls use light, they require line of sight to operate the destination device. The signal can, however, be reflected by mirrors, just like any other light source.
Since infrared (IR) remote controls use light, they require line of sight to operate the destination device. The signal can, however, be reflected by mirrors, just like any other light sources. <br>
If operation is required where no line of sight is possible, for instance when controlling equipment in another room or installed in a cabinet, many brands of IR extenders are available for this on the market. Most of these have an IR receiver, picking up the IR signal and relaying it via radio waves to the remote part, which has an IR transmitter mimicking the original IR control.
If operation is required where no line of sight is possible, for instance when controlling equipment in another room or installed in a cabinet, many brands of IR extenders are available for this on the market. Most of these have an IR receiver, picking up the IR signal and relaying it via radio waves to the remote part, which has an IR transmitter mimicking the original IR control. <br>
Infrared receivers also tend to have a more or less limited operating angle, which mainly depends on the optical characteristics of the phototransistor. However, it’s easy to increase the operating angle using a matte transparent object in front of the receiver.
Infrared receivers also tend to have a more or less limited operating angle, which mainly depends on the optical characteristics of the phototransistor. However, it’s easy to increase the operating angle using a matte transparent object in front of the receiver.
<br>[[File:271.png|500px|frameless|thumb]]<br>
<br>[[File:KS0027 (5).jpg|500px|frameless|thumb]]<br>
 


<br>
==Specification==
==Specification==
*Power Supply: 3-5V
*Power Supply: 3-5V
Line 12: Line 14:
*Infrared Emission Angle: about 20degree
*Infrared Emission Angle: about 20degree
*Infrared Emission Distance: about 1.3m (5V 38Khz)
*Infrared Emission Distance: about 1.3m (5V 38Khz)
*Interface Socket: JST PH2.0
*Mounting Hole: inner diameter is 3.2mm, spacing is 15mm
*Mounting Hole: inner diameter is 3.2mm, spacing is 15mm
*Size: 35*20mm
*Weight: 3g


<br>
==Connection Diagram ==
==Connection Diagram ==
<br>[[File:Ks0027.png|700px|frameless|thumb]]<br>


<br>[[File:272.png|500px|frameless|thumb]]<br>  
<br>
 
==Sample Code 1 ==
==Sample Code ==
 
 
<pre>
<pre>
int led = 3;
int led = 3;
Line 34: Line 32:
   digitalWrite(led, LOW);   
   digitalWrite(led, LOW);   
   delay(1000);  
   delay(1000);  
}</pre>
}
</pre>
 
<br>
In the darkness of the environment, you are going to see blinking blue light on phone's screen when using camera to shoot the infrared LED.<br>
Upload well the above code to the board, the led on the sensor will blink red light.<br>
In the following, let’s move on to an interactive example between IR receiver and IR transmitter module.
 
 
<br>
===Infrared Remote/Communication:===


In the darkness of the environment, you are going to see blinking blue light on phone's screen when using camera to shoot the infrared LED.
===Infrared remote/communication:===
===Hardware List===
===Hardware List===
*UNO R3 x2
*UNO R3 x2
Line 43: Line 49:
*IR Transmitter Module x1
*IR Transmitter Module x1
Get Arduino library [https://github.com/z3t0/Arduino-IRremote Arduino-IRremote] and install it
Get Arduino library [https://github.com/z3t0/Arduino-IRremote Arduino-IRremote] and install it
===Connection Diagram:===
IR Transmitter: same as above, Notice: Arduino-IRremote only supports D3 as transmitter.
<br>[[File:273.png|500px|frameless|thumb]]<br>


IR Receiver: connet it to D11 port.
<br>
<br>[[File:274.png|500px|frameless|thumb]]<br>
<span style=color:red> Note: here if you have no two main boards, you can replace it with the breadboard for connection, may be more easier and convenient. <br>
 
<br>
===Connection Diagram===
'''For IR Transmitter:''' <br>
<span style=color:red> Notice: Arduino-IRremote only supports D3 as transmitter. <br>
<br>[[File:Ks0027.png|700px|frameless|thumb]]<br>  


Upload code to the UNO connected with IR Transmitter:
<br>
'''For IR Receiver:''' <br>
connect it to D11 port.
<br>[[File:Ks0027-2.png|700px|frameless|thumb]]<br>
 
<br>
'''Upload code 2 to the UNO connected with IR Transmitter:'''<br>
<pre>
<pre>
#include <IRremote.h>
#include <IRremote.h>
   IRsend irsend;
   IRsend irsend;
  void setup()
  void setup()
Line 61: Line 76:
   irsend.sendRC5(0x1, 8);  
   irsend.sendRC5(0x1, 8);  
     delay(200); }
     delay(200); }
}</pre>
</pre>


Upload code to the UNO connected with IR Receiver:
 
<br>
'''Upload code 3 to the UNO connected with IR Receiver:'''<br>
<pre>
<pre>
#include <IRremote.h>
#include <IRremote.h>
Line 90: Line 107:
     }
     }
   irrecv.resume();        // prepare to receive the next value
   irrecv.resume();        // prepare to receive the next value
   }}f)
   }}
}</pre>
</pre>
 
 
<br>
=== Test Result ===
When IR Receiver module receives the infrared signal from IR Transmitter, D1 led on the IR Receiver module will blink.Shown as below figure.
<br>[[File:KS0349 34-5.png|800px|frameless|thumb]]<br>
 
 
<br>
==Extension==
Or you can make further use with a 1602 LCD. Like the picture below: <br>
<br>[[File:图片-KS0027.png|600px|frameless|thumb]]<br>
 
<br>
==Resources ==
 
* '''Video'''<br>
http://video.keyestudio.com/ks0027/
 
* '''All Info.'''<br>
https://fs.keyestudio.com/KS0027
 
 
<br>
 
==Buy from ==
 
*[https://www.keyestudio.com/free-shipping-keyestudio-digital-ir-infrared-transmitter-transmit-module-for-arduino-p0169.html    '''Official Website''']
 
*[https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=keyestudio+Digital+IR+Transmitter+Module+for+Arduino  '''Amazon Store''']
 
*[https://www.aliexpress.com/store/product/Free-shipping-Keyestudio-38KHz-Digital-IR-Infrared-Transmitter-transmit-Module-for-Arduino-CE-FCC/4247007_32887976083.html?spm=2114.12010615.8148356.7.53827852viTGyz  '''Shop on aliexpress''']
 


Result: The "L" LED of the shield connected with IR Receiver will blink when IR Receiver faces to IR Transmitter.
[[Category: Sensor]]
[[Category: Sensor]]

Latest revision as of 10:40, 8 January 2021


Introduction

IR Transmitter Module is designed for IR communication which is widely used for operating the television device from a short line-of-sight distance. The remote control is usually contracted to remote.
Since infrared (IR) remote controls use light, they require line of sight to operate the destination device. The signal can, however, be reflected by mirrors, just like any other light sources.
If operation is required where no line of sight is possible, for instance when controlling equipment in another room or installed in a cabinet, many brands of IR extenders are available for this on the market. Most of these have an IR receiver, picking up the IR signal and relaying it via radio waves to the remote part, which has an IR transmitter mimicking the original IR control.
Infrared receivers also tend to have a more or less limited operating angle, which mainly depends on the optical characteristics of the phototransistor. However, it’s easy to increase the operating angle using a matte transparent object in front of the receiver.
thumb


Specification

  • Power Supply: 3-5V
  • Infrared Center Frequency: 850nm-940nm
  • Infrared Emission Angle: about 20degree
  • Infrared Emission Distance: about 1.3m (5V 38Khz)
  • Mounting Hole: inner diameter is 3.2mm, spacing is 15mm


Connection Diagram


thumb


Sample Code 1

int led = 3;
void setup() {                
   pinMode(led, OUTPUT);     
}
void loop() {
  digitalWrite(led, HIGH);  
  delay(1000);               
  digitalWrite(led, LOW);   
  delay(1000); 
}


In the darkness of the environment, you are going to see blinking blue light on phone's screen when using camera to shoot the infrared LED.
Upload well the above code to the board, the led on the sensor will blink red light.
In the following, let’s move on to an interactive example between IR receiver and IR transmitter module.



Infrared Remote/Communication:

Hardware List

  • UNO R3 x2
  • Digital IR Receiver x1
  • IR Transmitter Module x1

Get Arduino library Arduino-IRremote and install it


Note: here if you have no two main boards, you can replace it with the breadboard for connection, may be more easier and convenient.


Connection Diagram

For IR Transmitter:
Notice: Arduino-IRremote only supports D3 as transmitter.

thumb


For IR Receiver:
connect it to D11 port.
thumb


Upload code 2 to the UNO connected with IR Transmitter:

 #include <IRremote.h>
  IRsend irsend;
 void setup()
 {}
 void loop() {
  irsend.sendRC5(0x0, 8); //send 0x0 code (8 bits)
     delay(200);
  irsend.sendRC5(0x1, 8); 
     delay(200); }



Upload code 3 to the UNO connected with IR Receiver:

#include <IRremote.h>
 const int RECV_PIN = 11;
 const int LED_PIN = 13;
 IRrecv irrecv(RECV_PIN);
 decode_results results;
 void setup()
 {Serial.begin(9600);
   irrecv.enableIRIn(); // Start the receiver
 }
  void loop() 
 {if (irrecv.decode(&results)) 
   { if ( results.bits > 0 )
     {
       int state;
       if ( 0x1 == results.value )	
       {		
         state = HIGH;
       }
       else
       {
       	state = LOW;
       }
 		digitalWrite( LED_PIN, state );			
     }
  irrecv.resume();        // prepare to receive the next value
   }}



Test Result

When IR Receiver module receives the infrared signal from IR Transmitter, D1 led on the IR Receiver module will blink.Shown as below figure.
thumb



Extension

Or you can make further use with a 1602 LCD. Like the picture below:

thumb


Resources

  • Video

http://video.keyestudio.com/ks0027/

  • All Info.

https://fs.keyestudio.com/KS0027



Buy from