F16: Door Alarm System

From Embedded Systems Learning Academy
Revision as of 05:23, 20 December 2016 by 146 user2 (talk | contribs) (Block Diagram)

Jump to: navigation, search



Project Title: Door Alarm System

Abstract

Our project would use a motion detector and light sensor on the SJOne board to control the output of a speaker. If the someone opens the door during daytime, the speaker would output a song as a welcome. However, if the door opened at night where there’s no light, the speaker would output an alarm because there might be thieves coming in during midnight.

Objectives & Introduction

The objective of this project to create a realizable indoor anti-theft system. The system is able to detect the people's motion by using the motion sensor, and judge the current brightness by using the on-board light sensor.

In order to accomplish the objective, we need to the following things:

> Modified the Pulse-Width Modulation(PWM) source code to allow the speaker to play a song. > Figure out how to amplify the sound signal. > Using the ADC code to receive the signal from motion sensor.


Team Members & Responsibilities

  • Bowei Zhang
    • Program the speaker.
    • Programming the ADC code.
    • Testing the software.
  • James Huang
    • Improve the playing song algorithm.
    • Design the hardware connection between MCU and external parts.
    • Programming the ADC code

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 Completion Comment
week1 Oct31 - Nov4 Project Plan & ordering parts Incompleted. Haven't ordered the parts.
week2 Nov 7 - Nov11 Circuit Design & Writing Software (part 1) Completed Finalizing the idea.
week3 Nov14- Nov18 Circuit Design & Writing Software (part 2) Incomplete Speaker with low volume. Consider ordering Amplifier.
week4 Nov21- Nov25 Finish Testing In completed Motion Senor came with damage. Ordering new one.
week5 Nov27- Dec2 Project Report Completed Working on Report. Waiting for sensor.
week6 Dec 3 - Dec9 Cont. Testing & finish project report Incomplete Waiting for Motion sensor. Consider moving to plan B.
week7 Dec12- Dec16 Cont. Testing Completed Report finished. Testing sensor.
week8 Dec17- Dec19 Finish Report & Testing Completed Done

Parts List & Cost

Part Name Quantity Cost Notes
SJone Board 1 $80 SJone Board
Speaker module 1 $2 Buzzer
SD card 1 ~$10
LEDs 4 <$1
Motion Sensor 1 $15 Detector
Signal Amplifier 1 $1 2N3904

Design & Implementation

Block Diagram

The following figure is the system level design of our project.

File:System Level Design.PNG
Figure 1. System Level Design

Hardware Design

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

Hardware Interface

Pulse-Width Modulatio(PWM)

  • As the Figure 1 showed,we connected the speaker with an 2N3904 Amplifier, and then connected it to the on- board PWM Pin (pin2.0)directly. When the speaker output condition is triggered, pin 2.0 will send a PWM signal to the amplifier and it will be amplified to allow the speaker output louder.

Analog to Digital Converter(ADC)

  • In order to receive the data from motion sensor, we connected it with the on-board ADC pin (pin 2.6), the ADC pin will send a 20us trigger signal to trigger the sensor, and then the sensor will return an analog signal. By decoding the signal, we will able to know did the sensor detect something or not.

General Purpose Input/Output (GPIO)

  • The General Purpose Input/Output(GPIO)Pin is used to control the LEDs.


File:SM.PNG
Figure 2. State Machine

Hardware Used

In order to accomplish the project, we used following components:


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

Describe the challenges of your project. What advise would you give yourself or someone else if your project can be started from scratch again? Make a smooth transition to testing section and described what it took to test your project.


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


My Issue #1

Discuss the issue and resolution.


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

Upload a video of your project and post the link here.


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

You can list the references you used.