# Owl IR TV Remote

## Overview

https://youtu.be/qT8jQussOno

## TV Remote with CircuitPython

Build your own IR remote using QT Py RP2040 and CircuitPython! The LED arcade button can be programmed to transmit just about any IR signal.

![3d_printing_guide-loop.gif](https://cdn-learn.adafruit.com/assets/assets/000/113/110/medium640thumb/3d_printing_guide-loop.jpg?1657633427)

## NeoPixel Status

The LED illuminates when the arcade button is pressed and the QT Py's on-board NeoPixel LED turns on, letting you know the IR signal has been sent. The NeoPixel color switches from green to red.

![3d_printing_button-loop.gif](https://cdn-learn.adafruit.com/assets/assets/000/113/112/medium640thumb/3d_printing_button-loop.jpg?1657634210)

## Embedded Electronics

All of the electronics are housed inside a snap fit case. The QT Py RP2040 is secured to a quarter-sized Perma-Proto via headers making it modular.

![3d_printing_hero-case-open.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/111/medium640/3d_printing_hero-case-open.jpg?1657633741)

## Prerequisite Guides

Take a moment to browse through the following guides

- [QT Py RP2040](https://learn.adafruit.com/adafruit-qt-py-2040)
- [IR Sensor](https://learn.adafruit.com/ir-sensor)
- [All About LEDs](https://learn.adafruit.com/all-about-leds)

![](https://cdn-learn.adafruit.com/assets/assets/000/113/113/medium800/3d_printing_hero-code.jpg?1657634549)

## Parts

Parts to build this project.

- [QT Py RP204](https://www.adafruit.com/product/4900)
- [IR LEDs](https://www.adafruit.com/product/387)
- [IR Receiver](https://www.adafruit.com/product/157)
- [Mini Arcade Button with LED](https://www.adafruit.com/product/3429)
- [Perma-Proto Quarter Size](https://www.adafruit.com/product/1608)
- [USB-C cable](https://www.adafruit.com/product/5044)
- [JST 2-pin female cable](https://www.adafruit.com/product/3814)
- [JST 2-pin male cable](https://www.adafruit.com/product/261)&nbsp;
- [100ohm Resistor](https://www.adafruit.com/product/4293)
- [M3 Hardware Kit](https://www.adafruit.com/product/4685)

![3d_printing_parts.jpg](https://cdn-learn.adafruit.com/assets/assets/000/112/936/medium640/3d_printing_parts.jpg?1657214721)

### Adafruit QT Py RP2040

[Adafruit QT Py RP2040](https://www.adafruit.com/product/4900)
What a cutie pie! Or is it... a QT Py?&nbsp;This diminutive dev board comes with one of our new favorite chip, the RP2040. It's been made famous in the new [Raspberry Pi Pico](https://www.adafruit.com/pico) _and_ our [Feather...](http://www.adafruit.com/product/4884)

In Stock
[Buy Now](https://www.adafruit.com/product/4900)
[Related Guides to the Product](https://learn.adafruit.com/products/4900/guides)
![Video of hand holding a QT Py PCB in their hand. An LED glows rainbow colors.](https://cdn-shop.adafruit.com/product-videos/640x480/4900-06.jpg)

### Super-bright 5mm IR LED

[Super-bright 5mm IR LED](https://www.adafruit.com/product/387)
Infrared LEDs are used for remote controls (they're the little LED in the part you point at your TV) and 'night-vision' cameras, and these little blue guys are high powered ones! They are 940nm wavelength, which is what nearly all devices listen to. They're 20 degree beamwidth,...

In Stock
[Buy Now](https://www.adafruit.com/product/387)
[Related Guides to the Product](https://learn.adafruit.com/products/387/guides)
![Unlit blue-tinted LED](https://cdn-shop.adafruit.com/640x480/387-01.jpg)

### IR (Infrared) Receiver Sensor

[IR (Infrared) Receiver Sensor](https://www.adafruit.com/product/157)
IR sensor tuned to 38KHz, perfect for receiving commands from a TV remote control. Runs at 3V to 5V so it's great for any microcontroller.  
  
To use, connect pin 3 (all the way to the right) to 5V power, pin 2 (middle) to ground and listen on pin 1. It doesn't do any decoding...

In Stock
[Buy Now](https://www.adafruit.com/product/157)
[Related Guides to the Product](https://learn.adafruit.com/products/157/guides)
![IR (Infrared) Receiver Sensor plugged into breadboard](https://cdn-shop.adafruit.com/640x480/157-00.jpg)

### Mini LED Arcade Button - 24mm Translucent Clear

[Mini LED Arcade Button - 24mm Translucent Clear](https://www.adafruit.com/product/3429)
A button is a button, and a switch is a switch, but these translucent arcade buttons are in a class of their own. Particularly because they have **LEDs built right in!** That's right, you'll be button-mashing amidst a wash of beautiful light with these lil'...

In Stock
[Buy Now](https://www.adafruit.com/product/3429)
[Related Guides to the Product](https://learn.adafruit.com/products/3429/guides)
![Video of 24mm mini translucent clear LED arcade button flashing on and off.](https://cdn-shop.adafruit.com/product-videos/640x480/3429-03.jpg)

### Adafruit Perma-Proto Quarter-sized Breadboard PCB - Single

[Adafruit Perma-Proto Quarter-sized Breadboard PCB - Single](https://www.adafruit.com/product/1608)
Customers have asked us to carry basic perf-board, but we never liked the look of most basic perf: it's always crummy quality, with pads that flake off and no labeling. Then we thought about how people **actually** prototype - usually starting with a solderless breadboard and...

Out of Stock
[Buy Now](https://www.adafruit.com/product/1608)
[Related Guides to the Product](https://learn.adafruit.com/products/1608/guides)
![Angled Shot of the Adafruit Perma-Proto Quarter-sized Breadboard PCB - Single.](https://cdn-shop.adafruit.com/640x480/1608-03.jpg)

### Pink and Purple Woven USB A to USB C Cable - 2 meters long

[Pink and Purple Woven USB A to USB C Cable - 2 meters long](https://www.adafruit.com/product/5044)
This cable is not only super-fashionable, with a woven pink and purple Blinka-like pattern, it's also made for USB C for our modernized breakout boards, Feathers and more.&nbsp; [If you want something just like it but for Micro B, we have a B...](https://www.adafruit.com/product/4111)

Out of Stock
[Buy Now](https://www.adafruit.com/product/5044)
[Related Guides to the Product](https://learn.adafruit.com/products/5044/guides)
![Angled shot of a pink/purple woven USB cable plugged into a laptop port and a small dev board.](https://cdn-shop.adafruit.com/640x480/5044-04.jpg)

### Part: JST PH 2-Pin Cable
quantity: 3
Male Header 200mm
[JST PH 2-Pin Cable](https://www.adafruit.com/product/3814)

### Part: JST PH 2-Pin Cable
quantity: 3
Female Connector 100mm
[JST PH 2-Pin Cable](https://www.adafruit.com/product/261)

### Part: Through-Hole Resistors
quantity: 1
100 ohm 5% 1/4W - Pack of 25
[Through-Hole Resistors](https://www.adafruit.com/product/4293)

### Part: Silicone Cover Stranded-Core Ribbon Cable
quantity: 1
10 Wire 1 Meter Long - 28AWG Black
[Silicone Cover Stranded-Core Ribbon Cable](https://www.adafruit.com/product/3890)

### Part: M3 Hardware Kit
quantity: 1
Black Nylon Machine Screw and Stand-off Set – M3 Thread
[M3 Hardware Kit](https://www.adafruit.com/product/4685)

### Part: Little Rubber Bumper Feet
quantity: 1
Pack of 4
[Little Rubber Bumper Feet](https://www.adafruit.com/product/550)

### Part: Short Header Female
quantity: 1
Short header for ItsyBitsy (repurpose)
[Short Header Female](https://www.adafruit.com/product/4174)

### Part: Short Header Male
quantity: 1
Short header for Feather (repurpose)
[Short Header Male](https://www.adafruit.com/product/3002)

# Owl IR TV Remote

## CAD Files

## CAD Assembly

The owl is secured to the case top cover with hardware screws and nuts. The arcade button is panel mounted to the top of the Owl. The IR LEDs are press fitted into the Owl's eyes. The case framing snap fits onto the top and bottom covers. The QT Py is secured to the Perma Proto via headers. The Perma Proto PCB is secured to the bottom cover with hardware screws. The IR receiver is press fit into the case framing.&nbsp;

![3d_printing_cad-explode-800.gif](https://cdn-learn.adafruit.com/assets/assets/000/113/103/medium640thumb/3d_printing_cad-explode-800.jpg?1657631545)

## CAD Parts List

STL files for 3D printing are oriented to print "as-is" on FDM style machines. Parts are designed to 3D print without any support material. Original design source may be downloaded using the links below:

- Owl.stl
- Owl-Case-Frame.stl
- Owl-Case-Bottom.stl
- Owl-Case-Top.stl
- Owl-Plug-B.stl
- Owl-Plug-A.stl

![3d_printing_3d-parts.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/106/medium640/3d_printing_3d-parts.jpg?1657632519)

[Download STL files](https://cdn-learn.adafruit.com/assets/assets/000/113/101/original/STLs.zip?1657628121)
[Download CAD source](https://cdn-learn.adafruit.com/assets/assets/000/113/102/original/cad.zip?1657628142)
## Build Volume

The parts require a 3D printer with a minimum build volume.

- 95mm (X) x 95mm (Y) x 114mm (Z)

![3d_printing_cura-slice-owl.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/099/medium640/3d_printing_cura-slice-owl.jpg?1657628064)

## Design Source Files

The project assembly was designed in Fusion 360. This can be downloaded in different formats like STEP, STL and more. Electronic components like Adafruit's board, displays, connectors and more can be downloaded from the&nbsp;[Adafruit CAD parts GitHub Repo](https://github.com/adafruit/Adafruit_CAD_Parts).

![3d_printing_4900_QTPY-RP2040.gif](https://cdn-learn.adafruit.com/assets/assets/000/113/100/medium640thumb/3d_printing_4900_QTPY-RP2040.jpg?1657628095)

# Owl IR TV Remote

## Circuit Diagram

The diagram below provides a visual reference for wiring of the components. This diagram was created using the software package [Fritzing](http://fritzing.org/download/).

## Adafruit Library for Fritzing

Use Adafruit's Fritzing parts library to create circuit diagrams for your projects. Download the library or just grab individual parts. Get the library and parts from [GitHub - Adafruit Fritzing Parts](https://github.com/adafruit/Fritzing-Library/tree/master/parts).

![](https://cdn-learn.adafruit.com/assets/assets/000/112/912/medium800/3d_printing_Circuit-Diagram-V6.jpg?1657208417)

## Wired Connections

The QT Py RP2040 is soldered to the 1/4 sized perma-proto to make sharing grounds easier.

Button Swittch

- Pin 1 to Pin **A2** on QT Py RP2040
- Pin 2 to **GND** on Perma-Proto

Button LED

- Anode to Pin **A1** on QT Py RP2040
- Cathode to&nbsp; **GND** on Perma-Proto

IR Receiver&nbsp;

- Anode to Pin **A0** on QT Py RP2040
- Cathode to&nbsp; **GND** on Perma-Proto

IR LEDs

The IR LED features a 100ohm resistor wired in-line with ground.

- Anode to Pin **TX** on QT Py RP2040
- Cathode to&nbsp; **GND** on Perma-Proto

# Owl IR TV Remote

## CircuitPython

[CircuitPython](https://github.com/adafruit/circuitpython) is a derivative of [MicroPython](https://micropython.org) designed to simplify experimentation and education on low-cost microcontrollers. It makes it easier than ever to get prototyping by requiring no upfront desktop software downloads. Simply copy and edit files on the **CIRCUITPY** drive to iterate.

## CircuitPython Quickstart

Follow this step-by-step to quickly get CircuitPython running on your board.

[Download the latest version of CircuitPython for this board via circuitpython.org](https://circuitpython.org/board/adafruit_qtpy_rp2040/)
 **Click the link above to download the latest CircuitPython UF2 file.**

Save it wherever is convenient for you.

![install_circuitpython_on_rp2040_RP2040_UF2_downloaded.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/655/medium640/install_circuitpython_on_rp2040_RP2040_UF2_downloaded.jpg?1618943202)

![](https://cdn-learn.adafruit.com/assets/assets/000/101/680/medium800/adafruit_products_QTRP_buttons.jpg?1618956837)

To enter the bootloader, hold down the **BOOT/**** BOOTSEL button**(highlighted in red above), and while continuing to hold it (don't let go!), press and release the**reset button**(highlighted in red or blue above).&nbsp;**Continue to hold the BOOT/BOOTSEL button until the RPI-RP2 drive appears!**

If the drive does not appear, release all the buttons, and then repeat the process above.

You can also start with your board unplugged from USB, press and hold the BOOTSEL button (highlighted in red above), continue to hold it while plugging it into USB, and wait for the drive to appear before releasing the button.

A lot of people end up using charge-only USB cables and it is very frustrating! **Make sure you have a USB cable you know is good for data sync.**

You will see a new disk drive appear called **RPI-RP2**.

&nbsp;

Drag the **adafruit\_circuitpython\_etc.uf2** file to **RPI-RP2.**

![install_circuitpython_on_rp2040_RP2040_bootloader_drive.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/656/medium640/install_circuitpython_on_rp2040_RP2040_bootloader_drive.jpg?1618943666)

![install_circuitpython_on_rp2040_RP2040_drag_UF2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/657/medium640/install_circuitpython_on_rp2040_RP2040_drag_UF2.jpg?1618943674)

The **RPI-RP2** drive will disappear and a new disk drive called **CIRCUITPY** will appear.

That's it, you're done! :)

![install_circuitpython_on_rp2040_RP2040_CIRCUITPY.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/658/medium640/install_circuitpython_on_rp2040_RP2040_CIRCUITPY.jpg?1618943864)

## Safe Mode

You want to edit your **code.py** or modify the files on your **CIRCUITPY** drive, but find that you can't. Perhaps your board has gotten into a state where **CIRCUITPY** is read-only. You may have turned off the **CIRCUITPY** drive altogether. Whatever the reason, safe mode can help.

Safe mode in CircuitPython does not run any user code on startup, and disables auto-reload. This means a few things. First, safe mode _bypasses any code in_ **boot.py** (where you can set **CIRCUITPY** read-only or turn it off completely). Second, _it does not run the code in_ **code.py**. And finally, _it does not automatically soft-reload when data is written to the_ **CIRCUITPY** _drive_.

Therefore, whatever you may have done to put your board in a non-interactive state, safe mode gives you the opportunity to correct it without losing all of the data on the **CIRCUITPY** drive.

### Entering Safe Mode
To enter safe mode when using CircuitPython, plug in your board or hit reset (highlighted in red above). Immediately after the board starts up or resets, it waits 1000ms. On some boards, the onboard status LED (highlighted in green above) will blink yellow during that time. If you press reset during that 1000ms, the board will start up in safe mode. It can be difficult to react to the yellow LED, so you may want to think of it simply as a slow double click of the reset button. (Remember, a fast double click of reset enters the bootloader.)

### In Safe Mode

If you successfully enter safe mode on CircuitPython, the LED will intermittently blink yellow three times.

If you connect to the serial console, you'll find the following message.

```terminal
Auto-reload is off.
Running in safe mode! Not running saved code.

CircuitPython is in safe mode because you pressed the reset button during boot. Press again to exit safe mode.

Press any key to enter the REPL. Use CTRL-D to reload.
```

You can now edit the contents of the **CIRCUITPY** drive. Remember, _your code will not run until you press the reset button, or unplug and plug in your board, to get out of safe mode._

## Flash Resetting UF2

If your board ever gets into a really _weird_ state and CIRCUITPY doesn't show up as a disk drive after installing CircuitPython, try loading this 'nuke' UF2 to RPI-RP2. which will do a 'deep clean' on your Flash Memory. **You will lose all the files on the board** , but at least you'll be able to revive it! After loading this UF2, follow the steps above to re-install CircuitPython.

[Download flash erasing "nuke" UF2](https://cdn-learn.adafruit.com/assets/assets/000/101/659/original/flash_nuke.uf2?1618945856)
# Owl IR TV Remote

## Code the Owl IR TV Remote

![](https://cdn-learn.adafruit.com/assets/assets/000/113/114/medium800/3d_printing_hero-code-remote.jpg?1657634759)

Once you've finished setting up your QT Py RP2040 with CircuitPython, you can access the code and necessary libraries by downloading the Project Bundle.

To do this, click on the **&nbsp;Download Project Bundle** &nbsp;button in the window below. It will download as a zipped folder.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Owl_IR_TV_Remote/code.py

## Upload the Code and Libraries to the QT Py RP2040

After downloading the Project Bundle, plug your QT Py RP2040 into the computer's USB port with a known good USB data+power cable. You should see a new flash drive appear in the computer's File Explorer or Finder (depending on your operating system) called&nbsp; **CIRCUITPY**. Unzip the folder and copy the following items to the QT Py RP2040's&nbsp; **CIRCUITPY** &nbsp;drive.&nbsp;

- **lib** &nbsp;folder
- **code.py**

Your QT Py RP2040&nbsp; **CIRCUITPY&nbsp;** drive should look like this after copying the&nbsp; **lib** &nbsp;folder and the&nbsp; **code.py&nbsp;** file.

![CIRCUITPY](https://adafruit.github.io/Adafruit_Learning_System_Guides/Owl_IR_TV_Remote.png )

Warning: 

## Decode Your Pulses
Each remote command for your TV is stored in an array of IR pulses. Follow along with [this guide page](https://learn.adafruit.com/ir-sensor/circuitpython) for the IR sensor to decode your remote's pulses. Once you decode the arrays that you want your owl to send from your TV remote, then you can update the CircuitPython code to work with your TV.

## How the CircuitPython Code Works

The code stores two IR pulse arrays: one for powering on the TV and one for powering it off. These arrays are stored in the `signals` list for use in the loop. The `colors` array is setup with `GREEN` and `RED` NeoPixel colors. The onboard NeoPixel will change color depending on which IR command was sent.

You'll edit the `power_on` and `power_off` arrays with your decoded IR pulses so that the code will work with your TV.

```python
remote = pulseio.PulseOut(pwm)
#  power on pulse array
power_on = array.array('H', [9027, 4490, 577, 563, 549, 1677, 579, 1674, 582, 558,
                             554, 559, 553, 561, 551, 562, 551, 1675, 580, 1674, 572,
                             567, 555, 1672, 573, 567, 556, 558, 554, 559, 553, 560,
                             552, 562, 550, 1675, 581, 560, 552, 561, 552, 561, 551,
                             563, 549, 1677, 579, 1674, 581, 560, 552, 561, 552, 1674,
                             581, 1673, 573, 1680, 575, 1679, 577, 563, 549, 565, 547,
                             1679, 577])
#  power off pulse array
power_off = array.array('H', [9028, 4491, 576, 563, 549, 1678, 578, 1701, 554, 533,
                              579, 561, 551, 562, 551, 536, 576, 1703, 552, 1700, 556,
                              558, 554, 1698, 547, 540, 582, 558, 554, 532, 580, 560,
                              552, 561, 552, 562, 550, 563, 549, 564, 548, 565, 547,
                              566, 546, 1707, 549, 1704, 551, 562, 550, 1703, 553, 1699,
                              556, 1697, 548, 1705, 551, 1701, 554, 560, 553, 560, 552,
                              1701, 554])
#  array of the pulses
signals = [power_on, power_off]
#  neopixel colors
RED = (255, 0, 0)
GREEN = (0, 255, 0)
#  array of colors
colors = [GREEN, RED]
```

### The Loop

In the loop, `s` is used as the index variable and either has a value of `0` or `1`. When the button is pressed, the IR LEDs alternate between sending out the `power_on` or `power_off` pulse arrays. The onboard NeoPixel is green when `power_on` has been sent and red when `power_off` has been sent.

```python
#  if the button is pressed..
    if button.fell:
        #  send the pulse
        remote.send(signals[s])
        #  update onboard neopixel
        pixel.fill(colors[s])
        pixel.show()
        #  turn on button LED
        led.value = True
        #  advance the index variable
        s = (s + 1) % 2
```

# Owl IR TV Remote

## QT Py Headers

## Perma-Proto for QT Py

The QT Py RP2040 will connect to the quarter-sized Perma Proto using a mix of male and female headers.&nbsp;

This makes the QT Py modular so it can be removed from the Circuit and repurposed.

![3d_printing_qtpy-proto.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/007/medium640/3d_printing_qtpy-proto.jpg?1657541855)

## Header Setup

Use the following headers to connect the QT Py to the Perma Proto.

- 2x 1x7 short female header strip
- 2x 1x7 short male header strip

![3d_printing_qtpy-headers.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/008/medium640/3d_printing_qtpy-headers.jpg?1657541876)

## Install QT Py to Perma Proto

Fit the two strips of male header pins under the QT Py PCB.

Place the two strips of female header pins under the male pins.

Position the QT Py in the center of the Perma Proto and place it down with the female pins going into the pins.

![3d_printing_qtpy-proto-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/009/medium640/3d_printing_qtpy-proto-install.jpg?1657541908)

## Solder Headers to Perma Proto

Carefully flip the two PCB's and begin to solder the pins in place.

![3d_printing_qtpy-proto-solder.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/010/medium640/3d_printing_qtpy-proto-solder.jpg?1657541975)

## Soldered QT Py and Perma Proto

Take a moment to check all of the pins have been properly soldered.

![3d_printing_qtpy-proto-soldered.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/011/medium640/3d_printing_qtpy-proto-soldered.jpg?1657541990)

# Owl IR TV Remote

## Wiring IR LEDs

## Wires for IR LEDs

Use the following wires for connecting the IR LEDs to the QT Py.

- 1x 2-pin JST cable (female)
- 1x 100ohm resistor
- 4x Wires

![3d_printing_irleds-wires.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/012/medium640/3d_printing_irleds-wires.jpg?1657542688)

## Trim Leads

Take a moment to trim the leads from the IR LEDs and resistor short.

![3d_printing_irleds-trim.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/013/medium640/3d_printing_irleds-trim.jpg?1657542763)

## Solder First IR LED

Solder two of the single wires to the pins on one of the IR LEDs.

Use pieces of heat shrink tubing to insulate the leads.

![3d_printing_irleds-1-wiring.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/014/medium640/3d_printing_irleds-1-wiring.jpg?1657542779)

## Solder Second IR LED

Two wires will be soldered to the anode pin on the second IR LED.

Connect the a new single wire AND the anode wire from the first IR LED to the anode pin on the second IR LED.

![3d_printing_irleds-2-gnd-wire.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/015/medium640/3d_printing_irleds-2-gnd-wire.jpg?1657542809)

## Wire Second IR LED

Two wires will be soldered to the cathode pin on the second IR LED.

Connect the a new single wire AND the cathode wire from the first IR LED to the cathode pin on the second IR LED.

![3d_printing_irleds-2-vcc-wire.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/016/medium640/3d_printing_irleds-2-vcc-wire.jpg?1657542834)

## Wired IR LEDs

Take a moment to check the wires have been properly soldered to the IR LEDs.

![3d_printing_irleds-1-2-wired.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/017/medium640/3d_printing_irleds-1-2-wired.jpg?1657542878)

## Solder Resistor

Connect the 100ohm resistor to the cathode wire from the two IR LEDs.&nbsp;

![3d_printing_irleds-resistor.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/018/medium640/3d_printing_irleds-resistor.jpg?1657542975)

## JST Cable for IR LEDs

Use the 2-pin JST female cable to connect the IR LEDs to the QT Py.&nbsp;

![3d_printing_irleds-jst-cable.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/019/medium640/3d_printing_irleds-jst-cable.jpg?1657543085)

## Ground Wire

Solder the 100ohm resistor to the black wire on the JST cable.

![3d_printing_irleds-resistor-wire.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/020/medium640/3d_printing_irleds-resistor-wire.jpg?1657543143)

## Signal Wire

Connect the remaining anode wire to the red wire on the JST cable.

![3d_printing_irleds-jst-vcc-wire.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/021/medium640/3d_printing_irleds-jst-vcc-wire.jpg?1657543238)

## Finished IR LEDs

Take a moment to check all of the wires have been properly soldered to the two IR LEDs.

![3d_printing_irleds-cable-wired.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/022/medium640/3d_printing_irleds-cable-wired.jpg?1657543327)

# Owl IR TV Remote

## Wiring Button

## Cables for LED Button

Use 2x 2-pin JST cables to connect the LED button to the QT Py.

The stock wire lengths are suffice and do not need to be shortened.

![3d_printing_btn-cables.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/023/medium640/3d_printing_btn-cables.jpg?1657543902)

## Pins on LED Button

Use the photo to reference which pins are used for the LED and switch.

The leads for the LED are just outside the gray body of the switch.

The leads for the switch are inside the gray body of the switch.

![3d_printing_btn-pins.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/024/medium640/3d_printing_btn-pins.jpg?1657543961)

## Solder Cable to LED Pins

Connect the red wire to the positive pin on the LED.

Connect the black wire to the negative pin on the LED.

![3d_printing_btn-switch-wired.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/025/medium640/3d_printing_btn-switch-wired.jpg?1657543996)

## Solder Cable to Switch Pins

The polarity of the switch doesn't matter here so you can solder the wires to either pins.

Here we're keeping the wiring consistent with the LED.

![3d_printing_btn-led-wired.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/026/medium640/3d_printing_btn-led-wired.jpg?1657544029)

## Wired LED Button

Take a moment to check the wires are properly soldered.

![3d_printing_btn-wired.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/027/medium640/3d_printing_btn-wired.jpg?1657544225)

# Owl IR TV Remote

## Wiring IR Receiver

## Cable for IR Receiver

Use a 3-wire ribbon cable to connect the IR receiver to the Perma Proto.

Measure and cut the ribbon cable so it's about 3in (76mm) in length.

![3d_printing_sensor-cable.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/028/medium640/3d_printing_sensor-cable.jpg?1657544289)

## Solder Cable to IR Receiver

Trim the leads short before soldering the wires.&nbsp;

Solder the three wires from the cable to the three pins on the IR Receiver.

![3d_printing_sensor-solder.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/029/medium640/3d_printing_sensor-solder.jpg?1657544299)

## Wired IR Receiver

Double check the three wires have been properly soldered to the pins on the IR Receiver.

![3d_printing_sensor-wired.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/030/medium640/3d_printing_sensor-wired.jpg?1657544326)

# Owl IR TV Remote

## Wiring Perma Proto

## Cables for Perma Proto

Use the following cables to make connecting the Perma Proto to the components.

- 3x 2-pin JST cables
- 1x 3-wire ribbon cable

![3d_printing_proto-cables.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/031/medium640/3d_printing_proto-cables.jpg?1657544467)

## Ground and Power Rails

Use a 2-wire cable to connect the ground and 3V pins to one of the power and ground rails on the Perma Proto.

Solder a wire from the GND pin on the QT Py to one of the GND rails on the Perma Proto.

Solder a wire from the 3V pin on the QT Py to one of the power rails on the Perma Proto.

&nbsp;

![3d_printing_proto-gnd-vcc-wired.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/032/medium640/3d_printing_proto-gnd-vcc-wired.jpg?1657544482)

## Solder IR Receiver&nbsp;

Connect the wires from the IR Receiver to the following pins the Perma Proto.

- Pin 1 from IR Receiver to A0 Pin
- Pin 2 from IR Receiver to GND pin
- Pin 3 from IR Receiver to 3V pin

![3d_printing_proto-sensor-solder.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/033/medium640/3d_printing_proto-sensor-solder.jpg?1657544806)

## Solder Cable for Button LED

Connect the two wires from one of the 2-pin JST cables to the following pins

- Black wire to GND pin on Perma Proto
- Red wire to A1 pin on Perma Proto

![3d_printing_proto-btn-led-solder.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/034/medium640/3d_printing_proto-btn-led-solder.jpg?1657544834)

## Solder Cable for Button Switch

Connect the two wires from another 2-pin JST cable to the following pins.

- Black wire to GND pin on Perma Proto
- Red wire to A2 pin on Perma Proto

![3d_printing_proto-btn-sw-solder.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/035/medium640/3d_printing_proto-btn-sw-solder.jpg?1657544861)

## Solder Cable for IR LEDs

Connect the two wires from the last 2-pin JST cable to the following pins.

- Black wire to GND pin on Perma Proto
- Red wire to TX pin on Perma Proto

![3d_printing_proto-irled-solder.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/036/medium640/3d_printing_proto-irled-solder.jpg?1657544913)

## Wired Perma Proto

Double check all of the wires have been properly soldered.

![3d_printing_proto-wired.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/037/medium640/3d_printing_proto-wired.jpg?1657544970)

# Owl IR TV Remote

## Assembly

## Hardware for Owl

Use the following hardware for attaching the Owl to the top cover of the enclosure.

- 4x M3 x 6mm
- 4x M3 nuts

![3d_printing_case-screws.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/038/medium640/3d_printing_case-screws.jpg?1657545211)

## Top Cover

Orient the top cover of the enclosure so it matches the photo. The side with the longer edge is oriented with the front of the owl.

![3d_printing_case-cover-owl.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/039/medium640/3d_printing_case-cover-owl.jpg?1657545251)

## Secure Owl to Cover

Use the M3 hex nuts to secure the Owl to the top cover.

Use the large opening on the back of the owl to get a better hold of the hex nuts.&nbsp;

Holder the hex nut in place while fastening the screws through the bottom of the cover.

![3d_printing_case-cover-nuts.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/040/medium640/3d_printing_case-cover-nuts.jpg?1657545337)

![3d_printing_case-cover-secure.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/041/medium640/3d_printing_case-cover-secure.jpg?1657545483)

## Secured Owl

Take a moment to check the orientation of the top cover is correct.

![3d_printing_case-cover-owl-secured.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/042/medium640/3d_printing_case-cover-owl-secured.jpg?1657545801)

## Install IR LEDs

Insert an IR LED into one of the Owls' eye to test fit.

If it's too tight, use a filing tool to loosen up the opening.

Press the two IR LEDs through the eyes inside of the Owl.

![3d_printing_owl-irleds-testfit.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/044/medium640/3d_printing_owl-irleds-testfit.jpg?1657547544)

![3d_printing_owl-irleds-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/045/medium640/3d_printing_owl-irleds-install.jpg?1657547623)

## IR LED Eyes

Take a moment to check the IR LEDs have been properly installed into the Owl's eyes an ensure they're fully seated.

![3d_printing_owl-irleds-eye.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/046/medium640/3d_printing_owl-irleds-eye.jpg?1657548575)

![3d_printing_owl-irleds-eyes.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/047/medium640/3d_printing_owl-irleds-eyes.jpg?1657548718)

## Install LED Button

Insert the two JST cables from the LED button through the top opening of the Owl's head.

Insert the hex nut that was included with the LED button through the back opening of the Owl with the cables threading through.

![3d_printing_owl-btn-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/049/medium640/3d_printing_owl-btn-install.jpg?1657548005)

![3d_printing_owl-btn-nut-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/050/medium640/3d_printing_owl-btn-nut-install.jpg?1657549017)

## Secure LED Button

Push the LED button all the through the hole until it's been fully seated.

Twist to fasten the hex nut onto the threads of the LED button.

Fasten the hex nut until it's fully secured to the LED button.

![3d_printing_owl-btn-installed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/051/medium640/3d_printing_owl-btn-installed.jpg?1657548181)

## Route Cables&nbsp;

Grab hold of the three JST cables and pull them through the large opening on the top cover.

![3d_printing_owl-cover-cables.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/052/medium640/3d_printing_owl-cover-cables.jpg?1657548284)

## Bottom Rubber Feet

Take a moment to install the 4x rubber feet to the corners of the bottom cover.

Remove feet from pack by peeling off from the backing.

Feet feature adhesive backing so they can just be stuck onto each corner.

![3d_printing_owl-btm-feet-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/053/medium640/3d_printing_owl-btm-feet-install.jpg?1657548434)

![3d_printing_owl-btm-feet.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/054/medium640/3d_printing_owl-btm-feet.jpg?1657548786)

## Install Perma Proto

Grab the Perma Proto PCB and place it over the bottom cover with the two mounting holes lined up.

Orient the PCB so the USB-C port from the QT Py lines up with the notch.

Insert and fasten 2x M3 x 4mm long screws through the two mounting holes on the Perma Proto PCB.

&nbsp;

![3d_printing_case-btm-perma.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/055/medium640/3d_printing_case-btm-perma.jpg?1657548925)

![3d_printing_case-btm-perma-secure.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/056/medium640/3d_printing_case-btm-perma-secure.jpg?1657549948)

## Install IR Receiver&nbsp;

Press fit the IR receiver through the opening in the framing of the case.

![3d_printing_case-sensor-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/057/medium640/3d_printing_case-sensor-install.jpg?1657549180)

## Install Bottom Cover

Orient the bottom cover with the framing and press fit them together.

![3d_printing_case-btm-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/058/medium640/3d_printing_case-btm-install.jpg?1657549190)

![3d_printing_case-frame-installed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/059/medium640/3d_printing_case-frame-installed.jpg?1657550015)

## Connect JST Cables

Start connecting the cables from the Owl to the cables from the Perma Proto PCB.

Connect the cable from pin **A0** to the IR LEDs.

Connect the cable from pin **A1** to the Button's LED.

Connect the cables from pin **A2** to the Button's switch.

![3d_printing_owl-cables-connect.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/062/medium640/3d_printing_owl-cables-connect.jpg?1657549261)

## Close Case

Begin closing the enclosure by bringing the top cover to the framing.

The top cover snap fits over the framing.

![3d_printing_case-top-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/063/medium640/3d_printing_case-top-install.jpg?1657549393)

## USB Opening

The back of the enclosure features an opening for a USB-C cable to provide power and reprogramming.

![3d_printing_case-usb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/064/medium640/3d_printing_case-usb.jpg?1657550026)

## Additional Plug

You have the option to close the large opening on the back of Owl with the plug.

Use adhesives to secure the two halves together to form the plug.

The plug is press fitted onto the large opening on the back of the Owl. It will only fit correctly one way.

![3d_printing_owl-plug.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/065/medium640/3d_printing_owl-plug.jpg?1657550111)

## Connect USB-C

Insert and plug a USB-C cable through the opening on the back of the enclosure.

![3d_printing_owl-usb-power.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/066/medium640/3d_printing_owl-usb-power.jpg?1657550216)

## Test Circuit

Take a moment to test out the circuit by pressing the LED arcade button.

The IR LED's inside the Owl should be aimed towards the desired TV.

&nbsp;

![3d_printing_owl-btn-test.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/067/medium640/3d_printing_owl-btn-test.jpg?1657550252)

## Final Build

Congratulations on building your IR TV Remove Owl!

![3d_printing_owl-done.jpg](https://cdn-learn.adafruit.com/assets/assets/000/113/068/medium640/3d_printing_owl-done.jpg?1657549932)


## Featured Products

### Adafruit QT Py RP2040

[Adafruit QT Py RP2040](https://www.adafruit.com/product/4900)
What a cutie pie! Or is it... a QT Py?&nbsp;This diminutive dev board comes with one of our new favorite chip, the RP2040. It's been made famous in the new [Raspberry Pi Pico](https://www.adafruit.com/pico) _and_ our [Feather...](http://www.adafruit.com/product/4884)

In Stock
[Buy Now](https://www.adafruit.com/product/4900)
[Related Guides to the Product](https://learn.adafruit.com/products/4900/guides)
### IR (Infrared) Receiver Sensor

[IR (Infrared) Receiver Sensor](https://www.adafruit.com/product/157)
IR sensor tuned to 38KHz, perfect for receiving commands from a TV remote control. Runs at 3V to 5V so it's great for any microcontroller.  
  
To use, connect pin 3 (all the way to the right) to 5V power, pin 2 (middle) to ground and listen on pin 1. It doesn't do any decoding...

In Stock
[Buy Now](https://www.adafruit.com/product/157)
[Related Guides to the Product](https://learn.adafruit.com/products/157/guides)
### Super-bright 5mm IR LED

[Super-bright 5mm IR LED](https://www.adafruit.com/product/387)
Infrared LEDs are used for remote controls (they're the little LED in the part you point at your TV) and 'night-vision' cameras, and these little blue guys are high powered ones! They are 940nm wavelength, which is what nearly all devices listen to. They're 20 degree beamwidth,...

In Stock
[Buy Now](https://www.adafruit.com/product/387)
[Related Guides to the Product](https://learn.adafruit.com/products/387/guides)
### Pink and Purple Woven USB A to USB C Cable - 2 meters long

[Pink and Purple Woven USB A to USB C Cable - 2 meters long](https://www.adafruit.com/product/5044)
This cable is not only super-fashionable, with a woven pink and purple Blinka-like pattern, it's also made for USB C for our modernized breakout boards, Feathers and more.&nbsp; [If you want something just like it but for Micro B, we have a B...](https://www.adafruit.com/product/4111)

Out of Stock
[Buy Now](https://www.adafruit.com/product/5044)
[Related Guides to the Product](https://learn.adafruit.com/products/5044/guides)
### Adafruit Perma-Proto Quarter-sized Breadboard PCB - Single

[Adafruit Perma-Proto Quarter-sized Breadboard PCB - Single](https://www.adafruit.com/product/1608)
Customers have asked us to carry basic perf-board, but we never liked the look of most basic perf: it's always crummy quality, with pads that flake off and no labeling. Then we thought about how people **actually** prototype - usually starting with a solderless breadboard and...

Out of Stock
[Buy Now](https://www.adafruit.com/product/1608)
[Related Guides to the Product](https://learn.adafruit.com/products/1608/guides)
### Mini LED Arcade Button - 24mm Translucent Clear

[Mini LED Arcade Button - 24mm Translucent Clear](https://www.adafruit.com/product/3429)
A button is a button, and a switch is a switch, but these translucent arcade buttons are in a class of their own. Particularly because they have **LEDs built right in!** That's right, you'll be button-mashing amidst a wash of beautiful light with these lil'...

In Stock
[Buy Now](https://www.adafruit.com/product/3429)
[Related Guides to the Product](https://learn.adafruit.com/products/3429/guides)
### JST PH 2-Pin Cable – Male Header 200mm

[JST PH 2-Pin Cable – Male Header 200mm](https://www.adafruit.com/product/3814)
For a really long time we assumed that the JST PH didn't have a free-hanging male header version. But then we found this **JST-PH 2-pin Male Cable,** and we were like,&nbsp;_this is perfect!_ It's not a genuine JST connector, but it's 100%...

In Stock
[Buy Now](https://www.adafruit.com/product/3814)
[Related Guides to the Product](https://learn.adafruit.com/products/3814/guides)
### JST PH 2-Pin Cable - Female Connector 100mm

[JST PH 2-Pin Cable - Female Connector 100mm](https://www.adafruit.com/product/261)
Red and black tinned wires with a 2-pin JST PH connector on the end. 4" / 100mm long. Matches up nicely with our Lipoly chargers!

[We have the socket 'mating' version of this cable](https://www.adafruit.com/product/3814) over here, <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/261)
[Related Guides to the Product](https://learn.adafruit.com/products/261/guides)

## Related Guides

- [Adafruit QT Py RP2040](https://learn.adafruit.com/adafruit-qt-py-2040.md)
- [3D Printed Frankenstein Monster with NeoPixel Eyes](https://learn.adafruit.com/neopixel-frankenstein.md)
- [LED Trampoline](https://learn.adafruit.com/led-trampoline.md)
- [MIDI for Makers](https://learn.adafruit.com/midi-for-makers.md)
- [Hacking Yoto Music Players](https://learn.adafruit.com/hacking-the-yoto-music-players.md)
- [Light Up your Costume with Noods](https://learn.adafruit.com/light-up-your-costume-with-noods.md)
- [NeoKey Emoji Keyboard](https://learn.adafruit.com/neokey-emoji-keyboard.md)
- [AS5600 Super Smooth Rotary Encoder](https://learn.adafruit.com/as5600-smooth-rotary-encoder.md)
- [Hexpad](https://learn.adafruit.com/hexpad.md)
- [Walkmellotron: Cassette Player Mods](https://learn.adafruit.com/walkmellotron.md)
- [Animated Edge Lit Acrylic NeoPixel Lamp](https://learn.adafruit.com/acrylic-neopixel-lamp.md)
- [Wireless BLE MIDI Robot Xylophone](https://learn.adafruit.com/wireless-ble-midi-robot-xylophone.md)
- [Using the CircuitPython Extension for Visual Studio Code](https://learn.adafruit.com/using-the-circuitpython-extension-for-visual-studio-code.md)
- [Arcade Fightstick](https://learn.adafruit.com/arcade-fightstick.md)
- [DotStar Pi Painter](https://learn.adafruit.com/dotstar-pi-painter.md)
- [How to Choose a Microcontroller](https://learn.adafruit.com/how-to-choose-a-microcontroller.md)
