The motivation comes from being unable to use the infrared capability of my Samsung Galaxy S5 phone, as there's no app that knows the infrared codes for my TV, set-top-box or soundbar. There are however apps that take Pronto HEX codes, e.g. Universal TV Remote (org.twinone.irremote), so all I would need is my own IR code learner.
ST has its own app note on how to implement IR RC functionality:
www.st.com/resource/en/application_note/dm00271524-implementation-of-transmitters-and-receivers-for-infrared-remote-control-protocols-with-stm32cube-stmicroelectronics.pdf
However that document deals with specific protocols, while raw Pronto HEX is a universal format that can describe any modulated IR code, which is why it's so widely supported for IR learning. There is a nice document to understand how raw Pronto HEX codes are interpreted:
https://www.majority.nl/files/prontoirformats.pdf
Even though I only need an IR receiver, I will be implementing a transmitter as well. The transmitter's implementation seems simpler - it's not learning a foreign code with unknown frequency, just switching PWM on-off - I can use the transmitter to create a Hardware-in-the-Loop test by shorting the MCU's transmitter and receiver pins.
Steps to completion:
- Implement IR transmitter that can process raw Pronto HEX codes, verify with logic analyzer
- Implement IR receiver that can receive the looped signal near identically (an error in detected carrier frequency is tolerable)
- Implement Pronto HEX string conversion, and bidirectional UART transfers
- Install real IR sensor to the MCU, verify that it has output with logic analyzer
- Emit a simple Pronto code from smartphone, check learning on MCU
- Learn a real RC code, replay the code from smartphone / MCU