1838B Infrared IR receiver (HCSENS0014)

Resistors, capacitors, transistors, LED's IC's, etc.
Post Reply
admin
Site Admin
Posts: 866
Joined: Sun Aug 05, 2012 4:02 pm

1838B Infrared IR receiver (HCSENS0014)

Post by admin » Thu May 29, 2014 12:41 pm

Image

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.


ImageImage


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:
Image

Internal Diagram:
Image



Image

  1. /* FILE:    HCIRNEC_Receive_Example.h
  2.    DATE:    07/05/19
  3.    VERSION: 1.0
  4.    AUTHOR:  Andrew Davies
  5.    BY:      HobbyComponents.com
  6.    
  7. 07/05/19 version 1.0: Original version
  8.  
  9. This example sketch demonstrates how to use the HCIRNEC library to receive
  10. IR codes from an NEC compatible remote control. To use this example sketch you
  11. will need the following IR receiver:
  12.  
  13. https://hobbycomponents.com/opto-electronics/463-1838b-infrared-ir-receiver
  14.  
  15. Connect the receiver to your Arduino as follows:
  16.  
  17. 1838B.......Arduino
  18. OUT........Digital pin 2
  19. GND........GND
  20. VCC........5V for 5V Arduinos (Uno/Nano etc) or 3.3V for 3.3V Arduinos (Due)
  21.  
  22.  
  23. This library is provided free to support the open source community.
  24. PLEASE SUPPORT HOBBY COMPONENTS so that we can continue to provide free content
  25. like this by purchasing items from our store -
  26.  
  27. HOBBYCOMPONENTS.COM
  28.  
  29.  
  30. You may copy, alter and reuse this code in any way you like, but please leave
  31. reference to HobbyComponents.com in your comments if you redistribute this code.
  32. This software may not be used directly for the purpose of selling products that
  33. directly compete with Hobby Components Ltd's own range of products.
  34. THIS SOFTWARE IS PROVIDED "AS IS". HOBBY COMPONENTS MAKES NO WARRANTIES, WHETHER
  35. EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
  36. MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ACCURACY OR LACK OF NEGLIGENCE.
  37. HOBBY COMPONENTS SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR ANY DAMAGES,
  38. INCLUDING, BUT NOT LIMITED TO, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY
  39. REASON WHATSOEVER.
  40. */
  41.  
  42.  
  43. // Include the library
  44. #include "HCIRNEC.h"
  45.  
  46. //Digital pin connected to the OUT pin of the 1838B
  47. #define IRRXPIN 2
  48.  
  49. // Create an instance of the library
  50. HCIRNEC HCIRNEC;
  51.  
  52.  
  53. void setup()
  54. {
  55.   Serial.begin(9600);
  56.  
  57.   // Initialise the library to receive Rx codes
  58.   HCIRNEC.initRX(IRRXPIN);
  59. }
  60.  
  61.  
  62. void loop()
  63. {
  64.   // Check for a new code
  65.   byte state = HCIRNEC.newCode();
  66.  
  67.   switch(state)
  68.   {
  69.     case(NEWCODE):  // A new code has been received
  70.       Serial.print("New code: Address = 0x");
  71.       Serial.print(HCIRNEC.address, HEX);
  72.       Serial.print(" code = 0x");
  73.       Serial.println(HCIRNEC.command, HEX);
  74.       break;
  75.  
  76.     case(REPEATCODE): // A repeat code has been received
  77.       Serial.println("Repeat code received");
  78.       break;
  79.  
  80.     case(RECEIVEERROR): //An invalid code had been received
  81.       Serial.println("Invalid code received");
  82.       break;
  83.   }
  84. }
  85.  


Image


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.

Post Reply

Return to “Components”