This is a stripped-down programmable AC remote control made with Arduino Pro Mini. Software is based on Shirriff's IRremote library.
The remote has two buttons and three LEDs. One button turns off the AC unit, and the other sets the cooling level (1, 2 or 3), shown by the LEDs.
- 2 - IR sensor (VS1838 output)
- 3 - IR LED (NPN/N-MOSFET transistor driven)
- 4 - LED 1
- 5 - LED 2
- 6 - LED 3
- 7 - Blink LED (on send and for other info)
- 10 - Level buton (
INPUT_PULLUP
) - 11 - Off button (
INPUT_PULLUP
)
Instead of decoding specific remote control data, like number of bits, function of each bit, checksum etc, this project aims to reproduce whatever command is presented with a timing decode/encode approach, i.e. raw data is transformed to bits by association with a generic protocol, defined by some timing paratemers.
Once the decode process is done, the data bits are stored on Arduino's EEPROM memory, and then loaded on next system boot.
IRData.hpp
defines a class that holds an IR data packet, consisting of a protocol reference and the decoded data bits.
IRProtocols.hpp
defines an IR protocol class with its timings and arbitrary ID number and name; and also defines a storage class for all protocols used in this project.
IRDecoder.hpp
and IRSender.hpp
defines functions for decoding and encoding of IR data. The decode process compares the raw data provided by IRremote library with the available protocols.
IRRawAnalyzer.hpp
holds a function that analyzes the raw IR data, basically counting and printing the occurence of each width found, useful to debug and identify new protocols.
The following changes were made on IRremote library:
On file IRremoteInt.h
:
RAWBUF
to300
, in order to capture bigger packets._GAP
to10000
, in order to capture shorter headers and repeated data.- struct
irparams_t
, and also on fileIRremote.h
classdecode_results
, changerawlen
type touint16_t
MARK_EXCESS
to 0TOLERANCE
to 10
- HVAC IR Control
- Cooking hacks IR Remote shield
- VS1838B IR receiver module
- VS1838B datasheet
- Random word generator : used as protocol name generator (uncommon nouns mode)
Copyright 2017 Gutierrez PS