Universal IR remote controller

a universal IR remote controller with only WIFI connection required by RTL8722DM

Similar projects worth following
The project aims to control the TV by using a universal IR control box. There are 3 major benifits to use this project.
1, Contactless from use to TV control (only requires to touch the phone).
2, Universal learning mode. It can be used for all TVs that using IR remote control.
3, Customize data and UI by micro SD card.

There are 5 steps of this project.
1. test IR and TV remote and simulate the signal
2. store the signal into text files and old the data into RTL8722DM by micro SD card.
3. set server from the RTL8722DM
4. use Eink to display the QR of server IP
5. write the HTML UI for phone to use.
All source codes is from the links below.

The block diagram comes first before starting the project. 

The whole system is shown above. This is a contactless system all data is transferred by wireless. Phone and mini control box required to connect the same WiFi. There is an E-ink screen on the box that used to display the QR code of the server IP after connected with WiFi. The phone then scans the QR and uses the link to visit HTML UI to control the TV. 

Below is the hardware of the box. 

The following pictures are the process of the system.  The dotted box is the pre-request of the process.

The first part is to get the signal from the target TV controller. 

the remote controller has a very simple circuit. We can easily get the IR signal from the IR sensor (the LED) positive PIN with power the controller by 3 volts.

the measure the signal, I use the logic analyzer. It is simply a connection with USB to PC to monitor the signal. 

above it the power button from my measurement. each group of the signal represents a press of the POWER button. In this case, I just hold the button. 

Zoom in,  we will see the clear shape of signals. This is the KEY to control TV. Record the period of the peeks.

Zoom in more, I will see the signal and get the carrier frequency. 

let us chose the IR transmitter and simulate the signal. my reference is

Above are my hardware connections. 

Above channel 0 is the real TV signal, channel 1 is my simulated signal.  There is no difference if it is active high or low. Because the IR signal is a kind of light, the receiver only gets light or dark. In my case, it is fine. 

By, we can simply edit the "irRawSignal" to store all data and let the IR transmitter send them.

Each pair of the number is a "high peak" and "low peak" of the signal. So if I want to send 5 signals(power on/off, vol +, vol -, ch +, and ch -), there has to be 5 this kind of array. Also, there is 1 more data that needs to be stored, "#define CARRIER_FREQ        38000". the different brand has a different use of IR, which leads to a different frequency. 

The next step is to store and read data from a microSD card.

My major codes refer to Basically, I just want to store all data into 5 text files and let the file system help to read from the MicroSD card into the board. Then use all reader data to processed the IR signal. 

Above are my files, and I have put the "CARRIER_FREQ" stored at the first of the power data file. 

Above is what is inside the file. We should care about "the end of line" ("CRLF"). This considers 1 character when handling the data by referring Ascii Table. 

By referring to the above example, it is quite easy to get all data. 

In the future, we just need to change or update the 5 files in the SD card, then the system will perfectly match with all brands of TV/IR system. 

Now is the real fun part. WiFi webserver part. 

Refer to the demo . it is very easy to make a server, thanks to the example, saved a lot of time. 

Next stage, import the HTML for control design. 

Well, it should be whatever HTML file I have, I just put it in the SD card and the system should be able to load the HTML design and give me the UI. But I am not able to write an HTML reader by fatfs. So I just hard copy, put each line of my HTML design into the Arduino demo code. just like the demo here, 

So we have signal, control, and server. How is the cell phone able to control the system. Or easy to say how does the phone able to find the server? The QR code indeed. ...

Read more »

Part Studio 1.png


Portable Network Graphics (PNG) - 971.89 kB - 06/03/2021 at 11:36


Part Studio

stl files

x-zip-compressed - 812.55 kB - 06/03/2021 at 11:36


  • 1 × RTL8722DM_mini the WiFi SoC development board
  • 1 × IR sensor transmitter Grove – Infrared Emitter
  • 1 × audio jack male cable connect IR sensor and SoC development board
  • 10 × wires for connection
  • 1 × power circuit for output 3.3V or 5V to power the system. this is optional the system can be powered by a micro USB cable

View all 8 components

View all 7 project logs

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates