Week 7 ยท Displays & Signals

Session 33: IR remote control

Teach & buildFlex120 minLesson 22: Infrared Remote Control

Learning outcomes

  • Explain how a 38 kHz receiver demodulates a remote's signal
  • Wire the IR receiver after checking its pinout
  • Capture your remote's codes with IRremote 4.x
  • Map remote buttons to actions with a switch

Kit and components

  • Uno, IR receiver module, kit remote, servo or RGB LED circuit
  • Oscilloscope

Pre-reading about 20 min

Students read these on their phones before class. They are listed on the student Before class page.

  1. Lesson 22: Carrier, demodulation and protocols
  2. Lesson 22: Receiver pinout
  3. Lesson 22: Capture, then map

Session plan

  1. 0:0010 min
    Recap

    Quiz: buses

  2. 0:1015 min
    Demo

    Light you cannot see

    Point a phone camera at the remote to see its LED flash, then show the demodulated receiver output on the scope.

  3. 0:2530 min
    Build

    Capture the codes

    Students run the worked sketch and record the protocol and command for at least six buttons.

  4. 0:5525 min
    Measure

    Scope the receiver output

    Students capture one button press at 10 ms/div and identify the leader pulse and the data bits.

  5. 1:2030 min
    Build

    Remote-controlled outputs

    Students use a switch on the command to set the servo angle or LED colour from their code table.

  6. 1:5010 min
    Wrap-up

    Remote or button?

Checkpoint: ready to move on?

Students have a table of their own remote's codes, and the remote controls an output through a switch.

Extension for fast finishers

Hold-to-repeat: make two buttons step the servo while they are held.

Catch-up path

Capture the codes and map two buttons only.

Homework and practice

Pre-reading for S34.

Facilitator notes

  • Receiver modules differ in pin order. Check the silkscreen before power - a reversed receiver gets hot.
  • Flex session: in a shorter course keep this lesson as final project material.