“This IR remote control is powered only while one of its buttons is pressed.
To watch TV I needed two IR remote controls, one for my TV set and the other one for my decoder. I wanted to combine them into a single one. The Arduino Project Hub contains several projects that describe IR remote controls, but the specificity of this one is that it is battery powered and that the battery saving has been maximized as far as possible.
The code of this project is specific to the remote controls it replaces, and you can find codes for IR remotes in several projects on the Arduino hub. So I won’t describe my code, and I will only show the hardware solution which allowed power consumption to be limited to the strict minimum.
The remote control is built around an Arduino Nano Every board and 16 push buttons connected to 16 inputs of the board. Of course, you can use fewer buttons. The board is powered by a 9V battery through a P-channel FET. As long as no button is pressed, that FET is blocked and the board is not powered.
The gate of this FET is controlled by the drain of an N-channel FET whose gate is controlled by the buttons through diodes which isolate the buttons from each other. Each button is associated with a 2.2kΩ pull-down resistor that fixes the level of the board input when the button is not pressed. The value of these resistors had to be determined experimentally because when the card is not powered, the behavior of its inputs is not specified.
To complete the description of the circuit, two 220 kΩ resistors fix the level of the gates of the FETs and protect them from ESD. When a button is pressed, a voltage divider is created by a 1.5 kΩ resistor and the 2.2 kΩ associated with the button. This voltage divider applies a voltage of about 5 V to the corresponding input of the board. Finaly, an IR LED is driven by the pin D11 of the board through a 220 Ω resistor.
I don’t know if the board is stressed by these repeated power-up and down, and therefore if it will last a long time before failing, but I know that the battery will last a long time because it is solicited very few.”