Here is a YouTube video that provides step-by-step instructions on how to assemble the QT Py Hat board.

If you'd rather not watch the entire video, here are the steps to assemble the board. Some of these steps are in a different order than what we did in the video.

  1. Solder in all of the through-hole components. There are two kinds of IR LEDs. The clear one is a 40° wide-angle LED and the blue-tinted one is a 20° narrow-angle LED. Either one can go in either position. The short wire is the cathode and it should go towards the flat side of the circle printed on the circuit board. The long wire is the anode and to should in the other hole. Do not put the LEDs flush with the circuit board. Leave the leads along so that you can bend the LEDs over 90° as seen in the photographs and video.
  2. There are two PN2907 PNP transistors and a single PN2222 NPN transistor. These components appear identical so make sure that you get the proper ones in the proper slots. They should be oriented according to the printing on the circuit board.
  3. There is a 1K ohm resistor. The hole spacing is a little bit narrow so this component cannot be installed flush against the board but that's okay. Also, there is no polarity on a resistor so the orientation doesn't matter.
  4. Solder in the 40 pin (2x 20) female header on the underneath side of the board with the pins coming through the top side. Make sure it is flush against the board. We have waited to install this component later so that you don't accidentally bump into it with a soldering iron when installing the through-hole components.
  5. Finally, solder the QT Py board to the circuit board. Start by tacking one corner in place and check to make sure the board is straight. You can reheat that first attach point to adjust the position. Once it is in place, solder the rest of the pads. See the video for details.

If you purchased a Raspberry Pi Zero W without headers you will need to solder in a 40 pin (2x20) male header on the top of the Raspberry Pi Zero W.

Do not attach the two boards together until we have tested the boards separately.

Optional Features

The infrared transmitter circuit on this board is based on a previous board I designed which you can read about here. For some applications, the power requirements of the infrared LEDs can be excessive. We mentioned that a previous version of this project used an Arduino Yún. If we used the full power of the IR LEDs that board would sometimes crash. So we designed an optional 33-ohm resistor that you can put inline with the IR LEDs. Our testing using a Raspberry Pi Zero W has shown that these extra current limiting resistors are not necessary. But if you have another application and you believe that the IR LEDs are drawing too much power then you can cut the traces on the backside of the board and solder in a pair of 33-ohm resistors.

The TSOP 38438 is an infrared receiver that is tuned to 38 kHz. Our experience is that it is also capable of reading signals modulated from 36-40 kHz which encompasses most of the IR protocols in use today. We will use this device to determine signals from your existing remote so that we can program this device to re-create them. Unfortunately, one particular protocol "Panasonic Old" protocol #5 uses 56 kHz modulation. It is unlikely that the TSOP 38438 will be able to decode it.

The TSMP 98000 is a learning chip. It receives modulated signals directly regardless of frequency. For the time being, it can only be used to determine the frequency of the incoming signal. NOTE: We originally specified the TSMP 58000 learner but it has been discontinued and replaced with the TSMP 98000 equivalent.

For now, we will have to do things the hard way. We will receive the IR signals using the TSOP 38438 and decode them into 32-bit codes for each function. We will then have to manually edit that 32-bit code into our software along with a protocol number and some other information about the function.

Eventually, we will have new software that will turn this device into a more traditional learning remote where you can simply point your IR remote at this device and it will record it and play it back faithfully. For now, the TSMP 58000 isn't completely necessary however when we get that software developed, the TSMP 58000 device will be essential.

Other optional jumpers and solder holes are available on the QT Py Hat that are not necessary for this particular project. However, they could be quite useful for other applications of the Hat. They are explained in the YouTube video at the top of this page.

This guide was first published on Apr 17, 2021. It was last updated on Dec 18, 2023.

This page (QT Py Hat Assembly) was last updated on Dec 18, 2023.

Text editor powered by tinymce.