MKR1000 Universal Remonster!
WiFi connected universal remote with smart phone webapp.
Things used in this project
I had been toying with the idea of building a WiFi connected IR blaster that can control everything in a room through a webapp running on my phone (which does not have a built in IR blaster).
- Low power 32bit ARM MCU
- Low power 802.11 b/g/n Wi-Fi
- Onboard Li-Po charging circuit
- Familiar Arduino IDE
- Tons of I/O like you’d expect from any Arduino
Since I wouldn’t get my MKR1000 for at least a month, I figured I’d start working on the code. I would need to accomplish three things:
- Connect to my home WiFi
- Light weight web server to accept HTTP requests
- Parse GET URL for virtual button presses
- Send IR signal depending on URL
The MKR1000 should be able to do all this on its own, but my prototype will need a few more components.
Here I have an ESP8266 running the WiFi client and relaying everything to the Arduino Nano over serial. The Nano is running the webserver itself and is responsible for handling the HTTP connections and parsing the URLs. It takes the URL, interprets that as a specific button press, and sends the corresponding IR code.
There is a bit of hackery needed to get this working. First, I’m using AT commands to manage the WiFi connection through the ESP8266. To get all the communication working over software serial, I had to level shift the voltages since the ESP8266 is 3.3v and the Nano is 5v. The ESP8266 also draws a lot of power when connecting to WiFi, so it requires its own power regulator and smoothing cap.
Fortunately, the MKR1000 can do all of this and more on just a single board that’s just slightly larger than the nano (4 pins longer, 3 pins wider on a breadboard).
Since the MKR1000 is a 3.3v board the output from the I/O pins would cause the IR LED to be quite dim. I also plan on having multiple LEDs pointed in different directions, so I’ll need to use the I/O pin to drive an NPN transistor which in turn switches a PNP transistor for each of the LEDs wired in parallel. These PNP transistors have the collector/emitter wired directly to the 5v supply voltage. Going this route, I can have as many IR LEDs as I want and can make an omnidirectional array.
Setting up the Backend
Read more: MKR1000 Universal Remonster!
JLCPCB – Prototype 10 PCBs for $2 + 2 days Lead Time
China’s Largest PCB Prototype Enterprise, 300,000+ Customers & 10,000+ Online Orders Per Day
Inside a huge PCB factory: https://www.youtube.com/watch?v=_XCznQFV-Mw