Here is a list of everything you will need for this project.
Although this project can use any Raspberry Pi that has Wi-Fi capability which includes the various varieties of models 3 and 4, we recommend the Raspberry Pi Zero W or Raspberry Pi Zero WH. The "WH" is identical to the "W" model except that it has the headers pre-soldered. If you already have 2 x 20 pin headers available you can save $4 and solder them yourself.
You will need a 5V power supply. We recommend this 2.5 amp supply with a micro USB cable already attached.
You will need a microSD card for the operating system. It should be at least 8Gb. You will need the capability of reading and writing information to this card from your PC or laptop. Although you can purchase an SD card with the NOOBS operating system preinstalled, we have not used that method and so the procedures we outline here will not exactly be the same. So we recommend getting a plain card and downloading NOOBS yourself.
We will be configuring the Raspberry Pi Zero W as a "headless" device. That means it will not need a monitor, keyboard or mouse. If you intend to use the Pi Zero W for other purposes you might want to consider getting an HDMI cable, Mini-HDMI to HDMI adapter, USB OTG cable, and USB Console cable as recommended on the Raspberry Pi Zero W product page.
This project is designed to work with the Adafruit QT Py-SAMD21. In addition to the board itself, you will also need a USB C cable for programming it.
Note that the QT Py Hat has been designed with the upcoming RP 2040 version of the QT Py board in mind however, the software included in this tutorial is not compatible with the RP 2040 because it uses the Arduino IDE C++ as well as IRLib2 neither of which currently support the RP 2040. The IRLib2 library may eventually support the RP 2040 processor and we will update the software when that capability is available.
Although not necessary for this project, you might also want to consider getting the 2 MB SPI 8 pin add-on memory chip. The QT Py Hat board has a hole in it to accommodate this chip which might be useful for future projects.
The QT Py circuit board is an open-source board. The Eagle CAD files for the board are available in a GitHub repository that you can download at the button below. The same repository also contains all of the software necessary for the project as well as STL files for a 3D printed case. You should download it now for later use.
You can submit the board files to your favorite board manufacturer, make the board yourself or you can also order the board directly from the following vendors
Here are images of the board and schematics.
You will also need a number of through-hole components. Most of the parts you will need are available from Adafruit. Some that are not available at Adafruit are available from a variety of suppliers. At the end of this list will give you a complete list of through-hole parts available from Digi-Key.
First, we will need 2 IR LEDs. We prefer to use a combination of wide-angle and narrow-angle LEDs. This narrow 20° angle LED is available from Adafruit. A 40° wide-angle LED is available from Digi-Key. See the Digi-Key parts list at the end.
You will also need an NPN transistor and 2 PNP transistors. Here Adafruit has a combo pack of five of each or you can buy them separately in packs of 10.
You will need a 1K ohm resistor and optionally you may need two 33 ohm resistors. Adafruit carries the 1K variety but if you need the 33 ohm see the Digi-Key parts list at the end of the page. We will explain later why you may or may not need the 33 ohm resistors.
You will need an infrared receiver such as this TSOP38238 from Adafruit. In the Digi-Key parts list, we specify a TSOP38438 which has a slightly better automatic gain control circuit however the 38238 from Adafruit will work fine under most every circumstance. You may also need an infrared learner device the TSMP 58000 from Digi-Key. We will explain later why you might need a TSMP58000.
The board requires a 2x20 pin female header to connect it to the Raspberry Pi.
Here is a parts list for the through-hole parts from Digi-Key.
- 1 -- IR333C/H0/L10 IR LED 40° angle from Digi-Key
- 1 -- IR333A 20° angle from Digi-Key
- 1 -- 1k ohm resistor from Digi-Key
- 2 -- 33 ohm resistors from Digi-Key (optional)
- 1 -- PN2222 NPN transistor TO-92 case from Digi-Key
- 2 -- PN2709 PNP transistor TO-92 case from Digi-Key
- 1 -- TSOP 38438 38 kHz IR receiver module from Digi-Key
- 1 -- TSMP 58000 IR learner module from Digi-Key