USB Controlled Appliances

USB controlled appliances.jpg
Front side of central hub PCB (revision 1)
Front side of thermostat PCB
Front side of optocoupler switcher PCB

USB Controlled Appliances is a system of Internet of Things style appliances that are controlled directly using a computer, rather than through a network or the Internet. This was mainly due to the privacy and security issues of wireless IoT devices, which are vulnerable to attacks like ARP spoofing (i.e. it could intercept connections to other websites made by other computers on the same network [or more specifically, on the same layer 2 broadcast segment]) Therefore, in order for the system to actually be secure, no wireless or network/Internet connectivity is allowed at all; thus the requirement to use USB.

The ability to control the appliances is entirely under the connected computer's discretion. This means that the appliances can still be controlled over the network if the connected computer has a web server running on it, for example. But this is still discretionary with respect to the connected computer; i.e. the web server is not strictly required for the operation of the USB Controlled Appliances.

To put things another way, a hard drive can be accessed over the network using a network attached storage (NAS) device (similar to a wireless IoT device), or it can be plugged directly into a computer using the USB cable (i.e. as in this project). If it is plugged directly into a computer, then by default, only that computer can access the files on it. However, that same computer could run a web or FTP server to allow the files on that hard drive to be accessed over the network in the same way that a NAS device would do so.

The system consists of a central hub and (currently) two types of appliances -- a thermostat and an "optocoupler switcher", the latter of which is a somewhat generic means of controlling the buttons on a remote control in a way that is independent of the button's electrical wiring on the remote itself.

The central hub consists of a 4 port USB hub IC with three USB-to-UART adapters permanently attached to the USB hub. (The fourth USB port is broken out onto an external USB connector.) Each appliance has an Arduino (ATMEGA328P) with a UART; the UART on the Arduino is connected to the UART on the central hub via a special, removable connector to allow the computer to communicate with the appliance.

On the revision 1 PCB for the central hub, all four of the back USB ports worked, but the UARTs did not; this was because the 7 port USB hub IC (TUSB2077A) turned out to only be a 4 port USB hub; the USB-to-UART chips (3x MCP2221A) were wired onto ports 5, 6, and 7, which meant that they did not work at all. The revision 2 PCB switched to a 4 port USB hub IC to eliminate further confusion.

USB Controlled Appliances was my senior design (ECE 445) project at the University of Illinois Urbana-Champaign.

https://git2.peterjin.org/usb-controlled-appliances