HS-S23A 38K Infrared Remote Control Receiver Module

HS-S23A 38K Infrared Remote Control Receiver Module

1. Introduction

2. Schematic

Module Parameters

Pin Name

description

G

GND (Negative Power Input)

V

VCC (Positive Power Input)

S

Digital Signal Pin

  • Power Supply Voltage: 3.3V / 5V

  • Connection Type: 2.54mm Header

  • Installation Method: Double Screw Fixed

4, Circuit Board Size

5 of Arduino IDE example program

Attention: If prompted with an error message about the library file during program upload, please import the library file first!
Arduino IDE Library Download and Import Tutorial:
Click to view

Example program (UNO development board):

#include <IRremote.h>

volatile int red;
volatile int yellow;
volatile int green;
const String IR_PROTOCOL_TYPE[] = {
  "UNKNOWN",
  "PULSE_DISTANCE",
  "PULSE_WIDTH",
  "DENON",
  "DISH",
  "JVC",
  "LG",
  "LG2",
  "NEC",
  "PANASONIC",
  "KASEIKYO",
  "KASEIKYO_JVC",
  "KASEIKYO_DENON",
  "KASEIKYO_SHARP",
  "KASEIKYO_MITSUBISHI",
  "RC5",
  "RC6",
  "SAMSUNG",
  "SHARP",
  "SONY",
  "ONKYO",
  "APPLE",
  "BOSEWAVE",
  "LEGO_PF",
  "MAGIQUEST",
  "WHYNTER"
};
IRrecv irrecv_4(4);

void setup(){
  red = 9;
  yellow = 10;
  green = 11;
  Serial.begin(9600);
  irrecv_4.enableIRIn();
}

void loop(){
  if (irrecv_4.decode()) {
    struct IRData *pIrData = &irrecv_4.decodedIRData;
    long ir_item = pIrData->decodedRawData;
    String irProtocol = IR_PROTOCOL_TYPE[pIrData->protocol];
    Serial.print("IR TYPE:" + irProtocol + "\tVALUE:");
    Serial.println(ir_item, HEX);
    irrecv_4.resume();
    Serial.println(ir_item,HEX);
    switch (ir_item) {
     case 0xF30CFF00:
      //ๆŒ‰ไธ‹้ฅๆŽงๅ™จโ€œ1โ€้”ฎ็ผ–็ ๅ€ผ๏ผšF30CFF00ใ€‚็บข็ฏไบฎใ€‚
      pinMode(red, OUTPUT);
      digitalWrite(red,HIGH);
      pinMode(yellow, OUTPUT);
      digitalWrite(yellow,LOW);
      pinMode(green, OUTPUT);
      digitalWrite(green,LOW);
      break;
     case 0xE718FF00:
      //ๆŒ‰ไธ‹้ฅๆŽงๅ™จโ€œ2โ€้”ฎ็ผ–็ ๅ€ผ๏ผšE718FF00ใ€‚้ป„็ฏไบฎใ€‚
      pinMode(yellow, OUTPUT);
      digitalWrite(yellow,HIGH);
      pinMode(red, OUTPUT);
      digitalWrite(red,LOW);
      pinMode(green, OUTPUT);
      digitalWrite(green,LOW);
      break;
     case 0xA15EFF00:
      //ๆŒ‰ไธ‹้ฅๆŽงๅ™จโ€œ3โ€้”ฎ็ผ–็ ๅ€ผ๏ผšA15EFF00ใ€‚็ปฟ็ฏไบฎใ€‚
      pinMode(green, OUTPUT);
      digitalWrite(green,HIGH);
      pinMode(red, OUTPUT);
      digitalWrite(red,LOW);
      pinMode(yellow, OUTPUT);
      digitalWrite(yellow,LOW);
      break;
     case 0xBA45FF00:
      //ๆŒ‰ไธ‹้ฅๆŽงๅ™จโ€œAโ€้”ฎ็ผ–็ ๅ€ผ๏ผšBA45FF00ใ€‚ๆ‰€ไปฅ็ฏ็†„็ญใ€‚
      pinMode(red, OUTPUT);
      digitalWrite(red,LOW);
      pinMode(yellow, OUTPUT);
      digitalWrite(yellow,LOW);
      pinMode(green, OUTPUT);
      digitalWrite(green,LOW);
      break;
     default:
      break;
    }

  } else {

  }

}

6, ESP32 Python Example (for Mixly IDE/Misashi)

Choose the development board Python ESP32 [ESP32 Generic(4MB)] and upload in code mode

Attention: If prompted with an error message about the library file during program upload, please import the library file first!
Download and import tutorial for Mixly IDE ESP32 library:
Click to view

Example program (ESP32-Python):

ๅพ…ๆ›ดๆ–ฐ...

7, Mixly example program (graphical language)

Example program (UNO development board):Click to download

Example Program (ESP32 Development Board):Click to download
Attention: If prompted with an error message about the library file during program upload, please import the library file first!
Download and import tutorial for Mixly IDE ESP32 library:
Click to view

Image pending update...

8. Setting up the Test Environment

Arduino UNO Test Environment Setup

Prepare Components:

  • HELLO STEM UNO R3 PRO DEVELOPMENT BOARD *1

  • USB TYPE-C DATA CABLE *1

  • Traffic light module (HS-F05A) *1

  • Infrared receiver module (HS-S23A) *1

  • 1P female-to-female Dupont wire *7 pieces or 3P female-to-female Dupont wire *2 pieces and 1P female-to-female Dupont wire *1 piece

  • Infrared remote control*1

Circuit wiring diagram:

ESP32 Test Environment Setup

Prepare Components:Pending update...

Circuit wiring diagram:Pending update...

9, Video tutorial

Video tutorial:Click to view

10, Test results

Arduino UNO test results:

ESP32 Test Results:

Pending update...