Smart House – Big Picture

The goal of this project was to create a smart house that could be controlled using a smartphone, which was achieved using Assembly, C, and Arduino Languages. In this project both the Atmega328PB and Arduino Uno R3 boards were used in conjunction. This was done to show how different languages can be used alongside each other by connecting inputs and outputs. The Arduino was used to connect our circuit to an app via Bluetooth to control the lights and door lock of the house. The ATmega328PB board was used along with an LCD to display when the door was locked or unlocked.

Smart House – Schematic

This project utilized two different microcontrollers, an ATmega328pb and an Arduino Uno R3. Combining these two was a major component of this project. To connect them we utilized a digital output from the Arduino and connected that to a digital input on the ATmega328pb, essentially using the ATmega328pb as an output peripheral for the Arduino. The ATmega328pb still had the LCD connected as it had been in previous labs, thus no changes were made to how it was connected. The Arduino had multiple outputs along with the ATmega328pb, those being the lights for the house and the actuator for the door lock. The Arduino circuit also utilizes a Bluetooth receiver which communicates with an android app to send commands to  the house. During testing it was found that one digital output could not power the “locked” LEDs, the actuator, and the signal to the ATmega328pb, this presented a problem because the project needed all of those things to happen when the door was locked. To  overcome this problem, a second output pin was utilized that copied the signals sent to the original output pin so that the required power was met to activate everything needed.


Smart House – Code

One of the two main components which we had to program for the house project was the ATmega328PB board that we’ve been using previously throughout the class. We did so using the Atmel Studio 7 application and accomplished our tasks using both the C and Assembly languages, very similar to the style of Lab 3. Both the C and Assembly sections utilized the base sample code from Lab 3 as we decided to use the LCD interface to have a function relating to our door lock on the house. The board is receiving this input anytime the door lock is engaged or disengaged on the Arduino, and is receiving a separate signal to the LCD than what is going to the Actuator.