- Ozeki 10
- Analog Sensor
- DC Motor
- DHT Sensor
- ID Manager
- IR Transceiver
- Arduino Mega
- Arduino Nano
- Arduino Uno
- Chat Control
- LCD Display
- NFC Reader
- Optical Gate
- RF 433 MHz
- RF 2.4 GHz
- RGB LED
- RGB Sensor
- Rotary Encoder
- Servo Motors
- Stepper Motors
- Switch Controller
- Temperature Sensor
- PBX VoIP Phone
- Speech Engines
- Autoconnect to Serial
- Installation guide
- Terms and Definitions
- Ozeki 10 Guide
- HTTP API
- Network speed calculate
- Bulk Messenger
- Cluster Software
- Developer tools
How to use an Arduino IR Transceiver
This guide shows you how you can work with infrared sensors. Infrared (IR) communication is a widely used and easy to implement wireless technology that has many useful applications. The most prominent examples in day to day life are TV/video remote controls, motion sensors, and infrared thermometers. At the end of this document, you will be able to get familiar with IR sensors and how to work with them by using Ozeki 10. The guide contains diagrams and videos to help you during your tour. So, let's get started.
What is infrared?
Infrared radiation is a form of light similar to the light we see all around us. The only difference between IR light and visible light is the frequency and wavelength. Infrared radiation lies outside the range of visible light, so humans can’t see it. Because IR is a type of light, IR communication requires a direct line of sight from the receiver to the transmitter. It can’t transmit through walls or other materials like WiFi or Bluetooth.
What is an IR Transceiver?
An infrared (IR) transceiver is a device which is capable of both sending and receiving infrared data. These devices are most commonly seen in use in communications, although they have other applications as well.
How does an IR Tranceiver work?
A typical infrared communication system requires an IR transmitter and an IR receiver. The transmitter looks just like a standard LED, except it produces light in the IR spectrum instead of the visible spectrum. The same type of LED is used in IR transmitter breakout boards for the Arduino. The IR receiver is a photodiode and pre-amplifier that converts the IR light into an electrical signal.
How to use an Arduino IR Transceiver?
To connect the transceiver to your Arduino, you need three wires to be connected. The first one goes from the G pin of the transceiver to the ground (Gnd), the transceiver's R pin goes to the 5V pin of the Arduino. Lastly, the Y pin from the transceiver needs to be connected with digital input from the Arduino.
Arduino IR Transceiver wiring diagram
Figure 1 - Wiring diagram of Arduino IR Transceiver
How to use IR Transceiver in Ozeki
IR Transceiver connections are capable to forward any signal received from the most popular remote controller brands to any connection in your Ozeki software. It can also send any data for transmission. The transmitter can imitate the most significant remote controller brands, so you are able to control any device belonging to these brands. To use the IR Transceiver in Ozeki, you first need to download Ozeki Robot Developer. Ozeki Robot Developer will install the Arduino libraries needed to use this sensor efficiently.
After Ozeki Robot developer is installed, you need to upload the IR Transceiver control code to your Arduino. You can find the code and download instructions on the following pages. The upload process includes two steps: first you need to format the EEPROM of the arduino, then you need to upload the control code. The procedure is very simple, it only takes a few seconds.
The arduino sensors and Ozeki will communicate over the USB port using the Ozeki IR Transceiver protocol. This protocol makes it possible for you to use the sensor directly on your PC. You will be able to control this sensor through the web based user interface or you will be able to communicate with it using Ozeki Chat. You can read more about chat control on the following page.
It is important to understand chat control, because when you build a robot, the way you wish to control this sensor is by sending and receiving messages. If you open the Ozeki Robot Developer app, you will see, who you can write a C#.Net program to work with this sensor.
- Connect the IR Transceiver to the Arduino using the wiring diagram
- Attach the Arduino board to your PC
- Check the COM port to see if the Arduino is connected properly
- Open the Arduino application on the computer
- Upload example code to the Arduino
- Open Ozeki 10 by typing https://localhost:9515 in your browser
- Select the connection of the IR Transceiver
- Send test message to try out your IR Transceiver
The system we suggest consists of a IR Transceiver, that is wired to the analog port of your Arduino. The Arduino will be responsible for reading data from this device in real-time. The brain of the system will be running on a PC (Figure 2). On the PC, Ozeki 10 will be able to manage the communication. You can easily run Ozeki 10 using a webbrowser.
Figure 2 - System configuration of IR Transceiver connecting to PC using Arduino
Decoding protocols for receiving
Encoding protocols for transmission
- Infrared LED for transmitter or infrared sensor (e.g. 1838B) for receiver
- Ozeki 10 installed on your computer
- Programmable board (Arduino Mega/Nano/Uno)
- USB cable is needed between Arduino Mega/Nano/Uno and your computer
Step 1 - Wire the IR sensor to your Arduino
You can see how to wire an IR sensor (such as 1838B) to any of the following boards:
After wiring, please plug the board to your computer!
Step 2 - Upload code to the microcontroller
Step 3 - Start Ozeki 10 to try the receiver
Step 4 - Wire an infra LED to your Arduino
You can see how to wire an infra LED to any of the following boards:
After wiring, please plug the board to your computer!
Step 5 - Upload code to the microcontroller
Step 6 - Start Ozeki 10 to try the transmitter
Step 7 - Understand the IR Transceiver protocol
The IR Transceiver can communicate with Ozeki through the following protocol.