<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://socialledge.com/sjsu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=146+user2</id>
		<title>Embedded Systems Learning Academy - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://socialledge.com/sjsu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=146+user2"/>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php/Special:Contributions/146_user2"/>
		<updated>2026-05-08T22:52:36Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.1</generator>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34270</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34270"/>
				<updated>2016-12-21T06:12:25Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* References Used */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Design Hardware Schematic.&lt;br /&gt;
**  Programming.&lt;br /&gt;
**  Testing the hardware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the software schematic.&lt;br /&gt;
**  Programming.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
The following table is our schedule for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Motion Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design2.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs. We also set the GPIO pin as an input pin to receive the signal come out from the motion sensor. The sensor will output logic &amp;quot;1&amp;quot; when it detects movement or output logic low if it doesn't.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;External Power Supply &amp;lt;/b&amp;gt;&lt;br /&gt;
*We power up the PIR Motion Sensor by using a 12V power supply which connected with a LM7805 Regulator to step down the voltage to 5V.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor2.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
In our project, we used Real Time Operating System (RTOS) for this project. The software design consist of two tasks with different priority level. The low priority task would check for inputs of the motion sensors and if motion is detected from the sensor, the lower priority task would send data to the queue. The medium priority task would then receive the signals from the queue and generate sound for the speaker based on the value of the light sensor. If the brightness is pretty high, then it the micro-controller would output a song named &amp;quot;Jingle Bell&amp;quot;, else micro-controller would output an alarm to the speaker because there maybe thieves inside the house.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
The first low priority task would check for the inputs of two motion sensors (This increases the accuracy of the detection). If both sensor sensed a motion in the first task, then it would send some data into the queue to indicate that motion is been detected. The medium priority task would wake up from sleep state because the queue is not empty anymore, this task would check the value on the light sensor to see how bright the room is. If the room is too dark (brightness &amp;lt;20), then there may be a thief inside the house, so an alarm frequency would be sent to the speaker pin. Else, if the value of brightness is pretty bright on the light sensor, just because it's christmas, the micro controller would generate a song called &amp;quot;Jingle Bell&amp;quot; just because it's christmas.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The biggest challenge we faced we deciding what to purchase for the project. In the first two week of the project, we purchased the speakers and thinking the onboard acceleration sensor would work like the way we want it to (sense motions), but it actually only works if the board is tilted. After the speaker came, we tested the speaker with our micro-controller, and yes there's sound coming out but the sound is very dim that we're barely able to hear. So we purchased some 2N3904 transistor and created a signal amplifying circuit and connected that to the speaker. Next, the first motion sensor that we bought online isn't turning off, we couldn't find out why so we bought 5 more motion sensor online just in case. If someone wants to start this project from scratch again, I would highly recommend doing enough research before making a purchase, because there's always not enough materials to work on the project if research are not well done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1: Speaker ===&lt;br /&gt;
When we purchased the speaker, the sound wasn't loud enough so we need some device to amplify the signal. So, we spend some time to go to an electronic store to purchase some transistors 2N3904 to create an amplifying circuit and connect that to the speaker. Finally, the sound it generated was a lot louder than before. It would be a lot better to purchase the speaker and 2N3904 together, because a lot of time is being wasted in between because we thought the micro controller could create enough voltage to sound a speaker.&lt;br /&gt;
&lt;br /&gt;
=== My Issue #2: Motion Sensor ===&lt;br /&gt;
The second part of our issue is the motion sensor, the first sensor that we bought is not turning off for some reason, in other words, it always senses motion even though nothing is moving in front of the sensor. Then, we were trying to think of a way to work around the box with other ideas, but none of them work. So we have to go online and buy 5 motion sensor because we don't want any defected parts to slow down our progress. The sensors that we bought finally worked, but sometimes it would give a false signal when there's no motion so I'm assuming it needs some time for the motion sensor to stabilize itself.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, the project was successful completed. Through working on this project, we were able to understand the FreeRTos and Embedded Code deeper. During testing the project, we got many queue timing problem and priority issues. After we fixed those bugs by testing the program multiple times, we furthered our knowledge in the embedded system field. We also learned how to use the PIR motion, it took us a long time to make it work precisely. By doing this project, the lesson we have learned is to do enough research before you actually order the parts.We waste lots of money due to this reason.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
*[https://www.youtube.com/watch?v=goAG0NiyZBs Indoor Alarm System Demonstration]&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
We would like to thank Mr. Preet and Professor Ozemek for teaching us all those knowledge about real-time embedded system design.&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
.&lt;br /&gt;
[http://www.socialledge.com/sjsu/index.php?title=Main_Page SocialEdge]&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
*[http://www.nxp.com/documents/user_manual/UM10360.pdf LPC1758 Datasheet]&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34269</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34269"/>
				<updated>2016-12-21T06:12:13Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* References Used */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Design Hardware Schematic.&lt;br /&gt;
**  Programming.&lt;br /&gt;
**  Testing the hardware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the software schematic.&lt;br /&gt;
**  Programming.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
The following table is our schedule for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Motion Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design2.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs. We also set the GPIO pin as an input pin to receive the signal come out from the motion sensor. The sensor will output logic &amp;quot;1&amp;quot; when it detects movement or output logic low if it doesn't.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;External Power Supply &amp;lt;/b&amp;gt;&lt;br /&gt;
*We power up the PIR Motion Sensor by using a 12V power supply which connected with a LM7805 Regulator to step down the voltage to 5V.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor2.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
In our project, we used Real Time Operating System (RTOS) for this project. The software design consist of two tasks with different priority level. The low priority task would check for inputs of the motion sensors and if motion is detected from the sensor, the lower priority task would send data to the queue. The medium priority task would then receive the signals from the queue and generate sound for the speaker based on the value of the light sensor. If the brightness is pretty high, then it the micro-controller would output a song named &amp;quot;Jingle Bell&amp;quot;, else micro-controller would output an alarm to the speaker because there maybe thieves inside the house.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
The first low priority task would check for the inputs of two motion sensors (This increases the accuracy of the detection). If both sensor sensed a motion in the first task, then it would send some data into the queue to indicate that motion is been detected. The medium priority task would wake up from sleep state because the queue is not empty anymore, this task would check the value on the light sensor to see how bright the room is. If the room is too dark (brightness &amp;lt;20), then there may be a thief inside the house, so an alarm frequency would be sent to the speaker pin. Else, if the value of brightness is pretty bright on the light sensor, just because it's christmas, the micro controller would generate a song called &amp;quot;Jingle Bell&amp;quot; just because it's christmas.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The biggest challenge we faced we deciding what to purchase for the project. In the first two week of the project, we purchased the speakers and thinking the onboard acceleration sensor would work like the way we want it to (sense motions), but it actually only works if the board is tilted. After the speaker came, we tested the speaker with our micro-controller, and yes there's sound coming out but the sound is very dim that we're barely able to hear. So we purchased some 2N3904 transistor and created a signal amplifying circuit and connected that to the speaker. Next, the first motion sensor that we bought online isn't turning off, we couldn't find out why so we bought 5 more motion sensor online just in case. If someone wants to start this project from scratch again, I would highly recommend doing enough research before making a purchase, because there's always not enough materials to work on the project if research are not well done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1: Speaker ===&lt;br /&gt;
When we purchased the speaker, the sound wasn't loud enough so we need some device to amplify the signal. So, we spend some time to go to an electronic store to purchase some transistors 2N3904 to create an amplifying circuit and connect that to the speaker. Finally, the sound it generated was a lot louder than before. It would be a lot better to purchase the speaker and 2N3904 together, because a lot of time is being wasted in between because we thought the micro controller could create enough voltage to sound a speaker.&lt;br /&gt;
&lt;br /&gt;
=== My Issue #2: Motion Sensor ===&lt;br /&gt;
The second part of our issue is the motion sensor, the first sensor that we bought is not turning off for some reason, in other words, it always senses motion even though nothing is moving in front of the sensor. Then, we were trying to think of a way to work around the box with other ideas, but none of them work. So we have to go online and buy 5 motion sensor because we don't want any defected parts to slow down our progress. The sensors that we bought finally worked, but sometimes it would give a false signal when there's no motion so I'm assuming it needs some time for the motion sensor to stabilize itself.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, the project was successful completed. Through working on this project, we were able to understand the FreeRTos and Embedded Code deeper. During testing the project, we got many queue timing problem and priority issues. After we fixed those bugs by testing the program multiple times, we furthered our knowledge in the embedded system field. We also learned how to use the PIR motion, it took us a long time to make it work precisely. By doing this project, the lesson we have learned is to do enough research before you actually order the parts.We waste lots of money due to this reason.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
*[https://www.youtube.com/watch?v=goAG0NiyZBs Indoor Alarm System Demonstration]&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
We would like to thank Mr. Preet and Professor Ozemek for teaching us all those knowledge about real-time embedded system design.&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
[http://www.socialledge.com/sjsu/index.php?title=Main_Page SocialEdge]&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
*[http://www.nxp.com/documents/user_manual/UM10360.pdf LPC1758 Datasheet]&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34268</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34268"/>
				<updated>2016-12-21T06:11:20Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Project Video */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Design Hardware Schematic.&lt;br /&gt;
**  Programming.&lt;br /&gt;
**  Testing the hardware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the software schematic.&lt;br /&gt;
**  Programming.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
The following table is our schedule for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Motion Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design2.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs. We also set the GPIO pin as an input pin to receive the signal come out from the motion sensor. The sensor will output logic &amp;quot;1&amp;quot; when it detects movement or output logic low if it doesn't.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;External Power Supply &amp;lt;/b&amp;gt;&lt;br /&gt;
*We power up the PIR Motion Sensor by using a 12V power supply which connected with a LM7805 Regulator to step down the voltage to 5V.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor2.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
In our project, we used Real Time Operating System (RTOS) for this project. The software design consist of two tasks with different priority level. The low priority task would check for inputs of the motion sensors and if motion is detected from the sensor, the lower priority task would send data to the queue. The medium priority task would then receive the signals from the queue and generate sound for the speaker based on the value of the light sensor. If the brightness is pretty high, then it the micro-controller would output a song named &amp;quot;Jingle Bell&amp;quot;, else micro-controller would output an alarm to the speaker because there maybe thieves inside the house.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
The first low priority task would check for the inputs of two motion sensors (This increases the accuracy of the detection). If both sensor sensed a motion in the first task, then it would send some data into the queue to indicate that motion is been detected. The medium priority task would wake up from sleep state because the queue is not empty anymore, this task would check the value on the light sensor to see how bright the room is. If the room is too dark (brightness &amp;lt;20), then there may be a thief inside the house, so an alarm frequency would be sent to the speaker pin. Else, if the value of brightness is pretty bright on the light sensor, just because it's christmas, the micro controller would generate a song called &amp;quot;Jingle Bell&amp;quot; just because it's christmas.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The biggest challenge we faced we deciding what to purchase for the project. In the first two week of the project, we purchased the speakers and thinking the onboard acceleration sensor would work like the way we want it to (sense motions), but it actually only works if the board is tilted. After the speaker came, we tested the speaker with our micro-controller, and yes there's sound coming out but the sound is very dim that we're barely able to hear. So we purchased some 2N3904 transistor and created a signal amplifying circuit and connected that to the speaker. Next, the first motion sensor that we bought online isn't turning off, we couldn't find out why so we bought 5 more motion sensor online just in case. If someone wants to start this project from scratch again, I would highly recommend doing enough research before making a purchase, because there's always not enough materials to work on the project if research are not well done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1: Speaker ===&lt;br /&gt;
When we purchased the speaker, the sound wasn't loud enough so we need some device to amplify the signal. So, we spend some time to go to an electronic store to purchase some transistors 2N3904 to create an amplifying circuit and connect that to the speaker. Finally, the sound it generated was a lot louder than before. It would be a lot better to purchase the speaker and 2N3904 together, because a lot of time is being wasted in between because we thought the micro controller could create enough voltage to sound a speaker.&lt;br /&gt;
&lt;br /&gt;
=== My Issue #2: Motion Sensor ===&lt;br /&gt;
The second part of our issue is the motion sensor, the first sensor that we bought is not turning off for some reason, in other words, it always senses motion even though nothing is moving in front of the sensor. Then, we were trying to think of a way to work around the box with other ideas, but none of them work. So we have to go online and buy 5 motion sensor because we don't want any defected parts to slow down our progress. The sensors that we bought finally worked, but sometimes it would give a false signal when there's no motion so I'm assuming it needs some time for the motion sensor to stabilize itself.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, the project was successful completed. Through working on this project, we were able to understand the FreeRTos and Embedded Code deeper. During testing the project, we got many queue timing problem and priority issues. After we fixed those bugs by testing the program multiple times, we furthered our knowledge in the embedded system field. We also learned how to use the PIR motion, it took us a long time to make it work precisely. By doing this project, the lesson we have learned is to do enough research before you actually order the parts.We waste lots of money due to this reason.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
*[https://www.youtube.com/watch?v=goAG0NiyZBs Indoor Alarm System Demonstration]&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
We would like to thank Mr. Preet and Professor Ozemek for teaching us all those knowledge about real-time embedded system design.&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
*[http://www.nxp.com/documents/user_manual/UM10360.pdf LPC1758 Datasheet]&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34267</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34267"/>
				<updated>2016-12-21T06:11:10Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Project Video */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Design Hardware Schematic.&lt;br /&gt;
**  Programming.&lt;br /&gt;
**  Testing the hardware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the software schematic.&lt;br /&gt;
**  Programming.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
The following table is our schedule for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Motion Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design2.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs. We also set the GPIO pin as an input pin to receive the signal come out from the motion sensor. The sensor will output logic &amp;quot;1&amp;quot; when it detects movement or output logic low if it doesn't.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;External Power Supply &amp;lt;/b&amp;gt;&lt;br /&gt;
*We power up the PIR Motion Sensor by using a 12V power supply which connected with a LM7805 Regulator to step down the voltage to 5V.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor2.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
In our project, we used Real Time Operating System (RTOS) for this project. The software design consist of two tasks with different priority level. The low priority task would check for inputs of the motion sensors and if motion is detected from the sensor, the lower priority task would send data to the queue. The medium priority task would then receive the signals from the queue and generate sound for the speaker based on the value of the light sensor. If the brightness is pretty high, then it the micro-controller would output a song named &amp;quot;Jingle Bell&amp;quot;, else micro-controller would output an alarm to the speaker because there maybe thieves inside the house.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
The first low priority task would check for the inputs of two motion sensors (This increases the accuracy of the detection). If both sensor sensed a motion in the first task, then it would send some data into the queue to indicate that motion is been detected. The medium priority task would wake up from sleep state because the queue is not empty anymore, this task would check the value on the light sensor to see how bright the room is. If the room is too dark (brightness &amp;lt;20), then there may be a thief inside the house, so an alarm frequency would be sent to the speaker pin. Else, if the value of brightness is pretty bright on the light sensor, just because it's christmas, the micro controller would generate a song called &amp;quot;Jingle Bell&amp;quot; just because it's christmas.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The biggest challenge we faced we deciding what to purchase for the project. In the first two week of the project, we purchased the speakers and thinking the onboard acceleration sensor would work like the way we want it to (sense motions), but it actually only works if the board is tilted. After the speaker came, we tested the speaker with our micro-controller, and yes there's sound coming out but the sound is very dim that we're barely able to hear. So we purchased some 2N3904 transistor and created a signal amplifying circuit and connected that to the speaker. Next, the first motion sensor that we bought online isn't turning off, we couldn't find out why so we bought 5 more motion sensor online just in case. If someone wants to start this project from scratch again, I would highly recommend doing enough research before making a purchase, because there's always not enough materials to work on the project if research are not well done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1: Speaker ===&lt;br /&gt;
When we purchased the speaker, the sound wasn't loud enough so we need some device to amplify the signal. So, we spend some time to go to an electronic store to purchase some transistors 2N3904 to create an amplifying circuit and connect that to the speaker. Finally, the sound it generated was a lot louder than before. It would be a lot better to purchase the speaker and 2N3904 together, because a lot of time is being wasted in between because we thought the micro controller could create enough voltage to sound a speaker.&lt;br /&gt;
&lt;br /&gt;
=== My Issue #2: Motion Sensor ===&lt;br /&gt;
The second part of our issue is the motion sensor, the first sensor that we bought is not turning off for some reason, in other words, it always senses motion even though nothing is moving in front of the sensor. Then, we were trying to think of a way to work around the box with other ideas, but none of them work. So we have to go online and buy 5 motion sensor because we don't want any defected parts to slow down our progress. The sensors that we bought finally worked, but sometimes it would give a false signal when there's no motion so I'm assuming it needs some time for the motion sensor to stabilize itself.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, the project was successful completed. Through working on this project, we were able to understand the FreeRTos and Embedded Code deeper. During testing the project, we got many queue timing problem and priority issues. After we fixed those bugs by testing the program multiple times, we furthered our knowledge in the embedded system field. We also learned how to use the PIR motion, it took us a long time to make it work precisely. By doing this project, the lesson we have learned is to do enough research before you actually order the parts.We waste lots of money due to this reason.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
*[https://www.youtube.com/watch?v=goAG0NiyZBs Indoor Alarm SystemDemonstration]&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
We would like to thank Mr. Preet and Professor Ozemek for teaching us all those knowledge about real-time embedded system design.&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
*[http://www.nxp.com/documents/user_manual/UM10360.pdf LPC1758 Datasheet]&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34263</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34263"/>
				<updated>2016-12-21T05:54:50Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Acknowledgement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Design Hardware Schematic.&lt;br /&gt;
**  Programming.&lt;br /&gt;
**  Testing the hardware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the software schematic.&lt;br /&gt;
**  Programming.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
The following table is our schedule for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Motion Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design2.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs. We also set the GPIO pin as an input pin to receive the signal come out from the motion sensor. The sensor will output logic &amp;quot;1&amp;quot; when it detects movement or output logic low if it doesn't.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;External Power Supply &amp;lt;/b&amp;gt;&lt;br /&gt;
*We power up the PIR Motion Sensor by using a 12V power supply which connected with a LM7805 Regulator to step down the voltage to 5V.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor2.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
In our project, we used Real Time Operating System (RTOS) for this project. The software design consist of two tasks with different priority level. The low priority task would check for inputs of the motion sensors and if motion is detected from the sensor, the lower priority task would send data to the queue. The medium priority task would then receive the signals from the queue and generate sound for the speaker based on the value of the light sensor. If the brightness is pretty high, then it the micro-controller would output a song named &amp;quot;Jingle Bell&amp;quot;, else micro-controller would output an alarm to the speaker because there maybe thieves inside the house.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
The first low priority task would check for the inputs of two motion sensors (This increases the accuracy of the detection). If both sensor sensed a motion in the first task, then it would send some data into the queue to indicate that motion is been detected. The medium priority task would wake up from sleep state because the queue is not empty anymore, this task would check the value on the light sensor to see how bright the room is. If the room is too dark (brightness &amp;lt;20), then there may be a thief inside the house, so an alarm frequency would be sent to the speaker pin. Else, if the value of brightness is pretty bright on the light sensor, just because it's christmas, the micro controller would generate a song called &amp;quot;Jingle Bell&amp;quot; just because it's christmas.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The biggest challenge we faced we deciding what to purchase for the project. In the first two week of the project, we purchased the speakers and thinking the onboard acceleration sensor would work like the way we want it to (sense motions), but it actually only works if the board is tilted. After the speaker came, we tested the speaker with our micro-controller, and yes there's sound coming out but the sound is very dim that we're barely able to hear. So we purchased some 2N3904 transistor and created a signal amplifying circuit and connected that to the speaker. Next, the first motion sensor that we bought online isn't turning off, we couldn't find out why so we bought 5 more motion sensor online just in case. If someone wants to start this project from scratch again, I would highly recommend doing enough research before making a purchase, because there's always not enough materials to work on the project if research are not well done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1: Speaker ===&lt;br /&gt;
When we purchased the speaker, the sound wasn't loud enough so we need some device to amplify the signal. So, we spend some time to go to an electronic store to purchase some transistors 2N3904 to create an amplifying circuit and connect that to the speaker. Finally, the sound it generated was a lot louder than before. It would be a lot better to purchase the speaker and 2N3904 together, because a lot of time is being wasted in between because we thought the micro controller could create enough voltage to sound a speaker.&lt;br /&gt;
&lt;br /&gt;
=== My Issue #2: Motion Sensor ===&lt;br /&gt;
The second part of our issue is the motion sensor, the first sensor that we bought is not turning off for some reason, in other words, it always senses motion even though nothing is moving in front of the sensor. Then, we were trying to think of a way to work around the box with other ideas, but none of them work. So we have to go online and buy 5 motion sensor because we don't want any defected parts to slow down our progress. The sensors that we bought finally worked, but sometimes it would give a false signal when there's no motion so I'm assuming it needs some time for the motion sensor to stabilize itself.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, the project was successful completed. Through working on this project, we were able to understand the FreeRTos and Embedded Code deeper. During testing the project, we got many queue timing problem and priority issues. After we fixed those bugs by testing the program multiple times, we furthered our knowledge in the embedded system field. We also learned how to use the PIR motion, it took us a long time to make it work precisely. By doing this project, the lesson we have learned is to do enough research before you actually order the parts.We waste lots of money due to this reason.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
We would like to thank Mr. Preet and Professor Ozemek for teaching us all those knowledge about real-time embedded system design.&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
*[http://www.nxp.com/documents/user_manual/UM10360.pdf LPC1758 Datasheet]&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34262</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34262"/>
				<updated>2016-12-21T05:52:44Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Acknowledgement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Design Hardware Schematic.&lt;br /&gt;
**  Programming.&lt;br /&gt;
**  Testing the hardware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the software schematic.&lt;br /&gt;
**  Programming.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
The following table is our schedule for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Motion Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design2.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs. We also set the GPIO pin as an input pin to receive the signal come out from the motion sensor. The sensor will output logic &amp;quot;1&amp;quot; when it detects movement or output logic low if it doesn't.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;External Power Supply &amp;lt;/b&amp;gt;&lt;br /&gt;
*We power up the PIR Motion Sensor by using a 12V power supply which connected with a LM7805 Regulator to step down the voltage to 5V.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor2.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
In our project, we used Real Time Operating System (RTOS) for this project. The software design consist of two tasks with different priority level. The low priority task would check for inputs of the motion sensors and if motion is detected from the sensor, the lower priority task would send data to the queue. The medium priority task would then receive the signals from the queue and generate sound for the speaker based on the value of the light sensor. If the brightness is pretty high, then it the micro-controller would output a song named &amp;quot;Jingle Bell&amp;quot;, else micro-controller would output an alarm to the speaker because there maybe thieves inside the house.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
The first low priority task would check for the inputs of two motion sensors (This increases the accuracy of the detection). If both sensor sensed a motion in the first task, then it would send some data into the queue to indicate that motion is been detected. The medium priority task would wake up from sleep state because the queue is not empty anymore, this task would check the value on the light sensor to see how bright the room is. If the room is too dark (brightness &amp;lt;20), then there may be a thief inside the house, so an alarm frequency would be sent to the speaker pin. Else, if the value of brightness is pretty bright on the light sensor, just because it's christmas, the micro controller would generate a song called &amp;quot;Jingle Bell&amp;quot; just because it's christmas.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The biggest challenge we faced we deciding what to purchase for the project. In the first two week of the project, we purchased the speakers and thinking the onboard acceleration sensor would work like the way we want it to (sense motions), but it actually only works if the board is tilted. After the speaker came, we tested the speaker with our micro-controller, and yes there's sound coming out but the sound is very dim that we're barely able to hear. So we purchased some 2N3904 transistor and created a signal amplifying circuit and connected that to the speaker. Next, the first motion sensor that we bought online isn't turning off, we couldn't find out why so we bought 5 more motion sensor online just in case. If someone wants to start this project from scratch again, I would highly recommend doing enough research before making a purchase, because there's always not enough materials to work on the project if research are not well done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1: Speaker ===&lt;br /&gt;
When we purchased the speaker, the sound wasn't loud enough so we need some device to amplify the signal. So, we spend some time to go to an electronic store to purchase some transistors 2N3904 to create an amplifying circuit and connect that to the speaker. Finally, the sound it generated was a lot louder than before. It would be a lot better to purchase the speaker and 2N3904 together, because a lot of time is being wasted in between because we thought the micro controller could create enough voltage to sound a speaker.&lt;br /&gt;
&lt;br /&gt;
=== My Issue #2: Motion Sensor ===&lt;br /&gt;
The second part of our issue is the motion sensor, the first sensor that we bought is not turning off for some reason, in other words, it always senses motion even though nothing is moving in front of the sensor. Then, we were trying to think of a way to work around the box with other ideas, but none of them work. So we have to go online and buy 5 motion sensor because we don't want any defected parts to slow down our progress. The sensors that we bought finally worked, but sometimes it would give a false signal when there's no motion so I'm assuming it needs some time for the motion sensor to stabilize itself.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, the project was successful completed. Through working on this project, we were able to understand the FreeRTos and Embedded Code deeper. During testing the project, we got many queue timing problem and priority issues. After we fixed those bugs by testing the program multiple times, we furthered our knowledge in the embedded system field. We also learned how to use the PIR motion, it took us a long time to make it work precisely. By doing this project, the lesson we have learned is to do enough research before you actually order the parts.We waste lots of money due to this reason.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
We would like to thank Preet and Professor Ozemek for helping us throughout the class. Also, thanks to webber who did a great job on doing the project. FK james&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
*[http://www.nxp.com/documents/user_manual/UM10360.pdf LPC1758 Datasheet]&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34261</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34261"/>
				<updated>2016-12-21T05:43:34Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Appendix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Design Hardware Schematic.&lt;br /&gt;
**  Programming.&lt;br /&gt;
**  Testing the hardware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the software schematic.&lt;br /&gt;
**  Programming.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
The following table is our schedule for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Motion Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design2.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs. We also set the GPIO pin as an input pin to receive the signal come out from the motion sensor. The sensor will output logic &amp;quot;1&amp;quot; when it detects movement or output logic low if it doesn't.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;External Power Supply &amp;lt;/b&amp;gt;&lt;br /&gt;
*We power up the PIR Motion Sensor by using a 12V power supply which connected with a LM7805 Regulator to step down the voltage to 5V.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor2.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
In our project, we used Real Time Operating System (RTOS) for this project. The software design consist of two tasks with different priority level. The low priority task would check for inputs of the motion sensors and if motion is detected from the sensor, the lower priority task would send data to the queue. The medium priority task would then receive the signals from the queue and generate sound for the speaker based on the value of the light sensor. If the brightness is pretty high, then it the micro-controller would output a song named &amp;quot;Jingle Bell&amp;quot;, else micro-controller would output an alarm to the speaker because there maybe thieves inside the house.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
The first low priority task would check for the inputs of two motion sensors (This increases the accuracy of the detection). If both sensor sensed a motion in the first task, then it would send some data into the queue to indicate that motion is been detected. The medium priority task would wake up from sleep state because the queue is not empty anymore, this task would check the value on the light sensor to see how bright the room is. If the room is too dark (brightness &amp;lt;20), then there may be a thief inside the house, so an alarm frequency would be sent to the speaker pin. Else, if the value of brightness is pretty bright on the light sensor, just because it's christmas, the micro controller would generate a song called &amp;quot;Jingle Bell&amp;quot; just because it's christmas.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The biggest challenge we faced we deciding what to purchase for the project. In the first two week of the project, we purchased the speakers and thinking the onboard acceleration sensor would work like the way we want it to (sense motions), but it actually only works if the board is tilted. After the speaker came, we tested the speaker with our micro-controller, and yes there's sound coming out but the sound is very dim that we're barely able to hear. So we purchased some 2N3904 transistor and created a signal amplifying circuit and connected that to the speaker. Next, the first motion sensor that we bought online isn't turning off, we couldn't find out why so we bought 5 more motion sensor online just in case. If someone wants to start this project from scratch again, I would highly recommend doing enough research before making a purchase, because there's always not enough materials to work on the project if research are not well done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1: Speaker ===&lt;br /&gt;
When we purchased the speaker, the sound wasn't loud enough so we need some device to amplify the signal. So, we spend some time to go to an electronic store to purchase some transistors 2N3904 to create an amplifying circuit and connect that to the speaker. Finally, the sound it generated was a lot louder than before. It would be a lot better to purchase the speaker and 2N3904 together, because a lot of time is being wasted in between because we thought the micro controller could create enough voltage to sound a speaker.&lt;br /&gt;
&lt;br /&gt;
=== My Issue #2: Motion Sensor ===&lt;br /&gt;
The second part of our issue is the motion sensor, the first sensor that we bought is not turning off for some reason, in other words, it always senses motion even though nothing is moving in front of the sensor. Then, we were trying to think of a way to work around the box with other ideas, but none of them work. So we have to go online and buy 5 motion sensor because we don't want any defected parts to slow down our progress. The sensors that we bought finally worked, but sometimes it would give a false signal when there's no motion so I'm assuming it needs some time for the motion sensor to stabilize itself.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, the project was successful completed. Through working on this project, we were able to understand the FreeRTos and Embedded Code deeper. During testing the project, we got many queue timing problem and priority issues. After we fixed those bugs by testing the program multiple times, we furthered our knowledge in the embedded system field. We also learned how to use the PIR motion, it took us a long time to make it work precisely. By doing this project, the lesson we have learned is to do enough research before you actually order the parts.We waste lots of money due to this reason.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
*[http://www.nxp.com/documents/user_manual/UM10360.pdf LPC1758 Datasheet]&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34260</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34260"/>
				<updated>2016-12-21T05:42:44Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Appendix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Design Hardware Schematic.&lt;br /&gt;
**  Programming.&lt;br /&gt;
**  Testing the hardware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the software schematic.&lt;br /&gt;
**  Programming.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
The following table is our schedule for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Motion Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design2.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs. We also set the GPIO pin as an input pin to receive the signal come out from the motion sensor. The sensor will output logic &amp;quot;1&amp;quot; when it detects movement or output logic low if it doesn't.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;External Power Supply &amp;lt;/b&amp;gt;&lt;br /&gt;
*We power up the PIR Motion Sensor by using a 12V power supply which connected with a LM7805 Regulator to step down the voltage to 5V.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor2.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
In our project, we used Real Time Operating System (RTOS) for this project. The software design consist of two tasks with different priority level. The low priority task would check for inputs of the motion sensors and if motion is detected from the sensor, the lower priority task would send data to the queue. The medium priority task would then receive the signals from the queue and generate sound for the speaker based on the value of the light sensor. If the brightness is pretty high, then it the micro-controller would output a song named &amp;quot;Jingle Bell&amp;quot;, else micro-controller would output an alarm to the speaker because there maybe thieves inside the house.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
The first low priority task would check for the inputs of two motion sensors (This increases the accuracy of the detection). If both sensor sensed a motion in the first task, then it would send some data into the queue to indicate that motion is been detected. The medium priority task would wake up from sleep state because the queue is not empty anymore, this task would check the value on the light sensor to see how bright the room is. If the room is too dark (brightness &amp;lt;20), then there may be a thief inside the house, so an alarm frequency would be sent to the speaker pin. Else, if the value of brightness is pretty bright on the light sensor, just because it's christmas, the micro controller would generate a song called &amp;quot;Jingle Bell&amp;quot; just because it's christmas.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The biggest challenge we faced we deciding what to purchase for the project. In the first two week of the project, we purchased the speakers and thinking the onboard acceleration sensor would work like the way we want it to (sense motions), but it actually only works if the board is tilted. After the speaker came, we tested the speaker with our micro-controller, and yes there's sound coming out but the sound is very dim that we're barely able to hear. So we purchased some 2N3904 transistor and created a signal amplifying circuit and connected that to the speaker. Next, the first motion sensor that we bought online isn't turning off, we couldn't find out why so we bought 5 more motion sensor online just in case. If someone wants to start this project from scratch again, I would highly recommend doing enough research before making a purchase, because there's always not enough materials to work on the project if research are not well done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1: Speaker ===&lt;br /&gt;
When we purchased the speaker, the sound wasn't loud enough so we need some device to amplify the signal. So, we spend some time to go to an electronic store to purchase some transistors 2N3904 to create an amplifying circuit and connect that to the speaker. Finally, the sound it generated was a lot louder than before. It would be a lot better to purchase the speaker and 2N3904 together, because a lot of time is being wasted in between because we thought the micro controller could create enough voltage to sound a speaker.&lt;br /&gt;
&lt;br /&gt;
=== My Issue #2: Motion Sensor ===&lt;br /&gt;
The second part of our issue is the motion sensor, the first sensor that we bought is not turning off for some reason, in other words, it always senses motion even though nothing is moving in front of the sensor. Then, we were trying to think of a way to work around the box with other ideas, but none of them work. So we have to go online and buy 5 motion sensor because we don't want any defected parts to slow down our progress. The sensors that we bought finally worked, but sometimes it would give a false signal when there's no motion so I'm assuming it needs some time for the motion sensor to stabilize itself.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, the project was successful completed. Through working on this project, we were able to understand the FreeRTos and Embedded Code deeper. During testing the project, we got many queue timing problem and priority issues. After we fixed those bugs by testing the program multiple times, we furthered our knowledge in the embedded system field. We also learned how to use the PIR motion, it took us a long time to make it work precisely. By doing this project, the lesson we have learned is to do enough research before you actually order the parts.We waste lots of money due to this reason.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
http://www.nxp.com/documents/user_manual/UM10360.pdf&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34259</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34259"/>
				<updated>2016-12-21T05:41:59Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Design Hardware Schematic.&lt;br /&gt;
**  Programming.&lt;br /&gt;
**  Testing the hardware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the software schematic.&lt;br /&gt;
**  Programming.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
The following table is our schedule for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Motion Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design2.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs. We also set the GPIO pin as an input pin to receive the signal come out from the motion sensor. The sensor will output logic &amp;quot;1&amp;quot; when it detects movement or output logic low if it doesn't.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;External Power Supply &amp;lt;/b&amp;gt;&lt;br /&gt;
*We power up the PIR Motion Sensor by using a 12V power supply which connected with a LM7805 Regulator to step down the voltage to 5V.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor2.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
In our project, we used Real Time Operating System (RTOS) for this project. The software design consist of two tasks with different priority level. The low priority task would check for inputs of the motion sensors and if motion is detected from the sensor, the lower priority task would send data to the queue. The medium priority task would then receive the signals from the queue and generate sound for the speaker based on the value of the light sensor. If the brightness is pretty high, then it the micro-controller would output a song named &amp;quot;Jingle Bell&amp;quot;, else micro-controller would output an alarm to the speaker because there maybe thieves inside the house.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
The first low priority task would check for the inputs of two motion sensors (This increases the accuracy of the detection). If both sensor sensed a motion in the first task, then it would send some data into the queue to indicate that motion is been detected. The medium priority task would wake up from sleep state because the queue is not empty anymore, this task would check the value on the light sensor to see how bright the room is. If the room is too dark (brightness &amp;lt;20), then there may be a thief inside the house, so an alarm frequency would be sent to the speaker pin. Else, if the value of brightness is pretty bright on the light sensor, just because it's christmas, the micro controller would generate a song called &amp;quot;Jingle Bell&amp;quot; just because it's christmas.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The biggest challenge we faced we deciding what to purchase for the project. In the first two week of the project, we purchased the speakers and thinking the onboard acceleration sensor would work like the way we want it to (sense motions), but it actually only works if the board is tilted. After the speaker came, we tested the speaker with our micro-controller, and yes there's sound coming out but the sound is very dim that we're barely able to hear. So we purchased some 2N3904 transistor and created a signal amplifying circuit and connected that to the speaker. Next, the first motion sensor that we bought online isn't turning off, we couldn't find out why so we bought 5 more motion sensor online just in case. If someone wants to start this project from scratch again, I would highly recommend doing enough research before making a purchase, because there's always not enough materials to work on the project if research are not well done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1: Speaker ===&lt;br /&gt;
When we purchased the speaker, the sound wasn't loud enough so we need some device to amplify the signal. So, we spend some time to go to an electronic store to purchase some transistors 2N3904 to create an amplifying circuit and connect that to the speaker. Finally, the sound it generated was a lot louder than before. It would be a lot better to purchase the speaker and 2N3904 together, because a lot of time is being wasted in between because we thought the micro controller could create enough voltage to sound a speaker.&lt;br /&gt;
&lt;br /&gt;
=== My Issue #2: Motion Sensor ===&lt;br /&gt;
The second part of our issue is the motion sensor, the first sensor that we bought is not turning off for some reason, in other words, it always senses motion even though nothing is moving in front of the sensor. Then, we were trying to think of a way to work around the box with other ideas, but none of them work. So we have to go online and buy 5 motion sensor because we don't want any defected parts to slow down our progress. The sensors that we bought finally worked, but sometimes it would give a false signal when there's no motion so I'm assuming it needs some time for the motion sensor to stabilize itself.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, the project was successful completed. Through working on this project, we were able to understand the FreeRTos and Embedded Code deeper. During testing the project, we got many queue timing problem and priority issues. After we fixed those bugs by testing the program multiple times, we furthered our knowledge in the embedded system field. We also learned how to use the PIR motion, it took us a long time to make it work precisely. By doing this project, the lesson we have learned is to do enough research before you actually order the parts.We waste lots of money due to this reason.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34258</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34258"/>
				<updated>2016-12-21T05:35:54Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Design Hardware Schematic.&lt;br /&gt;
**  Programming.&lt;br /&gt;
**  Testing the hardware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the software schematic.&lt;br /&gt;
**  Programming.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
The following table is our schedule for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Motion Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design2.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs. We also set the GPIO pin as an input pin to receive the signal come out from the motion sensor. The sensor will output logic &amp;quot;1&amp;quot; when it detects movement or output logic low if it doesn't.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;External Power Supply &amp;lt;/b&amp;gt;&lt;br /&gt;
*We power up the PIR Motion Sensor by using a 12V power supply which connected with a LM7805 Regulator to step down the voltage to 5V.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor2.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
In our project, we used Real Time Operating System (RTOS) for this project. The software design consist of two tasks with different priority level. The low priority task would check for inputs of the motion sensors and if motion is detected from the sensor, the lower priority task would send data to the queue. The medium priority task would then receive the signals from the queue and generate sound for the speaker based on the value of the light sensor. If the brightness is pretty high, then it the micro-controller would output a song named &amp;quot;Jingle Bell&amp;quot;, else micro-controller would output an alarm to the speaker because there maybe thieves inside the house.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
The first low priority task would check for the inputs of two motion sensors (This increases the accuracy of the detection). If both sensor sensed a motion in the first task, then it would send some data into the queue to indicate that motion is been detected. The medium priority task would wake up from sleep state because the queue is not empty anymore, this task would check the value on the light sensor to see how bright the room is. If the room is too dark (brightness &amp;lt;20), then there may be a thief inside the house, so an alarm frequency would be sent to the speaker pin. Else, if the value of brightness is pretty bright on the light sensor, just because it's christmas, the micro controller would generate a song called &amp;quot;Jingle Bell&amp;quot; just because it's christmas.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The biggest challenge we faced we deciding what to purchase for the project. In the first two week of the project, we purchased the speakers and thinking the onboard acceleration sensor would work like the way we want it to (sense motions), but it actually only works if the board is tilted. After the speaker came, we tested the speaker with our micro-controller, and yes there's sound coming out but the sound is very dim that we're barely able to hear. So we purchased some 2N3904 transistor and created a signal amplifying circuit and connected that to the speaker. Next, the first motion sensor that we bought online isn't turning off, we couldn't find out why so we bought 5 more motion sensor online just in case. If someone wants to start this project from scratch again, I would highly recommend doing enough research before making a purchase, because there's always not enough materials to work on the project if research are not well done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1: Speaker ===&lt;br /&gt;
When we purchased the speaker, the sound wasn't loud enough so we need some device to amplify the signal. So, we spend some time to go to an electronic store to purchase some transistors 2N3904 to create an amplifying circuit and connect that to the speaker. Finally, the sound it generated was a lot louder than before. It would be a lot better to purchase the speaker and 2N3904 together, because a lot of time is being wasted in between because we thought the micro controller could create enough voltage to sound a speaker.&lt;br /&gt;
&lt;br /&gt;
=== My Issue #2: Motion Sensor ===&lt;br /&gt;
The second part of our issue is the motion sensor, the first sensor that we bought is not turning off for some reason, in other words, it always senses motion even though nothing is moving in front of the sensor. Then, we were trying to think of a way to work around the box with other ideas, but none of them work. So we have to go online and buy 5 motion sensor because we don't want any defected parts to slow down our progress. The sensors that we bought finally worked, but sometimes it would give a false signal when there's no motion so I'm assuming it needs some time for the motion sensor to stabilize itself.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, the project was successful completed. Through working on this project, we were able to understand the FreeRTos and Embedded Code deeper. During testing the project, we got many queue timing problem and priority issues. After we fixed those bugs by testing the program multiple times, we furthered our knowledge in the embedded system field.    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34256</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34256"/>
				<updated>2016-12-21T05:28:08Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Project Video */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Design Hardware Schematic.&lt;br /&gt;
**  Programming.&lt;br /&gt;
**  Testing the hardware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the software schematic.&lt;br /&gt;
**  Programming.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
The following table is our schedule for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Motion Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design2.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs. We also set the GPIO pin as an input pin to receive the signal come out from the motion sensor. The sensor will output logic &amp;quot;1&amp;quot; when it detects movement or output logic low if it doesn't.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;External Power Supply &amp;lt;/b&amp;gt;&lt;br /&gt;
*We power up the PIR Motion Sensor by using a 12V power supply which connected with a LM7805 Regulator to step down the voltage to 5V.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor2.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
In our project, we used Real Time Operating System (RTOS) for this project. The software design consist of two tasks with different priority level. The low priority task would check for inputs of the motion sensors and if motion is detected from the sensor, the lower priority task would send data to the queue. The medium priority task would then receive the signals from the queue and generate sound for the speaker based on the value of the light sensor. If the brightness is pretty high, then it the micro-controller would output a song named &amp;quot;Jingle Bell&amp;quot;, else micro-controller would output an alarm to the speaker because there maybe thieves inside the house.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
The first low priority task would check for the inputs of two motion sensors (This increases the accuracy of the detection). If both sensor sensed a motion in the first task, then it would send some data into the queue to indicate that motion is been detected. The medium priority task would wake up from sleep state because the queue is not empty anymore, this task would check the value on the light sensor to see how bright the room is. If the room is too dark (brightness &amp;lt;20), then there may be a thief inside the house, so an alarm frequency would be sent to the speaker pin. Else, if the value of brightness is pretty bright on the light sensor, just because it's christmas, the micro controller would generate a song called &amp;quot;Jingle Bell&amp;quot; just because it's christmas.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The biggest challenge we faced we deciding what to purchase for the project. In the first two week of the project, we purchased the speakers and thinking the onboard acceleration sensor would work like the way we want it to (sense motions), but it actually only works if the board is tilted. After the speaker came, we tested the speaker with our micro-controller, and yes there's sound coming out but the sound is very dim that we're barely able to hear. So we purchased some 2N3904 transistor and created a signal amplifying circuit and connected that to the speaker. Next, the first motion sensor that we bought online isn't turning off, we couldn't find out why so we bought 5 more motion sensor online just in case. If someone wants to start this project from scratch again, I would highly recommend doing enough research before making a purchase, because there's always not enough materials to work on the project if research are not well done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1: Speaker ===&lt;br /&gt;
When we purchased the speaker, the sound wasn't loud enough so we need some device to amplify the signal. So, we spend some time to go to an electronic store to purchase some transistors 2N3904 to create an amplifying circuit and connect that to the speaker. Finally, the sound it generated was a lot louder than before. It would be a lot better to purchase the speaker and 2N3904 together, because a lot of time is being wasted in between because we thought the micro controller could create enough voltage to sound a speaker.&lt;br /&gt;
&lt;br /&gt;
=== My Issue #2: Motion Sensor ===&lt;br /&gt;
The second part of our issue is the motion sensor, the first sensor that we bought is not turning off for some reason, in other words, it always senses motion even though nothing is moving in front of the sensor. Then, we were trying to think of a way to work around the box with other ideas, but none of them work. So we have to go online and buy 5 motion sensor because we don't want any defected parts to slow down our progress. The sensors that we bought finally worked, but sometimes it would give a false signal when there's no motion so I'm assuming it needs some time for the motion sensor to stabilize itself.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, the project was successful completed. Through working on this project, we were able to understand the FreeRTos and Embedded Code deeper.   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34253</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34253"/>
				<updated>2016-12-21T05:12:01Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Team Members &amp;amp; Responsibilities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Design Hardware Schematic.&lt;br /&gt;
**  Programming.&lt;br /&gt;
**  Testing the hardware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the software schematic.&lt;br /&gt;
**  Programming.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
The following table is our schedule for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Motion Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design2.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs. We also set the GPIO pin as an input pin to receive the signal come out from the motion sensor. The sensor will output logic &amp;quot;1&amp;quot; when it detects movement or output logic low if it doesn't.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;External Power Supply &amp;lt;/b&amp;gt;&lt;br /&gt;
*We power up the PIR Motion Sensor by using a 12V power supply which connected with a LM7805 Regulator to step down the voltage to 5V.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor2.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
In our project, we used Real Time Operating System (RTOS) for this project. The software design consist of two tasks with different priority level. The low priority task would check for inputs of the motion sensors and if motion is detected from the sensor, the lower priority task would send data to the queue. The medium priority task would then receive the signals from the queue and generate sound for the speaker based on the value of the light sensor. If the brightness is pretty high, then it the micro-controller would output a song named &amp;quot;Jingle Bell&amp;quot;, else micro-controller would output an alarm to the speaker because there maybe thieves inside the house.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
The first low priority task would check for the inputs of two motion sensors (This increases the accuracy of the detection). If both sensor sensed a motion in the first task, then it would send some data into the queue to indicate that motion is been detected. The medium priority task would wake up from sleep state because the queue is not empty anymore, this task would check the value on the light sensor to see how bright the room is. If the room is too dark (brightness &amp;lt;20), then there may be a thief inside the house, so an alarm frequency would be sent to the speaker pin. Else, if the value of brightness is pretty bright on the light sensor, just because it's christmas, the micro controller would generate a song called &amp;quot;Jingle Bell&amp;quot; just because it's christmas.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The biggest challenge we faced we deciding what to purchase for the project. In the first two week of the project, we purchased the speakers and thinking the onboard acceleration sensor would work like the way we want it to (sense motions), but it actually only works if the board is tilted. After the speaker came, we tested the speaker with our micro-controller, and yes there's sound coming out but the sound is very dim that we're barely able to hear. So we purchased some 2N3904 transistor and created a signal amplifying circuit and connected that to the speaker. Next, the first motion sensor that we bought online isn't turning off, we couldn't find out why so we bought 5 more motion sensor online just in case. If someone wants to start this project from scratch again, I would highly recommend doing enough research before making a purchase, because there's always not enough materials to work on the project if research are not well done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1: Speaker ===&lt;br /&gt;
When we purchased the speaker, the sound wasn't loud enough so we need some device to amplify the signal. So, we spend some time to go to an electronic store to purchase some transistors 2N3904 to create an amplifying circuit and connect that to the speaker. Finally, the sound it generated was a lot louder than before. It would be a lot better to purchase the speaker and 2N3904 together, because a lot of time is being wasted in between because we thought the micro controller could create enough voltage to sound a speaker.&lt;br /&gt;
&lt;br /&gt;
=== My Issue #2: Motion Sensor ===&lt;br /&gt;
The second part of our issue is the motion sensor, the first sensor that we bought is not turning off for some reason, in other words, it always senses motion even though nothing is moving in front of the sensor. Then, we were trying to think of a way to work around the box with other ideas, but none of them work. So we have to go online and buy 5 motion sensor because we don't want any defected parts to slow down our progress. The sensors that we bought finally worked, but sometimes it would give a false signal when there's no motion so I'm assuming it needs some time for the motion sensor to stabilize itself.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, the project was successful completed. Through working on this project, we were able to understand the FreeRTos and Embedded Code deeper.   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34251</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34251"/>
				<updated>2016-12-21T05:08:51Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Design &amp;amp; Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
The following table is our schedule for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Motion Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design2.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs. We also set the GPIO pin as an input pin to receive the signal come out from the motion sensor. The sensor will output logic &amp;quot;1&amp;quot; when it detects movement or output logic low if it doesn't.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;External Power Supply &amp;lt;/b&amp;gt;&lt;br /&gt;
*We power up the PIR Motion Sensor by using a 12V power supply which connected with a LM7805 Regulator to step down the voltage to 5V.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor2.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
In our project, we used Real Time Operating System (RTOS) for this project. The software design consist of two tasks with different priority level. The low priority task would check for inputs of the motion sensors and if motion is detected from the sensor, the lower priority task would send data to the queue. The medium priority task would then receive the signals from the queue and generate sound for the speaker based on the value of the light sensor. If the brightness is pretty high, then it the micro-controller would output a song named &amp;quot;Jingle Bell&amp;quot;, else micro-controller would output an alarm to the speaker because there maybe thieves inside the house.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
The first low priority task would check for the inputs of two motion sensors (This increases the accuracy of the detection). If both sensor sensed a motion in the first task, then it would send some data into the queue to indicate that motion is been detected. The medium priority task would wake up from sleep state because the queue is not empty anymore, this task would check the value on the light sensor to see how bright the room is. If the room is too dark (brightness &amp;lt;20), then there may be a thief inside the house, so an alarm frequency would be sent to the speaker pin. Else, if the value of brightness is pretty bright on the light sensor, just because it's christmas, the micro controller would generate a song called &amp;quot;Jingle Bell&amp;quot; just because it's christmas.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The biggest challenge we faced we deciding what to purchase for the project. In the first two week of the project, we purchased the speakers and thinking the onboard acceleration sensor would work like the way we want it to (sense motions), but it actually only works if the board is tilted. After the speaker came, we tested the speaker with our micro-controller, and yes there's sound coming out but the sound is very dim that we're barely able to hear. So we purchased some 2N3904 transistor and created a signal amplifying circuit and connected that to the speaker. Next, the first motion sensor that we bought online isn't turning off, we couldn't find out why so we bought 5 more motion sensor online just in case. If someone wants to start this project from scratch again, I would highly recommend doing enough research before making a purchase, because there's always not enough materials to work on the project if research are not well done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1: Speaker ===&lt;br /&gt;
When we purchased the speaker, the sound wasn't loud enough so we need some device to amplify the signal. So, we spend some time to go to an electronic store to purchase some transistors 2N3904 to create an amplifying circuit and connect that to the speaker. Finally, the sound it generated was a lot louder than before. It would be a lot better to purchase the speaker and 2N3904 together, because a lot of time is being wasted in between because we thought the micro controller could create enough voltage to sound a speaker.&lt;br /&gt;
&lt;br /&gt;
=== My Issue #2: Motion Sensor ===&lt;br /&gt;
The second part of our issue is the motion sensor, the first sensor that we bought is not turning off for some reason, in other words, it always senses motion even though nothing is moving in front of the sensor. Then, we were trying to think of a way to work around the box with other ideas, but none of them work. So we have to go online and buy 5 motion sensor because we don't want any defected parts to slow down our progress. The sensors that we bought finally worked, but sometimes it would give a false signal when there's no motion so I'm assuming it needs some time for the motion sensor to stabilize itself.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, the project was successful completed. Through working on this project, we were able to understand the FreeRTos and Embedded Code deeper.   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34249</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34249"/>
				<updated>2016-12-21T05:02:46Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Hardware Interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
The following table is our schedule for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Motion Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design2.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs. We also set the GPIO pin as an input pin to receive the signal come out from the motion sensor. The sensor will output logic &amp;quot;1&amp;quot; when it detects movement or output logic low if it doesn't.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;External Power Supply &amp;lt;/b&amp;gt;&lt;br /&gt;
*We power up the PIR Motion Sensor by using a 12V power supply which connected with a LM7805 Regulator to step down the voltage to 5V.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor1.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
In our project, we used Real Time Operating System (RTOS) for this project. The software design consist of two tasks with different priority level. The low priority task would check for inputs of the motion sensors and if motion is detected from the sensor, the lower priority task would send data to the queue. The medium priority task would then receive the signals from the queue and generate sound for the speaker based on the value of the light sensor. If the brightness is pretty high, then it the micro-controller would output a song named &amp;quot;Jingle Bell&amp;quot;, else micro-controller would output an alarm to the speaker because there maybe thieves inside the house.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
The first low priority task would check for the inputs of two motion sensors (This increases the accuracy of the detection). If both sensor sensed a motion in the first task, then it would send some data into the queue to indicate that motion is been detected. The medium priority task would wake up from sleep state because the queue is not empty anymore, this task would check the value on the light sensor to see how bright the room is. If the room is too dark (brightness &amp;lt;20), then there may be a thief inside the house, so an alarm frequency would be sent to the speaker pin. Else, if the value of brightness is pretty bright on the light sensor, just because it's christmas, the micro controller would generate a song called &amp;quot;Jingle Bell&amp;quot; just because it's christmas.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The biggest challenge we faced we deciding what to purchase for the project. In the first two week of the project, we purchased the speakers and thinking the onboard acceleration sensor would work like the way we want it to (sense motions), but it actually only works if the board is tilted. After the speaker came, we tested the speaker with our micro-controller, and yes there's sound coming out but the sound is very dim that we're barely able to hear. So we purchased some 2N3904 transistor and created a signal amplifying circuit and connected that to the speaker. Next, the first motion sensor that we bought online isn't turning off, we couldn't find out why so we bought 5 more motion sensor online just in case. If someone wants to start this project from scratch again, I would highly recommend doing enough research before making a purchase, because there's always not enough materials to work on the project if research are not well done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1: Speaker ===&lt;br /&gt;
When we purchased the speaker, the sound wasn't loud enough so we need some device to amplify the signal. So, we spend some time to go to an electronic store to purchase some transistors 2N3904 to create an amplifying circuit and connect that to the speaker. Finally, the sound it generated was a lot louder than before. It would be a lot better to purchase the speaker and 2N3904 together, because a lot of time is being wasted in between because we thought the micro controller could create enough voltage to sound a speaker.&lt;br /&gt;
&lt;br /&gt;
=== My Issue #2: Motion Sensor ===&lt;br /&gt;
The second part of our issue is the motion sensor, the first sensor that we bought is not turning off for some reason, in other words, it always senses motion even though nothing is moving in front of the sensor. Then, we were trying to think of a way to work around the box with other ideas, but none of them work. So we have to go online and buy 5 motion sensor because we don't want any defected parts to slow down our progress. The sensors that we bought finally worked, but sometimes it would give a false signal when there's no motion so I'm assuming it needs some time for the motion sensor to stabilize itself.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, the project was successful completed. Through working on this project, we were able to understand the FreeRTos and Embedded Code deeper.   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34247</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34247"/>
				<updated>2016-12-21T05:01:45Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Hardware Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
The following table is our schedule for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Motion Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design2.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs. We also set the GPIO pin as an input pin to receive the signal come out from the motion sensor. The sensor will output logic &amp;quot;1&amp;quot; when it detects movement or output logic low if it doesn't.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;External Power Supply &amp;lt;/b&amp;gt;&lt;br /&gt;
*We power up the PIR Motion Sensor by using a 12V power supply which connected with a LM7805 Regulator to step down the voltage to 5V.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor1.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
In our project, we used Real Time Operating System (RTOS) for this project. The software design consist of two tasks with different priority level. The low priority task would check for inputs of the motion sensors and if motion is detected from the sensor, the lower priority task would send data to the queue. The medium priority task would then receive the signals from the queue and generate sound for the speaker based on the value of the light sensor. If the brightness is pretty high, then it the micro-controller would output a song named &amp;quot;Jingle Bell&amp;quot;, else micro-controller would output an alarm to the speaker because there maybe thieves inside the house.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
The first low priority task would check for the inputs of two motion sensors (This increases the accuracy of the detection). If both sensor sensed a motion in the first task, then it would send some data into the queue to indicate that motion is been detected. The medium priority task would wake up from sleep state because the queue is not empty anymore, this task would check the value on the light sensor to see how bright the room is. If the room is too dark (brightness &amp;lt;20), then there may be a thief inside the house, so an alarm frequency would be sent to the speaker pin. Else, if the value of brightness is pretty bright on the light sensor, just because it's christmas, the micro controller would generate a song called &amp;quot;Jingle Bell&amp;quot; just because it's christmas.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The biggest challenge we faced we deciding what to purchase for the project. In the first two week of the project, we purchased the speakers and thinking the onboard acceleration sensor would work like the way we want it to (sense motions), but it actually only works if the board is tilted. After the speaker came, we tested the speaker with our micro-controller, and yes there's sound coming out but the sound is very dim that we're barely able to hear. So we purchased some 2N3904 transistor and created a signal amplifying circuit and connected that to the speaker. Next, the first motion sensor that we bought online isn't turning off, we couldn't find out why so we bought 5 more motion sensor online just in case. If someone wants to start this project from scratch again, I would highly recommend doing enough research before making a purchase, because there's always not enough materials to work on the project if research are not well done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1: Speaker ===&lt;br /&gt;
When we purchased the speaker, the sound wasn't loud enough so we need some device to amplify the signal. So, we spend some time to go to an electronic store to purchase some transistors 2N3904 to create an amplifying circuit and connect that to the speaker. Finally, the sound it generated was a lot louder than before. It would be a lot better to purchase the speaker and 2N3904 together, because a lot of time is being wasted in between because we thought the micro controller could create enough voltage to sound a speaker.&lt;br /&gt;
&lt;br /&gt;
=== My Issue #2: Motion Sensor ===&lt;br /&gt;
The second part of our issue is the motion sensor, the first sensor that we bought is not turning off for some reason, in other words, it always senses motion even though nothing is moving in front of the sensor. Then, we were trying to think of a way to work around the box with other ideas, but none of them work. So we have to go online and buy 5 motion sensor because we don't want any defected parts to slow down our progress. The sensors that we bought finally worked, but sometimes it would give a false signal when there's no motion so I'm assuming it needs some time for the motion sensor to stabilize itself.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, the project was successful completed. Through working on this project, we were able to understand the FreeRTos and Embedded Code deeper.   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34246</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34246"/>
				<updated>2016-12-21T05:00:12Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Hardware Interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
The following table is our schedule for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Motion Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design1.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs. We also set the GPIO pin as an input pin to receive the signal come out from the motion sensor. The sensor will output logic &amp;quot;1&amp;quot; when it detects movement or output logic low if it doesn't.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;External Power Supply &amp;lt;/b&amp;gt;&lt;br /&gt;
*We power up the PIR Motion Sensor by using a 12V power supply which connected with a LM7805 Regulator to step down the voltage to 5V.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor1.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
In our project, we used Real Time Operating System (RTOS) for this project. The software design consist of two tasks with different priority level. The low priority task would check for inputs of the motion sensors and if motion is detected from the sensor, the lower priority task would send data to the queue. The medium priority task would then receive the signals from the queue and generate sound for the speaker based on the value of the light sensor. If the brightness is pretty high, then it the micro-controller would output a song named &amp;quot;Jingle Bell&amp;quot;, else micro-controller would output an alarm to the speaker because there maybe thieves inside the house.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
The first low priority task would check for the inputs of two motion sensors (This increases the accuracy of the detection). If both sensor sensed a motion in the first task, then it would send some data into the queue to indicate that motion is been detected. The medium priority task would wake up from sleep state because the queue is not empty anymore, this task would check the value on the light sensor to see how bright the room is. If the room is too dark (brightness &amp;lt;20), then there may be a thief inside the house, so an alarm frequency would be sent to the speaker pin. Else, if the value of brightness is pretty bright on the light sensor, just because it's christmas, the micro controller would generate a song called &amp;quot;Jingle Bell&amp;quot; just because it's christmas.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The biggest challenge we faced we deciding what to purchase for the project. In the first two week of the project, we purchased the speakers and thinking the onboard acceleration sensor would work like the way we want it to (sense motions), but it actually only works if the board is tilted. After the speaker came, we tested the speaker with our micro-controller, and yes there's sound coming out but the sound is very dim that we're barely able to hear. So we purchased some 2N3904 transistor and created a signal amplifying circuit and connected that to the speaker. Next, the first motion sensor that we bought online isn't turning off, we couldn't find out why so we bought 5 more motion sensor online just in case. If someone wants to start this project from scratch again, I would highly recommend doing enough research before making a purchase, because there's always not enough materials to work on the project if research are not well done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1: Speaker ===&lt;br /&gt;
When we purchased the speaker, the sound wasn't loud enough so we need some device to amplify the signal. So, we spend some time to go to an electronic store to purchase some transistors 2N3904 to create an amplifying circuit and connect that to the speaker. Finally, the sound it generated was a lot louder than before. It would be a lot better to purchase the speaker and 2N3904 together, because a lot of time is being wasted in between because we thought the micro controller could create enough voltage to sound a speaker.&lt;br /&gt;
&lt;br /&gt;
=== My Issue #2: Motion Sensor ===&lt;br /&gt;
The second part of our issue is the motion sensor, the first sensor that we bought is not turning off for some reason, in other words, it always senses motion even though nothing is moving in front of the sensor. Then, we were trying to think of a way to work around the box with other ideas, but none of them work. So we have to go online and buy 5 motion sensor because we don't want any defected parts to slow down our progress. The sensors that we bought finally worked, but sometimes it would give a false signal when there's no motion so I'm assuming it needs some time for the motion sensor to stabilize itself.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, the project was successful completed. Through working on this project, we were able to understand the FreeRTos and Embedded Code deeper.   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34245</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34245"/>
				<updated>2016-12-21T04:56:03Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Hardware Interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
The following table is our schedule for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Motion Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design1.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs. We also set the GPIO pin as an input pin to receive the signal come out from the motion sensor. The sensor will output logic &amp;quot;1&amp;quot; when it detects movement or output logic low if it doesn't.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor1.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
In our project, we used Real Time Operating System (RTOS) for this project. The software design consist of two tasks with different priority level. The low priority task would check for inputs of the motion sensors and if motion is detected from the sensor, the lower priority task would send data to the queue. The medium priority task would then receive the signals from the queue and generate sound for the speaker based on the value of the light sensor. If the brightness is pretty high, then it the micro-controller would output a song named &amp;quot;Jingle Bell&amp;quot;, else micro-controller would output an alarm to the speaker because there maybe thieves inside the house.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
The first low priority task would check for the inputs of two motion sensors (This increases the accuracy of the detection). If both sensor sensed a motion in the first task, then it would send some data into the queue to indicate that motion is been detected. The medium priority task would wake up from sleep state because the queue is not empty anymore, this task would check the value on the light sensor to see how bright the room is. If the room is too dark (brightness &amp;lt;20), then there may be a thief inside the house, so an alarm frequency would be sent to the speaker pin. Else, if the value of brightness is pretty bright on the light sensor, just because it's christmas, the micro controller would generate a song called &amp;quot;Jingle Bell&amp;quot; just because it's christmas.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The biggest challenge we faced we deciding what to purchase for the project. In the first two week of the project, we purchased the speakers and thinking the onboard acceleration sensor would work like the way we want it to (sense motions), but it actually only works if the board is tilted. After the speaker came, we tested the speaker with our micro-controller, and yes there's sound coming out but the sound is very dim that we're barely able to hear. So we purchased some 2N3904 transistor and created a signal amplifying circuit and connected that to the speaker. Next, the first motion sensor that we bought online isn't turning off, we couldn't find out why so we bought 5 more motion sensor online just in case. If someone wants to start this project from scratch again, I would highly recommend doing enough research before making a purchase, because there's always not enough materials to work on the project if research are not well done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1: Speaker ===&lt;br /&gt;
When we purchased the speaker, the sound wasn't loud enough so we need some device to amplify the signal. So, we spend some time to go to an electronic store to purchase some transistors 2N3904 to create an amplifying circuit and connect that to the speaker. Finally, the sound it generated was a lot louder than before. It would be a lot better to purchase the speaker and 2N3904 together, because a lot of time is being wasted in between because we thought the micro controller could create enough voltage to sound a speaker.&lt;br /&gt;
&lt;br /&gt;
=== My Issue #2: Motion Sensor ===&lt;br /&gt;
The second part of our issue is the motion sensor, the first sensor that we bought is not turning off for some reason, in other words, it always senses motion even though nothing is moving in front of the sensor. Then, we were trying to think of a way to work around the box with other ideas, but none of them work. So we have to go online and buy 5 motion sensor because we don't want any defected parts to slow down our progress. The sensors that we bought finally worked, but sometimes it would give a false signal when there's no motion so I'm assuming it needs some time for the motion sensor to stabilize itself.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, the project was successful completed. Through working on this project, we were able to understand the FreeRTos and Embedded Code deeper.   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34243</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34243"/>
				<updated>2016-12-21T04:53:30Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Hardware Interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
The following table is our schedule for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Motion Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design1.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Analog to Digital Converter(ADC)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor1.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
In our project, we used Real Time Operating System (RTOS) for this project. The software design consist of two tasks with different priority level. The low priority task would check for inputs of the motion sensors and if motion is detected from the sensor, the lower priority task would send data to the queue. The medium priority task would then receive the signals from the queue and generate sound for the speaker based on the value of the light sensor. If the brightness is pretty high, then it the micro-controller would output a song named &amp;quot;Jingle Bell&amp;quot;, else micro-controller would output an alarm to the speaker because there maybe thieves inside the house.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
The first low priority task would check for the inputs of two motion sensors (This increases the accuracy of the detection). If both sensor sensed a motion in the first task, then it would send some data into the queue to indicate that motion is been detected. The medium priority task would wake up from sleep state because the queue is not empty anymore, this task would check the value on the light sensor to see how bright the room is. If the room is too dark (brightness &amp;lt;20), then there may be a thief inside the house, so an alarm frequency would be sent to the speaker pin. Else, if the value of brightness is pretty bright on the light sensor, just because it's christmas, the micro controller would generate a song called &amp;quot;Jingle Bell&amp;quot; just because it's christmas.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The biggest challenge we faced we deciding what to purchase for the project. In the first two week of the project, we purchased the speakers and thinking the onboard acceleration sensor would work like the way we want it to (sense motions), but it actually only works if the board is tilted. After the speaker came, we tested the speaker with our micro-controller, and yes there's sound coming out but the sound is very dim that we're barely able to hear. So we purchased some 2N3904 transistor and created a signal amplifying circuit and connected that to the speaker. Next, the first motion sensor that we bought online isn't turning off, we couldn't find out why so we bought 5 more motion sensor online just in case. If someone wants to start this project from scratch again, I would highly recommend doing enough research before making a purchase, because there's always not enough materials to work on the project if research are not well done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1: Speaker ===&lt;br /&gt;
When we purchased the speaker, the sound wasn't loud enough so we need some device to amplify the signal. So, we spend some time to go to an electronic store to purchase some transistors 2N3904 to create an amplifying circuit and connect that to the speaker. Finally, the sound it generated was a lot louder than before. It would be a lot better to purchase the speaker and 2N3904 together, because a lot of time is being wasted in between because we thought the micro controller could create enough voltage to sound a speaker.&lt;br /&gt;
&lt;br /&gt;
=== My Issue #2: Motion Sensor ===&lt;br /&gt;
The second part of our issue is the motion sensor, the first sensor that we bought is not turning off for some reason, in other words, it always senses motion even though nothing is moving in front of the sensor. Then, we were trying to think of a way to work around the box with other ideas, but none of them work. So we have to go online and buy 5 motion sensor because we don't want any defected parts to slow down our progress. The sensors that we bought finally worked, but sometimes it would give a false signal when there's no motion so I'm assuming it needs some time for the motion sensor to stabilize itself.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, the project was successful completed. Through working on this project, we were able to understand the FreeRTos and Embedded Code deeper.   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34241</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34241"/>
				<updated>2016-12-21T04:52:44Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Design &amp;amp; Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
The following table is our schedule for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Motion Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design1.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Analog to Digital Converter(ADC)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor1.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
In our project, we used Real Time Operating System (RTOS) for this project. The software design consist of two tasks with different priority level. The low priority task would check for inputs of the motion sensors and if motion is detected from the sensor, the lower priority task would send data to the queue. The medium priority task would then receive the signals from the queue and generate sound for the speaker based on the value of the light sensor. If the brightness is pretty high, then it the micro-controller would output a song named &amp;quot;Jingle Bell&amp;quot;, else micro-controller would output an alarm to the speaker because there maybe thieves inside the house.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
The first low priority task would check for the inputs of two motion sensors (This increases the accuracy of the detection). If both sensor sensed a motion in the first task, then it would send some data into the queue to indicate that motion is been detected. The medium priority task would wake up from sleep state because the queue is not empty anymore, this task would check the value on the light sensor to see how bright the room is. If the room is too dark (brightness &amp;lt;20), then there may be a thief inside the house, so an alarm frequency would be sent to the speaker pin. Else, if the value of brightness is pretty bright on the light sensor, just because it's christmas, the micro controller would generate a song called &amp;quot;Jingle Bell&amp;quot; just because it's christmas.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The biggest challenge we faced we deciding what to purchase for the project. In the first two week of the project, we purchased the speakers and thinking the onboard acceleration sensor would work like the way we want it to (sense motions), but it actually only works if the board is tilted. After the speaker came, we tested the speaker with our micro-controller, and yes there's sound coming out but the sound is very dim that we're barely able to hear. So we purchased some 2N3904 transistor and created a signal amplifying circuit and connected that to the speaker. Next, the first motion sensor that we bought online isn't turning off, we couldn't find out why so we bought 5 more motion sensor online just in case. If someone wants to start this project from scratch again, I would highly recommend doing enough research before making a purchase, because there's always not enough materials to work on the project if research are not well done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1: Speaker ===&lt;br /&gt;
When we purchased the speaker, the sound wasn't loud enough so we need some device to amplify the signal. So, we spend some time to go to an electronic store to purchase some transistors 2N3904 to create an amplifying circuit and connect that to the speaker. Finally, the sound it generated was a lot louder than before. It would be a lot better to purchase the speaker and 2N3904 together, because a lot of time is being wasted in between because we thought the micro controller could create enough voltage to sound a speaker.&lt;br /&gt;
&lt;br /&gt;
=== My Issue #2: Motion Sensor ===&lt;br /&gt;
The second part of our issue is the motion sensor, the first sensor that we bought is not turning off for some reason, in other words, it always senses motion even though nothing is moving in front of the sensor. Then, we were trying to think of a way to work around the box with other ideas, but none of them work. So we have to go online and buy 5 motion sensor because we don't want any defected parts to slow down our progress. The sensors that we bought finally worked, but sometimes it would give a false signal when there's no motion so I'm assuming it needs some time for the motion sensor to stabilize itself.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, the project was successful completed. Through working on this project, we were able to understand the FreeRTos and Embedded Code deeper.   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34231</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34231"/>
				<updated>2016-12-21T04:44:23Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Parts List &amp;amp; Cost */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
The following table is our schedule for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Motion Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Analog to Digital Converter(ADC)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor1.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
In our project, we used Real Time Operating System (RTOS) for this project. The software design consist of two tasks with different priority level. The low priority task would check for inputs of the motion sensors and if motion is detected from the sensor, the lower priority task would send data to the queue. The medium priority task would then receive the signals from the queue and generate sound for the speaker based on the value of the light sensor. If the brightness is pretty high, then it the micro-controller would output a song named &amp;quot;Jingle Bell&amp;quot;, else micro-controller would output an alarm to the speaker because there maybe thieves inside the house.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
The first low priority task would check for the inputs of two motion sensors (This increases the accuracy of the detection). If both sensor sensed a motion in the first task, then it would send some data into the queue to indicate that motion is been detected. The medium priority task would wake up from sleep state because the queue is not empty anymore, this task would check the value on the light sensor to see how bright the room is. If the room is too dark (brightness &amp;lt;20), then there may be a thief inside the house, so an alarm frequency would be sent to the speaker pin. Else, if the value of brightness is pretty bright on the light sensor, just because it's christmas, the micro controller would generate a song called &amp;quot;Jingle Bell&amp;quot; just because it's christmas.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The biggest challenge we faced we deciding what to purchase for the project. In the first two week of the project, we purchased the speakers and thinking the onboard acceleration sensor would work like the way we want it to (sense motions), but it actually only works if the board is tilted. After the speaker came, we tested the speaker with our micro-controller, and yes there's sound coming out but the sound is very dim that we're barely able to hear. So we purchased some 2N3904 transistor and created a signal amplifying circuit and connected that to the speaker. Next, the first motion sensor that we bought online isn't turning off, we couldn't find out why so we bought 5 more motion sensor online just in case. If someone wants to start this project from scratch again, I would highly recommend doing enough research before making a purchase, because there's always not enough materials to work on the project if research are not well done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1: Speaker ===&lt;br /&gt;
When we purchased the speaker, the sound wasn't loud enough so we need some device to amplify the signal. So, we spend some time to go to an electronic store to purchase some transistors 2N3904 to create an amplifying circuit and connect that to the speaker. Finally, the sound it generated was a lot louder than before. It would be a lot better to purchase the speaker and 2N3904 together, because a lot of time is being wasted in between because we thought the micro controller could create enough voltage to sound a speaker.&lt;br /&gt;
&lt;br /&gt;
=== My Issue #2: Motion Sensor ===&lt;br /&gt;
The second part of our issue is the motion sensor, the first sensor that we bought is not turning off for some reason, in other words, it always senses motion even though nothing is moving in front of the sensor. Then, we were trying to think of a way to work around the box with other ideas, but none of them work. So we have to go online and buy 5 motion sensor because we don't want any defected parts to slow down our progress. The sensors that we bought finally worked, but sometimes it would give a false signal when there's no motion so I'm assuming it needs some time for the motion sensor to stabilize itself.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, the project was successful completed. Through working on this project, we were able to understand the FreeRTos and Embedded Code deeper.   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=Realtime_OS_on_Embedded_Systems&amp;diff=34226</id>
		<title>Realtime OS on Embedded Systems</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=Realtime_OS_on_Embedded_Systems&amp;diff=34226"/>
				<updated>2016-12-21T04:41:18Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /*  Fall 2016 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Program History ==&lt;br /&gt;
My contribution in Embedded System courses started with CmpE146.  This course teaches students on how to write UART, SPI, and I2C Drivers and interface their drivers to peripherals.  There are about 8 weekly labs in which students not only write drivers, but also learn the core of Real-time Operating Systems including threading (tasks), and inter-task communication using Queues and Semaphores.  FreeRTOS is the operating system used with C/C++ Compiler based on GNU.&lt;br /&gt;
&lt;br /&gt;
When the course was started by Dr. Ozemek @ SJSU (sometime before 2005), not many resources were out there.  Still, with helpful guidance from Dr. Ozemek, interesting projects were created.  This is when I started to help out in Embedded System Courses, and by collecting and sharing knowledge, we've raised the bar at SJSU!  &lt;br /&gt;
&lt;br /&gt;
There have been many great projects at SJSU, but since no one knew about them, the hard work went to a waste for anyone but the creator.  But now we've got the infrastructure to share the projects, which turn out as great references for future students.  Here is my project that started around 2007, and turned into Bachelor's Senior Design Project: &amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.youtube.com/watch?v=QEadXdRl3ws&amp;amp;feature=plcp YouTube Video of Self-Navigating Car]&lt;br /&gt;
&lt;br /&gt;
As of 2013, I have broadened my contribution to other embedded system courses like CmpE240, CmpE243 and CmpE244.&lt;br /&gt;
&lt;br /&gt;
== Lab Assignments ==&lt;br /&gt;
This article contains laboratory assignments and resources.  The assignments are under construction as we move towards SJ-One development board.&lt;br /&gt;
*  [[Embedded System Tutorial GPIO | Lesson 1 : GPIO]]&lt;br /&gt;
*  [[Embedded System Tutorial UART | Lesson 2 : UART]]&lt;br /&gt;
*  [[Embedded System Tutorial SPI  | Lesson 3 : SPI]]&lt;br /&gt;
*  [[Embedded System I2C Tutorial  | Lesson 4 : I2C]]&lt;br /&gt;
*  [[Embedded System Tutorial Interrupts | Lesson 5 : Interrupts]]&lt;br /&gt;
*  [[Embedded System Tutorial FreeRTOS | Lesson 6 : FreeRTOS Tasks]]&lt;br /&gt;
*  [[Embedded System Tutorial File I/O | Lesson 7 : FreeRTOS Application Programming]]&lt;br /&gt;
&lt;br /&gt;
==Other reference articles==&lt;br /&gt;
*  [[Bitmasking Tutorial]] (+ GPIO Example)&lt;br /&gt;
*  [[ LPC17xx Memory Map &amp;amp; Interrupts]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
== Senior Design Projects ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
== Semester Projects ==&lt;br /&gt;
Every semester, students are given about 7-10 weeks to complete their projects.  During this short time-span, students form groups, order parts, and begin working on their projects.  The work performed during the semester is documented at this Wiki.&lt;br /&gt;
&lt;br /&gt;
Here is the list of Preet's documented projects:&amp;lt;BR/&amp;gt;&lt;br /&gt;
*  [[Preet's Relay Controller Project]]&lt;br /&gt;
*  [[Nordic Low Powered Mesh Network stack]]&lt;br /&gt;
*  [http://www.youtube.com/watch?v=QEadXdRl3ws&amp;amp;feature=plcp Senior Design Project (MS-CmpE) Video]&lt;br /&gt;
&lt;br /&gt;
Here is another resource for good project references :&lt;br /&gt;
[http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/ Cornell EE476 Projects]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
=== [[Fall 2016 | Fall 2016]] ===&lt;br /&gt;
&lt;br /&gt;
CMPE146:&lt;br /&gt;
* Add Your Group on Here, then follow the link to add more to your template *&lt;br /&gt;
* [http://www.socialledge.com/sjsu/index.php?title=F16:_Seismograph F16: Seismograph]&lt;br /&gt;
* [[F16: Piano Glove]]&lt;br /&gt;
* [[F16: Object Detector]]&lt;br /&gt;
* [[F16: Autonomous Nautical System]]&lt;br /&gt;
* [[F16: Autonomous Fire Extinguishing Vehicle]]&lt;br /&gt;
* [[F16: Autonomous Runaway Alarm Car]]&lt;br /&gt;
* [[F16: E-Bike]]&lt;br /&gt;
* [[F16: NotifyBox]]&lt;br /&gt;
* [[F16: Wireless Tilt Controlled Camera Arm]]&lt;br /&gt;
* [[F16: OBD2 Reader]]&lt;br /&gt;
* [[F16: Micro Watch Monitoring System]]&lt;br /&gt;
* [[F16: Door Alarm System]]&lt;br /&gt;
* [[http://www.socialledge.com/sjsu/index.php?title=F16:i2Coffee F16: UART Coffee]]&lt;br /&gt;
* [[F16: Real Time Traffic Control System (RTTCS)]]&lt;br /&gt;
&lt;br /&gt;
=== [[Spring 2016 | Spring 2016]] ===&lt;br /&gt;
*  [[S16: Fantastic Four]]&lt;br /&gt;
*  [[S16: Simpsons]]&lt;br /&gt;
*  [[S16: Mars 1]]&lt;br /&gt;
*  [[S16: OpenSJ Bluz]]&lt;br /&gt;
*  [[S16: Motion Copy Bot]]&lt;br /&gt;
*  [[S16: Biker Assist]]&lt;br /&gt;
*  [[S16: Helios]]&lt;br /&gt;
*  [[S16: Sound Buddy]]&lt;br /&gt;
*  [[S16: Warriors]]&lt;br /&gt;
*  [[S16: Expendables]]&lt;br /&gt;
*  [[S16: Ahava]]&lt;br /&gt;
*  [[S16: Number 1]]&lt;br /&gt;
*  [[S16: SkyNet]]&lt;br /&gt;
*  [[S16: SmartDoorLock]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cmpe 146:&lt;br /&gt;
*  [[S16: Camera Gimbal]]&lt;br /&gt;
*  [[S16: Laser Harp]]&lt;br /&gt;
*  &amp;lt;strike&amp;gt;[[S16: Laser Cutter Motor Controller]]&amp;lt;/strike&amp;gt;&lt;br /&gt;
*  [[S16: Sprinkler]]&lt;br /&gt;
*  [[S16: The Jatrick Car]]&lt;br /&gt;
*  [[S16: Dan]]&lt;br /&gt;
*  [[S16: Robolamp]]&lt;br /&gt;
*  [[S16: Pinball]]&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Fall 2015 | Fall 2015]] ===&lt;br /&gt;
&lt;br /&gt;
CmpE146:&lt;br /&gt;
* [[F15: Autonomous Mobile]]&lt;br /&gt;
* [[F15: Car Report]]&lt;br /&gt;
* [[F15: Electronic Piano]]&lt;br /&gt;
* [[F15: Doorknock over Bluetooth]]&lt;br /&gt;
* [[F15: Smart Car]]&lt;br /&gt;
* [[F15: Plant Control]]&lt;br /&gt;
* [[F15: Laser Security System]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE244 Spring 2015 | Spring 2015]] ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
* [[S15: Quadcopter - It flies]]&lt;br /&gt;
* [[S15: Remote Learner]]&lt;br /&gt;
* [[S15: Protocol Interface: I2C - CAN Bridge]]&lt;br /&gt;
* [[S15: Vision RC Car]]&lt;br /&gt;
* [[S15: SJeight Octocopter]]&lt;br /&gt;
* [[S15: Swarm Robots]]&lt;br /&gt;
* [[S15: Smart Sparta Parking System]]&lt;br /&gt;
* [[S15: Touch Navigator]]&lt;br /&gt;
* [[S15: Wizard's Chess System]]&lt;br /&gt;
* [[S15: Bug Rider]]&lt;br /&gt;
* [[S15: Real Time Brake Assist (RTBA)]]&lt;br /&gt;
* [[S15: Wireless Mesh Network]]&lt;br /&gt;
* [[S15: Wireless Power Transfer System]]&lt;br /&gt;
* [[S15: Drone]]&lt;br /&gt;
* [[S15: Tree Node using Google Protocol Buffers]]&lt;br /&gt;
* [[S15: Multi-media Car]]&lt;br /&gt;
* [[S15: Hand Gesture Recognition using IR Sensors]]&lt;br /&gt;
* [[S15: CAN controlled RGB LED cubes]]&lt;br /&gt;
* [[S15: Rubik's Cube Solver]]&lt;br /&gt;
* [[S15: RFID Security Box]]&lt;br /&gt;
* [[S15: Automated Meeting Room Reservation]]&lt;br /&gt;
* [[S15: Patient Buddy System (PBS)]]&lt;br /&gt;
&lt;br /&gt;
CmpE146:&lt;br /&gt;
* [[S15: Hovercopter]]&lt;br /&gt;
* [[S15: Triclops: Smart RC Car]]&lt;br /&gt;
* [[S15: Connect Four - Robotic Player]]&lt;br /&gt;
* [[S15: Self-Balancing Robot]]&lt;br /&gt;
* [[S15: MP3 Player with Graphic Equalizer Display]]&lt;br /&gt;
* [[S15: Motion-Controlled RC Car]]&lt;br /&gt;
* [[S15: MENL (Monster Encounter Night Light) ]]&lt;br /&gt;
* [[S15: Tilt Motion Controlled LED Alarm Clock]]&lt;br /&gt;
* [[S15: Alarm Based Coffee Maker]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE244 Spring 2014 | Spring 2014]] ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
*  Senior Project: [[Project Advising: Remote Security System]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
* [[S14: Quadcopter]]&lt;br /&gt;
* [[S14: Smart Weather Clock]]&lt;br /&gt;
* [[S14: Divine WINd]]&lt;br /&gt;
* [[S14: Data Acquisition using CAN bus]]&lt;br /&gt;
* [[S14: E-Ink Display for Shopping Tags]]&lt;br /&gt;
* [[S14: Spectrum Analyzer for Audio Frequency Signals]]&lt;br /&gt;
* [[S14: CAN Firmware Uploader]]&lt;br /&gt;
* [[S14: Asset Management and Location System]]&lt;br /&gt;
* [[S14: Location  Tracker]]&lt;br /&gt;
* [[S14:  Androbot]]&lt;br /&gt;
* [[S14: Virtual Dog]]&lt;br /&gt;
* [[S14: Android based Automation]]&lt;br /&gt;
* [[S14: FaceTime Robo]]&lt;br /&gt;
* [[S14: Wireless Control Car]]&lt;br /&gt;
* [[S14: Power Efficient Security Door System for Light-rail using CAN Bus]]&lt;br /&gt;
* [[S14: Android based home monitoring system]]&lt;br /&gt;
* [[S14: Need For Speed]]&lt;br /&gt;
&lt;br /&gt;
CmpE146&lt;br /&gt;
* [[S14: Hyperintelligent NFC Locker of the Future]]&lt;br /&gt;
* [[S14: Smart Planter]]&lt;br /&gt;
* [[S14: Modular Security System]]&lt;br /&gt;
* [[S14: Autonomous Control System]]&lt;br /&gt;
* [[S14: Anti-Crash Car]]&lt;br /&gt;
* [[S14: Tricopter]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE240 Fall 2013 | Fall 2013]] ===&lt;br /&gt;
&lt;br /&gt;
* [[F13: POV Display]]&lt;br /&gt;
* [[F13: Line Following Robot]]&lt;br /&gt;
* [[F13: LED Display]]&lt;br /&gt;
* [[F13: Bulb Ramper]]&lt;br /&gt;
* [[F13: Garage Parking Assistant]]&lt;br /&gt;
* [[F13: Quadcopter]]&lt;br /&gt;
* [[F13: BarkMaster2000]]&lt;br /&gt;
* [[F13: Remote Control Car]]&lt;br /&gt;
* [[F13: Obstacle Avoidance Robot]]&lt;br /&gt;
* [[F13: Vehicle On Board Diagnostics]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE146 Spring 2013 | Spring 2013]] ===&lt;br /&gt;
&lt;br /&gt;
* [[S13: 2D Plotter]]&lt;br /&gt;
* [[S13: Smart Cube]]&lt;br /&gt;
* [[S13: Garage Parking Aid]]&lt;br /&gt;
* [[S13: Smart Security]]&lt;br /&gt;
* [[S13: Door Alarm System]]&lt;br /&gt;
* [[S13: Solar Panel Tracker]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE146 Fall 2012|Fall 2012]] ===&lt;br /&gt;
&lt;br /&gt;
* [[F12: Evil Watchdog]]&lt;br /&gt;
* [[F12: Smart Bulb]]&lt;br /&gt;
* [[F12: All Your Base are Belong to You]]&lt;br /&gt;
* [[F12: Android Controlled MP3]]&lt;br /&gt;
* [[F12: Unified Wireless Health Monitoring System]]&lt;br /&gt;
* [[F12: OBD-II Android Monitor]]&lt;br /&gt;
* [[F12: Self-Driving GPS Following Car]]&lt;br /&gt;
* [[F12: Android Door Lock]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE146 Spring 2012|Spring 2012]] ===&lt;br /&gt;
*  [[S12: FreeRTOS based QuadCopter]]&lt;br /&gt;
*  [[S12: Web-based MP3 Player]]&lt;br /&gt;
*  [[S12: Self Drive Car]]&lt;br /&gt;
*  [[S12: VAndroid]]&lt;br /&gt;
*  [[S12: Traffic Light Sensing Vehicle]]&lt;br /&gt;
*  [[S12: Sound Reader]]&lt;br /&gt;
*  [[S12: Remote Controlled MP3 Player]]&lt;br /&gt;
*  [[S12: Android Controlled Robot]]&lt;br /&gt;
*  [[S12: Eyes-Free GPS]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Handy References ==&lt;br /&gt;
*  [[Sample Project Report]]&lt;br /&gt;
*  [[Project Proposal Guidelines]]&lt;br /&gt;
*  [[CmpE146 Lab. Resources]]&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=Realtime_OS_on_Embedded_Systems&amp;diff=34225</id>
		<title>Realtime OS on Embedded Systems</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=Realtime_OS_on_Embedded_Systems&amp;diff=34225"/>
				<updated>2016-12-21T04:40:51Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /*  Fall 2016 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Program History ==&lt;br /&gt;
My contribution in Embedded System courses started with CmpE146.  This course teaches students on how to write UART, SPI, and I2C Drivers and interface their drivers to peripherals.  There are about 8 weekly labs in which students not only write drivers, but also learn the core of Real-time Operating Systems including threading (tasks), and inter-task communication using Queues and Semaphores.  FreeRTOS is the operating system used with C/C++ Compiler based on GNU.&lt;br /&gt;
&lt;br /&gt;
When the course was started by Dr. Ozemek @ SJSU (sometime before 2005), not many resources were out there.  Still, with helpful guidance from Dr. Ozemek, interesting projects were created.  This is when I started to help out in Embedded System Courses, and by collecting and sharing knowledge, we've raised the bar at SJSU!  &lt;br /&gt;
&lt;br /&gt;
There have been many great projects at SJSU, but since no one knew about them, the hard work went to a waste for anyone but the creator.  But now we've got the infrastructure to share the projects, which turn out as great references for future students.  Here is my project that started around 2007, and turned into Bachelor's Senior Design Project: &amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.youtube.com/watch?v=QEadXdRl3ws&amp;amp;feature=plcp YouTube Video of Self-Navigating Car]&lt;br /&gt;
&lt;br /&gt;
As of 2013, I have broadened my contribution to other embedded system courses like CmpE240, CmpE243 and CmpE244.&lt;br /&gt;
&lt;br /&gt;
== Lab Assignments ==&lt;br /&gt;
This article contains laboratory assignments and resources.  The assignments are under construction as we move towards SJ-One development board.&lt;br /&gt;
*  [[Embedded System Tutorial GPIO | Lesson 1 : GPIO]]&lt;br /&gt;
*  [[Embedded System Tutorial UART | Lesson 2 : UART]]&lt;br /&gt;
*  [[Embedded System Tutorial SPI  | Lesson 3 : SPI]]&lt;br /&gt;
*  [[Embedded System I2C Tutorial  | Lesson 4 : I2C]]&lt;br /&gt;
*  [[Embedded System Tutorial Interrupts | Lesson 5 : Interrupts]]&lt;br /&gt;
*  [[Embedded System Tutorial FreeRTOS | Lesson 6 : FreeRTOS Tasks]]&lt;br /&gt;
*  [[Embedded System Tutorial File I/O | Lesson 7 : FreeRTOS Application Programming]]&lt;br /&gt;
&lt;br /&gt;
==Other reference articles==&lt;br /&gt;
*  [[Bitmasking Tutorial]] (+ GPIO Example)&lt;br /&gt;
*  [[ LPC17xx Memory Map &amp;amp; Interrupts]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
== Senior Design Projects ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
== Semester Projects ==&lt;br /&gt;
Every semester, students are given about 7-10 weeks to complete their projects.  During this short time-span, students form groups, order parts, and begin working on their projects.  The work performed during the semester is documented at this Wiki.&lt;br /&gt;
&lt;br /&gt;
Here is the list of Preet's documented projects:&amp;lt;BR/&amp;gt;&lt;br /&gt;
*  [[Preet's Relay Controller Project]]&lt;br /&gt;
*  [[Nordic Low Powered Mesh Network stack]]&lt;br /&gt;
*  [http://www.youtube.com/watch?v=QEadXdRl3ws&amp;amp;feature=plcp Senior Design Project (MS-CmpE) Video]&lt;br /&gt;
&lt;br /&gt;
Here is another resource for good project references :&lt;br /&gt;
[http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/ Cornell EE476 Projects]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
=== [[Fall 2016 | Fall 2016]] ===&lt;br /&gt;
&lt;br /&gt;
CMPE146:&lt;br /&gt;
* Add Your Group on Here, then follow the link to add more to your template *&lt;br /&gt;
* [http://www.socialledge.com/sjsu/index.php?title=F16:_Seismograph F16: Seismograph]&lt;br /&gt;
* [[F16: Piano Glove]]&lt;br /&gt;
* [[F16: Object Detector]]&lt;br /&gt;
* [[F16: Autonomous Nautical System]]&lt;br /&gt;
* [[F16: Autonomous Fire Extinguishing Vehicle]]&lt;br /&gt;
* [[F16: Autonomous Runaway Alarm Car]]&lt;br /&gt;
* [[F16: E-Bike]]&lt;br /&gt;
* [[F16: NotifyBox]]&lt;br /&gt;
* [[F16: Wireless Tilt Controlled Camera Arm]]&lt;br /&gt;
* [[F16: OBD2 Reader]]&lt;br /&gt;
* [[F16: Micro Watch Monitoring System]]&lt;br /&gt;
* [[F16: Door Alarm System]]&lt;br /&gt;
* [[http://www.socialledge.com/sjsu/index.php?title=F16:I2Coffee F16: UART Coffee]]&lt;br /&gt;
* [[F16: Real Time Traffic Control System (RTTCS)]]&lt;br /&gt;
&lt;br /&gt;
=== [[Spring 2016 | Spring 2016]] ===&lt;br /&gt;
*  [[S16: Fantastic Four]]&lt;br /&gt;
*  [[S16: Simpsons]]&lt;br /&gt;
*  [[S16: Mars 1]]&lt;br /&gt;
*  [[S16: OpenSJ Bluz]]&lt;br /&gt;
*  [[S16: Motion Copy Bot]]&lt;br /&gt;
*  [[S16: Biker Assist]]&lt;br /&gt;
*  [[S16: Helios]]&lt;br /&gt;
*  [[S16: Sound Buddy]]&lt;br /&gt;
*  [[S16: Warriors]]&lt;br /&gt;
*  [[S16: Expendables]]&lt;br /&gt;
*  [[S16: Ahava]]&lt;br /&gt;
*  [[S16: Number 1]]&lt;br /&gt;
*  [[S16: SkyNet]]&lt;br /&gt;
*  [[S16: SmartDoorLock]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cmpe 146:&lt;br /&gt;
*  [[S16: Camera Gimbal]]&lt;br /&gt;
*  [[S16: Laser Harp]]&lt;br /&gt;
*  &amp;lt;strike&amp;gt;[[S16: Laser Cutter Motor Controller]]&amp;lt;/strike&amp;gt;&lt;br /&gt;
*  [[S16: Sprinkler]]&lt;br /&gt;
*  [[S16: The Jatrick Car]]&lt;br /&gt;
*  [[S16: Dan]]&lt;br /&gt;
*  [[S16: Robolamp]]&lt;br /&gt;
*  [[S16: Pinball]]&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Fall 2015 | Fall 2015]] ===&lt;br /&gt;
&lt;br /&gt;
CmpE146:&lt;br /&gt;
* [[F15: Autonomous Mobile]]&lt;br /&gt;
* [[F15: Car Report]]&lt;br /&gt;
* [[F15: Electronic Piano]]&lt;br /&gt;
* [[F15: Doorknock over Bluetooth]]&lt;br /&gt;
* [[F15: Smart Car]]&lt;br /&gt;
* [[F15: Plant Control]]&lt;br /&gt;
* [[F15: Laser Security System]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE244 Spring 2015 | Spring 2015]] ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
* [[S15: Quadcopter - It flies]]&lt;br /&gt;
* [[S15: Remote Learner]]&lt;br /&gt;
* [[S15: Protocol Interface: I2C - CAN Bridge]]&lt;br /&gt;
* [[S15: Vision RC Car]]&lt;br /&gt;
* [[S15: SJeight Octocopter]]&lt;br /&gt;
* [[S15: Swarm Robots]]&lt;br /&gt;
* [[S15: Smart Sparta Parking System]]&lt;br /&gt;
* [[S15: Touch Navigator]]&lt;br /&gt;
* [[S15: Wizard's Chess System]]&lt;br /&gt;
* [[S15: Bug Rider]]&lt;br /&gt;
* [[S15: Real Time Brake Assist (RTBA)]]&lt;br /&gt;
* [[S15: Wireless Mesh Network]]&lt;br /&gt;
* [[S15: Wireless Power Transfer System]]&lt;br /&gt;
* [[S15: Drone]]&lt;br /&gt;
* [[S15: Tree Node using Google Protocol Buffers]]&lt;br /&gt;
* [[S15: Multi-media Car]]&lt;br /&gt;
* [[S15: Hand Gesture Recognition using IR Sensors]]&lt;br /&gt;
* [[S15: CAN controlled RGB LED cubes]]&lt;br /&gt;
* [[S15: Rubik's Cube Solver]]&lt;br /&gt;
* [[S15: RFID Security Box]]&lt;br /&gt;
* [[S15: Automated Meeting Room Reservation]]&lt;br /&gt;
* [[S15: Patient Buddy System (PBS)]]&lt;br /&gt;
&lt;br /&gt;
CmpE146:&lt;br /&gt;
* [[S15: Hovercopter]]&lt;br /&gt;
* [[S15: Triclops: Smart RC Car]]&lt;br /&gt;
* [[S15: Connect Four - Robotic Player]]&lt;br /&gt;
* [[S15: Self-Balancing Robot]]&lt;br /&gt;
* [[S15: MP3 Player with Graphic Equalizer Display]]&lt;br /&gt;
* [[S15: Motion-Controlled RC Car]]&lt;br /&gt;
* [[S15: MENL (Monster Encounter Night Light) ]]&lt;br /&gt;
* [[S15: Tilt Motion Controlled LED Alarm Clock]]&lt;br /&gt;
* [[S15: Alarm Based Coffee Maker]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE244 Spring 2014 | Spring 2014]] ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
*  Senior Project: [[Project Advising: Remote Security System]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
* [[S14: Quadcopter]]&lt;br /&gt;
* [[S14: Smart Weather Clock]]&lt;br /&gt;
* [[S14: Divine WINd]]&lt;br /&gt;
* [[S14: Data Acquisition using CAN bus]]&lt;br /&gt;
* [[S14: E-Ink Display for Shopping Tags]]&lt;br /&gt;
* [[S14: Spectrum Analyzer for Audio Frequency Signals]]&lt;br /&gt;
* [[S14: CAN Firmware Uploader]]&lt;br /&gt;
* [[S14: Asset Management and Location System]]&lt;br /&gt;
* [[S14: Location  Tracker]]&lt;br /&gt;
* [[S14:  Androbot]]&lt;br /&gt;
* [[S14: Virtual Dog]]&lt;br /&gt;
* [[S14: Android based Automation]]&lt;br /&gt;
* [[S14: FaceTime Robo]]&lt;br /&gt;
* [[S14: Wireless Control Car]]&lt;br /&gt;
* [[S14: Power Efficient Security Door System for Light-rail using CAN Bus]]&lt;br /&gt;
* [[S14: Android based home monitoring system]]&lt;br /&gt;
* [[S14: Need For Speed]]&lt;br /&gt;
&lt;br /&gt;
CmpE146&lt;br /&gt;
* [[S14: Hyperintelligent NFC Locker of the Future]]&lt;br /&gt;
* [[S14: Smart Planter]]&lt;br /&gt;
* [[S14: Modular Security System]]&lt;br /&gt;
* [[S14: Autonomous Control System]]&lt;br /&gt;
* [[S14: Anti-Crash Car]]&lt;br /&gt;
* [[S14: Tricopter]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE240 Fall 2013 | Fall 2013]] ===&lt;br /&gt;
&lt;br /&gt;
* [[F13: POV Display]]&lt;br /&gt;
* [[F13: Line Following Robot]]&lt;br /&gt;
* [[F13: LED Display]]&lt;br /&gt;
* [[F13: Bulb Ramper]]&lt;br /&gt;
* [[F13: Garage Parking Assistant]]&lt;br /&gt;
* [[F13: Quadcopter]]&lt;br /&gt;
* [[F13: BarkMaster2000]]&lt;br /&gt;
* [[F13: Remote Control Car]]&lt;br /&gt;
* [[F13: Obstacle Avoidance Robot]]&lt;br /&gt;
* [[F13: Vehicle On Board Diagnostics]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE146 Spring 2013 | Spring 2013]] ===&lt;br /&gt;
&lt;br /&gt;
* [[S13: 2D Plotter]]&lt;br /&gt;
* [[S13: Smart Cube]]&lt;br /&gt;
* [[S13: Garage Parking Aid]]&lt;br /&gt;
* [[S13: Smart Security]]&lt;br /&gt;
* [[S13: Door Alarm System]]&lt;br /&gt;
* [[S13: Solar Panel Tracker]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE146 Fall 2012|Fall 2012]] ===&lt;br /&gt;
&lt;br /&gt;
* [[F12: Evil Watchdog]]&lt;br /&gt;
* [[F12: Smart Bulb]]&lt;br /&gt;
* [[F12: All Your Base are Belong to You]]&lt;br /&gt;
* [[F12: Android Controlled MP3]]&lt;br /&gt;
* [[F12: Unified Wireless Health Monitoring System]]&lt;br /&gt;
* [[F12: OBD-II Android Monitor]]&lt;br /&gt;
* [[F12: Self-Driving GPS Following Car]]&lt;br /&gt;
* [[F12: Android Door Lock]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE146 Spring 2012|Spring 2012]] ===&lt;br /&gt;
*  [[S12: FreeRTOS based QuadCopter]]&lt;br /&gt;
*  [[S12: Web-based MP3 Player]]&lt;br /&gt;
*  [[S12: Self Drive Car]]&lt;br /&gt;
*  [[S12: VAndroid]]&lt;br /&gt;
*  [[S12: Traffic Light Sensing Vehicle]]&lt;br /&gt;
*  [[S12: Sound Reader]]&lt;br /&gt;
*  [[S12: Remote Controlled MP3 Player]]&lt;br /&gt;
*  [[S12: Android Controlled Robot]]&lt;br /&gt;
*  [[S12: Eyes-Free GPS]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Handy References ==&lt;br /&gt;
*  [[Sample Project Report]]&lt;br /&gt;
*  [[Project Proposal Guidelines]]&lt;br /&gt;
*  [[CmpE146 Lab. Resources]]&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=Realtime_OS_on_Embedded_Systems&amp;diff=34224</id>
		<title>Realtime OS on Embedded Systems</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=Realtime_OS_on_Embedded_Systems&amp;diff=34224"/>
				<updated>2016-12-21T04:40:26Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /*  Fall 2016 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Program History ==&lt;br /&gt;
My contribution in Embedded System courses started with CmpE146.  This course teaches students on how to write UART, SPI, and I2C Drivers and interface their drivers to peripherals.  There are about 8 weekly labs in which students not only write drivers, but also learn the core of Real-time Operating Systems including threading (tasks), and inter-task communication using Queues and Semaphores.  FreeRTOS is the operating system used with C/C++ Compiler based on GNU.&lt;br /&gt;
&lt;br /&gt;
When the course was started by Dr. Ozemek @ SJSU (sometime before 2005), not many resources were out there.  Still, with helpful guidance from Dr. Ozemek, interesting projects were created.  This is when I started to help out in Embedded System Courses, and by collecting and sharing knowledge, we've raised the bar at SJSU!  &lt;br /&gt;
&lt;br /&gt;
There have been many great projects at SJSU, but since no one knew about them, the hard work went to a waste for anyone but the creator.  But now we've got the infrastructure to share the projects, which turn out as great references for future students.  Here is my project that started around 2007, and turned into Bachelor's Senior Design Project: &amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.youtube.com/watch?v=QEadXdRl3ws&amp;amp;feature=plcp YouTube Video of Self-Navigating Car]&lt;br /&gt;
&lt;br /&gt;
As of 2013, I have broadened my contribution to other embedded system courses like CmpE240, CmpE243 and CmpE244.&lt;br /&gt;
&lt;br /&gt;
== Lab Assignments ==&lt;br /&gt;
This article contains laboratory assignments and resources.  The assignments are under construction as we move towards SJ-One development board.&lt;br /&gt;
*  [[Embedded System Tutorial GPIO | Lesson 1 : GPIO]]&lt;br /&gt;
*  [[Embedded System Tutorial UART | Lesson 2 : UART]]&lt;br /&gt;
*  [[Embedded System Tutorial SPI  | Lesson 3 : SPI]]&lt;br /&gt;
*  [[Embedded System I2C Tutorial  | Lesson 4 : I2C]]&lt;br /&gt;
*  [[Embedded System Tutorial Interrupts | Lesson 5 : Interrupts]]&lt;br /&gt;
*  [[Embedded System Tutorial FreeRTOS | Lesson 6 : FreeRTOS Tasks]]&lt;br /&gt;
*  [[Embedded System Tutorial File I/O | Lesson 7 : FreeRTOS Application Programming]]&lt;br /&gt;
&lt;br /&gt;
==Other reference articles==&lt;br /&gt;
*  [[Bitmasking Tutorial]] (+ GPIO Example)&lt;br /&gt;
*  [[ LPC17xx Memory Map &amp;amp; Interrupts]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
== Senior Design Projects ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
== Semester Projects ==&lt;br /&gt;
Every semester, students are given about 7-10 weeks to complete their projects.  During this short time-span, students form groups, order parts, and begin working on their projects.  The work performed during the semester is documented at this Wiki.&lt;br /&gt;
&lt;br /&gt;
Here is the list of Preet's documented projects:&amp;lt;BR/&amp;gt;&lt;br /&gt;
*  [[Preet's Relay Controller Project]]&lt;br /&gt;
*  [[Nordic Low Powered Mesh Network stack]]&lt;br /&gt;
*  [http://www.youtube.com/watch?v=QEadXdRl3ws&amp;amp;feature=plcp Senior Design Project (MS-CmpE) Video]&lt;br /&gt;
&lt;br /&gt;
Here is another resource for good project references :&lt;br /&gt;
[http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/ Cornell EE476 Projects]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
=== [[Fall 2016 | Fall 2016]] ===&lt;br /&gt;
&lt;br /&gt;
CMPE146:&lt;br /&gt;
* Add Your Group on Here, then follow the link to add more to your template *&lt;br /&gt;
* [http://www.socialledge.com/sjsu/index.php?title=F16:_Seismograph F16: Seismograph]&lt;br /&gt;
* [[F16: Piano Glove]]&lt;br /&gt;
* [[F16: Object Detector]]&lt;br /&gt;
* [[F16: Autonomous Nautical System]]&lt;br /&gt;
* [[F16: Autonomous Fire Extinguishing Vehicle]]&lt;br /&gt;
* [[F16: Autonomous Runaway Alarm Car]]&lt;br /&gt;
* [[F16: E-Bike]]&lt;br /&gt;
* [[F16: NotifyBox]]&lt;br /&gt;
* [[F16: Wireless Tilt Controlled Camera Arm]]&lt;br /&gt;
* [[F16: OBD2 Reader]]&lt;br /&gt;
* [[F16: Micro Watch Monitoring System]]&lt;br /&gt;
* [[F16: Door Alarm System]]&lt;br /&gt;
* [[http://www.socialledge.com/sjsu/index.php?title=F16:xxxCoffee F16: UART Coffee]]&lt;br /&gt;
* [[F16: Real Time Traffic Control System (RTTCS)]]&lt;br /&gt;
&lt;br /&gt;
=== [[Spring 2016 | Spring 2016]] ===&lt;br /&gt;
*  [[S16: Fantastic Four]]&lt;br /&gt;
*  [[S16: Simpsons]]&lt;br /&gt;
*  [[S16: Mars 1]]&lt;br /&gt;
*  [[S16: OpenSJ Bluz]]&lt;br /&gt;
*  [[S16: Motion Copy Bot]]&lt;br /&gt;
*  [[S16: Biker Assist]]&lt;br /&gt;
*  [[S16: Helios]]&lt;br /&gt;
*  [[S16: Sound Buddy]]&lt;br /&gt;
*  [[S16: Warriors]]&lt;br /&gt;
*  [[S16: Expendables]]&lt;br /&gt;
*  [[S16: Ahava]]&lt;br /&gt;
*  [[S16: Number 1]]&lt;br /&gt;
*  [[S16: SkyNet]]&lt;br /&gt;
*  [[S16: SmartDoorLock]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cmpe 146:&lt;br /&gt;
*  [[S16: Camera Gimbal]]&lt;br /&gt;
*  [[S16: Laser Harp]]&lt;br /&gt;
*  &amp;lt;strike&amp;gt;[[S16: Laser Cutter Motor Controller]]&amp;lt;/strike&amp;gt;&lt;br /&gt;
*  [[S16: Sprinkler]]&lt;br /&gt;
*  [[S16: The Jatrick Car]]&lt;br /&gt;
*  [[S16: Dan]]&lt;br /&gt;
*  [[S16: Robolamp]]&lt;br /&gt;
*  [[S16: Pinball]]&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Fall 2015 | Fall 2015]] ===&lt;br /&gt;
&lt;br /&gt;
CmpE146:&lt;br /&gt;
* [[F15: Autonomous Mobile]]&lt;br /&gt;
* [[F15: Car Report]]&lt;br /&gt;
* [[F15: Electronic Piano]]&lt;br /&gt;
* [[F15: Doorknock over Bluetooth]]&lt;br /&gt;
* [[F15: Smart Car]]&lt;br /&gt;
* [[F15: Plant Control]]&lt;br /&gt;
* [[F15: Laser Security System]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE244 Spring 2015 | Spring 2015]] ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
* [[S15: Quadcopter - It flies]]&lt;br /&gt;
* [[S15: Remote Learner]]&lt;br /&gt;
* [[S15: Protocol Interface: I2C - CAN Bridge]]&lt;br /&gt;
* [[S15: Vision RC Car]]&lt;br /&gt;
* [[S15: SJeight Octocopter]]&lt;br /&gt;
* [[S15: Swarm Robots]]&lt;br /&gt;
* [[S15: Smart Sparta Parking System]]&lt;br /&gt;
* [[S15: Touch Navigator]]&lt;br /&gt;
* [[S15: Wizard's Chess System]]&lt;br /&gt;
* [[S15: Bug Rider]]&lt;br /&gt;
* [[S15: Real Time Brake Assist (RTBA)]]&lt;br /&gt;
* [[S15: Wireless Mesh Network]]&lt;br /&gt;
* [[S15: Wireless Power Transfer System]]&lt;br /&gt;
* [[S15: Drone]]&lt;br /&gt;
* [[S15: Tree Node using Google Protocol Buffers]]&lt;br /&gt;
* [[S15: Multi-media Car]]&lt;br /&gt;
* [[S15: Hand Gesture Recognition using IR Sensors]]&lt;br /&gt;
* [[S15: CAN controlled RGB LED cubes]]&lt;br /&gt;
* [[S15: Rubik's Cube Solver]]&lt;br /&gt;
* [[S15: RFID Security Box]]&lt;br /&gt;
* [[S15: Automated Meeting Room Reservation]]&lt;br /&gt;
* [[S15: Patient Buddy System (PBS)]]&lt;br /&gt;
&lt;br /&gt;
CmpE146:&lt;br /&gt;
* [[S15: Hovercopter]]&lt;br /&gt;
* [[S15: Triclops: Smart RC Car]]&lt;br /&gt;
* [[S15: Connect Four - Robotic Player]]&lt;br /&gt;
* [[S15: Self-Balancing Robot]]&lt;br /&gt;
* [[S15: MP3 Player with Graphic Equalizer Display]]&lt;br /&gt;
* [[S15: Motion-Controlled RC Car]]&lt;br /&gt;
* [[S15: MENL (Monster Encounter Night Light) ]]&lt;br /&gt;
* [[S15: Tilt Motion Controlled LED Alarm Clock]]&lt;br /&gt;
* [[S15: Alarm Based Coffee Maker]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE244 Spring 2014 | Spring 2014]] ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
*  Senior Project: [[Project Advising: Remote Security System]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
* [[S14: Quadcopter]]&lt;br /&gt;
* [[S14: Smart Weather Clock]]&lt;br /&gt;
* [[S14: Divine WINd]]&lt;br /&gt;
* [[S14: Data Acquisition using CAN bus]]&lt;br /&gt;
* [[S14: E-Ink Display for Shopping Tags]]&lt;br /&gt;
* [[S14: Spectrum Analyzer for Audio Frequency Signals]]&lt;br /&gt;
* [[S14: CAN Firmware Uploader]]&lt;br /&gt;
* [[S14: Asset Management and Location System]]&lt;br /&gt;
* [[S14: Location  Tracker]]&lt;br /&gt;
* [[S14:  Androbot]]&lt;br /&gt;
* [[S14: Virtual Dog]]&lt;br /&gt;
* [[S14: Android based Automation]]&lt;br /&gt;
* [[S14: FaceTime Robo]]&lt;br /&gt;
* [[S14: Wireless Control Car]]&lt;br /&gt;
* [[S14: Power Efficient Security Door System for Light-rail using CAN Bus]]&lt;br /&gt;
* [[S14: Android based home monitoring system]]&lt;br /&gt;
* [[S14: Need For Speed]]&lt;br /&gt;
&lt;br /&gt;
CmpE146&lt;br /&gt;
* [[S14: Hyperintelligent NFC Locker of the Future]]&lt;br /&gt;
* [[S14: Smart Planter]]&lt;br /&gt;
* [[S14: Modular Security System]]&lt;br /&gt;
* [[S14: Autonomous Control System]]&lt;br /&gt;
* [[S14: Anti-Crash Car]]&lt;br /&gt;
* [[S14: Tricopter]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE240 Fall 2013 | Fall 2013]] ===&lt;br /&gt;
&lt;br /&gt;
* [[F13: POV Display]]&lt;br /&gt;
* [[F13: Line Following Robot]]&lt;br /&gt;
* [[F13: LED Display]]&lt;br /&gt;
* [[F13: Bulb Ramper]]&lt;br /&gt;
* [[F13: Garage Parking Assistant]]&lt;br /&gt;
* [[F13: Quadcopter]]&lt;br /&gt;
* [[F13: BarkMaster2000]]&lt;br /&gt;
* [[F13: Remote Control Car]]&lt;br /&gt;
* [[F13: Obstacle Avoidance Robot]]&lt;br /&gt;
* [[F13: Vehicle On Board Diagnostics]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE146 Spring 2013 | Spring 2013]] ===&lt;br /&gt;
&lt;br /&gt;
* [[S13: 2D Plotter]]&lt;br /&gt;
* [[S13: Smart Cube]]&lt;br /&gt;
* [[S13: Garage Parking Aid]]&lt;br /&gt;
* [[S13: Smart Security]]&lt;br /&gt;
* [[S13: Door Alarm System]]&lt;br /&gt;
* [[S13: Solar Panel Tracker]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE146 Fall 2012|Fall 2012]] ===&lt;br /&gt;
&lt;br /&gt;
* [[F12: Evil Watchdog]]&lt;br /&gt;
* [[F12: Smart Bulb]]&lt;br /&gt;
* [[F12: All Your Base are Belong to You]]&lt;br /&gt;
* [[F12: Android Controlled MP3]]&lt;br /&gt;
* [[F12: Unified Wireless Health Monitoring System]]&lt;br /&gt;
* [[F12: OBD-II Android Monitor]]&lt;br /&gt;
* [[F12: Self-Driving GPS Following Car]]&lt;br /&gt;
* [[F12: Android Door Lock]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE146 Spring 2012|Spring 2012]] ===&lt;br /&gt;
*  [[S12: FreeRTOS based QuadCopter]]&lt;br /&gt;
*  [[S12: Web-based MP3 Player]]&lt;br /&gt;
*  [[S12: Self Drive Car]]&lt;br /&gt;
*  [[S12: VAndroid]]&lt;br /&gt;
*  [[S12: Traffic Light Sensing Vehicle]]&lt;br /&gt;
*  [[S12: Sound Reader]]&lt;br /&gt;
*  [[S12: Remote Controlled MP3 Player]]&lt;br /&gt;
*  [[S12: Android Controlled Robot]]&lt;br /&gt;
*  [[S12: Eyes-Free GPS]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Handy References ==&lt;br /&gt;
*  [[Sample Project Report]]&lt;br /&gt;
*  [[Project Proposal Guidelines]]&lt;br /&gt;
*  [[CmpE146 Lab. Resources]]&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=Realtime_OS_on_Embedded_Systems&amp;diff=34223</id>
		<title>Realtime OS on Embedded Systems</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=Realtime_OS_on_Embedded_Systems&amp;diff=34223"/>
				<updated>2016-12-21T04:39:15Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /*  Fall 2016 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Program History ==&lt;br /&gt;
My contribution in Embedded System courses started with CmpE146.  This course teaches students on how to write UART, SPI, and I2C Drivers and interface their drivers to peripherals.  There are about 8 weekly labs in which students not only write drivers, but also learn the core of Real-time Operating Systems including threading (tasks), and inter-task communication using Queues and Semaphores.  FreeRTOS is the operating system used with C/C++ Compiler based on GNU.&lt;br /&gt;
&lt;br /&gt;
When the course was started by Dr. Ozemek @ SJSU (sometime before 2005), not many resources were out there.  Still, with helpful guidance from Dr. Ozemek, interesting projects were created.  This is when I started to help out in Embedded System Courses, and by collecting and sharing knowledge, we've raised the bar at SJSU!  &lt;br /&gt;
&lt;br /&gt;
There have been many great projects at SJSU, but since no one knew about them, the hard work went to a waste for anyone but the creator.  But now we've got the infrastructure to share the projects, which turn out as great references for future students.  Here is my project that started around 2007, and turned into Bachelor's Senior Design Project: &amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.youtube.com/watch?v=QEadXdRl3ws&amp;amp;feature=plcp YouTube Video of Self-Navigating Car]&lt;br /&gt;
&lt;br /&gt;
As of 2013, I have broadened my contribution to other embedded system courses like CmpE240, CmpE243 and CmpE244.&lt;br /&gt;
&lt;br /&gt;
== Lab Assignments ==&lt;br /&gt;
This article contains laboratory assignments and resources.  The assignments are under construction as we move towards SJ-One development board.&lt;br /&gt;
*  [[Embedded System Tutorial GPIO | Lesson 1 : GPIO]]&lt;br /&gt;
*  [[Embedded System Tutorial UART | Lesson 2 : UART]]&lt;br /&gt;
*  [[Embedded System Tutorial SPI  | Lesson 3 : SPI]]&lt;br /&gt;
*  [[Embedded System I2C Tutorial  | Lesson 4 : I2C]]&lt;br /&gt;
*  [[Embedded System Tutorial Interrupts | Lesson 5 : Interrupts]]&lt;br /&gt;
*  [[Embedded System Tutorial FreeRTOS | Lesson 6 : FreeRTOS Tasks]]&lt;br /&gt;
*  [[Embedded System Tutorial File I/O | Lesson 7 : FreeRTOS Application Programming]]&lt;br /&gt;
&lt;br /&gt;
==Other reference articles==&lt;br /&gt;
*  [[Bitmasking Tutorial]] (+ GPIO Example)&lt;br /&gt;
*  [[ LPC17xx Memory Map &amp;amp; Interrupts]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
== Senior Design Projects ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
== Semester Projects ==&lt;br /&gt;
Every semester, students are given about 7-10 weeks to complete their projects.  During this short time-span, students form groups, order parts, and begin working on their projects.  The work performed during the semester is documented at this Wiki.&lt;br /&gt;
&lt;br /&gt;
Here is the list of Preet's documented projects:&amp;lt;BR/&amp;gt;&lt;br /&gt;
*  [[Preet's Relay Controller Project]]&lt;br /&gt;
*  [[Nordic Low Powered Mesh Network stack]]&lt;br /&gt;
*  [http://www.youtube.com/watch?v=QEadXdRl3ws&amp;amp;feature=plcp Senior Design Project (MS-CmpE) Video]&lt;br /&gt;
&lt;br /&gt;
Here is another resource for good project references :&lt;br /&gt;
[http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/ Cornell EE476 Projects]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
=== [[Fall 2016 | Fall 2016]] ===&lt;br /&gt;
&lt;br /&gt;
CMPE146:&lt;br /&gt;
* Add Your Group on Here, then follow the link to add more to your template *&lt;br /&gt;
* [http://www.socialledge.com/sjsu/index.php?title=F16:_Seismograph F16: Seismograph]&lt;br /&gt;
* [[F16: Piano Glove]]&lt;br /&gt;
* [[F16: Object Detector]]&lt;br /&gt;
* [[F16: Autonomous Nautical System]]&lt;br /&gt;
* [[F16: Autonomous Fire Extinguishing Vehicle]]&lt;br /&gt;
* [[F16: Autonomous Runaway Alarm Car]]&lt;br /&gt;
* [[F16: E-Bike]]&lt;br /&gt;
* [[F16: NotifyBox]]&lt;br /&gt;
* [[F16: Wireless Tilt Controlled Camera Arm]]&lt;br /&gt;
* [[F16: OBD2 Reader]]&lt;br /&gt;
* [[F16: Micro Watch Monitoring System]]&lt;br /&gt;
* [[F16: Door Alarm System]]&lt;br /&gt;
* [[http://www.socialledge.com/sjsu/index.php?title=F16:Mauric's Coffee shop F16: UART Coffee]]&lt;br /&gt;
* [[F16: Real Time Traffic Control System (RTTCS)]]&lt;br /&gt;
&lt;br /&gt;
=== [[Spring 2016 | Spring 2016]] ===&lt;br /&gt;
*  [[S16: Fantastic Four]]&lt;br /&gt;
*  [[S16: Simpsons]]&lt;br /&gt;
*  [[S16: Mars 1]]&lt;br /&gt;
*  [[S16: OpenSJ Bluz]]&lt;br /&gt;
*  [[S16: Motion Copy Bot]]&lt;br /&gt;
*  [[S16: Biker Assist]]&lt;br /&gt;
*  [[S16: Helios]]&lt;br /&gt;
*  [[S16: Sound Buddy]]&lt;br /&gt;
*  [[S16: Warriors]]&lt;br /&gt;
*  [[S16: Expendables]]&lt;br /&gt;
*  [[S16: Ahava]]&lt;br /&gt;
*  [[S16: Number 1]]&lt;br /&gt;
*  [[S16: SkyNet]]&lt;br /&gt;
*  [[S16: SmartDoorLock]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cmpe 146:&lt;br /&gt;
*  [[S16: Camera Gimbal]]&lt;br /&gt;
*  [[S16: Laser Harp]]&lt;br /&gt;
*  &amp;lt;strike&amp;gt;[[S16: Laser Cutter Motor Controller]]&amp;lt;/strike&amp;gt;&lt;br /&gt;
*  [[S16: Sprinkler]]&lt;br /&gt;
*  [[S16: The Jatrick Car]]&lt;br /&gt;
*  [[S16: Dan]]&lt;br /&gt;
*  [[S16: Robolamp]]&lt;br /&gt;
*  [[S16: Pinball]]&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Fall 2015 | Fall 2015]] ===&lt;br /&gt;
&lt;br /&gt;
CmpE146:&lt;br /&gt;
* [[F15: Autonomous Mobile]]&lt;br /&gt;
* [[F15: Car Report]]&lt;br /&gt;
* [[F15: Electronic Piano]]&lt;br /&gt;
* [[F15: Doorknock over Bluetooth]]&lt;br /&gt;
* [[F15: Smart Car]]&lt;br /&gt;
* [[F15: Plant Control]]&lt;br /&gt;
* [[F15: Laser Security System]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE244 Spring 2015 | Spring 2015]] ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
* [[S15: Quadcopter - It flies]]&lt;br /&gt;
* [[S15: Remote Learner]]&lt;br /&gt;
* [[S15: Protocol Interface: I2C - CAN Bridge]]&lt;br /&gt;
* [[S15: Vision RC Car]]&lt;br /&gt;
* [[S15: SJeight Octocopter]]&lt;br /&gt;
* [[S15: Swarm Robots]]&lt;br /&gt;
* [[S15: Smart Sparta Parking System]]&lt;br /&gt;
* [[S15: Touch Navigator]]&lt;br /&gt;
* [[S15: Wizard's Chess System]]&lt;br /&gt;
* [[S15: Bug Rider]]&lt;br /&gt;
* [[S15: Real Time Brake Assist (RTBA)]]&lt;br /&gt;
* [[S15: Wireless Mesh Network]]&lt;br /&gt;
* [[S15: Wireless Power Transfer System]]&lt;br /&gt;
* [[S15: Drone]]&lt;br /&gt;
* [[S15: Tree Node using Google Protocol Buffers]]&lt;br /&gt;
* [[S15: Multi-media Car]]&lt;br /&gt;
* [[S15: Hand Gesture Recognition using IR Sensors]]&lt;br /&gt;
* [[S15: CAN controlled RGB LED cubes]]&lt;br /&gt;
* [[S15: Rubik's Cube Solver]]&lt;br /&gt;
* [[S15: RFID Security Box]]&lt;br /&gt;
* [[S15: Automated Meeting Room Reservation]]&lt;br /&gt;
* [[S15: Patient Buddy System (PBS)]]&lt;br /&gt;
&lt;br /&gt;
CmpE146:&lt;br /&gt;
* [[S15: Hovercopter]]&lt;br /&gt;
* [[S15: Triclops: Smart RC Car]]&lt;br /&gt;
* [[S15: Connect Four - Robotic Player]]&lt;br /&gt;
* [[S15: Self-Balancing Robot]]&lt;br /&gt;
* [[S15: MP3 Player with Graphic Equalizer Display]]&lt;br /&gt;
* [[S15: Motion-Controlled RC Car]]&lt;br /&gt;
* [[S15: MENL (Monster Encounter Night Light) ]]&lt;br /&gt;
* [[S15: Tilt Motion Controlled LED Alarm Clock]]&lt;br /&gt;
* [[S15: Alarm Based Coffee Maker]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE244 Spring 2014 | Spring 2014]] ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
*  Senior Project: [[Project Advising: Remote Security System]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
* [[S14: Quadcopter]]&lt;br /&gt;
* [[S14: Smart Weather Clock]]&lt;br /&gt;
* [[S14: Divine WINd]]&lt;br /&gt;
* [[S14: Data Acquisition using CAN bus]]&lt;br /&gt;
* [[S14: E-Ink Display for Shopping Tags]]&lt;br /&gt;
* [[S14: Spectrum Analyzer for Audio Frequency Signals]]&lt;br /&gt;
* [[S14: CAN Firmware Uploader]]&lt;br /&gt;
* [[S14: Asset Management and Location System]]&lt;br /&gt;
* [[S14: Location  Tracker]]&lt;br /&gt;
* [[S14:  Androbot]]&lt;br /&gt;
* [[S14: Virtual Dog]]&lt;br /&gt;
* [[S14: Android based Automation]]&lt;br /&gt;
* [[S14: FaceTime Robo]]&lt;br /&gt;
* [[S14: Wireless Control Car]]&lt;br /&gt;
* [[S14: Power Efficient Security Door System for Light-rail using CAN Bus]]&lt;br /&gt;
* [[S14: Android based home monitoring system]]&lt;br /&gt;
* [[S14: Need For Speed]]&lt;br /&gt;
&lt;br /&gt;
CmpE146&lt;br /&gt;
* [[S14: Hyperintelligent NFC Locker of the Future]]&lt;br /&gt;
* [[S14: Smart Planter]]&lt;br /&gt;
* [[S14: Modular Security System]]&lt;br /&gt;
* [[S14: Autonomous Control System]]&lt;br /&gt;
* [[S14: Anti-Crash Car]]&lt;br /&gt;
* [[S14: Tricopter]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE240 Fall 2013 | Fall 2013]] ===&lt;br /&gt;
&lt;br /&gt;
* [[F13: POV Display]]&lt;br /&gt;
* [[F13: Line Following Robot]]&lt;br /&gt;
* [[F13: LED Display]]&lt;br /&gt;
* [[F13: Bulb Ramper]]&lt;br /&gt;
* [[F13: Garage Parking Assistant]]&lt;br /&gt;
* [[F13: Quadcopter]]&lt;br /&gt;
* [[F13: BarkMaster2000]]&lt;br /&gt;
* [[F13: Remote Control Car]]&lt;br /&gt;
* [[F13: Obstacle Avoidance Robot]]&lt;br /&gt;
* [[F13: Vehicle On Board Diagnostics]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE146 Spring 2013 | Spring 2013]] ===&lt;br /&gt;
&lt;br /&gt;
* [[S13: 2D Plotter]]&lt;br /&gt;
* [[S13: Smart Cube]]&lt;br /&gt;
* [[S13: Garage Parking Aid]]&lt;br /&gt;
* [[S13: Smart Security]]&lt;br /&gt;
* [[S13: Door Alarm System]]&lt;br /&gt;
* [[S13: Solar Panel Tracker]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE146 Fall 2012|Fall 2012]] ===&lt;br /&gt;
&lt;br /&gt;
* [[F12: Evil Watchdog]]&lt;br /&gt;
* [[F12: Smart Bulb]]&lt;br /&gt;
* [[F12: All Your Base are Belong to You]]&lt;br /&gt;
* [[F12: Android Controlled MP3]]&lt;br /&gt;
* [[F12: Unified Wireless Health Monitoring System]]&lt;br /&gt;
* [[F12: OBD-II Android Monitor]]&lt;br /&gt;
* [[F12: Self-Driving GPS Following Car]]&lt;br /&gt;
* [[F12: Android Door Lock]]&lt;br /&gt;
&lt;br /&gt;
=== [[CmpE146 Spring 2012|Spring 2012]] ===&lt;br /&gt;
*  [[S12: FreeRTOS based QuadCopter]]&lt;br /&gt;
*  [[S12: Web-based MP3 Player]]&lt;br /&gt;
*  [[S12: Self Drive Car]]&lt;br /&gt;
*  [[S12: VAndroid]]&lt;br /&gt;
*  [[S12: Traffic Light Sensing Vehicle]]&lt;br /&gt;
*  [[S12: Sound Reader]]&lt;br /&gt;
*  [[S12: Remote Controlled MP3 Player]]&lt;br /&gt;
*  [[S12: Android Controlled Robot]]&lt;br /&gt;
*  [[S12: Eyes-Free GPS]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Handy References ==&lt;br /&gt;
*  [[Sample Project Report]]&lt;br /&gt;
*  [[Project Proposal Guidelines]]&lt;br /&gt;
*  [[CmpE146 Lab. Resources]]&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34192</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=34192"/>
				<updated>2016-12-21T03:43:43Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
The following table is our schedule for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SD card&lt;br /&gt;
| 1&lt;br /&gt;
| ~$10&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Analog to Digital Converter(ADC)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor1.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
In our project, we used Real Time Operating System (RTOS) for this project. The software design consist of two tasks with different priority level. The low priority task would check for inputs of the motion sensors and if motion is detected from the sensor, the lower priority task would send data to the queue. The medium priority task would then receive the signals from the queue and generate sound for the speaker based on the value of the light sensor. If the brightness is pretty high, then it the micro-controller would output a song named &amp;quot;Jingle Bell&amp;quot;, else micro-controller would output an alarm to the speaker because there maybe thieves inside the house.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
The first low priority task would check for the inputs of two motion sensors (This increases the accuracy of the detection). If both sensor sensed a motion in the first task, then it would send some data into the queue to indicate that motion is been detected. The medium priority task would wake up from sleep state because the queue is not empty anymore, this task would check the value on the light sensor to see how bright the room is. If the room is too dark (brightness &amp;lt;20), then there may be a thief inside the house, so an alarm frequency would be sent to the speaker pin. Else, if the value of brightness is pretty bright on the light sensor, just because it's christmas, the micro controller would generate a song called &amp;quot;Jingle Bell&amp;quot; just because it's christmas.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The biggest challenge we faced we deciding what to purchase for the project. In the first two week of the project, we purchased the speakers and thinking the onboard acceleration sensor would work like the way we want it to (sense motions), but it actually only works if the board is tilted. After the speaker came, we tested the speaker with our micro-controller, and yes there's sound coming out but the sound is very dim that we're barely able to hear. So we purchased some 2N3904 transistor and created a signal amplifying circuit and connected that to the speaker. Next, the first motion sensor that we bought online isn't turning off, we couldn't find out why so we bought 5 more motion sensor online just in case. If someone wants to start this project from scratch again, I would highly recommend doing enough research before making a purchase, because there's always not enough materials to work on the project if research are not well done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1: Speaker ===&lt;br /&gt;
When we purchased the speaker, the sound wasn't loud enough so we need some device to amplify the signal. So, we spend some time to go to an electronic store to purchase some transistors 2N3904 to create an amplifying circuit and connect that to the speaker. Finally, the sound it generated was a lot louder than before. It would be a lot better to purchase the speaker and 2N3904 together, because a lot of time is being wasted in between because we thought the micro controller could create enough voltage to sound a speaker.&lt;br /&gt;
&lt;br /&gt;
=== My Issue #2: Motion Sensor ===&lt;br /&gt;
The second part of our issue is the motion sensor, the first sensor that we bought is not turning off for some reason, in other words, it always senses motion even though nothing is moving in front of the sensor. Then, we were trying to think of a way to work around the box with other ideas, but none of them work. So we have to go online and buy 5 motion sensor because we don't want any defected parts to slow down our progress. The sensors that we bought finally worked, but sometimes it would give a false signal when there's no motion so I'm assuming it needs some time for the motion sensor to stabilize itself.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
In conclusion, the project was successful completed. Through working on this project, we were able to understand the FreeRTos and Embedded Code deeper.   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=33554</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=33554"/>
				<updated>2016-12-20T21:42:04Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Testing &amp;amp; Technical Challenges */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
The following table is our schedule for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SD card&lt;br /&gt;
| 1&lt;br /&gt;
| ~$10&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Analog to Digital Converter(ADC)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor1.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
In our project, we used Real Time Operating System (RTOS) for this project. The software design consist of two tasks with different priority level. The low priority task would check for inputs of the motion sensors and if motion is detected from the sensor, the lower priority task would send data to the queue. The medium priority task would then receive the signals from the queue and generate sound for the speaker based on the value of the light sensor. If the brightness is pretty high, then it the micro-controller would output a song named &amp;quot;Jingle Bell&amp;quot;, else micro-controller would output an alarm to the speaker because there maybe thieves inside the house.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
The first low priority task would check for the inputs of two motion sensors (This increases the accuracy of the detection). If both sensor sensed a motion in the first task, then it would send some data into the queue to indicate that motion is been detected. The medium priority task would wake up from sleep state because the queue is not empty anymore, this task would check the value on the light sensor to see how bright the room is. If the room is too dark (brightness &amp;lt;20), then there may be a thief inside the house, so an alarm frequency would be sent to the speaker pin. Else, if the value of brightness is pretty bright on the light sensor, just because it's christmas, the micro controller would generate a song called &amp;quot;Jingle Bell&amp;quot; just because it's christmas.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The biggest challenge we faced we deciding what to purchase for the project. In the first two week of the project, we purchased the speakers and thinking the onboard acceleration sensor would work like the way we want it to (sense motions), but it actually only works if the board is tilted. After the speaker came, we tested the speaker with our micro-controller, and yes there's sound coming out but the sound is very dim that we're barely able to hear. So we purchased some 2N3904 transistor and created a signal amplifying circuit and connected that to the speaker. Next, the first motion sensor that we bought online isn't turning off, we couldn't find out why so we bought 5 more motion sensor online just in case. If someone wants to start this project from scratch again, I would highly recommend doing enough research before making a purchase, because there's always not enough materials to work on the project if research are not well done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1: Speaker ===&lt;br /&gt;
When we purchased the speaker, the sound wasn't loud enough so we need some device to amplify the signal. So, we spend some time to go to an electronic store to purchase some transistors 2N3904 to create an amplifying circuit and connect that to the speaker. Finally, the sound it generated was a lot louder than before. It would be a lot better to purchase the speaker and 2N3904 together, because a lot of time is being wasted in between because we thought the micro controller could create enough voltage to sound a speaker.&lt;br /&gt;
&lt;br /&gt;
=== My Issue #2: Motion Sensor ===&lt;br /&gt;
The second part of our issue is the motion sensor, the first sensor that we bought is not turning off for some reason, in other words, it always senses motion even though nothing is moving in front of the sensor. Then, we were trying to think of a way to work around the box with other ideas, but none of them work. So we have to go online and buy 5 motion sensor because we don't want any defected parts to slow down our progress. The sensors that we bought finally worked, but sometimes it would give a false signal when there's no motion so I'm assuming it needs some time for the motion sensor to stabilize itself.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=33484</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=33484"/>
				<updated>2016-12-20T20:59:49Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
The following table is our schedule for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SD card&lt;br /&gt;
| 1&lt;br /&gt;
| ~$10&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Analog to Digital Converter(ADC)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor1.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
In our project, we used Real Time Operating System (RTOS) for this project. The software design consist of two tasks with different priority level. The low priority task would check for inputs of the motion sensors and if motion is detected from the sensor, the lower priority task would send data to the queue. The medium priority task would then receive the signals from the queue and generate sound for the speaker based on the value of the light sensor. If the brightness is pretty high, then it the micro-controller would output a song named &amp;quot;Jingle Bell&amp;quot;, else micro-controller would output an alarm to the speaker because there maybe thieves inside the house.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
The first low priority task would check for the inputs of two motion sensors (This increases the accuracy of the detection). If both sensor sensed a motion in the first task, then it would send some data into the queue to indicate that motion is been detected. The medium priority task would wake up from sleep state because the queue is not empty anymore, this task would check the value on the light sensor to see how bright the room is. If the room is too dark (brightness &amp;lt;20), then there may be a thief inside the house, so an alarm frequency would be sent to the speaker pin. Else, if the value of brightness is pretty bright on the light sensor, just because it's christmas, the micro controller would generate a song called &amp;quot;Jingle Bell&amp;quot; just because it's christmas.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=33473</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=33473"/>
				<updated>2016-12-20T20:50:00Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Software Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
The following table is our schedule for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SD card&lt;br /&gt;
| 1&lt;br /&gt;
| ~$10&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Analog to Digital Converter(ADC)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor1.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
In our project, we used Real Time Operating System (RTOS) for this project. The software design consist of two tasks with different priority level. The low priority task would check for inputs of the motion sensors and if motion is detected from the sensor, the lower priority task would send data to the queue. The medium priority task would then receive the signals from the queue and generate sound for the speaker based on the value of the light sensor. If the brightness is pretty high, then it the micro-controller would output a song named &amp;quot;Jingle Bell&amp;quot;, else micro-controller would output an alarm to the speaker because there maybe thieves inside the house.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=33449</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=33449"/>
				<updated>2016-12-20T20:40:11Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Hardware Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
The following table is our schedule for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SD card&lt;br /&gt;
| 1&lt;br /&gt;
| ~$10&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Analog to Digital Converter(ADC)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor1.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=33444</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=33444"/>
				<updated>2016-12-20T20:39:03Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Schedule */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
The following table is our schedule for this project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SD card&lt;br /&gt;
| 1&lt;br /&gt;
| ~$10&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&amp;lt;b&amp;gt;Block Diagram&amp;lt;\b&amp;gt;&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Analog to Digital Converter(ADC)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor1.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32946</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32946"/>
				<updated>2016-12-20T07:58:28Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Schedule */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Completed&lt;br /&gt;
| Parts Ordered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SD card&lt;br /&gt;
| 1&lt;br /&gt;
| ~$10&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&amp;lt;b&amp;gt;Block Diagram&amp;lt;\b&amp;gt;&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Analog to Digital Converter(ADC)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor1.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32736</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32736"/>
				<updated>2016-12-20T05:56:41Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Objectives &amp;amp; Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
* Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
* Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
* Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Incompleted. &lt;br /&gt;
| Haven't ordered the parts.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SD card&lt;br /&gt;
| 1&lt;br /&gt;
| ~$10&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&amp;lt;b&amp;gt;Block Diagram&amp;lt;\b&amp;gt;&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Analog to Digital Converter(ADC)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor1.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32735</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32735"/>
				<updated>2016-12-20T05:56:26Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Objectives &amp;amp; Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Figure out how to amplify the sound signal.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Incompleted. &lt;br /&gt;
| Haven't ordered the parts.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SD card&lt;br /&gt;
| 1&lt;br /&gt;
| ~$10&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&amp;lt;b&amp;gt;Block Diagram&amp;lt;\b&amp;gt;&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Analog to Digital Converter(ADC)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor1.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32734</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32734"/>
				<updated>2016-12-20T05:54:26Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Design &amp;amp; Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&amp;gt; Figure out how to amplify the sound signal.&lt;br /&gt;
&amp;gt; Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Incompleted. &lt;br /&gt;
| Haven't ordered the parts.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SD card&lt;br /&gt;
| 1&lt;br /&gt;
| ~$10&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&amp;lt;b&amp;gt;Block Diagram&amp;lt;\b&amp;gt;&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Analog to Digital Converter(ADC)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|200px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor1.PNG|200px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
Figure 4 showed us the state machine of the project. &lt;br /&gt;
&lt;br /&gt;
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 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32733</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32733"/>
				<updated>2016-12-20T05:52:15Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Design &amp;amp; Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&amp;gt; Figure out how to amplify the sound signal.&lt;br /&gt;
&amp;gt; Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Incompleted. &lt;br /&gt;
| Haven't ordered the parts.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SD card&lt;br /&gt;
| 1&lt;br /&gt;
| ~$10&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&amp;lt;b&amp;gt;Block Diagram&amp;lt;\b&amp;gt;&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Analog to Digital Converter(ADC)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|300px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
[[File:sensor1.PNG|300px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Sensor Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left figure showed us the sensor circuit. The middle pin which is the trigger pin has been tied to the ADC, so the analog signal that send by the senor is able to transfer to the digital signal that the MCU is able to read. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Speaker Connection&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right figure showed us how to tie the Speaker. First, we use a 1k pull-up resister to prevent the current flows. Then we used the amplifier to amplify the PWM signal to make the song comes out of speaker is loud enough. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32706</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32706"/>
				<updated>2016-12-20T05:42:29Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Design &amp;amp; Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&amp;gt; Figure out how to amplify the sound signal.&lt;br /&gt;
&amp;gt; Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Incompleted. &lt;br /&gt;
| Haven't ordered the parts.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SD card&lt;br /&gt;
| 1&lt;br /&gt;
| ~$10&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&amp;lt;b&amp;gt;Block Diagram&amp;lt;\b&amp;gt;&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Analog to Digital Converter(ADC)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:sensor1.PNG|300px|thumb|left|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|300px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32704</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32704"/>
				<updated>2016-12-20T05:42:14Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Design &amp;amp; Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&amp;gt; Figure out how to amplify the sound signal.&lt;br /&gt;
&amp;gt; Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Incompleted. &lt;br /&gt;
| Haven't ordered the parts.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SD card&lt;br /&gt;
| 1&lt;br /&gt;
| ~$10&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&amp;lt;b&amp;gt;Block Diagram&amp;lt;\b&amp;gt;&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Analog to Digital Converter(ADC)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:sensor1.PNG|300px|thumb|right|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker1.PNG|300px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32703</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32703"/>
				<updated>2016-12-20T05:41:37Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Block Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&amp;gt; Figure out how to amplify the sound signal.&lt;br /&gt;
&amp;gt; Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Incompleted. &lt;br /&gt;
| Haven't ordered the parts.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SD card&lt;br /&gt;
| 1&lt;br /&gt;
| ~$10&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&amp;lt;b&amp;gt;Block Diagram&amp;lt;\b&amp;gt;&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Analog to Digital Converter(ADC)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:sensor.PNG|300px|thumb|right|Figure 2. Sensor Connection ]]&lt;br /&gt;
&lt;br /&gt;
[[File:Speaker.PNG|300px|thumb|right|Figure 3. Speaker Connection ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 4. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32674</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32674"/>
				<updated>2016-12-20T05:26:32Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Software Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&amp;gt; Figure out how to amplify the sound signal.&lt;br /&gt;
&amp;gt; Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Incompleted. &lt;br /&gt;
| Haven't ordered the parts.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SD card&lt;br /&gt;
| 1&lt;br /&gt;
| ~$10&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
== Block Diagram  ==&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
Discuss your hardware design here.  Show detailed schematics, and the interface here.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Analog to Digital Converter(ADC)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 2. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32673</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32673"/>
				<updated>2016-12-20T05:26:17Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Software Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&amp;gt; Figure out how to amplify the sound signal.&lt;br /&gt;
&amp;gt; Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Incompleted. &lt;br /&gt;
| Haven't ordered the parts.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SD card&lt;br /&gt;
| 1&lt;br /&gt;
| ~$10&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
== Block Diagram  ==&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
Discuss your hardware design here.  Show detailed schematics, and the interface here.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Analog to Digital Converter(ADC)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 2. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32670</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32670"/>
				<updated>2016-12-20T05:26:03Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Hardware Used */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&amp;gt; Figure out how to amplify the sound signal.&lt;br /&gt;
&amp;gt; Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Incompleted. &lt;br /&gt;
| Haven't ordered the parts.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SD card&lt;br /&gt;
| 1&lt;br /&gt;
| ~$10&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
== Block Diagram  ==&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
Discuss your hardware design here.  Show detailed schematics, and the interface here.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Analog to Digital Converter(ADC)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 2. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32669</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32669"/>
				<updated>2016-12-20T05:25:49Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Software Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&amp;gt; Figure out how to amplify the sound signal.&lt;br /&gt;
&amp;gt; Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Incompleted. &lt;br /&gt;
| Haven't ordered the parts.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SD card&lt;br /&gt;
| 1&lt;br /&gt;
| ~$10&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
== Block Diagram  ==&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
Discuss your hardware design here.  Show detailed schematics, and the interface here.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Analog to Digital Converter(ADC)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs.&lt;br /&gt;
&lt;br /&gt;
== Hardware Used ==&lt;br /&gt;
In order to accomplish the project, we used following components: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 2. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32667</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32667"/>
				<updated>2016-12-20T05:25:26Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Block Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&amp;gt; Figure out how to amplify the sound signal.&lt;br /&gt;
&amp;gt; Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Incompleted. &lt;br /&gt;
| Haven't ordered the parts.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SD card&lt;br /&gt;
| 1&lt;br /&gt;
| ~$10&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
== Block Diagram  ==&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
Discuss your hardware design here.  Show detailed schematics, and the interface here.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Analog to Digital Converter(ADC)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs.&lt;br /&gt;
&lt;br /&gt;
== Hardware Used ==&lt;br /&gt;
In order to accomplish the project, we used following components: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32666</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32666"/>
				<updated>2016-12-20T05:25:08Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Block Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&amp;gt; Figure out how to amplify the sound signal.&lt;br /&gt;
&amp;gt; Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Incompleted. &lt;br /&gt;
| Haven't ordered the parts.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SD card&lt;br /&gt;
| 1&lt;br /&gt;
| ~$10&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
== Block Diagram  ==&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
Discuss your hardware design here.  Show detailed schematics, and the interface here.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Analog to Digital Converter(ADC)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs.&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|550px|thumb|right|Figure 2. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
== Hardware Used ==&lt;br /&gt;
In order to accomplish the project, we used following components: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32662</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32662"/>
				<updated>2016-12-20T05:23:44Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Block Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&amp;gt; Figure out how to amplify the sound signal.&lt;br /&gt;
&amp;gt; Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Incompleted. &lt;br /&gt;
| Haven't ordered the parts.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SD card&lt;br /&gt;
| 1&lt;br /&gt;
| ~$10&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
== Block Diagram  ==&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
Discuss your hardware design here.  Show detailed schematics, and the interface here.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Analog to Digital Converter(ADC)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs.&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
[[File:SM.PNG|300px|thumb|right|Figure 2. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
== Hardware Used ==&lt;br /&gt;
In order to accomplish the project, we used following components: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32657</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32657"/>
				<updated>2016-12-20T05:20:42Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Block Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&amp;gt; Figure out how to amplify the sound signal.&lt;br /&gt;
&amp;gt; Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Incompleted. &lt;br /&gt;
| Haven't ordered the parts.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SD card&lt;br /&gt;
| 1&lt;br /&gt;
| ~$10&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
== Block Diagram  ==&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
Discuss your hardware design here.  Show detailed schematics, and the interface here.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&amp;lt;b&amp;gt;Pulse-Width Modulatio(PWM)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Analog to Digital Converter(ADC)&amp;lt;/b&amp;gt;&lt;br /&gt;
*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. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;General Purpose Input/Output (GPIO)&amp;lt;/b&amp;gt;&lt;br /&gt;
*The General Purpose Input/Output(GPIO)Pin is used to control the LEDs.&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
[[File:State Machine.PNG|300px|thumb|right|Figure 2. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hardware Used ==&lt;br /&gt;
In order to accomplish the project, we used following components: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32613</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32613"/>
				<updated>2016-12-20T05:02:50Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Block Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&amp;gt; Figure out how to amplify the sound signal.&lt;br /&gt;
&amp;gt; Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Incompleted. &lt;br /&gt;
| Haven't ordered the parts.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SD card&lt;br /&gt;
| 1&lt;br /&gt;
| ~$10&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
== Block Diagram  ==&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
[[File:State Machine.PNG|300px|thumb|center|Figure 2. State Machine ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
Discuss your hardware design here.  Show detailed schematics, and the interface here.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32612</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32612"/>
				<updated>2016-12-20T05:02:06Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Block Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&amp;gt; Figure out how to amplify the sound signal.&lt;br /&gt;
&amp;gt; Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Incompleted. &lt;br /&gt;
| Haven't ordered the parts.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SD card&lt;br /&gt;
| 1&lt;br /&gt;
| ~$10&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
== Block Diagram  ==&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
[[File:State Machine.PNG|550px|thumb|center|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
Discuss your hardware design here.  Show detailed schematics, and the interface here.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32593</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32593"/>
				<updated>2016-12-20T04:44:47Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Block Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&amp;gt; Figure out how to amplify the sound signal.&lt;br /&gt;
&amp;gt; Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Incompleted. &lt;br /&gt;
| Haven't ordered the parts.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SD card&lt;br /&gt;
| 1&lt;br /&gt;
| ~$10&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
== Block Diagram  ==&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
[[File:ASM Chart.PNG|550px|thumb|right|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
Discuss your hardware design here.  Show detailed schematics, and the interface here.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32592</id>
		<title>F16: Door Alarm System</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F16:_Door_Alarm_System&amp;diff=32592"/>
				<updated>2016-12-20T04:44:35Z</updated>
		
		<summary type="html">&lt;p&gt;146 user2: /* Block Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Title: Door Alarm System ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
In order to accomplish the objective, we need to the following things:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Modified the Pulse-Width Modulation(PWM) source code to allow  the speaker to play a song.&lt;br /&gt;
&amp;gt; Figure out how to amplify the sound signal.&lt;br /&gt;
&amp;gt; Using the ADC code to receive the signal from motion sensor.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*&amp;lt;b&amp;gt;Bowei Zhang&amp;lt;/b&amp;gt;&lt;br /&gt;
**  Program the speaker.&lt;br /&gt;
**  Programming the ADC code.&lt;br /&gt;
**  Testing the software.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;b&amp;gt;James Huang&amp;lt;/b&amp;gt;   &lt;br /&gt;
**  Improve the playing song algorithm.&lt;br /&gt;
**  Design the hardware connection between MCU and external parts.&lt;br /&gt;
**  Programming the ADC code&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Week#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Completion&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Comment&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week1&lt;br /&gt;
| Oct31 - Nov4&lt;br /&gt;
| Project Plan &amp;amp; ordering parts&lt;br /&gt;
| Incompleted. &lt;br /&gt;
| Haven't ordered the parts.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week2&lt;br /&gt;
| Nov 7 - Nov11&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 1)&lt;br /&gt;
| Completed&lt;br /&gt;
| Finalizing the idea.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week3&lt;br /&gt;
| Nov14- Nov18&lt;br /&gt;
| Circuit Design &amp;amp; Writing Software (part 2)&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Speaker with low volume. Consider ordering Amplifier.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week4&lt;br /&gt;
| Nov21- Nov25&lt;br /&gt;
| Finish Testing&lt;br /&gt;
| In completed&lt;br /&gt;
|  Motion Senor came with damage. Ordering new one.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week5&lt;br /&gt;
| Nov27- Dec2&lt;br /&gt;
| Project Report&lt;br /&gt;
| Completed&lt;br /&gt;
| Working on Report. Waiting for sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week6&lt;br /&gt;
| Dec 3 - Dec9&lt;br /&gt;
| Cont. Testing &amp;amp; finish project report&lt;br /&gt;
| Incomplete&lt;br /&gt;
| Waiting for Motion sensor. Consider moving to plan B. &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week7&lt;br /&gt;
| Dec12- Dec16&lt;br /&gt;
| Cont. Testing &lt;br /&gt;
| Completed&lt;br /&gt;
| Report finished. Testing sensor.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| week8&lt;br /&gt;
| Dec17- Dec19&lt;br /&gt;
| Finish Report &amp;amp; Testing&lt;br /&gt;
| Completed&lt;br /&gt;
| Done&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Quantity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SJone Board&lt;br /&gt;
| 1&lt;br /&gt;
| $80&lt;br /&gt;
| SJone Board&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Speaker module&lt;br /&gt;
| 1&lt;br /&gt;
| $2&lt;br /&gt;
| Buzzer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| SD card&lt;br /&gt;
| 1&lt;br /&gt;
| ~$10&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| LEDs&lt;br /&gt;
| 4&lt;br /&gt;
| &amp;lt;$1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Motion Sensor&lt;br /&gt;
|1&lt;br /&gt;
|$15&lt;br /&gt;
| Detector&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| Signal Amplifier&lt;br /&gt;
|1&lt;br /&gt;
|$1&lt;br /&gt;
| 2N3904&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
== Block Diagram  ==&lt;br /&gt;
The following figure is the system level design of our project. &lt;br /&gt;
&lt;br /&gt;
[[File:System Level Design.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
[[File:ASM Chart.PNG|550px|thumb|left|Figure 1. System Level Design ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
Discuss your hardware design here.  Show detailed schematics, and the interface here.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
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.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Implementation ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
Describe the challenges of your project.  What advise would you give yourself or someone else if your project can be started from scratch again?&lt;br /&gt;
Make a smooth transition to testing section and described what it took to test your project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Conclude your project here.  You can recap your testing and problems.  You should address the &amp;quot;so what&amp;quot; part here to indicate what you ultimately learnt from this project.  How has this project increased your knowledge?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Video ===&lt;br /&gt;
Upload a video of your project and post the link here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Project Source Code ===&lt;br /&gt;
*  [https://sourceforge.net/projects/sjsu/files/CmpE_S2016/ Sourceforge Source Code Link]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
Any acknowledgement that you may wish to provide can be included here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146 user2</name></author>	</entry>

	</feed>