This is not just another remote to control your TV. The IR Remote DIY kit includes a series of buttons and an IR emitter that can be used in conjunction with the Quantum system to create the ultimate universal remote. This DIY kit will allow you to control any component connected to the Quantum system, countless IR devices, and supported IoT platforms. What you program your remote to do is up to you. You can even create “Scenes” that can, if you choose, use one button to do all of that. Why not program a “Movie Night” button that can turn off the lights, roll down the shades, turn on the TV, and adjust the input of the TV and receiver to the movie inputs? Add an “intermission mode” to pause your movie and brighten the lights for a safer trip to the kitchen to make more popcorn. The possibilities are limited only by your imagination.
The components are part of the DIY Kit or can be sourced separately with help of the BOM:
Place groups of components on the board and then solder them to the pads.
Using some form of work holder is advised. You can find a list of suitable work holders on our Recommended Tools List.
We start by putting all parts on the table.
Start by soldering the resistors. Use the table and pictures to identify them.
220Ω Resistor: R1
2.2kΩ Resistor: R2
4.7kΩ Resistor: R5, R6, R12, R16
10kΩ Resistor: R3, R4, R7, R9, R11, R13, R15, R17
22kΩ Resistor: R8, R10, R14, R18
Solder the two LEDs.
The LED with the longer legs is the infrared LED and goes onto D1. The other normal LED goes onto D2
For each LED placement, the shorter pin on the LED goes into the right hole and the longer pin goes into the left hole
Solder the buttons on the dedicated schematics of the PCB. You can choose different color options but we recommend to use the same color for one row to have a better overview.
Solder the pin headers. Make sure they face to the hole of the PCB. This is were the wires will come trough.
Now we solder the switch. Make sure it faces away from the PCB.
Solder the battery holder.
Your IR Remote is now ready to be used! The back should look like this.
Connecting to the Builder Base
Please refer to the following image on how to connect the DIY Kit to your Builder Base.
If your IR Remote has a different layout of the connectors you can’t use our firmware because the relation is through the button layout, its color and the position of it.
This DIY Kit uses multiplexing technology. Multiplexing is a method by which multiple analog or digital signals are combined into one signal over a shared medium. The idea behind this is to reduce the amount of connections to a receiver by combining several signals at several distinct value ranges into a single medium.
In the case of the IR Remote, multiplexing is used to distinguish a series of push buttons based on the analog value that is received. So instead of having a single GPIO for each of the 12 push buttons we were able to reduce the amount of GPIO terminals used to one per row by determining the different analog values given by each push button in a series. The different analog values come from different resistor values of each push button.
Build the Firmware
Head to the Firmware tab of your Q-Server and click on “+ Create New” to start a new firmware file.
Give it a name so you remember your files. We named it “IR Remote DIY Kit”. Once you finished that we can add hardware to our firmware file. Simply click on the IR Remote firmware and then on “+ Add Hardware”.
So since we are using multiplexing for this DIY Kit to reduce the amount of GPIO terminals we need to use, we’re not going to be adding button hardware. Instead we will use one Analog In hardware for each row of the DIY Kit.
Add four of those. We name them Row 1, Row 2, Row 3 and Row 4.
Lastly we will have to add the LED hardware. Both the indicator LED and the IR Emitter LED are on the same GPIO terminal. We add one IR Emitter hardware for that.
The next step is to assign these different types of hardware to certain drivers and GPIO terminals they’re being used.
For Row 1 we select GPIO as the Driver and for the pin GP0. Select the terminal which is connected to the pin that says “Button 4” on your IR Remote.
For Row 2 use the same Driver and the Pin is GP1 or select the terminal that is connected to the pin that says “Button 3” on your IR Remote.
For Row 3 use the same Driver and the pin GP2 or select the terminal that is connected to the pin that says “Button 2”.
For Row 4 use the same Driver and the pin GP3 or select the terminal that is connected to the pin that says “Button 1”.
For the IR Emitter select the IR Emitter as the Driver and then select the pin that is connected to the pin “LED” of the IR Remote. In our case it is GP4.
Lastly hit “Save” and upload the file to the Builder Base that is connected to the IR Remote.
Build the App
There are now two ways to get to your final app. One is to simply download the app in the resource section here with instructions and comments on how to build the application you need for your project or you can download the app in your Q-Server library.
Let’s start by naming our application.
First we bring in four Analog In and four Text objects.
The Text objects will allow us to read the Analog In values that are given to the system. By that we can determine which button is which. Connect one Analog In with one Text object and name them together by the Rows we made before.
Save the app and map it. Simply for Row 1 choose Row 1 for the hardware and so on.
Hit “Save + Run” once you finished and then open the app in the dashboard.
As you can see we have each text interface object here with the four rows we create before and the value next to it. So if we press the first button of the red row the analog value should change.
The value changed. The value will be different for each button in each row and overall. So if we press the first button of the yellow row we will get a another analog value.
Now if you press the second button on row one, the value should be lower than 2735.
Now write the value down for each button and row. Our values can be seen in the following table.
When you have all the values go back to your apps and click on the Edit button of your app.
Delete the text objects because we have all the necessary values now. We need three Number Between objects for each row. One will be used for one button. The object will check a certain threshold since the button gives values like 2739, 2730 or 2742. Via this object we can then determine which button is pressed in the row.
Name the different Number Between objects and also activate the trigger for each value port so the Number Between object will be triggered when the Analog In objects sends a value.
For the threshold we use +- 200 for each button. So for the first set the Min value to 2500 and the Max value to 2900. Do this with all the other Number Between objects as well.
So once you distinguished each button on each row of the IR Remote we gonna test our app. For the test we will need 12 Switch interface objects and name them accordingly to their connected Number Between object.
Save your app and open the dashboard again. The app should still be mapped in the right way. We now see all our Switches with the corresponding button.
Pressing the first button of the red row should activate the first switch.
Now that you know how to determine each button and row you can attach other objects to the Number Between objects and then they will trigger those following objects and actions.
App & Firmware
This DIY Kit page is currently optimized for revision C.
Assembly files for the current revision of the DIY Kit (Rev C):