The Hobby Components IR Remote Control Kit has a transmission frequency of 38KHz and uses the NEC protocol. Depending on the surrounding environment, it has a launch distance of more than 8 meters with an effective angle of 60 degrees. The remote itself has 17 buttons and is powered by 1 CR2025 cell battery, which is included in the kit.
For Arduino users please checkout out exclusive library (HCIRNEC) and sketch below
- Sticking Material: 0.125mm PET
- Static Current: 3~5uA, Dynamic Current: 3~5mA
You can purchase this kit here.
IR Receiver pinout
1) GND
2) +5V
3) Signal out
Package contents
1 x Remote controller
1 x IR receiver module
1 x LED
1 x Dupont cable
Example Arduino sketch:
- /* FILE: HCIRNEC_IR_Remote_Kit_Example.ino
- DATE: 04/01/20
- VERSION: 1.0
- AUTHOR: Andrew Davies
- BY: HobbyComponents.com
- 04/01/20 version 1.0: Original version
- This example sketch demonstrates how to use the HCIRNEC library to receive
- IR codes using the IR receiver module and remote control found in the Hobby
- Components IR remote kit (HCKITS0006).
- The HCIRNEC library con be downloaded from the software section of our
- support forum here:
- https://forum.hobbycomponents.com/viewtopic.php?f=58&t=2883
- Connect the receiver module from the kit to your Arduino as follows:
- Module.........Arduino
- (-)............GND
- (+)............5V for 5V Arduinos (Uno/Nano etc) or 3.3V for 3.3V Arduinos (Due)
- (S)............Digital pin 2
- Caution: Do not connect the module to your Arduino in the above order if your
- module is not labelled exactly as above.
- This library is provided free to support the open source community.
- PLEASE SUPPORT HOBBY COMPONENTS so that we can continue to provide free content
- like this by purchasing items from our store -
- HOBBYCOMPONENTS.COM
- You may copy, alter and reuse this code in any way you like, but please leave
- reference to HobbyComponents.com in your comments if you redistribute this code.
- This software may not be used directly for the purpose of selling products that
- directly compete with Hobby Components Ltd's own range of products.
- THIS SOFTWARE IS PROVIDED "AS IS". HOBBY COMPONENTS MAKES NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ACCURACY OR LACK OF NEGLIGENCE.
- HOBBY COMPONENTS SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR ANY DAMAGES,
- INCLUDING, BUT NOT LIMITED TO, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY
- REASON WHATSOEVER.
- */
- // Include the library
- #include "HCIRNEC.h"
- //Digital pin connected to the S (digital out) pin of the receiver module
- #define IRRXPIN 2
- // Create an instance of the library
- HCIRNEC HCIRNEC;
- // Key code map for the remote control found in the kit
- const byte keyMap[][2] = {{0x45, '1'},
- {0x46, '2'},
- {0x47, '3'},
- {0x44, '4'},
- {0x40, '5'},
- {0x43, '6'},
- {0x07, '7'},
- {0x15, '8'},
- {0x09, '9'},
- {0x16, '*'},
- {0x19, '0'},
- {0x0D, '#'},
- {0x18, 'U'},
- {0x08, 'L'},
- {0x1C, 'E'},
- {0x5A, 'R'},
- {0x52, 'D'}
- };
- void setup()
- {
- Serial.begin(9600);
- // Initialise the library to receive Rx codes
- HCIRNEC.initRX(IRRXPIN);
- }
- void loop()
- {
- int keyName;
- // Check for a new code
- byte state = HCIRNEC.newCode();
- switch(state)
- {
- case(NEWCODE): // A new code has been received
- Serial.print("New code: Address = 0x");
- Serial.print(HCIRNEC.address, HEX);
- Serial.print(" code = 0x");
- Serial.print(HCIRNEC.command, HEX);
- Serial.print(" Button name = ");
- keyName = getKey(HCIRNEC.command);
- if(keyName != -1)
- Serial.println((char)keyName);
- else
- Serial.println("Unknown!");
- break;
- case(REPEATCODE): // A repeat code has been received
- Serial.println("Repeat code received");
- break;
- case(RECEIVEERROR): //An invalid code had been received
- Serial.println("Invalid code received");
- break;
- }
- }
- // Searches the keyMap array for the received IR code and
- // returns the button name. If the IR code is not found
- // in the list the function will return a -1.
- int getKey(byte code)
- {
- byte currRow = 0;
- int keyName = -1;
- // Calculate how many rows are in the keyMap array;
- byte numRows = (sizeof(keyMap) / sizeof(keyMap[0]));
- // Search for the IR code
- while(currRow < numRows && keyName == -1)
- {
- // If found get the name of the button
- if(keyMap[currRow][0] == code)
- keyName = keyMap[currRow][1];
- currRow++;
- }
- return keyName;
- }
The HCIRNEC library con be downloaded from the software section of our
support forum here:
viewtopic.php?f=58&t=2883
Disclaimer: Libraries, example code, and diagrams within this forum thread are provided as an additional free service by Hobby Components and are not sold as part of any product. We do not provide any guarantees or warranties as to their accuracy or fitness for purpose.
Descriptions and diagrams on this page are copyright Hobby Components Ltd and may not be reproduced without permission.