Description:
The 1838B is a miniaturised infrared receiver for remote control and other applications requiring improved ambient light rejection. The separate PIN diode and pre-amplifier IC are assembled on a single leadframe. The epoxy package contains a special IR filter. This module has excellent performance even in disturbed ambient light applications and provides protection against uncontrolled output pulses. The receiver can be powered from a 3.3V or 5V supply and with just one data output pin allows it to be easily interfaced with many types of microcontrollers.
Features:
• Photo detector and preamplifier in one package .
• Internal filter for PCM frequency.
• Inner shield,good anti-interference ability.
• High immunity against ambient light.
• Improved shielding against electric field disturbance
• 3.0V or 5.0V supply voltage; low power consumption.
• TTL and CMOS compatibility.
• Suitable transmission code: NEC code,RC5 code.
Specification:
Model number: 1838B (HCSENS0014)
Supply voltage: 2.7 to 5.5V
Supply Current : 0.4 to 1.5mA
Reception Distance: 18 Meters
B.P.F Center Frequency: 38KHz
Reception angle: +/- 45 Degrees
Typ -3Db bandwidth: 3.3KHz
VOL (5V Vcc): 0.4V
VOH (6V Vcc): 4.5V
Pinout:
1...OUT
2...GND
3...VCC
Dimentions:
Internal Diagram:
- /* FILE: HCIRNEC_Receive_Example.h
- DATE: 07/05/19
- VERSION: 1.0
- AUTHOR: Andrew Davies
- BY: HobbyComponents.com
- 07/05/19 version 1.0: Original version
- This example sketch demonstrates how to use the HCIRNEC library to receive
- IR codes from an NEC compatible remote control. To use this example sketch you
- will need the following IR receiver:
- https://hobbycomponents.com/opto-electronics/463-1838b-infrared-ir-receiver
- Connect the receiver to your Arduino as follows:
- 1838B.......Arduino
- OUT........Digital pin 2
- GND........GND
- VCC........5V for 5V Arduinos (Uno/Nano etc) or 3.3V for 3.3V Arduinos (Due)
- 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 OUT pin of the 1838B
- #define IRRXPIN 2
- // Create an instance of the library
- HCIRNEC HCIRNEC;
- void setup()
- {
- Serial.begin(9600);
- // Initialise the library to receive Rx codes
- HCIRNEC.initRX(IRRXPIN);
- }
- void loop()
- {
- // 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.println(HCIRNEC.command, HEX);
- 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;
- }
- }
The HCIRNEC Arduino library for the above sketch can be downloaded from the software section of our support forum here:
viewtopic.php?f=58&t=2883&p=7321
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.