Difference between revisions of "S15: Alarm Based Coffee Maker"

From Embedded Systems Learning Academy
Jump to: navigation, search
(Abstract)
(Project Video)
Line 121: Line 121:
  
 
=== Project Video ===
 
=== Project Video ===
Upload a video of your project and post the link here.
+
Overall, the project was more difficult that we could have imagined but we did learn a lot. We familiarized ourselves with developing android applications both on Android Studio and on Eclipse. We learned about interfacing bluetooth connections, including sockets and wrappers. The most significant thing that we learned was about the complexity of Android Apps.  Because Android Apps work on a system that executes multiple things in the background, we need to use multiple threads to avoid blocking. We have never programmed with threads before and it was a difficult concept to grasp.  It was also difficult to work with multiple classes to establish something as simple as establishing a bluetooth connection. We had difficulty working with the different classes because we only had a short time to familiarize ourselves with the IDE, and the Android architecture.
  
 
=== Project Source Code ===
 
=== Project Source Code ===

Revision as of 09:02, 25 May 2015

Grading Criteria

  • How well is Software & Hardware Design described?
  • How well can this report be used to reproduce this project?
  • Code Quality
  • Overall Report Quality:
    • Software Block Diagrams
    • Hardware Block Diagrams
      Schematic Quality
    • Quality of technical challenges and solutions adopted.

Alarm Based Coffee Maker

Abstract

The purpose of this project is to help make mornings easier. The goal is to upgrade an existing coffee maker to allow it to be programmed via smartphone application using an alarm application on a user's smartphone. The user syncs their alarm clock settings through a Bluetooth connection with the coffee maker to automatically start brewing coffee as soon as the preset time is reached. In addition to brewing coffee the SJSU One board will also be able to play music until the user stops it by stepping in front of the coffee maker.

Objectives & Introduction

Show list of your objectives. This section includes the high level details of your project. You can write about the various sensors or peripherals you used to get your project completed.

Team Members & Responsibilities

  • Patricia Mejia
    • Android App Development
    • Bluetooth Module & Task
    • Bring up MP3 Module
    • SJSU One Board Real Time Clock Setup;
  • Alberto Reyes
    • Relay Setup
    • Alarm Task
    • Mp3 Player Task
    • Motion Sensor Task
    • Interfacing All Tasks Together

Schedule

Show a simple table or figures that show your scheduled as planned before you started working on the project. Then in another table column, write down the actual schedule so that readers can see the planned vs. actual goals. The point of the schedule is for readers to assess how to pace themselves if they are doing a similar project.

Week# Date Task Actual
1 4/13 Set up bluetooth connection between board and smartphone. Complete
2 4/20 Complete bluetooth app and motion sensor on phone. Complete
3 4/27 Setup mp3 player on SJSU One board. Complete
4 5/4 Interface coffee maker and SJSU One board. Complete
5 5/11 Interface coffee maker and SJSU One board. Complete
6 5/18 Testeing Complete
7 5/25 Fix Bugs Complete

Parts List & Cost

  • Bluetooth Module:SiLabs HC-06 $7
  • Coffee Maker $20
  • Motion Sensor $ 5
  • Speakers $6
  • Mp3 Module: WIG-11029 ROHS - $50
  • Android Phone: LG L15G $40

Total Cost : $128

Design & Implementation

The design section can go over your hardware and software design. Organize this section using sub-sections that go over your design and implementation.

Hardware Design

Discuss your hardware design here. Show detailed schematics, and the interface here.

Hardware Interface

In this section, you can describe how your hardware communicates, such as which BUSes used. You can discuss your driver implementation here, such that the Software Design section is isolated to talk about high level workings rather than inner working of your project.

Software Design

Show your software design. For example, if you are designing an MP3 Player, show the tasks that you are using, and what they are doing at a high level. Do not show the details of the code. For example, do not show exact code, but you may show psuedocode and fragments of code. Keep in mind that you are showing DESIGN of your software, not the inner workings of it.

Implementation

This section includes implementation, but again, not the details, just the high level. For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash. You can include sub-sections for each of your component implementation.

Testing & Technical Challenges

This project brought together various modules into one system. Each unit needed specialized code to function correctly, and each module except for the relay needed troubleshooting. We had issues with the mp3 player, the motion sensor, the bluetooth module, and the Android device.

Include sub-sections that list out a problem and solution, such as:

The mp3 player #1

The mp3 player that was originally chosen was the Adafruit VS1053. This module was simply a decoder and transferred data back to a microcontroller board. We attempted for 3 days to understand how to handle this data, however the transfer format was something that we were not familiar with (dual mode spi). We did not have sufficient time in this class learn about how to implement music playback from the decoded data or how to implement dual mode spi. We decided to select another module which was easier to use and communicated via UART and had an easy to read datasheet with clear instructions. The mp3 player selected was the WIG-11029 ROHS, as listed in the parts section above.

The motion sensor #2

The motion sensor gave us difficulty because it was not very sensitive at first, but became more sensitive later in the project. We had to go back and change the sensitivity of the motion sensor to get accurate data. The sensitivity was changed using a knob on the back of the motion-sensor module.

The bluetooth module and Android Device #3

We spent many weeks trying to get the bluetooth to connect with our Android phone. At first, we connected the bluetooth module with a 3rd party App, Blue SPP, from the google play store to verify that it would connect to our phone. We were able to send and receive data. After a few weeks, the module stopped establishing a connection with any bluetooth app. It would pair but not connect. We tried 3 different bluetooth modules with the same results. We also did a factory reset on the cellphone. We then came across a developer's forum stating that HTC brand phones were know to have inconsistency with bluetooth connections. They would work fine under some circumstances than the fail. We purchased a new cellphone and the bluetooth connected successfully again. We then continued to develop our own bluetooth app.

The Android Studio IDE #4

Android Studio IDE is the official IDE for developing android Apps. It intuitive to use, and look similar to Visual Basic. It also comes with a large variety of examples of different functionality. We were confident that developing an app would be simple because Android studio had a sample bluetooth chat App that worked with the bluetooth serial port profile (SPP). However, the sample app did not work. When loaded on multiple devices, it would fail to connect to our bluetooth device. We had to develop our App from scratch using the Android Developers reference pages and understand how everything worked in detail. We made multiple apps with varying degrees of functionality. It was extremely difficult to work with Android Apps because we did not have knowledge of the architecture or about creating multiple threads. We had to read a lot of forums, and debug almost every section of code. The last App that we made was stable, although by this time we were unable to make the app as visually appealing as we had hoped.

Conclusion

Conclude your project here. You can recap your testing and problems. You should address the "so what" part here to indicate what you ultimately learnt from this project. How has this project increased your knowledge?

Project Video

Overall, the project was more difficult that we could have imagined but we did learn a lot. We familiarized ourselves with developing android applications both on Android Studio and on Eclipse. We learned about interfacing bluetooth connections, including sockets and wrappers. The most significant thing that we learned was about the complexity of Android Apps. Because Android Apps work on a system that executes multiple things in the background, we need to use multiple threads to avoid blocking. We have never programmed with threads before and it was a difficult concept to grasp. It was also difficult to work with multiple classes to establish something as simple as establishing a bluetooth connection. We had difficulty working with the different classes because we only had a short time to familiarize ourselves with the IDE, and the Android architecture.

Project Source Code

References

Acknowledgement

Any acknowledgement that you may wish to provide can be included here.

References Used

List any references used in project.

Appendix

http://developer.android.com/index.html