Skip to content

IR Receiver and Remote Control in AlphaBot V2

Overview

The AlphaBot V2 robot kit includes an infrared (IR) remote control system that allows you to wirelessly command your robot.This IR system provides a simple, low-cost wireless control method for your AlphaBot V2 robot. The decoding happens in software, allowing flexibility to work with different remote controls by adjusting the button codes.

Key Feature

  • IR Receiver Module
    • Typically connected to pin 4 on the AlphaBot V2
    • A small 3-pin component (VCC, GND, Signal)
    • Detects modulated infrared signals at 38kHz
    • Outputs a digital signal to the microcontroller
  • IR Remote Control
    • Uses infrared LEDs to transmit commands
    • Each button sends a unique code
    • Works on the NEC protocol (common standard)

Working

  • Signal Transmission (When Button Is Pressed)
    • The remote's IR LED emits a modulated infrared signal ,the signal contains a specific code for that button
    • The signal is modulated at 38kHz to avoid interference from ambient light
  • Signal Reception (The IR receiver on the AlphaBot)
    • Detects the 38kHz modulated signal, demodulates it to extract the digital code
    • Sends the decoded signal to the Arduino
  • Signal Decoding (NEC Protocol)
    • 32-bit transmission (4 bytes)
    • Starts with a 9ms leading pulse burst
    • Followed by a 4.5ms space
    • Then the address and command bytes
    • Uses pulse-distance encoding
  • Remote Control Functions
    • KEY2 (0x18): Move Forward
    • KEY8 (0x52): Move Backward
    • KEY4 (0x08): Turn Left
    • KEY6 (0x5A): Turn Right
    • KEY5 (0x1C): Stop
  • Practical Considerations
    • Range: Typically works within 5-10 meters depending on lighting conditions
    • Obstructions: Requires line-of-sight between remote and receiver
    • Button Codes: You may need to adjust the hex codes if using a different remote
    • Interference: Sunlight and other IR sources can cause interference