Midterm Project

29 March 2015

  1. The Plan

1.1 Introduction

This project, is going to be a sensor that is hooked up to a normal house front or internal door. The aim of the project is such that when the door is opened, the hallway light turns on and a photo of the guest (person who walks through door) is tweeted.

1.2 Target Audience

Consumer market product aimed at home users, with a social or security interest. The project has other applications in regards to quantification and statistics, but primarily is for the connect home purpose.

1.3 Technical System

The system will primarily focus around the use of an Arduino Micro-controller but will also utilise the capabilities of a PC for internet connectivity and camera.

1.3.1 Components

  • Arduino Uno
  • Push Button
  • Piezo Buzzer
  • Data transfer cable (USB type B)
  • PC with Camera (Macbook Air)
  • Wireless Light Bulb (LIFX)

1.3.2 Component Diagram


1.4 Process Chart


1.5 Manufacturing
As the button sensor (primary input) is essentially a hidden component, its main function is that it work correctly with the interface (the door). How it looks is secondary, however for a consume product still important.

1.5.1 Primary Need

1.5.2 Planned Design

2. Production and Process
2.1 Communication Channels
After the plan was drawn up the communications channels where identified and broke project up into production steps.

There are four main channels of communication in this project.
(1) Button (input from door)
(2) Arduino to PC
(3) PC to Twitter
(4) PC to LIFX Wifi Light

2.2 Arduino to PC
The project uses serial communications via the USB data cable to transmit the input from the Arduino to the PC. The Arduino has a fairly simple program that once the button is pushed a simple tune plays over the Piezo Buzzer to notify the User that the sensor/door has been open, and input received.

2.3 PC to Twitter
This was the most time consuming of the communication channels. As Ruby script was written to interface with the Arduino Serial output, to trigger the script. A new twitter account was created (@physicalcomp) and the authentication token were used in the program to be able to programmatically tweet.
By this stage once the button was pressed the Arduino would make an sound, computer would take photo and send pre-determine status. This was ¾ of the project finished, with manufacturing for Arduino and button casing remaining, as well as connecting to LIFX.

Video of progress to point.

2.4 PC to LIFX Wifi Light
Some further writing of the ruby script, the project was then able to be integrated with the LIFX light.

3.0 Manufacturing
Due to time constraints and resource shortage a proper case was not able to be made for the button and the Arduino. As a next iteration for the project I would like have a proper 3D printer casing, designed to fit perfect with the button and door stopper on the door.

Therefore a make-shift solution was implemented to ensure the manufacturing goals of the project were met, functionality. The solution used a Arduino and Breadboard holder plate (plastic) taped to a cardboard frame. The breadboard ensured the button was at the perfect height of the doorstopper, and the frame ensures that the Arduino stayed in position against the wall.

Furthermore an extra long USB Cable and extender were used to allow the PC and the Arduino to be well separated.

  1. Final Product

4.1 Problems
Connecting to the Cloud, e.g sending the tweet with the image was the most time consuming and difficult. Although simple to repeat, it took some time to initially setup successfully. LIFX was also difficult to connect to the same Ruby Script. Much of the rest of the system was straight forward to implement, and was generally without problem.

4.2 Lessons Learned
The midterm project was a combination of all skills used throughout the whole project, with a total of 2 inputs and 4 outputs it was rather challenging. I found the project highlighted the need for wireless connectivity, and portable power. The serial communication over usb is a little clumsy and it would be ideal to implement a similar system without the need for wires or a PC. With a little research I believe that an Raspberry Pi could reduce the need for both the Arduino and the PC.

4.3 The future
As mentioned previously I would like to continue this using an Arduino Yun or a raspberry pi and try to make a more custom compact solution with a 3D printed case.

  1. Appendix

Arduino Program

Ruby Program