Easy Basics: Project 010a IR receiver VS1838B and IR remote control Arduino Car Mp3

of Acoptex.com in UNO

Basics: Project 010a

Project name: IR receiver VS1838B

Attachments: libraries and program

In this project, you needed these parts :

1.Aruduino Uno R3 (you can also use the other version of Arduino)

2.VS1838B IR receiver

3.Arduino IDE ( you can download it from here  )

4.Jumper cables

5. IR remote control Arduino Car Mp3

6. LED 1 pc (Red)

7. Resistor 1 pc (220 Om)

Understanding the IR receiver

This tutorial will first explain the inner workings of common IR communication protocols. Then we will go over two examples that will allow you to transmit and receive IR data using an Arduino. In the first example, we will read incoming IR data from a common remote control using the TSOP382 IR photo sensor. The next example will show you how to transmit data from an IR LED to control a common appliance, for example your home stereo.

All of the gritty signal processing is handled by a great Arduino library written by Ken Shirriff and allows you to easily send and receive IR data. For additional details on how the IR Arduino library works, see Ken’s blog here. Also, the code examples used in this tutorial are found in the examples directory in the library.

IR, or infrared, communication is a common, inexpensive, and easy to use wireless communication technology. IR light is very similar to visible light, except that it has a slightlty longer wavelength. This means IR is undetectable to the human eye - perfect for wireless communication. For example, when you hit a button on your TV remote, an IR LED repeatedly turns on and off, 38,000 time a second, to transmit information (like volume or channel control) to an IR photo sensor on your TV.

You can find VS1838B IR receiver datasheet here.

Understanding the IR remote control Arduino Car Mp3

The new ultra-thin 38K universal infrared remote control, NEC encoding format 1-21-key remote control, USB port stereo, car MP3, foot bath, lighting, digital photo frame, microcontroller development board, learning board, etc..


  • Remote control distance: more than 8 meters
  • Launch tube infrared wavelength: 940Nm
  • Crystal: the oscillation frequency of 455 KHz
  • IR carrier frequency: 38KHz
  • Encoding: the encoding format of the NEC, upd6122 encoding scheme, the user code 00FF, key coding below picture
  • Size: 86 * 40 * 6mm
  • Frequency: 38K
  • Power supply: CR2025/160mAH
  • Button: free height is less than 3mm, the force 200-350g, the life of more than 200 000

You need a IR receiving breakout to detect the IR signal and decodes it as HEX code, then dispaly it on the serial monitor to read what the remote control send.

When you press any button on the remote control, serial monitor shows the hexadecimal code of that button.Every button on the remote control has a corresponding hexadecimal code. If you keep on pressing any button, it shows FFFFFFFF on the serial monitor. As well as the IR transmitter and receiver module, keep the IR LED on the remote control opposite the IR detector for better signal reception.

Signals and connections of IR receiver and LED

There are 3 connections : Signal (Output), GND (0V) and VCC (+5V)

Connect the long leg of the LED (the positive leg, called the anode) to the other end of the resistor. Connect the short leg of the LED (the negative leg, called the cathode) to the GND. Resistor connected for long leg.


The following picture shows the needed connections with the Arduino Uno 

Step by Step instruction

  1. Plug your Adruino Uno board into your PC and select the correct board and com port
  2. Open up serial monitor and set your baud to 9600 baud
  3. Verify and upload the the sketch to your Adruino Uno
  4. When you press the key, infrared rays will be emitted from the IR remote control and received by the infrared receiver, and the LED on the Arduino Uno board will light up. Connect an red LED to pin 13 on the Arduino Uno board so that you can see remotely whether the key is pressed down. 
  5. For example when you press CH- button on IR remote control you can see this line in serial monitor: irCode HEX: FFA25D irCode DEC: 16753245, bits: 32



See the codes of Arduino Car MP3 IR remote control keys below (DEC or HEX):

  • CH- irCode: 16753245 or FFA25D
  • CH  irCode: 16736925 or FF629D
  • CH+irCode: 16769565 or FFE21D
  • PREV irCode: 16720605 or FF22DD
  • NEXT irCode: 16712445 or FF02FD
  • PLAY/PAUSE irCode: 16761405 or FFC23D
  • -      irCode: 16769055 or FFE01F
  • +     irCode: 16754775 or FFA857
  • EQ   irCode: 16748655 or FF906F
  • 0      irCode: 16738455 or FF6897
  • 100+irCode: 16750695 or FF9867
  • 200+irCode: 16756815 or FFB04F
  • 1 irCode: 16724175 or FF30CF
  • 2 irCode: 16718055 or FF18E7
  • 3 irCode: 16743045 or FF7A85
  • 4 irCode: 16716015 or FF10EF
  • 5 irCode: 16726215 or FF38C7
  • 6 irCode: 16734885 or FF5AA5
  • 7 irCode: 16728765 or FF42BD
  • 8 irCode: 16730805 or FF4AB5
  • 9 irCode: 16732845 or FF52AD
  • if any key kept pressed irCode: 4294967295 or FFFFFFFF


  • See attachments on the begining of this project description - all libraries included.
  • Used IRremote library for this project which is included in attachment.


  • See attachment on the begining of this project description.

Other projects of Acoptex.com
Easy Merry Xmas to everyone of Acoptex.com, Not selected 24-12-2019

Published at 04-07-2017
Viewed: 7859 times