<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>MQTT | Data Science Portfolio</title>
    <link>http://mreevesdsba.hopto.org/tag/mqtt/</link>
      <atom:link href="http://mreevesdsba.hopto.org/tag/mqtt/index.xml" rel="self" type="application/rss+xml" />
    <description>MQTT</description>
    <generator>Wowchemy (https://wowchemy.com)</generator><language>en-us</language><lastBuildDate>Sat, 27 Apr 2019 00:00:00 -0400</lastBuildDate>
    <image>
      <url>http://mreevesdsba.hopto.org/images/icon_hua2ec155b4296a9c9791d015323e16eb5_11927_512x512_fill_lanczos_center_2.png</url>
      <title>MQTT</title>
      <link>http://mreevesdsba.hopto.org/tag/mqtt/</link>
    </image>
    
    <item>
      <title>Vintage Smart Remote</title>
      <link>http://mreevesdsba.hopto.org/project/remote/</link>
      <pubDate>Sat, 27 Apr 2019 00:00:00 -0400</pubDate>
      <guid>http://mreevesdsba.hopto.org/project/remote/</guid>
      <description>&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;The  Zenith Space Command was the first commercially available remote. It was battery-free and worked by using ultra-sonic clicks in order to communicate with the television. In essence, it was a musical instrument that only the television could hear. The goal of this project was to modernize the remote, maintaining its original form-factor and styling but adding WiFi and IR capabilities.
&lt;br&gt;
There were several goals to the project:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;WiFi-enabled&lt;/li&gt;
&lt;li&gt;Able to control TV, stereo, and lights&lt;/li&gt;
&lt;li&gt;Dependable&lt;/li&gt;
&lt;li&gt;User-friendly
&lt;br&gt;
&lt;br&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;approach&#34;&gt;Approach&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;As WiFi is notoriously power-hungry, enabling it in a remote device is a challenge. Another challenge was the limited number of buttons available. The one positive aspect of the project is that the remote is fairly large, by today&amp;rsquo;s standards, which allowed for a lot of room to add components. An ESP8266 chip was selected for its WiFi capabilities. This was combined with a battery and wireless charger. The additional components were the IR transmitter for local devices and a vibration sensor for battery management.
&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;h2 id=&#34;hardware&#34;&gt;Hardware&lt;/h2&gt;
&lt;hr&gt;
&lt;h5 id=&#34;build&#34;&gt;Build&lt;/h5&gt;
&lt;p&gt;Many of the original components were removed and the button contacts were wired to the microcontroller. A new support was designed and 3d-printed to house all of the components and hold the battery.
&lt;img src=&#34;http://mreevesdsba.hopto.org/img/remote/remote2.jpg&#34; alt=&#34;3D-printed housing with development board&#34;&gt;&lt;/p&gt;
&lt;h5 id=&#34;microcontroller&#34;&gt;Microcontroller&lt;/h5&gt;
&lt;p&gt;The ESP8266 chip is a common starting point for many similar projects. It has a small footprint and quite capable, in fact overly capable for this project.&lt;/p&gt;
&lt;h5 id=&#34;battery&#34;&gt;Battery&lt;/h5&gt;
&lt;p&gt;An 800mAh battery was used as it was the largest battery that would still fit in the given space. It provides a decent amount of power for the project, but not nearly enough for a reasonable remote control without adjustments.&lt;/p&gt;
&lt;h5 id=&#34;charging&#34;&gt;Charging&lt;/h5&gt;
&lt;p&gt;In order to be more dependable and user-friendly without sacrificing the aesthetics, wireless charging was incorporated to allow it to be charged on any Qi-enabled charge pad.&lt;/p&gt;
&lt;h5 id=&#34;additional-components&#34;&gt;Additional Components&lt;/h5&gt;
&lt;p&gt;IR was added for local components (i.e. TV and stereo). A vibration sensor was also added in order to reduce battery usage. Without modifications, the remote lasted around 4 hours with the WiFi connection. However, by going into deep sleep until the vibration sensor is activated, this has been extended to over a week on a single charge, depending on usage. There is no discernible difference in functionality due to deep sleep.
&lt;img src=&#34;http://mreevesdsba.hopto.org/img/remote/remote1.jpg&#34; alt=&#34;Ensuring buttons and charging work before switching from dev to production board&#34;&gt;
&lt;br&gt;&lt;/p&gt;
&lt;h2 id=&#34;software&#34;&gt;Software&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;The microcontroller was programmed with the Arduino IDE. WiFi SSID is set with an WAP if no connection can be established. The WAP allows the user to scan the local WiFi networks, select the desired connection, and add a password.&lt;/p&gt;
&lt;h5 id=&#34;button-configuration&#34;&gt;Button Configuration&lt;/h5&gt;
&lt;p&gt;Due to the lack of inputs, each button has two input methods: short press and long press. In addition to short and long presses, a single press of the yellow button allows for each of 4 lights to be controlled individually. This means there are a total of 11 button functions instead of 4.
&lt;img src=&#34;http://mreevesdsba.hopto.org/img/remote/button.PNG&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;h5 id=&#34;wifi-communication&#34;&gt;WiFi Communication&lt;/h5&gt;
&lt;p&gt;In order to ensure ease of updates, the remote does not communicate directly with each smart device. Instead, an MQTT message is sent to a broker run through FLASK on a cloud server. The server then sends the appropriate command to the specified device.
&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;h2 id=&#34;results&#34;&gt;Results&lt;/h2&gt;
&lt;hr&gt;
&lt;p&gt;While the functionality of the remote is not as user-friendly as hoped, the other aspects of the project were quite successful. The styling and innovation from nearly 70 years ago has been modernized to accommodate for current technologies.
&lt;img src=&#34;http://mreevesdsba.hopto.org/img/remote/remote3.gif&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>
