IR Station

IR Station

IR-Station

Infrared Remote Controller with ESP8266 WiFi-module
You can control your home appliances with your smartphone or laptop.

The latest information is here

Main parts

  • ESP-WROOM-02 (ESP8266 WiFi Module)
  • IR Receiver
  • IR LED
  • Indicator LED

Looks

The Device’s Appearance

body

body

Display Sample

display

display

How to Use

Setup the Device

  1. Supply power to the device.
  2. Connect your cellphone or laptop to Wi-Fi SSID “IR-Station”.
  3. Access http://192.168.4.1 in a browser
  4. Enter Wi-Fi SSID of your home and its password
  5. Enter a device name you like. We call it the hostname. Because it will be a part of URL, you cannot use space character.
  6. If connection succeeded, IR-Station’s local IP address is displayed. Please make a note of it.
  7. Connect your cellphone or laptop to your home’s Wi-Fi.
  8. Access http:/xxx.xxx.xx.xx (IR-Station’s local IP address) in a browser. (for example http://192.168.11.3 )
  9. If something appears, setup is complete.

Store Signals

  1. Access http:/192.168.xx.xx (one example) in a browser. 1. Look at the form of the bottom of the screen.
  2. Select “record a new Signal” action.
  3. Select a channel you want to assign a new signal.
  4. Enter a name of the signal.
  5. When you click the “Submit” button, the green LED of your IR-Station will light up.
  6. Press a button on your remote controller toward your IR-Station to store a new signal.

Remote Control

  1. Access your IR-Station in a browser.
  2. Click a button which assigned a signal you want to send.

Meanings of LED Indicator

ColorStatus
RedError
GreenProcessing
BlueListening

How to Make

Required Library

Please Add the Libraries below to your Arduino IDE

Steps

  1. Gather the components.
  2. Assemble the components according to the circuit diagram.
  3. Connect the device and the PC with a serial-to-USB conversion module.
  4. Prepare Arduino IDE and serial-USB converter’s driver.
  5. Open the preferences of Arduino IDE and fill in this URL: http://arduino.esp8266.com/stable/package_esp8266com_index.json to “Additional Boards Manager URLs”.
  6. Add “Generic ESP8266 Module” in the Arduino IDE Board Manager.
  7. Add the required libraries to your Arduino IDE in the Arduino IDE Library Manager or zip files.
  8. Open IR-Station firmware in the Arduino IDE.
  9. Select “Generic ESP8266 Module” and configure each item of board settings properly. See Arduino Board Settings below.
  10. Select correct serial COM port and upload program to the device. When upload program, GPIO0 and GPIO2 must be pulled-up, and GPIO15 must be pulled-down. It’s necessary to reset the device immediately before upload. It’s a little difficult.
  11. The uploading takes about 30 seconds.
  12. Upload the SPIFFS data: menu -> tool -> ESP8266 Sketch Data Upload. (See https://github.com/esp8266/Arduino/blob/2.3.0/doc/filesystem.md)
  13. Process termination.

Arduino Board Settings

itemselect
BoardESPino (ESP-12 Module)
Flash ModeQIO
CPU Frequency80MHz
Flash Size4M(3M SPIFFS)
Reset Methodck
Upload Speed115200

Components

Device Components

ComponentsDetailsQuantityRemarks
ESP8266 WiFi ModuleESP-WROOM-021
IR receiverOSRB38C9AA1Power: 3.3V
IR LEDOSI5FU3A11C4anything maybe OK
Voltage RegulatorNJU7223-331output: 3.3V 500mA
Nch MOS-FETIRLML63441
Resistor for IR LED4.7 ohms, 1W2
Pull-up/down Resistor10k ohms5
Indicator LEDOSTBABS4C2B1
Resistor for LED100~220 ohms3
Resistor for IR receiver220 ohms1
Capacitor for IR receiver4.7uF3
Power Stabilization Capacitor100uF1
Bypass Capacitor0.1uF3
User ButtonSKRPACE0101
Poly SwitchMICROSMD035F-021up to 350mA
USB ConncectorUSB-Micro-B1Power Only

Components

Components

Requires

RequiresDetailsQuantity
Serial-to-USB conversion Modulesuch as FT2321

Circuit Diagram

sketch

sketch

Breadboard Sample

sample

sample

3D shape

3D

3D

PCB pattern sample

PCB

PCB

IR data JSON format

Format

[
	uint16_t microseconds_high, uint16_t microseconds_low, uint16_t microseconds_high, uint16_t microseconds_low, ...
]

Sample

[
	3300,1786,363,1305,390,473,364,476,317,548,289,577,288,501,364,474,390,475,290,550,289,1403,290,551,314,1377,290,552,313,502,362,1379,289,1378,289,1378,314,1377,389,1304,364,476,312,552,290,553,312,474,391,1305,362,501,364,474,361,504,289,553,312,477,363,500,364,476,287,578,289,1377,314,551,290,502,363,476,388,474,391,451,313,551,313,553,288,500,363,1304,385,1362,310,475,389,475,364,477,313,552,288,1380,317,50215,3305,3489,314
]

HTTP API v1.5.0

Setup Form

PathMethodParameter(s)ReturnRemarks
/GETindex.htmlsetup form page
/wifi/listGETa list of (string)a list of existing WiFi SSID
/wifi/confirmPOSTIP Address or “false”confirm if WiFi connection is established and reboot the device
/mode/stationPOSTssid, password, stealth, hostnamemessageset the device as Station Mode
/mode/accesspointPOSThostnamemessageset the device as AP Mode
/dbgGETssid, passwordlocal_ip or “false”

Main Page

PathMethodParameter(s)ReturnRemarks
/GETindex.htmlmain page of IR-Station
/infoGETstation.jsona json includes the device information
/signals/sendPOSTidmessage
/signals/recordPOSTrow, column, namemessage
/signals/renamePOSTid, namemessage
/signals/movePOSTid, row, columnmessage
/signals/uploadPOSTirJson, row, columnmessage
/signals/clearPOSTidmessage
/signals/clear-allPOSTmessage
/schedule/newPOSTid, timemessage
/schedule/deletePOSTschedule_idmessage
/wifi/disconnectPOSTnone
/wifi/change-ipPOSTlocal_ip, subnetmask, gatewaymessage

result json

{
	"code":0 or -1,
	"message":"message"
}