<?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=146S12T4</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=146S12T4"/>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php/Special:Contributions/146S12T4"/>
		<updated>2026-04-10T21:25:15Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.1</generator>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=15190</id>
		<title>S15: Remote Learner</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=15190"/>
				<updated>2015-05-24T18:39:08Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: /* Receive IR LED */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Remote Learner ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
The objective of this project was to create a remote learner using the SJOne board. The Remote Learner would have the ability to be learn any buttons of any remote controller then controlled by an Android application using Bluetooth. The application would tell the SJOne board to learn a remote control button using the onboard IR receiver sensor. Once the button was learned, then the SJOne board notifys the Android application and allows the application to replicate the button functionality using our own IR transmitter.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction == &lt;br /&gt;
Project Remote Learner is to have the ability to learn button functionalities from multiple remotes, and then control devices via an Android application. The objects for the remote learner are as the following:&lt;br /&gt;
* To create an Android application that will communicate with SJOne board using Bluetooth and UART&lt;br /&gt;
* To create a task that will be signal by the Android application to learn the IR timing using the on-board IR receiver. &lt;br /&gt;
** Task will then send a message to Android application through a Queue to indicate if it was able to successfully capture and write the timing values to a file to Flash memory&lt;br /&gt;
* To create a task that will receive a signal to transmit the IR timing values from Flash memory. This task will use the PWM library and delay function to turn on and off the IR LED&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Ying (Bailey) Wu - Android App and BT I/F&lt;br /&gt;
*  Yoni Klein - IR RX and IR Learning&lt;br /&gt;
*  Tejeswar - IR Protocol&lt;br /&gt;
*  Christopher Laurence - IR TX and IR learning&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
=== Remote Learner ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1-2&lt;br /&gt;
|3/27/2015&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|Research about the basic of remote controller protocols&lt;br /&gt;
|Completed&lt;br /&gt;
|3/10/15&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|Research about transmit timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
Research about receive timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
|Completed&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|Accurately decode IR signals from a remote control&lt;br /&gt;
Accurately transmit IR signals to a device &lt;br /&gt;
|Completed&lt;br /&gt;
|5/2/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|Interface BT module and establish communication with the Android phone&lt;br /&gt;
Decide on a communication protocol between phone and board.&lt;br /&gt;
|Completed&lt;br /&gt;
|05/22/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6-7&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|Research and add additional protocol support&lt;br /&gt;
|Completed&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|5/22/2015&lt;br /&gt;
|Final integration and testing.&lt;br /&gt;
|Completed&lt;br /&gt;
|05/23/2015&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Android Application ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|4/6/2015&lt;br /&gt;
|4/13/2015&lt;br /&gt;
|Research about Android application development&lt;br /&gt;
Research about Bluetooth module implementation with SJOne board&lt;br /&gt;
|Completed&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4/13/2015&lt;br /&gt;
|4/20/2015&lt;br /&gt;
|Implement and design a basic Android application on Android Studio&lt;br /&gt;
Implement the Bluetooth module using UART&lt;br /&gt;
|Completed&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/20/2015&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|Continue development of the Android application&lt;br /&gt;
Establish a connection between the SJOne board and Android application through Bluetooth &lt;br /&gt;
|Completed&lt;br /&gt;
|5/04/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|5/4/2015&lt;br /&gt;
|Collaborate with team members to integrate the Android application and remote learner functions &lt;br /&gt;
|Completed&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|5/4/2015&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|Debug and troubleshoot any issues that may arise&lt;br /&gt;
|Completed&lt;br /&gt;
|5/23/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|5/18/2015&lt;br /&gt;
|Miscellaneous&lt;br /&gt;
|Completed&lt;br /&gt;
|5/23/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
Give a simple list of the cost of your project broken down by components.  Do not write long stories here.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Line Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Number&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost ($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 120 Resistor&lt;br /&gt;
| Anchor Electronic&lt;br /&gt;
| N/A&lt;br /&gt;
| 10&lt;br /&gt;
| 1.00&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| IR LED 1.5 V 40mA&lt;br /&gt;
| Anchor Electronic&lt;br /&gt;
| N/A&lt;br /&gt;
| 4&lt;br /&gt;
| 1.00&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| HC-06 Bluetooth Module&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| 1&lt;br /&gt;
| 9.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| SJOne&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| 1&lt;br /&gt;
| 80.00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
====Transmit IR LED====&lt;br /&gt;
The IR LED transmitter is a simple circuit that connects to a PWM pin that is set to toggle at 38 Khz. The circuit needs a resister to create the voltage drop for the IR LED.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:CmpE244_S15_T3_Remote_Learner_IR LED Circuit.png|600px|centre|thumb|IR LED circuit]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Receive IR LED====&lt;br /&gt;
The IR receiver is already part of the SJOne board.  On our revision 4 board, this is the TSOP75238TR 38KHz IR Receiver Module by Vishay Semiconductors.  Other revision boards may have a slightly different part, but the operation and concepts are the same.&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver.png|400px|centre|thumb|IR Receiver Circuit]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The basic circuit is relatively simple.  Along with power and ground, an output signal is connected to two different parts of the board.&lt;br /&gt;
&lt;br /&gt;
The first connection is made to P1[18] on the LPC controller.  This GPIO pin will be configured to use the capture feature of the boards timer in order to &amp;quot;capture&amp;quot; the time a rising or falling signal event occurs.  This pin is labeled as &amp;quot;IR_DATA&amp;quot; on the board schematic and the associated GPIO function is referred to as CAP1[0] in the user manual.&lt;br /&gt;
The operation of the capture pin is described in the Hardware Interface section below.&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_LPC_Input.png|600px|centre|thumb|IR_DATA connection to CAP1[0]]]&lt;br /&gt;
&lt;br /&gt;
The second connection is to an external pin referenced in section 6D on page 3 of the board schematic.  This is mainly used for debugging and validating captured data on an oscilloscope.  Thanks Preet for adding this!  Both of these connections are displayed in the images below.&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_Test_Pin.png|365px|centre|thumb|External Pin]]&lt;br /&gt;
&lt;br /&gt;
====Android Application with SJOne Board Hardware Design ====&lt;br /&gt;
The Android application hardware design consists of the Bluetooth module (HC-06) and SJOne board. The communication link is established using the SJOne board UART3 Tx and Rx Pins.&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;
====PWM to IR Transmitter LED====&lt;br /&gt;
The PWM was used to generate the 38 Khz by creating an instance of PWM class. Then using the predefined function of &amp;quot;pwm.set&amp;quot; to toggle the pin at a duty cycle of about 25% and after certain amount of time we set the duty cycle to 0. Below is the standard behavior for NEC IR protocol explaining the amount of time that the PWM pin needs to toggle and time required to be off.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Protocol&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| On(µs)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Off(µs)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Total(µs)&lt;br /&gt;
|-&lt;br /&gt;
! Start&lt;br /&gt;
| 9000&lt;br /&gt;
| 4500&lt;br /&gt;
| 13500&lt;br /&gt;
|-&lt;br /&gt;
! 0 bit&lt;br /&gt;
| 560&lt;br /&gt;
| 560 &lt;br /&gt;
| 1120&lt;br /&gt;
|-&lt;br /&gt;
! 1 bit&lt;br /&gt;
| 560&lt;br /&gt;
| 1690 &lt;br /&gt;
| 2250&lt;br /&gt;
|-&lt;br /&gt;
! End&lt;br /&gt;
| 560&lt;br /&gt;
| N/A&lt;br /&gt;
| 560&lt;br /&gt;
|}&lt;br /&gt;
  &lt;br /&gt;
[[File:CmpE244_S15_T3_Remote_Learner_NEC_IR.JPG|600px|centre|thumb|In the above image is a capture of a NEC IR transmission using an oscilloscope.]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====IR Receiver to Capture Pin====&lt;br /&gt;
The IR receiver outputs a logic one (high, 3.3v) signal when idle.  When active, the signal drops to a logic zero (low, 0v).  Therefore, the signal is active low, which may actually be inverted relative to the transmitted signal.  The images below show two examples of transmitted signals and receiver output.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:1200px;&amp;quot; |&lt;br /&gt;
|[[File:S15_244_RemoteLearner_IR_Receiver_Waveform1.png|400px|center|thumb|IR receiver output given typical pulse input signal]]&lt;br /&gt;
|[[File:S15_244_RemoteLearner_IR_Receiver_Waveform2.png|400px|center|thumb|IR receiver output given pulse burst input signal]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These images are from the IR receiver data sheet included in the development package of the SJOne board.  However, you can find it on Vishay's website as well.  This signal is physically connected to one of the capture pins on the LPC microcontroller.  In our example, the board is designed to take this input on P1[18] using CAP1[0].&lt;br /&gt;
&lt;br /&gt;
The capture feature is associated with one of the boards timers.  In our case, this is timer 1 (hence CAP1).  The [0] indicates port 0.  Timer 1 is used by the development package, so it should already be started for us.  All we need to do is configure the Capture Control Register to generate an input on both rising and falling edges.&lt;br /&gt;
&lt;br /&gt;
When this interrupt occurs, we get a tick count.  We don't need to know the time exactly, just the difference in times between captures.  Since the IR receiver idles high, we know the first interrupt will be for a falling edge.  We can perform the calculations according to this assumption.&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;
====IR Receive Task====&lt;br /&gt;
&lt;br /&gt;
There are two components that make the IR receive functionality work.  The first is the task itself, which processes commands from the Bluetooth task and saves IR timings to the SD card.&lt;br /&gt;
&lt;br /&gt;
''The receive task and capture code was modified from Preet's IR_Sensor and remoteTask classes.  This was a great starting place but needed to be modified to suit the project needs.''&lt;br /&gt;
&lt;br /&gt;
This task sleeps indefinitely until it receives a message on the mRXQueue.  If this message contains a learn command, it will attempt to take the mutex shared by the transmit task.  If it can take it, that means the system is not transmitting and it's safe to start recording timing signals.  If it can't take it, then the task will let the Bluetooth task know the system is busy and cannot learn new commands.&lt;br /&gt;
&lt;br /&gt;
However, if learning can continue, we signal the second part of the IR receive functionality.  We tell the IR_Sensor singleton class to clear any stored captures and wait until a new command is received or a timeout occurs.  Next, we retrieve the array of timings and store it on the SD card for the transmit task to use.&lt;br /&gt;
&lt;br /&gt;
The code segment and flow chart to show this behavior are shown below.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    bool remoteRXTask::run(void *p)&lt;br /&gt;
    {&lt;br /&gt;
      u0_dbg_printf(&amp;quot;Learning...\n&amp;quot; );&lt;br /&gt;
      //Receive item from queue&lt;br /&gt;
      xQueueReceive(rxQueue);&lt;br /&gt;
      //Check if it is a learn command and semaphore avaliable&lt;br /&gt;
      if ((learn_command) &amp;amp;&amp;amp; (xSemaphoreAvaliable))&lt;br /&gt;
      {&lt;br /&gt;
        //Read IR code&lt;br /&gt;
        IS.clearCode();&lt;br /&gt;
        while(!IS.isIRCodeReceived())&lt;br /&gt;
        {&lt;br /&gt;
            vTaskDelayMs(100);&lt;br /&gt;
        }&lt;br /&gt;
        uint8_t max_timings = 255;&lt;br /&gt;
        uint16_t timings[max_timings] = {0};&lt;br /&gt;
        uint16_t count;&lt;br /&gt;
        IS.getLastIRCode(timings, &amp;amp;count, max_timings);&lt;br /&gt;
        //get+store the code and send feedback here&lt;br /&gt;
        sprintf(filename,&amp;quot;1:%c.hex&amp;quot;,mMsg.button);&lt;br /&gt;
        Storage :: write(filename,(void *)&amp;amp;timings,count,0);&lt;br /&gt;
        xSemaphoreGive(mIRMutex);&lt;br /&gt;
      }&lt;br /&gt;
      else&lt;br /&gt;
      {&lt;br /&gt;
        strcpy(mMsg.msg,&amp;quot;*****Busy Transmitting***&amp;quot;);&lt;br /&gt;
        //Send item to the Bluetooth queue&lt;br /&gt;
        xQueueSend(mBtQueue,&amp;amp;mMsg,0);&lt;br /&gt;
    }&lt;br /&gt;
       return true;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_TaskFlow.png|700px|center|Flow Diagram for IR receive Task|thumb|Flow Chart : IR Receive Task]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The code below is the core of what makes the IR learning possible.  If a rising or falling edge occurs on the capture pin, then an interrupt is generated.  In this case, storeIrCode() will be called which saves the timestamps to an array.  We set a timeout of 50ms, after which decodeIrCode() is called that calculates the differences in timestamps.  These differences are the timings we will store and later transmit.  &lt;br /&gt;
&lt;br /&gt;
The 50ms timeout was chosen because some remotes have more complicated commands that include two consecutive commands.  The time between those commands was measured to be about 40ms with the tested remotes.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    #if (1 == SYS_CFG_SYS_TIMER)&lt;br /&gt;
        /* ISR for captured time of the capture input pin */&lt;br /&gt;
        if (intr_reason &amp;amp; timer_capt0_intr_ir_sensor_edge_time_captured)&lt;br /&gt;
        {&lt;br /&gt;
            gp_timer_ptr-&amp;gt;IR = timer_capt0_intr_ir_sensor_edge_time_captured;&lt;br /&gt;
            // Store the IR capture time and setup timeout of the IR signal (unless we reset it again)&lt;br /&gt;
            IS.storeIrCode(gp_timer_ptr-&amp;gt;CR0);&lt;br /&gt;
            //10k was too short of a timeout for long commands,&lt;br /&gt;
            //which sometimes have separations of up to 40ms&lt;br /&gt;
            gp_timer_ptr-&amp;gt;MR2 = 50000 + gp_timer_ptr-&amp;gt;TC;&lt;br /&gt;
        }&lt;br /&gt;
        /* MR2: End of IR capture (no IR capture after initial IR signal) */&lt;br /&gt;
        else if (intr_reason &amp;amp; timer_mr2_intr_ir_sensor_timeout)&lt;br /&gt;
        {&lt;br /&gt;
            gp_timer_ptr-&amp;gt;IR = timer_mr2_intr_ir_sensor_timeout;&lt;br /&gt;
            IS.decodeIrCode();&lt;br /&gt;
        }&lt;br /&gt;
        /* MR0 is used for the timer rollover count */&lt;br /&gt;
        else&lt;br /&gt;
    #endif&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    void IR_Sensor::storeIrCode(uint32_t value)&lt;br /&gt;
    {&lt;br /&gt;
        if (!m_ready_to_receive)&lt;br /&gt;
            return;&lt;br /&gt;
        // Just store the timestamp of this signal&lt;br /&gt;
        if(g_signal_count &amp;lt; MAX_EDGES_PER_IR_FRAME)&lt;br /&gt;
        {&lt;br /&gt;
            g_ir_edge_timings[g_signal_count++] = value;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    void IR_Sensor::decodeIrCode(void)&lt;br /&gt;
    {&lt;br /&gt;
        if (!m_ready_to_receive)&lt;br /&gt;
            return;&lt;br /&gt;
        for (int i = 0; i &amp;lt; g_signal_count-1; i++)&lt;br /&gt;
        {&lt;br /&gt;
            g_ir_cmd_timings[i] = g_ir_edge_timings[i+1]-g_ir_edge_timings[i];&lt;br /&gt;
        }&lt;br /&gt;
        m_code_received = true;&lt;br /&gt;
        m_ready_to_receive = false;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_CaptureFlow.png|500px|center|Flow Diagram for IR capture|thumb|Flow Chart : IR Capture Interrupt]]&lt;br /&gt;
&lt;br /&gt;
====IR Transmit Task:====&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The IR transmit task will be signaled by the Bluetooth task. After being signal the task will attempt to read from a file using the Storage class. If the file doesn't exist it will send an error message the terminal. If the file does exist then the task will read all the timing values into an array. The task will then enter a PortCritical area and transmit the IR signal by turning on and off the PWM pin. Once it is finished the IR Transmit task return the Mutex.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
        remoteTXTask(uint8_t priority) :scheduler_task(&amp;quot;rTX&amp;quot;, 2048, priority), pwm0(38Khz)&lt;br /&gt;
        bool run(void *p)&lt;br /&gt;
        {&lt;br /&gt;
            xQueueReceive;&lt;br /&gt;
            if ((command == send_cmd) &amp;amp;&amp;amp; xSemaphoreTakeAvailable)&lt;br /&gt;
            {&lt;br /&gt;
                u0_dbg_printf(&amp;quot;Transmitting...\n&amp;quot; );&lt;br /&gt;
                int size = readFile(mMsg.fileName);&lt;br /&gt;
                portENTER_CRITICAL();&lt;br /&gt;
                for(int i = 0; i &amp;lt; size; i++)&lt;br /&gt;
                {&lt;br /&gt;
                    if(i % 2 == 0) pwm1.set(25);&lt;br /&gt;
                    else pwm1.set(0);&lt;br /&gt;
                    delay_us(timing_values[i]);&lt;br /&gt;
                }&lt;br /&gt;
                pwm1.set(0);&lt;br /&gt;
                portEXIT_CRITICAL();&lt;br /&gt;
            }&lt;br /&gt;
            xSemaphoreGive(mIRMutex);&lt;br /&gt;
            return true;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[File:CmpE244_S15_T3_Remote_Learner_IRTask.jpg|250px|center|Flow Diagram for IR transmit Task|350px|thumb|Flow Chart : IR Transmit Task]]&lt;br /&gt;
&lt;br /&gt;
====Android Application with SJOne Board Software Design ====&lt;br /&gt;
&lt;br /&gt;
[[File:CMPE244_S15_TEAM2_Android_FlowChart.png|300px|right|thumb|Flow Chart: Android App with SJOne Board Software Design]]&lt;br /&gt;
&lt;br /&gt;
The Android application Bluetooth task is to provide the a communication link between all the tasks. The Bluetooth task would receive commands from the application, then send items to the queue with the appropriate information such as command, button number, and message from the Android application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pseudo Code:'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void BluetoothTask(void *p) {&lt;br /&gt;
  //Initialize transmit, receive and bluetooth queues&lt;br /&gt;
  bool init();&lt;br /&gt;
  bool run()&lt;br /&gt;
  {&lt;br /&gt;
     //Get command from Android app&lt;br /&gt;
     uart3.gets();&lt;br /&gt;
     //Check if it is a transmit or learn command&lt;br /&gt;
     checkCommand();&lt;br /&gt;
     //Send item to the appropriate queue&lt;br /&gt;
     xQueueSend();&lt;br /&gt;
     //Sleep to reduce CPU usage&lt;br /&gt;
     vTaskDelay(10);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Learner Android App ===&lt;br /&gt;
The software development environment for the Remote Learner android application is Android Studio 1.2.1.1. &lt;br /&gt;
&lt;br /&gt;
[[File:CMPE244_S15_TEAM2_Android_AndroidStudio.png|900px|center|thumb|Android App: Development Envirnoment]]&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:1200px;&amp;quot; |&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Unconnected.png|350px|left|thumb|Android App: Starting Screen]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_DeviceList.png|350px|left|thumb|Android App: Bluetooth Device List]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Connecting.png|350px|left|thumb|Android App: Connecting to Bluetooth Device]]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:1200px;&amp;quot; |&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Connected.png|350px|left|thumb|Android App: Bluetooth Device Connected]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Learned.png|350px|left|thumb|Android App: Button Learned]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_LearnFailed.png|350px|left|thumb|Android App: Button Learn Failed]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&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;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Issue #1 ===&lt;br /&gt;
'''PROBLEM:'''&lt;br /&gt;
&lt;br /&gt;
IR transmission signal was not being received by IR receiver. &lt;br /&gt;
&lt;br /&gt;
'''RESOLUTION:'''&lt;br /&gt;
&lt;br /&gt;
Used Oscilloscope to discover that PWM instance set to 38,000 Hz did not produce a 38 kHz. Had to adjust the value to about 3205 Hz to get a PWM signal that was about 38Khz. &lt;br /&gt;
&lt;br /&gt;
'''FUTURE RECOMMENDATIONS:'''&lt;br /&gt;
&lt;br /&gt;
Examine PWM code and determine if there is a way to enter the fequency in Khz.&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Issue #2 ===&lt;br /&gt;
'''PROBLEM:'''&lt;br /&gt;
&lt;br /&gt;
Putting IR transmission signal  in task was causing IR signal not to be received because task was being interrupted. &lt;br /&gt;
&lt;br /&gt;
'''RESOLUTION:'''&lt;br /&gt;
&lt;br /&gt;
Placed time sensitive code in a Port Critical section to prevent that section of code being interrupted.&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Testing ===&lt;br /&gt;
To test the IR transmitter we first used an oscilloscope to capture a IR signal from a remote control. After capturing the signal we determined the protocol. To replicate the signal we created an array with the timing values. The array values that were even index values represented the timing for the IR led to toggle on. The odd values represent the timing values that the IR LED need to be off. Using a for loop, we send the signal and tested using an oscilloscope first. After determining that the signal was similar to the capture, we tested with a few devices. The first device was an Apple remote to turn the volume up. Afterward we tested a different device using a different protocol. We were able to figure channel up/down and volume up/down and control a Sharp TV. The final test for integration was to control an LG TV. See demo video of the device controlling LG TV.&lt;br /&gt;
&lt;br /&gt;
=== Android App Testing ===&lt;br /&gt;
This section is for android app testing.&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;
=== 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_SJSU_S2015/ 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;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=15187</id>
		<title>S15: Remote Learner</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=15187"/>
				<updated>2015-05-24T18:38:22Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: /* IR Receiver to Capture Pin: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Remote Learner ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
The objective of this project was to create a remote learner using the SJOne board. The Remote Learner would have the ability to be learn any buttons of any remote controller then controlled by an Android application using Bluetooth. The application would tell the SJOne board to learn a remote control button using the onboard IR receiver sensor. Once the button was learned, then the SJOne board notifys the Android application and allows the application to replicate the button functionality using our own IR transmitter.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction == &lt;br /&gt;
Project Remote Learner is to have the ability to learn button functionalities from multiple remotes, and then control devices via an Android application. The objects for the remote learner are as the following:&lt;br /&gt;
* To create an Android application that will communicate with SJOne board using Bluetooth and UART&lt;br /&gt;
* To create a task that will be signal by the Android application to learn the IR timing using the on-board IR receiver. &lt;br /&gt;
** Task will then send a message to Android application through a Queue to indicate if it was able to successfully capture and write the timing values to a file to Flash memory&lt;br /&gt;
* To create a task that will receive a signal to transmit the IR timing values from Flash memory. This task will use the PWM library and delay function to turn on and off the IR LED&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Ying (Bailey) Wu - Android App and BT I/F&lt;br /&gt;
*  Yoni Klein - IR RX and IR Learning&lt;br /&gt;
*  Tejeswar - IR Protocol&lt;br /&gt;
*  Christopher Laurence - IR TX and IR learning&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
=== Remote Learner ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1-2&lt;br /&gt;
|3/27/2015&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|Research about the basic of remote controller protocols&lt;br /&gt;
|Completed&lt;br /&gt;
|3/10/15&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|Research about transmit timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
Research about receive timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
|Completed&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|Accurately decode IR signals from a remote control&lt;br /&gt;
Accurately transmit IR signals to a device &lt;br /&gt;
|Completed&lt;br /&gt;
|5/2/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|Interface BT module and establish communication with the Android phone&lt;br /&gt;
Decide on a communication protocol between phone and board.&lt;br /&gt;
|Completed&lt;br /&gt;
|05/22/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6-7&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|Research and add additional protocol support&lt;br /&gt;
|Completed&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|5/22/2015&lt;br /&gt;
|Final integration and testing.&lt;br /&gt;
|Completed&lt;br /&gt;
|05/23/2015&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Android Application ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|4/6/2015&lt;br /&gt;
|4/13/2015&lt;br /&gt;
|Research about Android application development&lt;br /&gt;
Research about Bluetooth module implementation with SJOne board&lt;br /&gt;
|Completed&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4/13/2015&lt;br /&gt;
|4/20/2015&lt;br /&gt;
|Implement and design a basic Android application on Android Studio&lt;br /&gt;
Implement the Bluetooth module using UART&lt;br /&gt;
|Completed&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/20/2015&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|Continue development of the Android application&lt;br /&gt;
Establish a connection between the SJOne board and Android application through Bluetooth &lt;br /&gt;
|Completed&lt;br /&gt;
|5/04/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|5/4/2015&lt;br /&gt;
|Collaborate with team members to integrate the Android application and remote learner functions &lt;br /&gt;
|Completed&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|5/4/2015&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|Debug and troubleshoot any issues that may arise&lt;br /&gt;
|Completed&lt;br /&gt;
|5/23/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|5/18/2015&lt;br /&gt;
|Miscellaneous&lt;br /&gt;
|Completed&lt;br /&gt;
|5/23/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
Give a simple list of the cost of your project broken down by components.  Do not write long stories here.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Line Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Number&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost ($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 120 Resistor&lt;br /&gt;
| Anchor Electronic&lt;br /&gt;
| N/A&lt;br /&gt;
| 10&lt;br /&gt;
| 1.00&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| IR LED 1.5 V 40mA&lt;br /&gt;
| Anchor Electronic&lt;br /&gt;
| N/A&lt;br /&gt;
| 4&lt;br /&gt;
| 1.00&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| HC-06 Bluetooth Module&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| 1&lt;br /&gt;
| 9.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| SJOne&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| 1&lt;br /&gt;
| 80.00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
====Transmit IR LED====&lt;br /&gt;
The IR LED transmitter is a simple circuit that connects to a PWM pin that is set to toggle at 38 Khz. The circuit needs a resister to create the voltage drop for the IR LED.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:CmpE244_S15_T3_Remote_Learner_IR LED Circuit.png|600px|centre|thumb|IR LED circuit]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Receive IR LED====&lt;br /&gt;
The IR receiver is already part of the SJOne board.  On our revision 4 board, this is the TSOP75238TR IR Receiver Module by Vishay Semiconductors.  Other revision boards may have a slightly different part, but the operation and concepts are the same.&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver.png|400px|centre|thumb|IR Receiver Circuit]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The basic circuit is relatively simple.  Along with power and ground, an output signal is connected to two different parts of the board.&lt;br /&gt;
&lt;br /&gt;
The first connection is made to P1[18] on the LPC controller.  This GPIO pin will be configured to use the capture feature of the boards timer in order to &amp;quot;capture&amp;quot; the time a rising or falling signal event occurs.  This pin is labeled as &amp;quot;IR_DATA&amp;quot; on the board schematic and the associated GPIO function is referred to as CAP1[0] in the user manual.&lt;br /&gt;
The operation of the capture pin is described in the Hardware Interface section below.&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_LPC_Input.png|600px|centre|thumb|IR_DATA connection to CAP1[0]]]&lt;br /&gt;
&lt;br /&gt;
The second connection is to an external pin referenced in section 6D on page 3 of the board schematic.  This is mainly used for debugging and validating captured data on an oscilloscope.  Thanks Preet for adding this!  Both of these connections are displayed in the images below.&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_Test_Pin.png|365px|centre|thumb|External Pin]]&lt;br /&gt;
&lt;br /&gt;
====Android Application with SJOne Board Hardware Design ====&lt;br /&gt;
The Android application hardware design consists of the Bluetooth module (HC-06) and SJOne board. The communication link is established using the SJOne board UART3 Tx and Rx Pins.&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;
====PWM to IR Transmitter LED====&lt;br /&gt;
The PWM was used to generate the 38 Khz by creating an instance of PWM class. Then using the predefined function of &amp;quot;pwm.set&amp;quot; to toggle the pin at a duty cycle of about 25% and after certain amount of time we set the duty cycle to 0. Below is the standard behavior for NEC IR protocol explaining the amount of time that the PWM pin needs to toggle and time required to be off.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Protocol&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| On(µs)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Off(µs)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Total(µs)&lt;br /&gt;
|-&lt;br /&gt;
! Start&lt;br /&gt;
| 9000&lt;br /&gt;
| 4500&lt;br /&gt;
| 13500&lt;br /&gt;
|-&lt;br /&gt;
! 0 bit&lt;br /&gt;
| 560&lt;br /&gt;
| 560 &lt;br /&gt;
| 1120&lt;br /&gt;
|-&lt;br /&gt;
! 1 bit&lt;br /&gt;
| 560&lt;br /&gt;
| 1690 &lt;br /&gt;
| 2250&lt;br /&gt;
|-&lt;br /&gt;
! End&lt;br /&gt;
| 560&lt;br /&gt;
| N/A&lt;br /&gt;
| 560&lt;br /&gt;
|}&lt;br /&gt;
  &lt;br /&gt;
[[File:CmpE244_S15_T3_Remote_Learner_NEC_IR.JPG|600px|centre|thumb|In the above image is a capture of a NEC IR transmission using an oscilloscope.]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====IR Receiver to Capture Pin====&lt;br /&gt;
The IR receiver outputs a logic one (high, 3.3v) signal when idle.  When active, the signal drops to a logic zero (low, 0v).  Therefore, the signal is active low, which may actually be inverted relative to the transmitted signal.  The images below show two examples of transmitted signals and receiver output.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:1200px;&amp;quot; |&lt;br /&gt;
|[[File:S15_244_RemoteLearner_IR_Receiver_Waveform1.png|400px|center|thumb|IR receiver output given typical pulse input signal]]&lt;br /&gt;
|[[File:S15_244_RemoteLearner_IR_Receiver_Waveform2.png|400px|center|thumb|IR receiver output given pulse burst input signal]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These images are from the IR receiver data sheet included in the development package of the SJOne board.  However, you can find it on Vishay's website as well.  This signal is physically connected to one of the capture pins on the LPC microcontroller.  In our example, the board is designed to take this input on P1[18] using CAP1[0].&lt;br /&gt;
&lt;br /&gt;
The capture feature is associated with one of the boards timers.  In our case, this is timer 1 (hence CAP1).  The [0] indicates port 0.  Timer 1 is used by the development package, so it should already be started for us.  All we need to do is configure the Capture Control Register to generate an input on both rising and falling edges.&lt;br /&gt;
&lt;br /&gt;
When this interrupt occurs, we get a tick count.  We don't need to know the time exactly, just the difference in times between captures.  Since the IR receiver idles high, we know the first interrupt will be for a falling edge.  We can perform the calculations according to this assumption.&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;
====IR Receive Task====&lt;br /&gt;
&lt;br /&gt;
There are two components that make the IR receive functionality work.  The first is the task itself, which processes commands from the Bluetooth task and saves IR timings to the SD card.&lt;br /&gt;
&lt;br /&gt;
''The receive task and capture code was modified from Preet's IR_Sensor and remoteTask classes.  This was a great starting place but needed to be modified to suit the project needs.''&lt;br /&gt;
&lt;br /&gt;
This task sleeps indefinitely until it receives a message on the mRXQueue.  If this message contains a learn command, it will attempt to take the mutex shared by the transmit task.  If it can take it, that means the system is not transmitting and it's safe to start recording timing signals.  If it can't take it, then the task will let the Bluetooth task know the system is busy and cannot learn new commands.&lt;br /&gt;
&lt;br /&gt;
However, if learning can continue, we signal the second part of the IR receive functionality.  We tell the IR_Sensor singleton class to clear any stored captures and wait until a new command is received or a timeout occurs.  Next, we retrieve the array of timings and store it on the SD card for the transmit task to use.&lt;br /&gt;
&lt;br /&gt;
The code segment and flow chart to show this behavior are shown below.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    bool remoteRXTask::run(void *p)&lt;br /&gt;
    {&lt;br /&gt;
      u0_dbg_printf(&amp;quot;Learning...\n&amp;quot; );&lt;br /&gt;
      //Receive item from queue&lt;br /&gt;
      xQueueReceive(rxQueue);&lt;br /&gt;
      //Check if it is a learn command and semaphore avaliable&lt;br /&gt;
      if ((learn_command) &amp;amp;&amp;amp; (xSemaphoreAvaliable))&lt;br /&gt;
      {&lt;br /&gt;
        //Read IR code&lt;br /&gt;
        IS.clearCode();&lt;br /&gt;
        while(!IS.isIRCodeReceived())&lt;br /&gt;
        {&lt;br /&gt;
            vTaskDelayMs(100);&lt;br /&gt;
        }&lt;br /&gt;
        uint8_t max_timings = 255;&lt;br /&gt;
        uint16_t timings[max_timings] = {0};&lt;br /&gt;
        uint16_t count;&lt;br /&gt;
        IS.getLastIRCode(timings, &amp;amp;count, max_timings);&lt;br /&gt;
        //get+store the code and send feedback here&lt;br /&gt;
        sprintf(filename,&amp;quot;1:%c.hex&amp;quot;,mMsg.button);&lt;br /&gt;
        Storage :: write(filename,(void *)&amp;amp;timings,count,0);&lt;br /&gt;
        xSemaphoreGive(mIRMutex);&lt;br /&gt;
      }&lt;br /&gt;
      else&lt;br /&gt;
      {&lt;br /&gt;
        strcpy(mMsg.msg,&amp;quot;*****Busy Transmitting***&amp;quot;);&lt;br /&gt;
        //Send item to the Bluetooth queue&lt;br /&gt;
        xQueueSend(mBtQueue,&amp;amp;mMsg,0);&lt;br /&gt;
    }&lt;br /&gt;
       return true;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_TaskFlow.png|700px|center|Flow Diagram for IR receive Task|thumb|Flow Chart : IR Receive Task]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The code below is the core of what makes the IR learning possible.  If a rising or falling edge occurs on the capture pin, then an interrupt is generated.  In this case, storeIrCode() will be called which saves the timestamps to an array.  We set a timeout of 50ms, after which decodeIrCode() is called that calculates the differences in timestamps.  These differences are the timings we will store and later transmit.  &lt;br /&gt;
&lt;br /&gt;
The 50ms timeout was chosen because some remotes have more complicated commands that include two consecutive commands.  The time between those commands was measured to be about 40ms with the tested remotes.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    #if (1 == SYS_CFG_SYS_TIMER)&lt;br /&gt;
        /* ISR for captured time of the capture input pin */&lt;br /&gt;
        if (intr_reason &amp;amp; timer_capt0_intr_ir_sensor_edge_time_captured)&lt;br /&gt;
        {&lt;br /&gt;
            gp_timer_ptr-&amp;gt;IR = timer_capt0_intr_ir_sensor_edge_time_captured;&lt;br /&gt;
            // Store the IR capture time and setup timeout of the IR signal (unless we reset it again)&lt;br /&gt;
            IS.storeIrCode(gp_timer_ptr-&amp;gt;CR0);&lt;br /&gt;
            //10k was too short of a timeout for long commands,&lt;br /&gt;
            //which sometimes have separations of up to 40ms&lt;br /&gt;
            gp_timer_ptr-&amp;gt;MR2 = 50000 + gp_timer_ptr-&amp;gt;TC;&lt;br /&gt;
        }&lt;br /&gt;
        /* MR2: End of IR capture (no IR capture after initial IR signal) */&lt;br /&gt;
        else if (intr_reason &amp;amp; timer_mr2_intr_ir_sensor_timeout)&lt;br /&gt;
        {&lt;br /&gt;
            gp_timer_ptr-&amp;gt;IR = timer_mr2_intr_ir_sensor_timeout;&lt;br /&gt;
            IS.decodeIrCode();&lt;br /&gt;
        }&lt;br /&gt;
        /* MR0 is used for the timer rollover count */&lt;br /&gt;
        else&lt;br /&gt;
    #endif&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    void IR_Sensor::storeIrCode(uint32_t value)&lt;br /&gt;
    {&lt;br /&gt;
        if (!m_ready_to_receive)&lt;br /&gt;
            return;&lt;br /&gt;
        // Just store the timestamp of this signal&lt;br /&gt;
        if(g_signal_count &amp;lt; MAX_EDGES_PER_IR_FRAME)&lt;br /&gt;
        {&lt;br /&gt;
            g_ir_edge_timings[g_signal_count++] = value;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    void IR_Sensor::decodeIrCode(void)&lt;br /&gt;
    {&lt;br /&gt;
        if (!m_ready_to_receive)&lt;br /&gt;
            return;&lt;br /&gt;
        for (int i = 0; i &amp;lt; g_signal_count-1; i++)&lt;br /&gt;
        {&lt;br /&gt;
            g_ir_cmd_timings[i] = g_ir_edge_timings[i+1]-g_ir_edge_timings[i];&lt;br /&gt;
        }&lt;br /&gt;
        m_code_received = true;&lt;br /&gt;
        m_ready_to_receive = false;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_CaptureFlow.png|500px|center|Flow Diagram for IR capture|thumb|Flow Chart : IR Capture Interrupt]]&lt;br /&gt;
&lt;br /&gt;
====IR Transmit Task:====&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The IR transmit task will be signaled by the Bluetooth task. After being signal the task will attempt to read from a file using the Storage class. If the file doesn't exist it will send an error message the terminal. If the file does exist then the task will read all the timing values into an array. The task will then enter a PortCritical area and transmit the IR signal by turning on and off the PWM pin. Once it is finished the IR Transmit task return the Mutex.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
        remoteTXTask(uint8_t priority) :scheduler_task(&amp;quot;rTX&amp;quot;, 2048, priority), pwm0(38Khz)&lt;br /&gt;
        bool run(void *p)&lt;br /&gt;
        {&lt;br /&gt;
            xQueueReceive;&lt;br /&gt;
            if ((command == send_cmd) &amp;amp;&amp;amp; xSemaphoreTakeAvailable)&lt;br /&gt;
            {&lt;br /&gt;
                u0_dbg_printf(&amp;quot;Transmitting...\n&amp;quot; );&lt;br /&gt;
                int size = readFile(mMsg.fileName);&lt;br /&gt;
                portENTER_CRITICAL();&lt;br /&gt;
                for(int i = 0; i &amp;lt; size; i++)&lt;br /&gt;
                {&lt;br /&gt;
                    if(i % 2 == 0) pwm1.set(25);&lt;br /&gt;
                    else pwm1.set(0);&lt;br /&gt;
                    delay_us(timing_values[i]);&lt;br /&gt;
                }&lt;br /&gt;
                pwm1.set(0);&lt;br /&gt;
                portEXIT_CRITICAL();&lt;br /&gt;
            }&lt;br /&gt;
            xSemaphoreGive(mIRMutex);&lt;br /&gt;
            return true;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[File:CmpE244_S15_T3_Remote_Learner_IRTask.jpg|250px|center|Flow Diagram for IR transmit Task|350px|thumb|Flow Chart : IR Transmit Task]]&lt;br /&gt;
&lt;br /&gt;
====Android Application with SJOne Board Software Design ====&lt;br /&gt;
&lt;br /&gt;
[[File:CMPE244_S15_TEAM2_Android_FlowChart.png|300px|right|thumb|Flow Chart: Android App with SJOne Board Software Design]]&lt;br /&gt;
&lt;br /&gt;
The Android application Bluetooth task is to provide the a communication link between all the tasks. The Bluetooth task would receive commands from the application, then send items to the queue with the appropriate information such as command, button number, and message from the Android application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pseudo Code:'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void BluetoothTask(void *p) {&lt;br /&gt;
  //Initialize transmit, receive and bluetooth queues&lt;br /&gt;
  bool init();&lt;br /&gt;
  bool run()&lt;br /&gt;
  {&lt;br /&gt;
     //Get command from Android app&lt;br /&gt;
     uart3.gets();&lt;br /&gt;
     //Check if it is a transmit or learn command&lt;br /&gt;
     checkCommand();&lt;br /&gt;
     //Send item to the appropriate queue&lt;br /&gt;
     xQueueSend();&lt;br /&gt;
     //Sleep to reduce CPU usage&lt;br /&gt;
     vTaskDelay(10);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Learner Android App ===&lt;br /&gt;
The software development environment for the Remote Learner android application is Android Studio 1.2.1.1. &lt;br /&gt;
&lt;br /&gt;
[[File:CMPE244_S15_TEAM2_Android_AndroidStudio.png|900px|center|thumb|Android App: Development Envirnoment]]&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:1200px;&amp;quot; |&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Unconnected.png|350px|left|thumb|Android App: Starting Screen]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_DeviceList.png|350px|left|thumb|Android App: Bluetooth Device List]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Connecting.png|350px|left|thumb|Android App: Connecting to Bluetooth Device]]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:1200px;&amp;quot; |&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Connected.png|350px|left|thumb|Android App: Bluetooth Device Connected]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Learned.png|350px|left|thumb|Android App: Button Learned]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_LearnFailed.png|350px|left|thumb|Android App: Button Learn Failed]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&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;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Issue #1 ===&lt;br /&gt;
'''PROBLEM:'''&lt;br /&gt;
&lt;br /&gt;
IR transmission signal was not being received by IR receiver. &lt;br /&gt;
&lt;br /&gt;
'''RESOLUTION:'''&lt;br /&gt;
&lt;br /&gt;
Used Oscilloscope to discover that PWM instance set to 38,000 Hz did not produce a 38 kHz. Had to adjust the value to about 3205 Hz to get a PWM signal that was about 38Khz. &lt;br /&gt;
&lt;br /&gt;
'''FUTURE RECOMMENDATIONS:'''&lt;br /&gt;
&lt;br /&gt;
Examine PWM code and determine if there is a way to enter the fequency in Khz.&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Issue #2 ===&lt;br /&gt;
'''PROBLEM:'''&lt;br /&gt;
&lt;br /&gt;
Putting IR transmission signal  in task was causing IR signal not to be received because task was being interrupted. &lt;br /&gt;
&lt;br /&gt;
'''RESOLUTION:'''&lt;br /&gt;
&lt;br /&gt;
Placed time sensitive code in a Port Critical section to prevent that section of code being interrupted.&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Testing ===&lt;br /&gt;
To test the IR transmitter we first used an oscilloscope to capture a IR signal from a remote control. After capturing the signal we determined the protocol. To replicate the signal we created an array with the timing values. The array values that were even index values represented the timing for the IR led to toggle on. The odd values represent the timing values that the IR LED need to be off. Using a for loop, we send the signal and tested using an oscilloscope first. After determining that the signal was similar to the capture, we tested with a few devices. The first device was an Apple remote to turn the volume up. Afterward we tested a different device using a different protocol. We were able to figure channel up/down and volume up/down and control a Sharp TV. The final test for integration was to control an LG TV. See demo video of the device controlling LG TV.&lt;br /&gt;
&lt;br /&gt;
=== Android App Testing ===&lt;br /&gt;
This section is for android app testing.&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;
=== 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_SJSU_S2015/ 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;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=15186</id>
		<title>S15: Remote Learner</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=15186"/>
				<updated>2015-05-24T18:38:06Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: /* PWM to IR Transmitter LED: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Remote Learner ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
The objective of this project was to create a remote learner using the SJOne board. The Remote Learner would have the ability to be learn any buttons of any remote controller then controlled by an Android application using Bluetooth. The application would tell the SJOne board to learn a remote control button using the onboard IR receiver sensor. Once the button was learned, then the SJOne board notifys the Android application and allows the application to replicate the button functionality using our own IR transmitter.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction == &lt;br /&gt;
Project Remote Learner is to have the ability to learn button functionalities from multiple remotes, and then control devices via an Android application. The objects for the remote learner are as the following:&lt;br /&gt;
* To create an Android application that will communicate with SJOne board using Bluetooth and UART&lt;br /&gt;
* To create a task that will be signal by the Android application to learn the IR timing using the on-board IR receiver. &lt;br /&gt;
** Task will then send a message to Android application through a Queue to indicate if it was able to successfully capture and write the timing values to a file to Flash memory&lt;br /&gt;
* To create a task that will receive a signal to transmit the IR timing values from Flash memory. This task will use the PWM library and delay function to turn on and off the IR LED&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Ying (Bailey) Wu - Android App and BT I/F&lt;br /&gt;
*  Yoni Klein - IR RX and IR Learning&lt;br /&gt;
*  Tejeswar - IR Protocol&lt;br /&gt;
*  Christopher Laurence - IR TX and IR learning&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
=== Remote Learner ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1-2&lt;br /&gt;
|3/27/2015&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|Research about the basic of remote controller protocols&lt;br /&gt;
|Completed&lt;br /&gt;
|3/10/15&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|Research about transmit timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
Research about receive timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
|Completed&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|Accurately decode IR signals from a remote control&lt;br /&gt;
Accurately transmit IR signals to a device &lt;br /&gt;
|Completed&lt;br /&gt;
|5/2/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|Interface BT module and establish communication with the Android phone&lt;br /&gt;
Decide on a communication protocol between phone and board.&lt;br /&gt;
|Completed&lt;br /&gt;
|05/22/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6-7&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|Research and add additional protocol support&lt;br /&gt;
|Completed&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|5/22/2015&lt;br /&gt;
|Final integration and testing.&lt;br /&gt;
|Completed&lt;br /&gt;
|05/23/2015&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Android Application ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|4/6/2015&lt;br /&gt;
|4/13/2015&lt;br /&gt;
|Research about Android application development&lt;br /&gt;
Research about Bluetooth module implementation with SJOne board&lt;br /&gt;
|Completed&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4/13/2015&lt;br /&gt;
|4/20/2015&lt;br /&gt;
|Implement and design a basic Android application on Android Studio&lt;br /&gt;
Implement the Bluetooth module using UART&lt;br /&gt;
|Completed&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/20/2015&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|Continue development of the Android application&lt;br /&gt;
Establish a connection between the SJOne board and Android application through Bluetooth &lt;br /&gt;
|Completed&lt;br /&gt;
|5/04/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|5/4/2015&lt;br /&gt;
|Collaborate with team members to integrate the Android application and remote learner functions &lt;br /&gt;
|Completed&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|5/4/2015&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|Debug and troubleshoot any issues that may arise&lt;br /&gt;
|Completed&lt;br /&gt;
|5/23/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|5/18/2015&lt;br /&gt;
|Miscellaneous&lt;br /&gt;
|Completed&lt;br /&gt;
|5/23/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
Give a simple list of the cost of your project broken down by components.  Do not write long stories here.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Line Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Number&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost ($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 120 Resistor&lt;br /&gt;
| Anchor Electronic&lt;br /&gt;
| N/A&lt;br /&gt;
| 10&lt;br /&gt;
| 1.00&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| IR LED 1.5 V 40mA&lt;br /&gt;
| Anchor Electronic&lt;br /&gt;
| N/A&lt;br /&gt;
| 4&lt;br /&gt;
| 1.00&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| HC-06 Bluetooth Module&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| 1&lt;br /&gt;
| 9.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| SJOne&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| 1&lt;br /&gt;
| 80.00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
====Transmit IR LED====&lt;br /&gt;
The IR LED transmitter is a simple circuit that connects to a PWM pin that is set to toggle at 38 Khz. The circuit needs a resister to create the voltage drop for the IR LED.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:CmpE244_S15_T3_Remote_Learner_IR LED Circuit.png|600px|centre|thumb|IR LED circuit]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Receive IR LED====&lt;br /&gt;
The IR receiver is already part of the SJOne board.  On our revision 4 board, this is the TSOP75238TR IR Receiver Module by Vishay Semiconductors.  Other revision boards may have a slightly different part, but the operation and concepts are the same.&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver.png|400px|centre|thumb|IR Receiver Circuit]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The basic circuit is relatively simple.  Along with power and ground, an output signal is connected to two different parts of the board.&lt;br /&gt;
&lt;br /&gt;
The first connection is made to P1[18] on the LPC controller.  This GPIO pin will be configured to use the capture feature of the boards timer in order to &amp;quot;capture&amp;quot; the time a rising or falling signal event occurs.  This pin is labeled as &amp;quot;IR_DATA&amp;quot; on the board schematic and the associated GPIO function is referred to as CAP1[0] in the user manual.&lt;br /&gt;
The operation of the capture pin is described in the Hardware Interface section below.&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_LPC_Input.png|600px|centre|thumb|IR_DATA connection to CAP1[0]]]&lt;br /&gt;
&lt;br /&gt;
The second connection is to an external pin referenced in section 6D on page 3 of the board schematic.  This is mainly used for debugging and validating captured data on an oscilloscope.  Thanks Preet for adding this!  Both of these connections are displayed in the images below.&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_Test_Pin.png|365px|centre|thumb|External Pin]]&lt;br /&gt;
&lt;br /&gt;
====Android Application with SJOne Board Hardware Design ====&lt;br /&gt;
The Android application hardware design consists of the Bluetooth module (HC-06) and SJOne board. The communication link is established using the SJOne board UART3 Tx and Rx Pins.&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;
====PWM to IR Transmitter LED====&lt;br /&gt;
The PWM was used to generate the 38 Khz by creating an instance of PWM class. Then using the predefined function of &amp;quot;pwm.set&amp;quot; to toggle the pin at a duty cycle of about 25% and after certain amount of time we set the duty cycle to 0. Below is the standard behavior for NEC IR protocol explaining the amount of time that the PWM pin needs to toggle and time required to be off.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Protocol&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| On(µs)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Off(µs)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Total(µs)&lt;br /&gt;
|-&lt;br /&gt;
! Start&lt;br /&gt;
| 9000&lt;br /&gt;
| 4500&lt;br /&gt;
| 13500&lt;br /&gt;
|-&lt;br /&gt;
! 0 bit&lt;br /&gt;
| 560&lt;br /&gt;
| 560 &lt;br /&gt;
| 1120&lt;br /&gt;
|-&lt;br /&gt;
! 1 bit&lt;br /&gt;
| 560&lt;br /&gt;
| 1690 &lt;br /&gt;
| 2250&lt;br /&gt;
|-&lt;br /&gt;
! End&lt;br /&gt;
| 560&lt;br /&gt;
| N/A&lt;br /&gt;
| 560&lt;br /&gt;
|}&lt;br /&gt;
  &lt;br /&gt;
[[File:CmpE244_S15_T3_Remote_Learner_NEC_IR.JPG|600px|centre|thumb|In the above image is a capture of a NEC IR transmission using an oscilloscope.]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====IR Receiver to Capture Pin:====&lt;br /&gt;
The IR receiver outputs a logic one (high, 3.3v) signal when idle.  When active, the signal drops to a logic zero (low, 0v).  Therefore, the signal is active low, which may actually be inverted relative to the transmitted signal.  The images below show two examples of transmitted signals and receiver output.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:1200px;&amp;quot; |&lt;br /&gt;
|[[File:S15_244_RemoteLearner_IR_Receiver_Waveform1.png|400px|center|thumb|IR receiver output given typical pulse input signal]]&lt;br /&gt;
|[[File:S15_244_RemoteLearner_IR_Receiver_Waveform2.png|400px|center|thumb|IR receiver output given pulse burst input signal]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These images are from the IR receiver data sheet included in the development package of the SJOne board.  However, you can find it on Vishay's website as well.  This signal is physically connected to one of the capture pins on the LPC microcontroller.  In our example, the board is designed to take this input on P1[18] using CAP1[0].&lt;br /&gt;
&lt;br /&gt;
The capture feature is associated with one of the boards timers.  In our case, this is timer 1 (hence CAP1).  The [0] indicates port 0.  Timer 1 is used by the development package, so it should already be started for us.  All we need to do is configure the Capture Control Register to generate an input on both rising and falling edges.&lt;br /&gt;
&lt;br /&gt;
When this interrupt occurs, we get a tick count.  We don't need to know the time exactly, just the difference in times between captures.  Since the IR receiver idles high, we know the first interrupt will be for a falling edge.  We can perform the calculations according to this assumption.&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;
====IR Receive Task====&lt;br /&gt;
&lt;br /&gt;
There are two components that make the IR receive functionality work.  The first is the task itself, which processes commands from the Bluetooth task and saves IR timings to the SD card.&lt;br /&gt;
&lt;br /&gt;
''The receive task and capture code was modified from Preet's IR_Sensor and remoteTask classes.  This was a great starting place but needed to be modified to suit the project needs.''&lt;br /&gt;
&lt;br /&gt;
This task sleeps indefinitely until it receives a message on the mRXQueue.  If this message contains a learn command, it will attempt to take the mutex shared by the transmit task.  If it can take it, that means the system is not transmitting and it's safe to start recording timing signals.  If it can't take it, then the task will let the Bluetooth task know the system is busy and cannot learn new commands.&lt;br /&gt;
&lt;br /&gt;
However, if learning can continue, we signal the second part of the IR receive functionality.  We tell the IR_Sensor singleton class to clear any stored captures and wait until a new command is received or a timeout occurs.  Next, we retrieve the array of timings and store it on the SD card for the transmit task to use.&lt;br /&gt;
&lt;br /&gt;
The code segment and flow chart to show this behavior are shown below.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    bool remoteRXTask::run(void *p)&lt;br /&gt;
    {&lt;br /&gt;
      u0_dbg_printf(&amp;quot;Learning...\n&amp;quot; );&lt;br /&gt;
      //Receive item from queue&lt;br /&gt;
      xQueueReceive(rxQueue);&lt;br /&gt;
      //Check if it is a learn command and semaphore avaliable&lt;br /&gt;
      if ((learn_command) &amp;amp;&amp;amp; (xSemaphoreAvaliable))&lt;br /&gt;
      {&lt;br /&gt;
        //Read IR code&lt;br /&gt;
        IS.clearCode();&lt;br /&gt;
        while(!IS.isIRCodeReceived())&lt;br /&gt;
        {&lt;br /&gt;
            vTaskDelayMs(100);&lt;br /&gt;
        }&lt;br /&gt;
        uint8_t max_timings = 255;&lt;br /&gt;
        uint16_t timings[max_timings] = {0};&lt;br /&gt;
        uint16_t count;&lt;br /&gt;
        IS.getLastIRCode(timings, &amp;amp;count, max_timings);&lt;br /&gt;
        //get+store the code and send feedback here&lt;br /&gt;
        sprintf(filename,&amp;quot;1:%c.hex&amp;quot;,mMsg.button);&lt;br /&gt;
        Storage :: write(filename,(void *)&amp;amp;timings,count,0);&lt;br /&gt;
        xSemaphoreGive(mIRMutex);&lt;br /&gt;
      }&lt;br /&gt;
      else&lt;br /&gt;
      {&lt;br /&gt;
        strcpy(mMsg.msg,&amp;quot;*****Busy Transmitting***&amp;quot;);&lt;br /&gt;
        //Send item to the Bluetooth queue&lt;br /&gt;
        xQueueSend(mBtQueue,&amp;amp;mMsg,0);&lt;br /&gt;
    }&lt;br /&gt;
       return true;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_TaskFlow.png|700px|center|Flow Diagram for IR receive Task|thumb|Flow Chart : IR Receive Task]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The code below is the core of what makes the IR learning possible.  If a rising or falling edge occurs on the capture pin, then an interrupt is generated.  In this case, storeIrCode() will be called which saves the timestamps to an array.  We set a timeout of 50ms, after which decodeIrCode() is called that calculates the differences in timestamps.  These differences are the timings we will store and later transmit.  &lt;br /&gt;
&lt;br /&gt;
The 50ms timeout was chosen because some remotes have more complicated commands that include two consecutive commands.  The time between those commands was measured to be about 40ms with the tested remotes.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    #if (1 == SYS_CFG_SYS_TIMER)&lt;br /&gt;
        /* ISR for captured time of the capture input pin */&lt;br /&gt;
        if (intr_reason &amp;amp; timer_capt0_intr_ir_sensor_edge_time_captured)&lt;br /&gt;
        {&lt;br /&gt;
            gp_timer_ptr-&amp;gt;IR = timer_capt0_intr_ir_sensor_edge_time_captured;&lt;br /&gt;
            // Store the IR capture time and setup timeout of the IR signal (unless we reset it again)&lt;br /&gt;
            IS.storeIrCode(gp_timer_ptr-&amp;gt;CR0);&lt;br /&gt;
            //10k was too short of a timeout for long commands,&lt;br /&gt;
            //which sometimes have separations of up to 40ms&lt;br /&gt;
            gp_timer_ptr-&amp;gt;MR2 = 50000 + gp_timer_ptr-&amp;gt;TC;&lt;br /&gt;
        }&lt;br /&gt;
        /* MR2: End of IR capture (no IR capture after initial IR signal) */&lt;br /&gt;
        else if (intr_reason &amp;amp; timer_mr2_intr_ir_sensor_timeout)&lt;br /&gt;
        {&lt;br /&gt;
            gp_timer_ptr-&amp;gt;IR = timer_mr2_intr_ir_sensor_timeout;&lt;br /&gt;
            IS.decodeIrCode();&lt;br /&gt;
        }&lt;br /&gt;
        /* MR0 is used for the timer rollover count */&lt;br /&gt;
        else&lt;br /&gt;
    #endif&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    void IR_Sensor::storeIrCode(uint32_t value)&lt;br /&gt;
    {&lt;br /&gt;
        if (!m_ready_to_receive)&lt;br /&gt;
            return;&lt;br /&gt;
        // Just store the timestamp of this signal&lt;br /&gt;
        if(g_signal_count &amp;lt; MAX_EDGES_PER_IR_FRAME)&lt;br /&gt;
        {&lt;br /&gt;
            g_ir_edge_timings[g_signal_count++] = value;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    void IR_Sensor::decodeIrCode(void)&lt;br /&gt;
    {&lt;br /&gt;
        if (!m_ready_to_receive)&lt;br /&gt;
            return;&lt;br /&gt;
        for (int i = 0; i &amp;lt; g_signal_count-1; i++)&lt;br /&gt;
        {&lt;br /&gt;
            g_ir_cmd_timings[i] = g_ir_edge_timings[i+1]-g_ir_edge_timings[i];&lt;br /&gt;
        }&lt;br /&gt;
        m_code_received = true;&lt;br /&gt;
        m_ready_to_receive = false;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_CaptureFlow.png|500px|center|Flow Diagram for IR capture|thumb|Flow Chart : IR Capture Interrupt]]&lt;br /&gt;
&lt;br /&gt;
====IR Transmit Task:====&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The IR transmit task will be signaled by the Bluetooth task. After being signal the task will attempt to read from a file using the Storage class. If the file doesn't exist it will send an error message the terminal. If the file does exist then the task will read all the timing values into an array. The task will then enter a PortCritical area and transmit the IR signal by turning on and off the PWM pin. Once it is finished the IR Transmit task return the Mutex.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
        remoteTXTask(uint8_t priority) :scheduler_task(&amp;quot;rTX&amp;quot;, 2048, priority), pwm0(38Khz)&lt;br /&gt;
        bool run(void *p)&lt;br /&gt;
        {&lt;br /&gt;
            xQueueReceive;&lt;br /&gt;
            if ((command == send_cmd) &amp;amp;&amp;amp; xSemaphoreTakeAvailable)&lt;br /&gt;
            {&lt;br /&gt;
                u0_dbg_printf(&amp;quot;Transmitting...\n&amp;quot; );&lt;br /&gt;
                int size = readFile(mMsg.fileName);&lt;br /&gt;
                portENTER_CRITICAL();&lt;br /&gt;
                for(int i = 0; i &amp;lt; size; i++)&lt;br /&gt;
                {&lt;br /&gt;
                    if(i % 2 == 0) pwm1.set(25);&lt;br /&gt;
                    else pwm1.set(0);&lt;br /&gt;
                    delay_us(timing_values[i]);&lt;br /&gt;
                }&lt;br /&gt;
                pwm1.set(0);&lt;br /&gt;
                portEXIT_CRITICAL();&lt;br /&gt;
            }&lt;br /&gt;
            xSemaphoreGive(mIRMutex);&lt;br /&gt;
            return true;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[File:CmpE244_S15_T3_Remote_Learner_IRTask.jpg|250px|center|Flow Diagram for IR transmit Task|350px|thumb|Flow Chart : IR Transmit Task]]&lt;br /&gt;
&lt;br /&gt;
====Android Application with SJOne Board Software Design ====&lt;br /&gt;
&lt;br /&gt;
[[File:CMPE244_S15_TEAM2_Android_FlowChart.png|300px|right|thumb|Flow Chart: Android App with SJOne Board Software Design]]&lt;br /&gt;
&lt;br /&gt;
The Android application Bluetooth task is to provide the a communication link between all the tasks. The Bluetooth task would receive commands from the application, then send items to the queue with the appropriate information such as command, button number, and message from the Android application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pseudo Code:'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void BluetoothTask(void *p) {&lt;br /&gt;
  //Initialize transmit, receive and bluetooth queues&lt;br /&gt;
  bool init();&lt;br /&gt;
  bool run()&lt;br /&gt;
  {&lt;br /&gt;
     //Get command from Android app&lt;br /&gt;
     uart3.gets();&lt;br /&gt;
     //Check if it is a transmit or learn command&lt;br /&gt;
     checkCommand();&lt;br /&gt;
     //Send item to the appropriate queue&lt;br /&gt;
     xQueueSend();&lt;br /&gt;
     //Sleep to reduce CPU usage&lt;br /&gt;
     vTaskDelay(10);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Learner Android App ===&lt;br /&gt;
The software development environment for the Remote Learner android application is Android Studio 1.2.1.1. &lt;br /&gt;
&lt;br /&gt;
[[File:CMPE244_S15_TEAM2_Android_AndroidStudio.png|900px|center|thumb|Android App: Development Envirnoment]]&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:1200px;&amp;quot; |&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Unconnected.png|350px|left|thumb|Android App: Starting Screen]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_DeviceList.png|350px|left|thumb|Android App: Bluetooth Device List]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Connecting.png|350px|left|thumb|Android App: Connecting to Bluetooth Device]]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:1200px;&amp;quot; |&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Connected.png|350px|left|thumb|Android App: Bluetooth Device Connected]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Learned.png|350px|left|thumb|Android App: Button Learned]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_LearnFailed.png|350px|left|thumb|Android App: Button Learn Failed]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&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;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Issue #1 ===&lt;br /&gt;
'''PROBLEM:'''&lt;br /&gt;
&lt;br /&gt;
IR transmission signal was not being received by IR receiver. &lt;br /&gt;
&lt;br /&gt;
'''RESOLUTION:'''&lt;br /&gt;
&lt;br /&gt;
Used Oscilloscope to discover that PWM instance set to 38,000 Hz did not produce a 38 kHz. Had to adjust the value to about 3205 Hz to get a PWM signal that was about 38Khz. &lt;br /&gt;
&lt;br /&gt;
'''FUTURE RECOMMENDATIONS:'''&lt;br /&gt;
&lt;br /&gt;
Examine PWM code and determine if there is a way to enter the fequency in Khz.&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Issue #2 ===&lt;br /&gt;
'''PROBLEM:'''&lt;br /&gt;
&lt;br /&gt;
Putting IR transmission signal  in task was causing IR signal not to be received because task was being interrupted. &lt;br /&gt;
&lt;br /&gt;
'''RESOLUTION:'''&lt;br /&gt;
&lt;br /&gt;
Placed time sensitive code in a Port Critical section to prevent that section of code being interrupted.&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Testing ===&lt;br /&gt;
To test the IR transmitter we first used an oscilloscope to capture a IR signal from a remote control. After capturing the signal we determined the protocol. To replicate the signal we created an array with the timing values. The array values that were even index values represented the timing for the IR led to toggle on. The odd values represent the timing values that the IR LED need to be off. Using a for loop, we send the signal and tested using an oscilloscope first. After determining that the signal was similar to the capture, we tested with a few devices. The first device was an Apple remote to turn the volume up. Afterward we tested a different device using a different protocol. We were able to figure channel up/down and volume up/down and control a Sharp TV. The final test for integration was to control an LG TV. See demo video of the device controlling LG TV.&lt;br /&gt;
&lt;br /&gt;
=== Android App Testing ===&lt;br /&gt;
This section is for android app testing.&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;
=== 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_SJSU_S2015/ 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;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=15184</id>
		<title>S15: Remote Learner</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=15184"/>
				<updated>2015-05-24T18:37:57Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: /* Transmit IR LED: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Remote Learner ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
The objective of this project was to create a remote learner using the SJOne board. The Remote Learner would have the ability to be learn any buttons of any remote controller then controlled by an Android application using Bluetooth. The application would tell the SJOne board to learn a remote control button using the onboard IR receiver sensor. Once the button was learned, then the SJOne board notifys the Android application and allows the application to replicate the button functionality using our own IR transmitter.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction == &lt;br /&gt;
Project Remote Learner is to have the ability to learn button functionalities from multiple remotes, and then control devices via an Android application. The objects for the remote learner are as the following:&lt;br /&gt;
* To create an Android application that will communicate with SJOne board using Bluetooth and UART&lt;br /&gt;
* To create a task that will be signal by the Android application to learn the IR timing using the on-board IR receiver. &lt;br /&gt;
** Task will then send a message to Android application through a Queue to indicate if it was able to successfully capture and write the timing values to a file to Flash memory&lt;br /&gt;
* To create a task that will receive a signal to transmit the IR timing values from Flash memory. This task will use the PWM library and delay function to turn on and off the IR LED&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Ying (Bailey) Wu - Android App and BT I/F&lt;br /&gt;
*  Yoni Klein - IR RX and IR Learning&lt;br /&gt;
*  Tejeswar - IR Protocol&lt;br /&gt;
*  Christopher Laurence - IR TX and IR learning&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
=== Remote Learner ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1-2&lt;br /&gt;
|3/27/2015&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|Research about the basic of remote controller protocols&lt;br /&gt;
|Completed&lt;br /&gt;
|3/10/15&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|Research about transmit timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
Research about receive timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
|Completed&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|Accurately decode IR signals from a remote control&lt;br /&gt;
Accurately transmit IR signals to a device &lt;br /&gt;
|Completed&lt;br /&gt;
|5/2/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|Interface BT module and establish communication with the Android phone&lt;br /&gt;
Decide on a communication protocol between phone and board.&lt;br /&gt;
|Completed&lt;br /&gt;
|05/22/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6-7&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|Research and add additional protocol support&lt;br /&gt;
|Completed&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|5/22/2015&lt;br /&gt;
|Final integration and testing.&lt;br /&gt;
|Completed&lt;br /&gt;
|05/23/2015&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Android Application ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|4/6/2015&lt;br /&gt;
|4/13/2015&lt;br /&gt;
|Research about Android application development&lt;br /&gt;
Research about Bluetooth module implementation with SJOne board&lt;br /&gt;
|Completed&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4/13/2015&lt;br /&gt;
|4/20/2015&lt;br /&gt;
|Implement and design a basic Android application on Android Studio&lt;br /&gt;
Implement the Bluetooth module using UART&lt;br /&gt;
|Completed&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/20/2015&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|Continue development of the Android application&lt;br /&gt;
Establish a connection between the SJOne board and Android application through Bluetooth &lt;br /&gt;
|Completed&lt;br /&gt;
|5/04/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|5/4/2015&lt;br /&gt;
|Collaborate with team members to integrate the Android application and remote learner functions &lt;br /&gt;
|Completed&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|5/4/2015&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|Debug and troubleshoot any issues that may arise&lt;br /&gt;
|Completed&lt;br /&gt;
|5/23/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|5/18/2015&lt;br /&gt;
|Miscellaneous&lt;br /&gt;
|Completed&lt;br /&gt;
|5/23/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
Give a simple list of the cost of your project broken down by components.  Do not write long stories here.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Line Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Number&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost ($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 120 Resistor&lt;br /&gt;
| Anchor Electronic&lt;br /&gt;
| N/A&lt;br /&gt;
| 10&lt;br /&gt;
| 1.00&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| IR LED 1.5 V 40mA&lt;br /&gt;
| Anchor Electronic&lt;br /&gt;
| N/A&lt;br /&gt;
| 4&lt;br /&gt;
| 1.00&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| HC-06 Bluetooth Module&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| 1&lt;br /&gt;
| 9.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| SJOne&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| 1&lt;br /&gt;
| 80.00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
====Transmit IR LED====&lt;br /&gt;
The IR LED transmitter is a simple circuit that connects to a PWM pin that is set to toggle at 38 Khz. The circuit needs a resister to create the voltage drop for the IR LED.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:CmpE244_S15_T3_Remote_Learner_IR LED Circuit.png|600px|centre|thumb|IR LED circuit]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Receive IR LED====&lt;br /&gt;
The IR receiver is already part of the SJOne board.  On our revision 4 board, this is the TSOP75238TR IR Receiver Module by Vishay Semiconductors.  Other revision boards may have a slightly different part, but the operation and concepts are the same.&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver.png|400px|centre|thumb|IR Receiver Circuit]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The basic circuit is relatively simple.  Along with power and ground, an output signal is connected to two different parts of the board.&lt;br /&gt;
&lt;br /&gt;
The first connection is made to P1[18] on the LPC controller.  This GPIO pin will be configured to use the capture feature of the boards timer in order to &amp;quot;capture&amp;quot; the time a rising or falling signal event occurs.  This pin is labeled as &amp;quot;IR_DATA&amp;quot; on the board schematic and the associated GPIO function is referred to as CAP1[0] in the user manual.&lt;br /&gt;
The operation of the capture pin is described in the Hardware Interface section below.&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_LPC_Input.png|600px|centre|thumb|IR_DATA connection to CAP1[0]]]&lt;br /&gt;
&lt;br /&gt;
The second connection is to an external pin referenced in section 6D on page 3 of the board schematic.  This is mainly used for debugging and validating captured data on an oscilloscope.  Thanks Preet for adding this!  Both of these connections are displayed in the images below.&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_Test_Pin.png|365px|centre|thumb|External Pin]]&lt;br /&gt;
&lt;br /&gt;
====Android Application with SJOne Board Hardware Design ====&lt;br /&gt;
The Android application hardware design consists of the Bluetooth module (HC-06) and SJOne board. The communication link is established using the SJOne board UART3 Tx and Rx Pins.&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;
====PWM to IR Transmitter LED:====&lt;br /&gt;
The PWM was used to generate the 38 Khz by creating an instance of PWM class. Then using the predefined function of &amp;quot;pwm.set&amp;quot; to toggle the pin at a duty cycle of about 25% and after certain amount of time we set the duty cycle to 0. Below is the standard behavior for NEC IR protocol explaining the amount of time that the PWM pin needs to toggle and time required to be off.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Protocol&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| On(µs)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Off(µs)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Total(µs)&lt;br /&gt;
|-&lt;br /&gt;
! Start&lt;br /&gt;
| 9000&lt;br /&gt;
| 4500&lt;br /&gt;
| 13500&lt;br /&gt;
|-&lt;br /&gt;
! 0 bit&lt;br /&gt;
| 560&lt;br /&gt;
| 560 &lt;br /&gt;
| 1120&lt;br /&gt;
|-&lt;br /&gt;
! 1 bit&lt;br /&gt;
| 560&lt;br /&gt;
| 1690 &lt;br /&gt;
| 2250&lt;br /&gt;
|-&lt;br /&gt;
! End&lt;br /&gt;
| 560&lt;br /&gt;
| N/A&lt;br /&gt;
| 560&lt;br /&gt;
|}&lt;br /&gt;
  &lt;br /&gt;
[[File:CmpE244_S15_T3_Remote_Learner_NEC_IR.JPG|600px|centre|thumb|In the above image is a capture of a NEC IR transmission using an oscilloscope.]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====IR Receiver to Capture Pin:====&lt;br /&gt;
The IR receiver outputs a logic one (high, 3.3v) signal when idle.  When active, the signal drops to a logic zero (low, 0v).  Therefore, the signal is active low, which may actually be inverted relative to the transmitted signal.  The images below show two examples of transmitted signals and receiver output.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:1200px;&amp;quot; |&lt;br /&gt;
|[[File:S15_244_RemoteLearner_IR_Receiver_Waveform1.png|400px|center|thumb|IR receiver output given typical pulse input signal]]&lt;br /&gt;
|[[File:S15_244_RemoteLearner_IR_Receiver_Waveform2.png|400px|center|thumb|IR receiver output given pulse burst input signal]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These images are from the IR receiver data sheet included in the development package of the SJOne board.  However, you can find it on Vishay's website as well.  This signal is physically connected to one of the capture pins on the LPC microcontroller.  In our example, the board is designed to take this input on P1[18] using CAP1[0].&lt;br /&gt;
&lt;br /&gt;
The capture feature is associated with one of the boards timers.  In our case, this is timer 1 (hence CAP1).  The [0] indicates port 0.  Timer 1 is used by the development package, so it should already be started for us.  All we need to do is configure the Capture Control Register to generate an input on both rising and falling edges.&lt;br /&gt;
&lt;br /&gt;
When this interrupt occurs, we get a tick count.  We don't need to know the time exactly, just the difference in times between captures.  Since the IR receiver idles high, we know the first interrupt will be for a falling edge.  We can perform the calculations according to this assumption.&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;
====IR Receive Task====&lt;br /&gt;
&lt;br /&gt;
There are two components that make the IR receive functionality work.  The first is the task itself, which processes commands from the Bluetooth task and saves IR timings to the SD card.&lt;br /&gt;
&lt;br /&gt;
''The receive task and capture code was modified from Preet's IR_Sensor and remoteTask classes.  This was a great starting place but needed to be modified to suit the project needs.''&lt;br /&gt;
&lt;br /&gt;
This task sleeps indefinitely until it receives a message on the mRXQueue.  If this message contains a learn command, it will attempt to take the mutex shared by the transmit task.  If it can take it, that means the system is not transmitting and it's safe to start recording timing signals.  If it can't take it, then the task will let the Bluetooth task know the system is busy and cannot learn new commands.&lt;br /&gt;
&lt;br /&gt;
However, if learning can continue, we signal the second part of the IR receive functionality.  We tell the IR_Sensor singleton class to clear any stored captures and wait until a new command is received or a timeout occurs.  Next, we retrieve the array of timings and store it on the SD card for the transmit task to use.&lt;br /&gt;
&lt;br /&gt;
The code segment and flow chart to show this behavior are shown below.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    bool remoteRXTask::run(void *p)&lt;br /&gt;
    {&lt;br /&gt;
      u0_dbg_printf(&amp;quot;Learning...\n&amp;quot; );&lt;br /&gt;
      //Receive item from queue&lt;br /&gt;
      xQueueReceive(rxQueue);&lt;br /&gt;
      //Check if it is a learn command and semaphore avaliable&lt;br /&gt;
      if ((learn_command) &amp;amp;&amp;amp; (xSemaphoreAvaliable))&lt;br /&gt;
      {&lt;br /&gt;
        //Read IR code&lt;br /&gt;
        IS.clearCode();&lt;br /&gt;
        while(!IS.isIRCodeReceived())&lt;br /&gt;
        {&lt;br /&gt;
            vTaskDelayMs(100);&lt;br /&gt;
        }&lt;br /&gt;
        uint8_t max_timings = 255;&lt;br /&gt;
        uint16_t timings[max_timings] = {0};&lt;br /&gt;
        uint16_t count;&lt;br /&gt;
        IS.getLastIRCode(timings, &amp;amp;count, max_timings);&lt;br /&gt;
        //get+store the code and send feedback here&lt;br /&gt;
        sprintf(filename,&amp;quot;1:%c.hex&amp;quot;,mMsg.button);&lt;br /&gt;
        Storage :: write(filename,(void *)&amp;amp;timings,count,0);&lt;br /&gt;
        xSemaphoreGive(mIRMutex);&lt;br /&gt;
      }&lt;br /&gt;
      else&lt;br /&gt;
      {&lt;br /&gt;
        strcpy(mMsg.msg,&amp;quot;*****Busy Transmitting***&amp;quot;);&lt;br /&gt;
        //Send item to the Bluetooth queue&lt;br /&gt;
        xQueueSend(mBtQueue,&amp;amp;mMsg,0);&lt;br /&gt;
    }&lt;br /&gt;
       return true;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_TaskFlow.png|700px|center|Flow Diagram for IR receive Task|thumb|Flow Chart : IR Receive Task]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The code below is the core of what makes the IR learning possible.  If a rising or falling edge occurs on the capture pin, then an interrupt is generated.  In this case, storeIrCode() will be called which saves the timestamps to an array.  We set a timeout of 50ms, after which decodeIrCode() is called that calculates the differences in timestamps.  These differences are the timings we will store and later transmit.  &lt;br /&gt;
&lt;br /&gt;
The 50ms timeout was chosen because some remotes have more complicated commands that include two consecutive commands.  The time between those commands was measured to be about 40ms with the tested remotes.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    #if (1 == SYS_CFG_SYS_TIMER)&lt;br /&gt;
        /* ISR for captured time of the capture input pin */&lt;br /&gt;
        if (intr_reason &amp;amp; timer_capt0_intr_ir_sensor_edge_time_captured)&lt;br /&gt;
        {&lt;br /&gt;
            gp_timer_ptr-&amp;gt;IR = timer_capt0_intr_ir_sensor_edge_time_captured;&lt;br /&gt;
            // Store the IR capture time and setup timeout of the IR signal (unless we reset it again)&lt;br /&gt;
            IS.storeIrCode(gp_timer_ptr-&amp;gt;CR0);&lt;br /&gt;
            //10k was too short of a timeout for long commands,&lt;br /&gt;
            //which sometimes have separations of up to 40ms&lt;br /&gt;
            gp_timer_ptr-&amp;gt;MR2 = 50000 + gp_timer_ptr-&amp;gt;TC;&lt;br /&gt;
        }&lt;br /&gt;
        /* MR2: End of IR capture (no IR capture after initial IR signal) */&lt;br /&gt;
        else if (intr_reason &amp;amp; timer_mr2_intr_ir_sensor_timeout)&lt;br /&gt;
        {&lt;br /&gt;
            gp_timer_ptr-&amp;gt;IR = timer_mr2_intr_ir_sensor_timeout;&lt;br /&gt;
            IS.decodeIrCode();&lt;br /&gt;
        }&lt;br /&gt;
        /* MR0 is used for the timer rollover count */&lt;br /&gt;
        else&lt;br /&gt;
    #endif&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    void IR_Sensor::storeIrCode(uint32_t value)&lt;br /&gt;
    {&lt;br /&gt;
        if (!m_ready_to_receive)&lt;br /&gt;
            return;&lt;br /&gt;
        // Just store the timestamp of this signal&lt;br /&gt;
        if(g_signal_count &amp;lt; MAX_EDGES_PER_IR_FRAME)&lt;br /&gt;
        {&lt;br /&gt;
            g_ir_edge_timings[g_signal_count++] = value;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    void IR_Sensor::decodeIrCode(void)&lt;br /&gt;
    {&lt;br /&gt;
        if (!m_ready_to_receive)&lt;br /&gt;
            return;&lt;br /&gt;
        for (int i = 0; i &amp;lt; g_signal_count-1; i++)&lt;br /&gt;
        {&lt;br /&gt;
            g_ir_cmd_timings[i] = g_ir_edge_timings[i+1]-g_ir_edge_timings[i];&lt;br /&gt;
        }&lt;br /&gt;
        m_code_received = true;&lt;br /&gt;
        m_ready_to_receive = false;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_CaptureFlow.png|500px|center|Flow Diagram for IR capture|thumb|Flow Chart : IR Capture Interrupt]]&lt;br /&gt;
&lt;br /&gt;
====IR Transmit Task:====&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The IR transmit task will be signaled by the Bluetooth task. After being signal the task will attempt to read from a file using the Storage class. If the file doesn't exist it will send an error message the terminal. If the file does exist then the task will read all the timing values into an array. The task will then enter a PortCritical area and transmit the IR signal by turning on and off the PWM pin. Once it is finished the IR Transmit task return the Mutex.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
        remoteTXTask(uint8_t priority) :scheduler_task(&amp;quot;rTX&amp;quot;, 2048, priority), pwm0(38Khz)&lt;br /&gt;
        bool run(void *p)&lt;br /&gt;
        {&lt;br /&gt;
            xQueueReceive;&lt;br /&gt;
            if ((command == send_cmd) &amp;amp;&amp;amp; xSemaphoreTakeAvailable)&lt;br /&gt;
            {&lt;br /&gt;
                u0_dbg_printf(&amp;quot;Transmitting...\n&amp;quot; );&lt;br /&gt;
                int size = readFile(mMsg.fileName);&lt;br /&gt;
                portENTER_CRITICAL();&lt;br /&gt;
                for(int i = 0; i &amp;lt; size; i++)&lt;br /&gt;
                {&lt;br /&gt;
                    if(i % 2 == 0) pwm1.set(25);&lt;br /&gt;
                    else pwm1.set(0);&lt;br /&gt;
                    delay_us(timing_values[i]);&lt;br /&gt;
                }&lt;br /&gt;
                pwm1.set(0);&lt;br /&gt;
                portEXIT_CRITICAL();&lt;br /&gt;
            }&lt;br /&gt;
            xSemaphoreGive(mIRMutex);&lt;br /&gt;
            return true;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[File:CmpE244_S15_T3_Remote_Learner_IRTask.jpg|250px|center|Flow Diagram for IR transmit Task|350px|thumb|Flow Chart : IR Transmit Task]]&lt;br /&gt;
&lt;br /&gt;
====Android Application with SJOne Board Software Design ====&lt;br /&gt;
&lt;br /&gt;
[[File:CMPE244_S15_TEAM2_Android_FlowChart.png|300px|right|thumb|Flow Chart: Android App with SJOne Board Software Design]]&lt;br /&gt;
&lt;br /&gt;
The Android application Bluetooth task is to provide the a communication link between all the tasks. The Bluetooth task would receive commands from the application, then send items to the queue with the appropriate information such as command, button number, and message from the Android application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pseudo Code:'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void BluetoothTask(void *p) {&lt;br /&gt;
  //Initialize transmit, receive and bluetooth queues&lt;br /&gt;
  bool init();&lt;br /&gt;
  bool run()&lt;br /&gt;
  {&lt;br /&gt;
     //Get command from Android app&lt;br /&gt;
     uart3.gets();&lt;br /&gt;
     //Check if it is a transmit or learn command&lt;br /&gt;
     checkCommand();&lt;br /&gt;
     //Send item to the appropriate queue&lt;br /&gt;
     xQueueSend();&lt;br /&gt;
     //Sleep to reduce CPU usage&lt;br /&gt;
     vTaskDelay(10);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Learner Android App ===&lt;br /&gt;
The software development environment for the Remote Learner android application is Android Studio 1.2.1.1. &lt;br /&gt;
&lt;br /&gt;
[[File:CMPE244_S15_TEAM2_Android_AndroidStudio.png|900px|center|thumb|Android App: Development Envirnoment]]&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:1200px;&amp;quot; |&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Unconnected.png|350px|left|thumb|Android App: Starting Screen]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_DeviceList.png|350px|left|thumb|Android App: Bluetooth Device List]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Connecting.png|350px|left|thumb|Android App: Connecting to Bluetooth Device]]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:1200px;&amp;quot; |&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Connected.png|350px|left|thumb|Android App: Bluetooth Device Connected]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Learned.png|350px|left|thumb|Android App: Button Learned]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_LearnFailed.png|350px|left|thumb|Android App: Button Learn Failed]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&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;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Issue #1 ===&lt;br /&gt;
'''PROBLEM:'''&lt;br /&gt;
&lt;br /&gt;
IR transmission signal was not being received by IR receiver. &lt;br /&gt;
&lt;br /&gt;
'''RESOLUTION:'''&lt;br /&gt;
&lt;br /&gt;
Used Oscilloscope to discover that PWM instance set to 38,000 Hz did not produce a 38 kHz. Had to adjust the value to about 3205 Hz to get a PWM signal that was about 38Khz. &lt;br /&gt;
&lt;br /&gt;
'''FUTURE RECOMMENDATIONS:'''&lt;br /&gt;
&lt;br /&gt;
Examine PWM code and determine if there is a way to enter the fequency in Khz.&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Issue #2 ===&lt;br /&gt;
'''PROBLEM:'''&lt;br /&gt;
&lt;br /&gt;
Putting IR transmission signal  in task was causing IR signal not to be received because task was being interrupted. &lt;br /&gt;
&lt;br /&gt;
'''RESOLUTION:'''&lt;br /&gt;
&lt;br /&gt;
Placed time sensitive code in a Port Critical section to prevent that section of code being interrupted.&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Testing ===&lt;br /&gt;
To test the IR transmitter we first used an oscilloscope to capture a IR signal from a remote control. After capturing the signal we determined the protocol. To replicate the signal we created an array with the timing values. The array values that were even index values represented the timing for the IR led to toggle on. The odd values represent the timing values that the IR LED need to be off. Using a for loop, we send the signal and tested using an oscilloscope first. After determining that the signal was similar to the capture, we tested with a few devices. The first device was an Apple remote to turn the volume up. Afterward we tested a different device using a different protocol. We were able to figure channel up/down and volume up/down and control a Sharp TV. The final test for integration was to control an LG TV. See demo video of the device controlling LG TV.&lt;br /&gt;
&lt;br /&gt;
=== Android App Testing ===&lt;br /&gt;
This section is for android app testing.&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;
=== 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_SJSU_S2015/ 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;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=15183</id>
		<title>S15: Remote Learner</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=15183"/>
				<updated>2015-05-24T18:37:43Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: /* Receive IR LED: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Remote Learner ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
The objective of this project was to create a remote learner using the SJOne board. The Remote Learner would have the ability to be learn any buttons of any remote controller then controlled by an Android application using Bluetooth. The application would tell the SJOne board to learn a remote control button using the onboard IR receiver sensor. Once the button was learned, then the SJOne board notifys the Android application and allows the application to replicate the button functionality using our own IR transmitter.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction == &lt;br /&gt;
Project Remote Learner is to have the ability to learn button functionalities from multiple remotes, and then control devices via an Android application. The objects for the remote learner are as the following:&lt;br /&gt;
* To create an Android application that will communicate with SJOne board using Bluetooth and UART&lt;br /&gt;
* To create a task that will be signal by the Android application to learn the IR timing using the on-board IR receiver. &lt;br /&gt;
** Task will then send a message to Android application through a Queue to indicate if it was able to successfully capture and write the timing values to a file to Flash memory&lt;br /&gt;
* To create a task that will receive a signal to transmit the IR timing values from Flash memory. This task will use the PWM library and delay function to turn on and off the IR LED&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Ying (Bailey) Wu - Android App and BT I/F&lt;br /&gt;
*  Yoni Klein - IR RX and IR Learning&lt;br /&gt;
*  Tejeswar - IR Protocol&lt;br /&gt;
*  Christopher Laurence - IR TX and IR learning&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
=== Remote Learner ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1-2&lt;br /&gt;
|3/27/2015&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|Research about the basic of remote controller protocols&lt;br /&gt;
|Completed&lt;br /&gt;
|3/10/15&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|Research about transmit timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
Research about receive timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
|Completed&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|Accurately decode IR signals from a remote control&lt;br /&gt;
Accurately transmit IR signals to a device &lt;br /&gt;
|Completed&lt;br /&gt;
|5/2/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|Interface BT module and establish communication with the Android phone&lt;br /&gt;
Decide on a communication protocol between phone and board.&lt;br /&gt;
|Completed&lt;br /&gt;
|05/22/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6-7&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|Research and add additional protocol support&lt;br /&gt;
|Completed&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|5/22/2015&lt;br /&gt;
|Final integration and testing.&lt;br /&gt;
|Completed&lt;br /&gt;
|05/23/2015&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Android Application ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|4/6/2015&lt;br /&gt;
|4/13/2015&lt;br /&gt;
|Research about Android application development&lt;br /&gt;
Research about Bluetooth module implementation with SJOne board&lt;br /&gt;
|Completed&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4/13/2015&lt;br /&gt;
|4/20/2015&lt;br /&gt;
|Implement and design a basic Android application on Android Studio&lt;br /&gt;
Implement the Bluetooth module using UART&lt;br /&gt;
|Completed&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/20/2015&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|Continue development of the Android application&lt;br /&gt;
Establish a connection between the SJOne board and Android application through Bluetooth &lt;br /&gt;
|Completed&lt;br /&gt;
|5/04/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|5/4/2015&lt;br /&gt;
|Collaborate with team members to integrate the Android application and remote learner functions &lt;br /&gt;
|Completed&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|5/4/2015&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|Debug and troubleshoot any issues that may arise&lt;br /&gt;
|Completed&lt;br /&gt;
|5/23/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|5/18/2015&lt;br /&gt;
|Miscellaneous&lt;br /&gt;
|Completed&lt;br /&gt;
|5/23/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
Give a simple list of the cost of your project broken down by components.  Do not write long stories here.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Line Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Number&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost ($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 120 Resistor&lt;br /&gt;
| Anchor Electronic&lt;br /&gt;
| N/A&lt;br /&gt;
| 10&lt;br /&gt;
| 1.00&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| IR LED 1.5 V 40mA&lt;br /&gt;
| Anchor Electronic&lt;br /&gt;
| N/A&lt;br /&gt;
| 4&lt;br /&gt;
| 1.00&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| HC-06 Bluetooth Module&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| 1&lt;br /&gt;
| 9.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| SJOne&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| 1&lt;br /&gt;
| 80.00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
====Transmit IR LED:====&lt;br /&gt;
The IR LED transmitter is a simple circuit that connects to a PWM pin that is set to toggle at 38 Khz. The circuit needs a resister to create the voltage drop for the IR LED.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:CmpE244_S15_T3_Remote_Learner_IR LED Circuit.png|600px|centre|thumb|IR LED circuit]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Receive IR LED====&lt;br /&gt;
The IR receiver is already part of the SJOne board.  On our revision 4 board, this is the TSOP75238TR IR Receiver Module by Vishay Semiconductors.  Other revision boards may have a slightly different part, but the operation and concepts are the same.&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver.png|400px|centre|thumb|IR Receiver Circuit]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The basic circuit is relatively simple.  Along with power and ground, an output signal is connected to two different parts of the board.&lt;br /&gt;
&lt;br /&gt;
The first connection is made to P1[18] on the LPC controller.  This GPIO pin will be configured to use the capture feature of the boards timer in order to &amp;quot;capture&amp;quot; the time a rising or falling signal event occurs.  This pin is labeled as &amp;quot;IR_DATA&amp;quot; on the board schematic and the associated GPIO function is referred to as CAP1[0] in the user manual.&lt;br /&gt;
The operation of the capture pin is described in the Hardware Interface section below.&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_LPC_Input.png|600px|centre|thumb|IR_DATA connection to CAP1[0]]]&lt;br /&gt;
&lt;br /&gt;
The second connection is to an external pin referenced in section 6D on page 3 of the board schematic.  This is mainly used for debugging and validating captured data on an oscilloscope.  Thanks Preet for adding this!  Both of these connections are displayed in the images below.&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_Test_Pin.png|365px|centre|thumb|External Pin]]&lt;br /&gt;
&lt;br /&gt;
====Android Application with SJOne Board Hardware Design ====&lt;br /&gt;
The Android application hardware design consists of the Bluetooth module (HC-06) and SJOne board. The communication link is established using the SJOne board UART3 Tx and Rx Pins.&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;
====PWM to IR Transmitter LED:====&lt;br /&gt;
The PWM was used to generate the 38 Khz by creating an instance of PWM class. Then using the predefined function of &amp;quot;pwm.set&amp;quot; to toggle the pin at a duty cycle of about 25% and after certain amount of time we set the duty cycle to 0. Below is the standard behavior for NEC IR protocol explaining the amount of time that the PWM pin needs to toggle and time required to be off.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Protocol&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| On(µs)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Off(µs)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Total(µs)&lt;br /&gt;
|-&lt;br /&gt;
! Start&lt;br /&gt;
| 9000&lt;br /&gt;
| 4500&lt;br /&gt;
| 13500&lt;br /&gt;
|-&lt;br /&gt;
! 0 bit&lt;br /&gt;
| 560&lt;br /&gt;
| 560 &lt;br /&gt;
| 1120&lt;br /&gt;
|-&lt;br /&gt;
! 1 bit&lt;br /&gt;
| 560&lt;br /&gt;
| 1690 &lt;br /&gt;
| 2250&lt;br /&gt;
|-&lt;br /&gt;
! End&lt;br /&gt;
| 560&lt;br /&gt;
| N/A&lt;br /&gt;
| 560&lt;br /&gt;
|}&lt;br /&gt;
  &lt;br /&gt;
[[File:CmpE244_S15_T3_Remote_Learner_NEC_IR.JPG|600px|centre|thumb|In the above image is a capture of a NEC IR transmission using an oscilloscope.]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====IR Receiver to Capture Pin:====&lt;br /&gt;
The IR receiver outputs a logic one (high, 3.3v) signal when idle.  When active, the signal drops to a logic zero (low, 0v).  Therefore, the signal is active low, which may actually be inverted relative to the transmitted signal.  The images below show two examples of transmitted signals and receiver output.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:1200px;&amp;quot; |&lt;br /&gt;
|[[File:S15_244_RemoteLearner_IR_Receiver_Waveform1.png|400px|center|thumb|IR receiver output given typical pulse input signal]]&lt;br /&gt;
|[[File:S15_244_RemoteLearner_IR_Receiver_Waveform2.png|400px|center|thumb|IR receiver output given pulse burst input signal]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These images are from the IR receiver data sheet included in the development package of the SJOne board.  However, you can find it on Vishay's website as well.  This signal is physically connected to one of the capture pins on the LPC microcontroller.  In our example, the board is designed to take this input on P1[18] using CAP1[0].&lt;br /&gt;
&lt;br /&gt;
The capture feature is associated with one of the boards timers.  In our case, this is timer 1 (hence CAP1).  The [0] indicates port 0.  Timer 1 is used by the development package, so it should already be started for us.  All we need to do is configure the Capture Control Register to generate an input on both rising and falling edges.&lt;br /&gt;
&lt;br /&gt;
When this interrupt occurs, we get a tick count.  We don't need to know the time exactly, just the difference in times between captures.  Since the IR receiver idles high, we know the first interrupt will be for a falling edge.  We can perform the calculations according to this assumption.&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;
====IR Receive Task====&lt;br /&gt;
&lt;br /&gt;
There are two components that make the IR receive functionality work.  The first is the task itself, which processes commands from the Bluetooth task and saves IR timings to the SD card.&lt;br /&gt;
&lt;br /&gt;
''The receive task and capture code was modified from Preet's IR_Sensor and remoteTask classes.  This was a great starting place but needed to be modified to suit the project needs.''&lt;br /&gt;
&lt;br /&gt;
This task sleeps indefinitely until it receives a message on the mRXQueue.  If this message contains a learn command, it will attempt to take the mutex shared by the transmit task.  If it can take it, that means the system is not transmitting and it's safe to start recording timing signals.  If it can't take it, then the task will let the Bluetooth task know the system is busy and cannot learn new commands.&lt;br /&gt;
&lt;br /&gt;
However, if learning can continue, we signal the second part of the IR receive functionality.  We tell the IR_Sensor singleton class to clear any stored captures and wait until a new command is received or a timeout occurs.  Next, we retrieve the array of timings and store it on the SD card for the transmit task to use.&lt;br /&gt;
&lt;br /&gt;
The code segment and flow chart to show this behavior are shown below.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    bool remoteRXTask::run(void *p)&lt;br /&gt;
    {&lt;br /&gt;
      u0_dbg_printf(&amp;quot;Learning...\n&amp;quot; );&lt;br /&gt;
      //Receive item from queue&lt;br /&gt;
      xQueueReceive(rxQueue);&lt;br /&gt;
      //Check if it is a learn command and semaphore avaliable&lt;br /&gt;
      if ((learn_command) &amp;amp;&amp;amp; (xSemaphoreAvaliable))&lt;br /&gt;
      {&lt;br /&gt;
        //Read IR code&lt;br /&gt;
        IS.clearCode();&lt;br /&gt;
        while(!IS.isIRCodeReceived())&lt;br /&gt;
        {&lt;br /&gt;
            vTaskDelayMs(100);&lt;br /&gt;
        }&lt;br /&gt;
        uint8_t max_timings = 255;&lt;br /&gt;
        uint16_t timings[max_timings] = {0};&lt;br /&gt;
        uint16_t count;&lt;br /&gt;
        IS.getLastIRCode(timings, &amp;amp;count, max_timings);&lt;br /&gt;
        //get+store the code and send feedback here&lt;br /&gt;
        sprintf(filename,&amp;quot;1:%c.hex&amp;quot;,mMsg.button);&lt;br /&gt;
        Storage :: write(filename,(void *)&amp;amp;timings,count,0);&lt;br /&gt;
        xSemaphoreGive(mIRMutex);&lt;br /&gt;
      }&lt;br /&gt;
      else&lt;br /&gt;
      {&lt;br /&gt;
        strcpy(mMsg.msg,&amp;quot;*****Busy Transmitting***&amp;quot;);&lt;br /&gt;
        //Send item to the Bluetooth queue&lt;br /&gt;
        xQueueSend(mBtQueue,&amp;amp;mMsg,0);&lt;br /&gt;
    }&lt;br /&gt;
       return true;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_TaskFlow.png|700px|center|Flow Diagram for IR receive Task|thumb|Flow Chart : IR Receive Task]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The code below is the core of what makes the IR learning possible.  If a rising or falling edge occurs on the capture pin, then an interrupt is generated.  In this case, storeIrCode() will be called which saves the timestamps to an array.  We set a timeout of 50ms, after which decodeIrCode() is called that calculates the differences in timestamps.  These differences are the timings we will store and later transmit.  &lt;br /&gt;
&lt;br /&gt;
The 50ms timeout was chosen because some remotes have more complicated commands that include two consecutive commands.  The time between those commands was measured to be about 40ms with the tested remotes.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    #if (1 == SYS_CFG_SYS_TIMER)&lt;br /&gt;
        /* ISR for captured time of the capture input pin */&lt;br /&gt;
        if (intr_reason &amp;amp; timer_capt0_intr_ir_sensor_edge_time_captured)&lt;br /&gt;
        {&lt;br /&gt;
            gp_timer_ptr-&amp;gt;IR = timer_capt0_intr_ir_sensor_edge_time_captured;&lt;br /&gt;
            // Store the IR capture time and setup timeout of the IR signal (unless we reset it again)&lt;br /&gt;
            IS.storeIrCode(gp_timer_ptr-&amp;gt;CR0);&lt;br /&gt;
            //10k was too short of a timeout for long commands,&lt;br /&gt;
            //which sometimes have separations of up to 40ms&lt;br /&gt;
            gp_timer_ptr-&amp;gt;MR2 = 50000 + gp_timer_ptr-&amp;gt;TC;&lt;br /&gt;
        }&lt;br /&gt;
        /* MR2: End of IR capture (no IR capture after initial IR signal) */&lt;br /&gt;
        else if (intr_reason &amp;amp; timer_mr2_intr_ir_sensor_timeout)&lt;br /&gt;
        {&lt;br /&gt;
            gp_timer_ptr-&amp;gt;IR = timer_mr2_intr_ir_sensor_timeout;&lt;br /&gt;
            IS.decodeIrCode();&lt;br /&gt;
        }&lt;br /&gt;
        /* MR0 is used for the timer rollover count */&lt;br /&gt;
        else&lt;br /&gt;
    #endif&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    void IR_Sensor::storeIrCode(uint32_t value)&lt;br /&gt;
    {&lt;br /&gt;
        if (!m_ready_to_receive)&lt;br /&gt;
            return;&lt;br /&gt;
        // Just store the timestamp of this signal&lt;br /&gt;
        if(g_signal_count &amp;lt; MAX_EDGES_PER_IR_FRAME)&lt;br /&gt;
        {&lt;br /&gt;
            g_ir_edge_timings[g_signal_count++] = value;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    void IR_Sensor::decodeIrCode(void)&lt;br /&gt;
    {&lt;br /&gt;
        if (!m_ready_to_receive)&lt;br /&gt;
            return;&lt;br /&gt;
        for (int i = 0; i &amp;lt; g_signal_count-1; i++)&lt;br /&gt;
        {&lt;br /&gt;
            g_ir_cmd_timings[i] = g_ir_edge_timings[i+1]-g_ir_edge_timings[i];&lt;br /&gt;
        }&lt;br /&gt;
        m_code_received = true;&lt;br /&gt;
        m_ready_to_receive = false;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_CaptureFlow.png|500px|center|Flow Diagram for IR capture|thumb|Flow Chart : IR Capture Interrupt]]&lt;br /&gt;
&lt;br /&gt;
====IR Transmit Task:====&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The IR transmit task will be signaled by the Bluetooth task. After being signal the task will attempt to read from a file using the Storage class. If the file doesn't exist it will send an error message the terminal. If the file does exist then the task will read all the timing values into an array. The task will then enter a PortCritical area and transmit the IR signal by turning on and off the PWM pin. Once it is finished the IR Transmit task return the Mutex.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
        remoteTXTask(uint8_t priority) :scheduler_task(&amp;quot;rTX&amp;quot;, 2048, priority), pwm0(38Khz)&lt;br /&gt;
        bool run(void *p)&lt;br /&gt;
        {&lt;br /&gt;
            xQueueReceive;&lt;br /&gt;
            if ((command == send_cmd) &amp;amp;&amp;amp; xSemaphoreTakeAvailable)&lt;br /&gt;
            {&lt;br /&gt;
                u0_dbg_printf(&amp;quot;Transmitting...\n&amp;quot; );&lt;br /&gt;
                int size = readFile(mMsg.fileName);&lt;br /&gt;
                portENTER_CRITICAL();&lt;br /&gt;
                for(int i = 0; i &amp;lt; size; i++)&lt;br /&gt;
                {&lt;br /&gt;
                    if(i % 2 == 0) pwm1.set(25);&lt;br /&gt;
                    else pwm1.set(0);&lt;br /&gt;
                    delay_us(timing_values[i]);&lt;br /&gt;
                }&lt;br /&gt;
                pwm1.set(0);&lt;br /&gt;
                portEXIT_CRITICAL();&lt;br /&gt;
            }&lt;br /&gt;
            xSemaphoreGive(mIRMutex);&lt;br /&gt;
            return true;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[File:CmpE244_S15_T3_Remote_Learner_IRTask.jpg|250px|center|Flow Diagram for IR transmit Task|350px|thumb|Flow Chart : IR Transmit Task]]&lt;br /&gt;
&lt;br /&gt;
====Android Application with SJOne Board Software Design ====&lt;br /&gt;
&lt;br /&gt;
[[File:CMPE244_S15_TEAM2_Android_FlowChart.png|300px|right|thumb|Flow Chart: Android App with SJOne Board Software Design]]&lt;br /&gt;
&lt;br /&gt;
The Android application Bluetooth task is to provide the a communication link between all the tasks. The Bluetooth task would receive commands from the application, then send items to the queue with the appropriate information such as command, button number, and message from the Android application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pseudo Code:'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void BluetoothTask(void *p) {&lt;br /&gt;
  //Initialize transmit, receive and bluetooth queues&lt;br /&gt;
  bool init();&lt;br /&gt;
  bool run()&lt;br /&gt;
  {&lt;br /&gt;
     //Get command from Android app&lt;br /&gt;
     uart3.gets();&lt;br /&gt;
     //Check if it is a transmit or learn command&lt;br /&gt;
     checkCommand();&lt;br /&gt;
     //Send item to the appropriate queue&lt;br /&gt;
     xQueueSend();&lt;br /&gt;
     //Sleep to reduce CPU usage&lt;br /&gt;
     vTaskDelay(10);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Learner Android App ===&lt;br /&gt;
The software development environment for the Remote Learner android application is Android Studio 1.2.1.1. &lt;br /&gt;
&lt;br /&gt;
[[File:CMPE244_S15_TEAM2_Android_AndroidStudio.png|900px|center|thumb|Android App: Development Envirnoment]]&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:1200px;&amp;quot; |&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Unconnected.png|350px|left|thumb|Android App: Starting Screen]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_DeviceList.png|350px|left|thumb|Android App: Bluetooth Device List]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Connecting.png|350px|left|thumb|Android App: Connecting to Bluetooth Device]]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:1200px;&amp;quot; |&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Connected.png|350px|left|thumb|Android App: Bluetooth Device Connected]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Learned.png|350px|left|thumb|Android App: Button Learned]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_LearnFailed.png|350px|left|thumb|Android App: Button Learn Failed]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&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;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Issue #1 ===&lt;br /&gt;
'''PROBLEM:'''&lt;br /&gt;
&lt;br /&gt;
IR transmission signal was not being received by IR receiver. &lt;br /&gt;
&lt;br /&gt;
'''RESOLUTION:'''&lt;br /&gt;
&lt;br /&gt;
Used Oscilloscope to discover that PWM instance set to 38,000 Hz did not produce a 38 kHz. Had to adjust the value to about 3205 Hz to get a PWM signal that was about 38Khz. &lt;br /&gt;
&lt;br /&gt;
'''FUTURE RECOMMENDATIONS:'''&lt;br /&gt;
&lt;br /&gt;
Examine PWM code and determine if there is a way to enter the fequency in Khz.&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Issue #2 ===&lt;br /&gt;
'''PROBLEM:'''&lt;br /&gt;
&lt;br /&gt;
Putting IR transmission signal  in task was causing IR signal not to be received because task was being interrupted. &lt;br /&gt;
&lt;br /&gt;
'''RESOLUTION:'''&lt;br /&gt;
&lt;br /&gt;
Placed time sensitive code in a Port Critical section to prevent that section of code being interrupted.&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Testing ===&lt;br /&gt;
To test the IR transmitter we first used an oscilloscope to capture a IR signal from a remote control. After capturing the signal we determined the protocol. To replicate the signal we created an array with the timing values. The array values that were even index values represented the timing for the IR led to toggle on. The odd values represent the timing values that the IR LED need to be off. Using a for loop, we send the signal and tested using an oscilloscope first. After determining that the signal was similar to the capture, we tested with a few devices. The first device was an Apple remote to turn the volume up. Afterward we tested a different device using a different protocol. We were able to figure channel up/down and volume up/down and control a Sharp TV. The final test for integration was to control an LG TV. See demo video of the device controlling LG TV.&lt;br /&gt;
&lt;br /&gt;
=== Android App Testing ===&lt;br /&gt;
This section is for android app testing.&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;
=== 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_SJSU_S2015/ 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;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=15182</id>
		<title>S15: Remote Learner</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=15182"/>
				<updated>2015-05-24T18:37:04Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: /* IR Receive Task */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Remote Learner ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
The objective of this project was to create a remote learner using the SJOne board. The Remote Learner would have the ability to be learn any buttons of any remote controller then controlled by an Android application using Bluetooth. The application would tell the SJOne board to learn a remote control button using the onboard IR receiver sensor. Once the button was learned, then the SJOne board notifys the Android application and allows the application to replicate the button functionality using our own IR transmitter.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction == &lt;br /&gt;
Project Remote Learner is to have the ability to learn button functionalities from multiple remotes, and then control devices via an Android application. The objects for the remote learner are as the following:&lt;br /&gt;
* To create an Android application that will communicate with SJOne board using Bluetooth and UART&lt;br /&gt;
* To create a task that will be signal by the Android application to learn the IR timing using the on-board IR receiver. &lt;br /&gt;
** Task will then send a message to Android application through a Queue to indicate if it was able to successfully capture and write the timing values to a file to Flash memory&lt;br /&gt;
* To create a task that will receive a signal to transmit the IR timing values from Flash memory. This task will use the PWM library and delay function to turn on and off the IR LED&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Ying (Bailey) Wu - Android App and BT I/F&lt;br /&gt;
*  Yoni Klein - IR RX and IR Learning&lt;br /&gt;
*  Tejeswar - IR Protocol&lt;br /&gt;
*  Christopher Laurence - IR TX and IR learning&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
=== Remote Learner ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1-2&lt;br /&gt;
|3/27/2015&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|Research about the basic of remote controller protocols&lt;br /&gt;
|Completed&lt;br /&gt;
|3/10/15&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|Research about transmit timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
Research about receive timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
|Completed&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|Accurately decode IR signals from a remote control&lt;br /&gt;
Accurately transmit IR signals to a device &lt;br /&gt;
|Completed&lt;br /&gt;
|5/2/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|Interface BT module and establish communication with the Android phone&lt;br /&gt;
Decide on a communication protocol between phone and board.&lt;br /&gt;
|Completed&lt;br /&gt;
|05/22/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6-7&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|Research and add additional protocol support&lt;br /&gt;
|Completed&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|5/22/2015&lt;br /&gt;
|Final integration and testing.&lt;br /&gt;
|Completed&lt;br /&gt;
|05/23/2015&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Android Application ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|4/6/2015&lt;br /&gt;
|4/13/2015&lt;br /&gt;
|Research about Android application development&lt;br /&gt;
Research about Bluetooth module implementation with SJOne board&lt;br /&gt;
|Completed&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4/13/2015&lt;br /&gt;
|4/20/2015&lt;br /&gt;
|Implement and design a basic Android application on Android Studio&lt;br /&gt;
Implement the Bluetooth module using UART&lt;br /&gt;
|Completed&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/20/2015&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|Continue development of the Android application&lt;br /&gt;
Establish a connection between the SJOne board and Android application through Bluetooth &lt;br /&gt;
|Completed&lt;br /&gt;
|5/04/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|5/4/2015&lt;br /&gt;
|Collaborate with team members to integrate the Android application and remote learner functions &lt;br /&gt;
|Completed&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|5/4/2015&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|Debug and troubleshoot any issues that may arise&lt;br /&gt;
|Completed&lt;br /&gt;
|5/23/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|5/18/2015&lt;br /&gt;
|Miscellaneous&lt;br /&gt;
|Completed&lt;br /&gt;
|5/23/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
Give a simple list of the cost of your project broken down by components.  Do not write long stories here.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Line Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Number&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost ($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 120 Resistor&lt;br /&gt;
| Anchor Electronic&lt;br /&gt;
| N/A&lt;br /&gt;
| 10&lt;br /&gt;
| 1.00&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| IR LED 1.5 V 40mA&lt;br /&gt;
| Anchor Electronic&lt;br /&gt;
| N/A&lt;br /&gt;
| 4&lt;br /&gt;
| 1.00&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| HC-06 Bluetooth Module&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| 1&lt;br /&gt;
| 9.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| SJOne&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| 1&lt;br /&gt;
| 80.00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
====Transmit IR LED:====&lt;br /&gt;
The IR LED transmitter is a simple circuit that connects to a PWM pin that is set to toggle at 38 Khz. The circuit needs a resister to create the voltage drop for the IR LED.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:CmpE244_S15_T3_Remote_Learner_IR LED Circuit.png|600px|centre|thumb|IR LED circuit]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Receive IR LED:====&lt;br /&gt;
The IR receiver is already part of the SJOne board.  On our revision 4 board, this is the TSOP75238TR IR Receiver Module by Vishay Semiconductors.  Other revision boards may have a slightly different part, but the operation and concepts are the same.&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver.png|400px|centre|thumb|IR Receiver Circuit]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The basic circuit is relatively simple.  Along with power and ground, an output signal is connected to two different parts of the board.&lt;br /&gt;
&lt;br /&gt;
The first connection is made to P1[18] on the LPC controller.  This GPIO pin will be configured to use the capture feature of the boards timer in order to &amp;quot;capture&amp;quot; the time a rising or falling signal event occurs.  This pin is labeled as &amp;quot;IR_DATA&amp;quot; on the board schematic and the associated GPIO function is referred to as CAP1[0] in the user manual.&lt;br /&gt;
The operation of the capture pin is described in the Hardware Interface section below.&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_LPC_Input.png|600px|centre|thumb|IR_DATA connection to CAP1[0]]]&lt;br /&gt;
&lt;br /&gt;
The second connection is to an external pin referenced in section 6D on page 3 of the board schematic.  This is mainly used for debugging and validating captured data on an oscilloscope.  Thanks Preet for adding this!  Both of these connections are displayed in the images below.&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_Test_Pin.png|365px|centre|thumb|External Pin]]&lt;br /&gt;
&lt;br /&gt;
====Android Application with SJOne Board Hardware Design ====&lt;br /&gt;
The Android application hardware design consists of the Bluetooth module (HC-06) and SJOne board. The communication link is established using the SJOne board UART3 Tx and Rx Pins.&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;
====PWM to IR Transmitter LED:====&lt;br /&gt;
The PWM was used to generate the 38 Khz by creating an instance of PWM class. Then using the predefined function of &amp;quot;pwm.set&amp;quot; to toggle the pin at a duty cycle of about 25% and after certain amount of time we set the duty cycle to 0. Below is the standard behavior for NEC IR protocol explaining the amount of time that the PWM pin needs to toggle and time required to be off.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Protocol&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| On(µs)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Off(µs)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Total(µs)&lt;br /&gt;
|-&lt;br /&gt;
! Start&lt;br /&gt;
| 9000&lt;br /&gt;
| 4500&lt;br /&gt;
| 13500&lt;br /&gt;
|-&lt;br /&gt;
! 0 bit&lt;br /&gt;
| 560&lt;br /&gt;
| 560 &lt;br /&gt;
| 1120&lt;br /&gt;
|-&lt;br /&gt;
! 1 bit&lt;br /&gt;
| 560&lt;br /&gt;
| 1690 &lt;br /&gt;
| 2250&lt;br /&gt;
|-&lt;br /&gt;
! End&lt;br /&gt;
| 560&lt;br /&gt;
| N/A&lt;br /&gt;
| 560&lt;br /&gt;
|}&lt;br /&gt;
  &lt;br /&gt;
[[File:CmpE244_S15_T3_Remote_Learner_NEC_IR.JPG|600px|centre|thumb|In the above image is a capture of a NEC IR transmission using an oscilloscope.]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====IR Receiver to Capture Pin:====&lt;br /&gt;
The IR receiver outputs a logic one (high, 3.3v) signal when idle.  When active, the signal drops to a logic zero (low, 0v).  Therefore, the signal is active low, which may actually be inverted relative to the transmitted signal.  The images below show two examples of transmitted signals and receiver output.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:1200px;&amp;quot; |&lt;br /&gt;
|[[File:S15_244_RemoteLearner_IR_Receiver_Waveform1.png|400px|center|thumb|IR receiver output given typical pulse input signal]]&lt;br /&gt;
|[[File:S15_244_RemoteLearner_IR_Receiver_Waveform2.png|400px|center|thumb|IR receiver output given pulse burst input signal]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These images are from the IR receiver data sheet included in the development package of the SJOne board.  However, you can find it on Vishay's website as well.  This signal is physically connected to one of the capture pins on the LPC microcontroller.  In our example, the board is designed to take this input on P1[18] using CAP1[0].&lt;br /&gt;
&lt;br /&gt;
The capture feature is associated with one of the boards timers.  In our case, this is timer 1 (hence CAP1).  The [0] indicates port 0.  Timer 1 is used by the development package, so it should already be started for us.  All we need to do is configure the Capture Control Register to generate an input on both rising and falling edges.&lt;br /&gt;
&lt;br /&gt;
When this interrupt occurs, we get a tick count.  We don't need to know the time exactly, just the difference in times between captures.  Since the IR receiver idles high, we know the first interrupt will be for a falling edge.  We can perform the calculations according to this assumption.&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;
====IR Receive Task====&lt;br /&gt;
&lt;br /&gt;
There are two components that make the IR receive functionality work.  The first is the task itself, which processes commands from the Bluetooth task and saves IR timings to the SD card.&lt;br /&gt;
&lt;br /&gt;
''The receive task and capture code was modified from Preet's IR_Sensor and remoteTask classes.  This was a great starting place but needed to be modified to suit the project needs.''&lt;br /&gt;
&lt;br /&gt;
This task sleeps indefinitely until it receives a message on the mRXQueue.  If this message contains a learn command, it will attempt to take the mutex shared by the transmit task.  If it can take it, that means the system is not transmitting and it's safe to start recording timing signals.  If it can't take it, then the task will let the Bluetooth task know the system is busy and cannot learn new commands.&lt;br /&gt;
&lt;br /&gt;
However, if learning can continue, we signal the second part of the IR receive functionality.  We tell the IR_Sensor singleton class to clear any stored captures and wait until a new command is received or a timeout occurs.  Next, we retrieve the array of timings and store it on the SD card for the transmit task to use.&lt;br /&gt;
&lt;br /&gt;
The code segment and flow chart to show this behavior are shown below.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    bool remoteRXTask::run(void *p)&lt;br /&gt;
    {&lt;br /&gt;
      u0_dbg_printf(&amp;quot;Learning...\n&amp;quot; );&lt;br /&gt;
      //Receive item from queue&lt;br /&gt;
      xQueueReceive(rxQueue);&lt;br /&gt;
      //Check if it is a learn command and semaphore avaliable&lt;br /&gt;
      if ((learn_command) &amp;amp;&amp;amp; (xSemaphoreAvaliable))&lt;br /&gt;
      {&lt;br /&gt;
        //Read IR code&lt;br /&gt;
        IS.clearCode();&lt;br /&gt;
        while(!IS.isIRCodeReceived())&lt;br /&gt;
        {&lt;br /&gt;
            vTaskDelayMs(100);&lt;br /&gt;
        }&lt;br /&gt;
        uint8_t max_timings = 255;&lt;br /&gt;
        uint16_t timings[max_timings] = {0};&lt;br /&gt;
        uint16_t count;&lt;br /&gt;
        IS.getLastIRCode(timings, &amp;amp;count, max_timings);&lt;br /&gt;
        //get+store the code and send feedback here&lt;br /&gt;
        sprintf(filename,&amp;quot;1:%c.hex&amp;quot;,mMsg.button);&lt;br /&gt;
        Storage :: write(filename,(void *)&amp;amp;timings,count,0);&lt;br /&gt;
        xSemaphoreGive(mIRMutex);&lt;br /&gt;
      }&lt;br /&gt;
      else&lt;br /&gt;
      {&lt;br /&gt;
        strcpy(mMsg.msg,&amp;quot;*****Busy Transmitting***&amp;quot;);&lt;br /&gt;
        //Send item to the Bluetooth queue&lt;br /&gt;
        xQueueSend(mBtQueue,&amp;amp;mMsg,0);&lt;br /&gt;
    }&lt;br /&gt;
       return true;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_TaskFlow.png|700px|center|Flow Diagram for IR receive Task|thumb|Flow Chart : IR Receive Task]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The code below is the core of what makes the IR learning possible.  If a rising or falling edge occurs on the capture pin, then an interrupt is generated.  In this case, storeIrCode() will be called which saves the timestamps to an array.  We set a timeout of 50ms, after which decodeIrCode() is called that calculates the differences in timestamps.  These differences are the timings we will store and later transmit.  &lt;br /&gt;
&lt;br /&gt;
The 50ms timeout was chosen because some remotes have more complicated commands that include two consecutive commands.  The time between those commands was measured to be about 40ms with the tested remotes.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    #if (1 == SYS_CFG_SYS_TIMER)&lt;br /&gt;
        /* ISR for captured time of the capture input pin */&lt;br /&gt;
        if (intr_reason &amp;amp; timer_capt0_intr_ir_sensor_edge_time_captured)&lt;br /&gt;
        {&lt;br /&gt;
            gp_timer_ptr-&amp;gt;IR = timer_capt0_intr_ir_sensor_edge_time_captured;&lt;br /&gt;
            // Store the IR capture time and setup timeout of the IR signal (unless we reset it again)&lt;br /&gt;
            IS.storeIrCode(gp_timer_ptr-&amp;gt;CR0);&lt;br /&gt;
            //10k was too short of a timeout for long commands,&lt;br /&gt;
            //which sometimes have separations of up to 40ms&lt;br /&gt;
            gp_timer_ptr-&amp;gt;MR2 = 50000 + gp_timer_ptr-&amp;gt;TC;&lt;br /&gt;
        }&lt;br /&gt;
        /* MR2: End of IR capture (no IR capture after initial IR signal) */&lt;br /&gt;
        else if (intr_reason &amp;amp; timer_mr2_intr_ir_sensor_timeout)&lt;br /&gt;
        {&lt;br /&gt;
            gp_timer_ptr-&amp;gt;IR = timer_mr2_intr_ir_sensor_timeout;&lt;br /&gt;
            IS.decodeIrCode();&lt;br /&gt;
        }&lt;br /&gt;
        /* MR0 is used for the timer rollover count */&lt;br /&gt;
        else&lt;br /&gt;
    #endif&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    void IR_Sensor::storeIrCode(uint32_t value)&lt;br /&gt;
    {&lt;br /&gt;
        if (!m_ready_to_receive)&lt;br /&gt;
            return;&lt;br /&gt;
        // Just store the timestamp of this signal&lt;br /&gt;
        if(g_signal_count &amp;lt; MAX_EDGES_PER_IR_FRAME)&lt;br /&gt;
        {&lt;br /&gt;
            g_ir_edge_timings[g_signal_count++] = value;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    void IR_Sensor::decodeIrCode(void)&lt;br /&gt;
    {&lt;br /&gt;
        if (!m_ready_to_receive)&lt;br /&gt;
            return;&lt;br /&gt;
        for (int i = 0; i &amp;lt; g_signal_count-1; i++)&lt;br /&gt;
        {&lt;br /&gt;
            g_ir_cmd_timings[i] = g_ir_edge_timings[i+1]-g_ir_edge_timings[i];&lt;br /&gt;
        }&lt;br /&gt;
        m_code_received = true;&lt;br /&gt;
        m_ready_to_receive = false;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_CaptureFlow.png|500px|center|Flow Diagram for IR capture|thumb|Flow Chart : IR Capture Interrupt]]&lt;br /&gt;
&lt;br /&gt;
====IR Transmit Task:====&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The IR transmit task will be signaled by the Bluetooth task. After being signal the task will attempt to read from a file using the Storage class. If the file doesn't exist it will send an error message the terminal. If the file does exist then the task will read all the timing values into an array. The task will then enter a PortCritical area and transmit the IR signal by turning on and off the PWM pin. Once it is finished the IR Transmit task return the Mutex.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
        remoteTXTask(uint8_t priority) :scheduler_task(&amp;quot;rTX&amp;quot;, 2048, priority), pwm0(38Khz)&lt;br /&gt;
        bool run(void *p)&lt;br /&gt;
        {&lt;br /&gt;
            xQueueReceive;&lt;br /&gt;
            if ((command == send_cmd) &amp;amp;&amp;amp; xSemaphoreTakeAvailable)&lt;br /&gt;
            {&lt;br /&gt;
                u0_dbg_printf(&amp;quot;Transmitting...\n&amp;quot; );&lt;br /&gt;
                int size = readFile(mMsg.fileName);&lt;br /&gt;
                portENTER_CRITICAL();&lt;br /&gt;
                for(int i = 0; i &amp;lt; size; i++)&lt;br /&gt;
                {&lt;br /&gt;
                    if(i % 2 == 0) pwm1.set(25);&lt;br /&gt;
                    else pwm1.set(0);&lt;br /&gt;
                    delay_us(timing_values[i]);&lt;br /&gt;
                }&lt;br /&gt;
                pwm1.set(0);&lt;br /&gt;
                portEXIT_CRITICAL();&lt;br /&gt;
            }&lt;br /&gt;
            xSemaphoreGive(mIRMutex);&lt;br /&gt;
            return true;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[File:CmpE244_S15_T3_Remote_Learner_IRTask.jpg|250px|center|Flow Diagram for IR transmit Task|350px|thumb|Flow Chart : IR Transmit Task]]&lt;br /&gt;
&lt;br /&gt;
====Android Application with SJOne Board Software Design ====&lt;br /&gt;
&lt;br /&gt;
[[File:CMPE244_S15_TEAM2_Android_FlowChart.png|300px|right|thumb|Flow Chart: Android App with SJOne Board Software Design]]&lt;br /&gt;
&lt;br /&gt;
The Android application Bluetooth task is to provide the a communication link between all the tasks. The Bluetooth task would receive commands from the application, then send items to the queue with the appropriate information such as command, button number, and message from the Android application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pseudo Code:'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void BluetoothTask(void *p) {&lt;br /&gt;
  //Initialize transmit, receive and bluetooth queues&lt;br /&gt;
  bool init();&lt;br /&gt;
  bool run()&lt;br /&gt;
  {&lt;br /&gt;
     //Get command from Android app&lt;br /&gt;
     uart3.gets();&lt;br /&gt;
     //Check if it is a transmit or learn command&lt;br /&gt;
     checkCommand();&lt;br /&gt;
     //Send item to the appropriate queue&lt;br /&gt;
     xQueueSend();&lt;br /&gt;
     //Sleep to reduce CPU usage&lt;br /&gt;
     vTaskDelay(10);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Learner Android App ===&lt;br /&gt;
The software development environment for the Remote Learner android application is Android Studio 1.2.1.1. &lt;br /&gt;
&lt;br /&gt;
[[File:CMPE244_S15_TEAM2_Android_AndroidStudio.png|900px|center|thumb|Android App: Development Envirnoment]]&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:1200px;&amp;quot; |&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Unconnected.png|350px|left|thumb|Android App: Starting Screen]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_DeviceList.png|350px|left|thumb|Android App: Bluetooth Device List]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Connecting.png|350px|left|thumb|Android App: Connecting to Bluetooth Device]]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:1200px;&amp;quot; |&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Connected.png|350px|left|thumb|Android App: Bluetooth Device Connected]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Learned.png|350px|left|thumb|Android App: Button Learned]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_LearnFailed.png|350px|left|thumb|Android App: Button Learn Failed]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&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;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Issue #1 ===&lt;br /&gt;
'''PROBLEM:'''&lt;br /&gt;
&lt;br /&gt;
IR transmission signal was not being received by IR receiver. &lt;br /&gt;
&lt;br /&gt;
'''RESOLUTION:'''&lt;br /&gt;
&lt;br /&gt;
Used Oscilloscope to discover that PWM instance set to 38,000 Hz did not produce a 38 kHz. Had to adjust the value to about 3205 Hz to get a PWM signal that was about 38Khz. &lt;br /&gt;
&lt;br /&gt;
'''FUTURE RECOMMENDATIONS:'''&lt;br /&gt;
&lt;br /&gt;
Examine PWM code and determine if there is a way to enter the fequency in Khz.&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Issue #2 ===&lt;br /&gt;
'''PROBLEM:'''&lt;br /&gt;
&lt;br /&gt;
Putting IR transmission signal  in task was causing IR signal not to be received because task was being interrupted. &lt;br /&gt;
&lt;br /&gt;
'''RESOLUTION:'''&lt;br /&gt;
&lt;br /&gt;
Placed time sensitive code in a Port Critical section to prevent that section of code being interrupted.&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Testing ===&lt;br /&gt;
To test the IR transmitter we first used an oscilloscope to capture a IR signal from a remote control. After capturing the signal we determined the protocol. To replicate the signal we created an array with the timing values. The array values that were even index values represented the timing for the IR led to toggle on. The odd values represent the timing values that the IR LED need to be off. Using a for loop, we send the signal and tested using an oscilloscope first. After determining that the signal was similar to the capture, we tested with a few devices. The first device was an Apple remote to turn the volume up. Afterward we tested a different device using a different protocol. We were able to figure channel up/down and volume up/down and control a Sharp TV. The final test for integration was to control an LG TV. See demo video of the device controlling LG TV.&lt;br /&gt;
&lt;br /&gt;
=== Android App Testing ===&lt;br /&gt;
This section is for android app testing.&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;
=== 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_SJSU_S2015/ 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;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=File:S15_244_RemoteLearner_IR_Receiver_CaptureFlow.png&amp;diff=15178</id>
		<title>File:S15 244 RemoteLearner IR Receiver CaptureFlow.png</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=File:S15_244_RemoteLearner_IR_Receiver_CaptureFlow.png&amp;diff=15178"/>
				<updated>2015-05-24T18:31:14Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=File:S15_244_RemoteLearner_IR_Receiver_TaskFlow.png&amp;diff=15177</id>
		<title>File:S15 244 RemoteLearner IR Receiver TaskFlow.png</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=File:S15_244_RemoteLearner_IR_Receiver_TaskFlow.png&amp;diff=15177"/>
				<updated>2015-05-24T18:31:01Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=15138</id>
		<title>S15: Remote Learner</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=15138"/>
				<updated>2015-05-24T17:40:02Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: /* IR Receive Task: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Remote Learner ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
The objective of this project was to create a remote learner using the SJOne board. The Remote Learner would have the ability to be learn any buttons of any remote controller then controlled by an Android application using Bluetooth. The application would tell the SJOne board to learn a remote control button using the onboard IR receiver sensor. Once the button was learned, then the SJOne board notifys the Android application and allows the application to replicate the button functionality using our own IR transmitter.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction == &lt;br /&gt;
Project Remote Learner is to have the ability to learn button functionalities from multiple remotes, and then control devices via an Android application. The objects for the remote learner are as the following:&lt;br /&gt;
* To create an Android application that will communicate with SJOne board using Bluetooth and UART&lt;br /&gt;
* To create a task that will be signal by the Android application to learn the IR timing using the on-board IR receiver. &lt;br /&gt;
** Task will then send a message to Android application through a Queue to indicate if it was able to successfully capture and write the timing values to a file to Flash memory&lt;br /&gt;
* To create a task that will receive a signal to transmit the IR timing values from Flash memory. This task will use the PWM library and delay function to turn on and off the IR LED&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Ying (Bailey) Wu - Android App and BT I/F&lt;br /&gt;
*  Yoni Klein - IR RX and IR Learning&lt;br /&gt;
*  Tejeswar - IR Protocol&lt;br /&gt;
*  Christopher Laurence - IR TX and IR learning&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
=== Remote Learner ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1-2&lt;br /&gt;
|3/27/2015&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|Research about the basic of remote controller protocols&lt;br /&gt;
|Completed&lt;br /&gt;
|3/10/15&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|Research about transmit timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
Research about receive timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
|Completed&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|Accurately decode IR signals from a remote control&lt;br /&gt;
Accurately transmit IR signals to a device &lt;br /&gt;
|Completed&lt;br /&gt;
|5/2/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|Interface BT module and establish communication with the Android phone&lt;br /&gt;
Decide on a communication protocol between phone and board.&lt;br /&gt;
|Completed&lt;br /&gt;
|05/22/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6-7&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|Research and add additional protocol support&lt;br /&gt;
|Completed&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|5/22/2015&lt;br /&gt;
|Final integration and testing.&lt;br /&gt;
|Completed&lt;br /&gt;
|05/23/2015&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Android Application ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|4/6/2015&lt;br /&gt;
|4/13/2015&lt;br /&gt;
|Research about Android application development&lt;br /&gt;
Research about Bluetooth module implementation with SJOne board&lt;br /&gt;
|Completed&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4/13/2015&lt;br /&gt;
|4/20/2015&lt;br /&gt;
|Implement and design a basic Android application on Android Studio&lt;br /&gt;
Implement the Bluetooth module using UART&lt;br /&gt;
|Completed&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/20/2015&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|Continue development of the Android application&lt;br /&gt;
Establish a connection between the SJOne board and Android application through Bluetooth &lt;br /&gt;
|Completed&lt;br /&gt;
|5/04/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|5/4/2015&lt;br /&gt;
|Collaborate with team members to integrate the Android application and remote learner functions &lt;br /&gt;
|Completed&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|5/4/2015&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|Debug and troubleshoot any issues that may arise&lt;br /&gt;
|Completed&lt;br /&gt;
|5/23/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|5/18/2015&lt;br /&gt;
|Miscellaneous&lt;br /&gt;
|Completed&lt;br /&gt;
|5/23/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
Give a simple list of the cost of your project broken down by components.  Do not write long stories here.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Line Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Number&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost ($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 120 Resistor&lt;br /&gt;
| Anchor Electronic&lt;br /&gt;
| N/A&lt;br /&gt;
| 10&lt;br /&gt;
| 1.00&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| IR LED 1.5 V 40mA&lt;br /&gt;
| Anchor Electronic&lt;br /&gt;
| N/A&lt;br /&gt;
| 4&lt;br /&gt;
| 1.00&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| HC-06 Bluetooth Module&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| 1&lt;br /&gt;
| 9.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| SJOne&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| 1&lt;br /&gt;
| 80.00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
====Transmit IR LED:====&lt;br /&gt;
The IR LED transmitter is a simple circuit that connects to a PWM pin that is set to toggle at 38 Khz. The circuit needs a resister to create the voltage drop for the IR LED.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:CmpE244_S15_T3_Remote_Learner_IR LED Circuit.png|600px|centre|thumb|IR LED circuit]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Receive IR LED:====&lt;br /&gt;
The IR receiver is already part of the SJOne board.  On our revision 4 board, this is the TSOP75238TR IR Receiver Module by Vishay Semiconductors.  Other revision boards may have a slightly different part, but the operation and concepts are the same.&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver.png|400px|centre|thumb|IR Receiver Circuit]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The basic circuit is relatively simple.  Along with power and ground, an output signal is connected to two different parts of the board.&lt;br /&gt;
&lt;br /&gt;
The first connection is made to P1[18] on the LPC controller.  This GPIO pin will be configured to use the capture feature of the boards timer in order to &amp;quot;capture&amp;quot; the time a rising or falling signal event occurs.  This pin is labeled as &amp;quot;IR_DATA&amp;quot; on the board schematic and the associated GPIO function is referred to as CAP1[0] in the user manual.&lt;br /&gt;
The operation of the capture pin is described in the Hardware Interface section below.&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_LPC_Input.png|600px|centre|thumb|IR_DATA connection to CAP1[0]]]&lt;br /&gt;
&lt;br /&gt;
The second connection is to an external pin referenced in section 6D on page 3 of the board schematic.  This is mainly used for debugging and validating captured data on an oscilloscope.  Thanks Preet for adding this!  Both of these connections are displayed in the images below.&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_Test_Pin.png|365px|centre|thumb|External Pin]]&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;
====PWM to IR Transmitter LED:====&lt;br /&gt;
The PWM was used to generate the 38 Khz by creating an instance of PWM class. Then using the predefined function of &amp;quot;pwm.set&amp;quot; to toggle the pin at a duty cycle of about 25% and after certain amount of time we set the duty cycle to 0. Below is the standard behavior for NEC IR protocol explaining the amount of time that the PWM pin needs to toggle and time required to be off.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Protocol&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| On(µs)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Off(µs)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Total(µs)&lt;br /&gt;
|-&lt;br /&gt;
! Start&lt;br /&gt;
| 9000&lt;br /&gt;
| 4500&lt;br /&gt;
| 13500&lt;br /&gt;
|-&lt;br /&gt;
! 0 bit&lt;br /&gt;
| 560&lt;br /&gt;
| 560 &lt;br /&gt;
| 1120&lt;br /&gt;
|-&lt;br /&gt;
! 1 bit&lt;br /&gt;
| 560&lt;br /&gt;
| 1690 &lt;br /&gt;
| 2250&lt;br /&gt;
|-&lt;br /&gt;
! End&lt;br /&gt;
| 560&lt;br /&gt;
| N/A&lt;br /&gt;
| 560&lt;br /&gt;
|}&lt;br /&gt;
  &lt;br /&gt;
[[File:CmpE244_S15_T3_Remote_Learner_NEC_IR.JPG|600px|centre|thumb|In the above image is a capture of a NEC IR transmission using an oscilloscope.]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====IR Receiver to Capture Pin:====&lt;br /&gt;
The IR receiver outputs a logic one (high, 3.3v) signal when idle.  When active, the signal drops to a logic zero (low, 0v).  Therefore, the signal is active low, which may actually be inverted relative to the transmitted signal.  The images below show two examples of transmitted signals and receiver output.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:1200px;&amp;quot; |&lt;br /&gt;
|[[File:S15_244_RemoteLearner_IR_Receiver_Waveform1.png|400px|center|thumb|IR receiver output given typical pulse input signal]]&lt;br /&gt;
|[[File:S15_244_RemoteLearner_IR_Receiver_Waveform2.png|400px|center|thumb|IR receiver output given pulse burst input signal]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These images are from the IR receiver data sheet included in the development package of the SJOne board.  However, you can find it on Vishay's website as well.  This signal is physically connected to one of the capture pins on the LPC microcontroller.  In our example, the board is designed to take this input on P1[18] using CAP1[0].&lt;br /&gt;
&lt;br /&gt;
The capture feature is associated with one of the boards timers.  In our case, this is timer 1 (hence CAP1).  The [0] indicates port 0.  Timer 1 is used by the development package, so it should already be started for us.  All we need to do is configure the Capture Control Register to generate an input on both rising and falling edges.&lt;br /&gt;
&lt;br /&gt;
When this interrupt occurs, we get a tick count.  We don't need to know the time exactly, just the difference in times between captures.  Since the IR receiver idles high, we know the first interrupt will be for a falling edge.  We can perform the calculations according to this assumption.&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;
====IR Receive Task====&lt;br /&gt;
&lt;br /&gt;
There are two components that make the IR receive functionality work.  The first is the task itself, which processes commands from the Bluetooth task and saves IR timings to the SD card.&lt;br /&gt;
&lt;br /&gt;
''The receive task and capture code was modified from Preet's IR_Sensor and remoteTask classes.  This was a great starting place but needed to be modified to suit the project needs.''&lt;br /&gt;
&lt;br /&gt;
This task sleeps indefinitely until it receives a message on the mRXQueue.  If this message contains a learn command, it will attempt to take the mutex shared by the transmit task.  If it can take it, that means the system is not transmitting and it's safe to start recording timing signals.  If it can't take it, then the task will let the Bluetooth task know the system is busy and cannot learn new commands.&lt;br /&gt;
&lt;br /&gt;
However, if learning can continue, we signal the second part of the IR receive functionality.  We tell the IR_Sensor singleton class to clear any stored captures and wait until a new command is received or a timeout occurs.  Next, we retrieve the array of timings and store it on the SD card for the transmit task to use.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    bool remoteRXTask::run(void *p)&lt;br /&gt;
    {&lt;br /&gt;
    xQueueReceive(mRxQueue,&amp;amp;mMsg,portMAX_DELAY);&lt;br /&gt;
    if ((mMsg.command == learn_cmd) &amp;amp;&amp;amp; (xSemaphoreTake(mIRMutex,0) == pdTRUE))&lt;br /&gt;
    {&lt;br /&gt;
        IS.clearCode();&lt;br /&gt;
        while(!IS.isIRCodeReceived())&lt;br /&gt;
        {&lt;br /&gt;
            vTaskDelayMs(100);&lt;br /&gt;
        }&lt;br /&gt;
        uint8_t max_timings = 255;&lt;br /&gt;
        uint16_t timings[max_timings] = {0};&lt;br /&gt;
        uint16_t count;&lt;br /&gt;
        IS.getLastIRCode(timings, &amp;amp;count, max_timings);&lt;br /&gt;
        //get+store the code and send feedback here&lt;br /&gt;
        sprintf(filename,&amp;quot;1:%s_%c.hex&amp;quot;,mMsg.msg,mMsg.button);&lt;br /&gt;
        Storage :: write(filename,(void *)&amp;amp;timings,count,0);&lt;br /&gt;
        xSemaphoreGive(mIRMutex);&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        strcpy(mMsg.msg,&amp;quot;*****Busy Transmitting***&amp;quot;);&lt;br /&gt;
        xQueueSend(mBtQueue,&amp;amp;mMsg,0);&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The code below is the core of what makes the IR learning possible.  If a rising or falling edge occurs on the capture pin, then an interrupt is generated.  In this case, storeIrCode() will be called which saves the timestamps to an array.  We set a timeout of 50ms, after which decodeIrCode() is called that calculates the differences in timestamps.  These differences are the timings we will store and later transmit.  &lt;br /&gt;
&lt;br /&gt;
The 50ms timeout was chosen because some remotes have more complicated commands that include two consecutive commands.  The time between those commands was measured to be about 40ms with the tested remotes.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    #if (1 == SYS_CFG_SYS_TIMER)&lt;br /&gt;
        /* ISR for captured time of the capture input pin */&lt;br /&gt;
        if (intr_reason &amp;amp; timer_capt0_intr_ir_sensor_edge_time_captured)&lt;br /&gt;
        {&lt;br /&gt;
            gp_timer_ptr-&amp;gt;IR = timer_capt0_intr_ir_sensor_edge_time_captured;&lt;br /&gt;
            // Store the IR capture time and setup timeout of the IR signal (unless we reset it again)&lt;br /&gt;
            IS.storeIrCode(gp_timer_ptr-&amp;gt;CR0);&lt;br /&gt;
            //10k was too short of a timeout for long commands,&lt;br /&gt;
            //which sometimes have separations of up to 40ms&lt;br /&gt;
            gp_timer_ptr-&amp;gt;MR2 = 50000 + gp_timer_ptr-&amp;gt;TC;&lt;br /&gt;
        }&lt;br /&gt;
        /* MR2: End of IR capture (no IR capture after initial IR signal) */&lt;br /&gt;
        else if (intr_reason &amp;amp; timer_mr2_intr_ir_sensor_timeout)&lt;br /&gt;
        {&lt;br /&gt;
            gp_timer_ptr-&amp;gt;IR = timer_mr2_intr_ir_sensor_timeout;&lt;br /&gt;
            IS.decodeIrCode();&lt;br /&gt;
        }&lt;br /&gt;
        /* MR0 is used for the timer rollover count */&lt;br /&gt;
        else&lt;br /&gt;
    #endif&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    void IR_Sensor::storeIrCode(uint32_t value)&lt;br /&gt;
    {&lt;br /&gt;
        if (!m_ready_to_receive)&lt;br /&gt;
            return;&lt;br /&gt;
        // Just store the timestamp of this signal&lt;br /&gt;
        if(g_signal_count &amp;lt; MAX_EDGES_PER_IR_FRAME)&lt;br /&gt;
        {&lt;br /&gt;
            g_ir_edge_timings[g_signal_count++] = value;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
    void IR_Sensor::decodeIrCode(void)&lt;br /&gt;
    {&lt;br /&gt;
        if (!m_ready_to_receive)&lt;br /&gt;
            return;&lt;br /&gt;
        for (int i = 0; i &amp;lt; g_signal_count-1; i++)&lt;br /&gt;
        {&lt;br /&gt;
            g_ir_cmd_timings[i] = g_ir_edge_timings[i+1]-g_ir_edge_timings[i];&lt;br /&gt;
        }&lt;br /&gt;
        m_code_received = true;&lt;br /&gt;
        m_ready_to_receive = false;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====IR Transmit Task:====&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The IR transmit task will be signaled by the Bluetooth task. After being signal the task will attempt to read from a file using the Storage class. If the file doesn't exist it will send an error message the terminal. If the file does exist then the task will read all the timing values into an array. The task will then enter a PortCritical area and transmit the IR signal by turning on and off the PWM pin. Once it is finished the IR Transmit task return the Mutex.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
        remoteTXTask(uint8_t priority) :scheduler_task(&amp;quot;rTX&amp;quot;, 2048, priority), pwm0(38Khz)&lt;br /&gt;
        bool run(void *p)&lt;br /&gt;
        {&lt;br /&gt;
            xQueueReceive;&lt;br /&gt;
            if ((command == send_cmd) &amp;amp;&amp;amp; xSemaphoreTakeAvailable)&lt;br /&gt;
            {&lt;br /&gt;
                u0_dbg_printf(&amp;quot;Transmitting...\n&amp;quot; );&lt;br /&gt;
                int size = readFile(mMsg.fileName);&lt;br /&gt;
                portENTER_CRITICAL();&lt;br /&gt;
                for(int i = 0; i &amp;lt; size; i++)&lt;br /&gt;
                {&lt;br /&gt;
                    if(i % 2 == 0) pwm1.set(25);&lt;br /&gt;
                    else pwm1.set(0);&lt;br /&gt;
                    delay_us(timing_values[i]);&lt;br /&gt;
                }&lt;br /&gt;
                pwm1.set(0);&lt;br /&gt;
                portEXIT_CRITICAL();&lt;br /&gt;
            }&lt;br /&gt;
            xSemaphoreGive(mIRMutex);&lt;br /&gt;
            return true;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[File:CmpE244_S15_T3_Remote_Learner_IRTask.jpg|250px|center|Flow Diagram for IR transmit Task|350px|thumb|Flow Chart : IR Transmit Task]]&lt;br /&gt;
&lt;br /&gt;
====Android Application with SJOne Board Software Design ====&lt;br /&gt;
&lt;br /&gt;
[[File:CMPE244_S15_TEAM2_Android_FlowChart.png|350px|right|thumb|Flow Chart: Android App with SJOne Board Software Design]]&lt;br /&gt;
&lt;br /&gt;
The Android application Bluetooth task is to provide the most important communication link between all the tasks. The Bluetooth task would receive commands from the application, then send items to the queue with the appropriate information such as command, button number, and message from the Android application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void BluetoothTask(void *p) {&lt;br /&gt;
  //Initialize transmit, receive and bluetooth queues&lt;br /&gt;
  bool init();&lt;br /&gt;
  bool run()&lt;br /&gt;
  {&lt;br /&gt;
     //Get command from Android app&lt;br /&gt;
     uart3.gets();&lt;br /&gt;
     //Check if it is a transmit or learn command&lt;br /&gt;
     checkCommand();&lt;br /&gt;
     //Send item to the appropriate queue&lt;br /&gt;
     xQueueSend();&lt;br /&gt;
     //Sleep to reduce CPU usage&lt;br /&gt;
     vTaskDelay(10);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Learner Android App ===&lt;br /&gt;
The software development environment for the Remote Learner android application is Android Studio 1.2.1.1. &lt;br /&gt;
&lt;br /&gt;
[[File:CMPE244_S15_TEAM2_Android_AndroidStudio.png|900px|center|thumb|Android App: Development Envirnoment]]&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:1200px;&amp;quot; |&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Unconnected.png|350px|left|thumb|Android App: Starting Screen]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_DeviceList.png|350px|left|thumb|Android App: Bluetooth Device List]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Connecting.png|350px|left|thumb|Android App: Connecting to Bluetooth Device]]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:1200px;&amp;quot; |&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Connected.png|350px|left|thumb|Android App: Bluetooth Device Connected]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Learned.png|350px|left|thumb|Android App: Button Learned]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_LearnFailed.png|350px|left|thumb|Android App: Button Learn Failed]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&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;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Issue #1 ===&lt;br /&gt;
'''PROBLEM:'''&lt;br /&gt;
&lt;br /&gt;
IR transmission signal was not being received by IR receiver. &lt;br /&gt;
&lt;br /&gt;
'''RESOLUTION:'''&lt;br /&gt;
&lt;br /&gt;
Used Oscilloscope to discover that PWM instance set to 38,000 Hz did not produce a 38 kHz. Had to adjust the value to about 3205 Hz to get a PWM signal that was about 38Khz. &lt;br /&gt;
&lt;br /&gt;
'''FUTURE RECOMMENDATIONS:'''&lt;br /&gt;
&lt;br /&gt;
Examine PWM code and determine if there is a way to enter the fequency in Khz.&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Issue #2 ===&lt;br /&gt;
'''PROBLEM:'''&lt;br /&gt;
&lt;br /&gt;
Putting IR transmission signal  in task was causing IR signal not to be received because task was being interrupted. &lt;br /&gt;
&lt;br /&gt;
'''RESOLUTION:'''&lt;br /&gt;
&lt;br /&gt;
Placed time sensitive code in a Port Critical section to prevent that section of code being interrupted.&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Testing ===&lt;br /&gt;
To test the IR transmitter we first used an oscilloscope to capture a IR signal from a remote control. After capturing the signal we determined the protocol. To replicate the signal we created an array with the timing values. The array values that were even index values represented the timing for the IR led to toggle on. The odd values represent the timing values that the IR LED need to be off. Using a for loop, we send the signal and tested using an oscilloscope first. After determining that the signal was similar to the capture, we tested with a few devices. The first device was an Apple remote to turn the volume up. Afterward we tested a different device using a different protocol. We were able to figure channel up/down and volume up/down and control a Sharp TV. The final test for integration was to control an LG TV. See demo video of the device controlling LG TV.&lt;br /&gt;
&lt;br /&gt;
=== Android App Testing ===&lt;br /&gt;
This section is for android app testing.&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;
=== 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_SJSU_S2015/ 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;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=15121</id>
		<title>S15: Remote Learner</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=15121"/>
				<updated>2015-05-24T17:34:14Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: /* IR Receive Task: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Remote Learner ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
The objective of this project was to create a remote learner using the SJOne board. The Remote Learner would have the ability to be learn any buttons of any remote controller then controlled by an Android application using Bluetooth. The application would tell the SJOne board to learn a remote control button using the onboard IR receiver sensor. Once the button was learned, then the SJOne board notifys the Android application and allows the application to replicate the button functionality using our own IR transmitter.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction == &lt;br /&gt;
Project Remote Learner is to have the ability to learn button functionalities from multiple remotes, and then control devices via an Android application. The objects for the remote learner are as the following:&lt;br /&gt;
* To create an Android application that will communicate with SJOne board using Bluetooth and UART&lt;br /&gt;
* To create a task that will be signal by the Android application to learn the IR timing using the on-board IR receiver. &lt;br /&gt;
** Task will then send a message to Android application through a Queue to indicate if it was able to successfully capture and write the timing values to a file to Flash memory&lt;br /&gt;
* To create a task that will receive a signal to transmit the IR timing values from Flash memory. This task will use the PWM library and delay function to turn on and off the IR LED&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Ying (Bailey) Wu - Android App and BT I/F&lt;br /&gt;
*  Yoni Klein - IR RX and IR Learning&lt;br /&gt;
*  Tejeswar - IR Protocol&lt;br /&gt;
*  Christopher Laurence - IR TX and IR learning&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
=== Remote Learner ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1-2&lt;br /&gt;
|3/27/2015&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|Research about the basic of remote controller protocols&lt;br /&gt;
|Completed&lt;br /&gt;
|3/10/15&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|Research about transmit timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
Research about receive timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
|Completed&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|Accurately decode IR signals from a remote control&lt;br /&gt;
Accurately transmit IR signals to a device &lt;br /&gt;
|Completed&lt;br /&gt;
|5/2/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|Interface BT module and establish communication with the Android phone&lt;br /&gt;
Decide on a communication protocol between phone and board.&lt;br /&gt;
|Completed&lt;br /&gt;
|05/22/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6-7&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|Research and add additional protocol support&lt;br /&gt;
|Completed&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|5/22/2015&lt;br /&gt;
|Final integration and testing.&lt;br /&gt;
|Completed&lt;br /&gt;
|05/23/2015&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Android Application ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|4/6/2015&lt;br /&gt;
|4/13/2015&lt;br /&gt;
|Research about Android application development&lt;br /&gt;
Research about Bluetooth module implementation with SJOne board&lt;br /&gt;
|Completed&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4/13/2015&lt;br /&gt;
|4/20/2015&lt;br /&gt;
|Implement and design a basic Android application on Android Studio&lt;br /&gt;
Implement the Bluetooth module using UART&lt;br /&gt;
|Completed&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/20/2015&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|Continue development of the Android application&lt;br /&gt;
Establish a connection between the SJOne board and Android application through Bluetooth &lt;br /&gt;
|Completed&lt;br /&gt;
|5/04/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|5/4/2015&lt;br /&gt;
|Collaborate with team members to integrate the Android application and remote learner functions &lt;br /&gt;
|Completed&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|5/4/2015&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|Debug and troubleshoot any issues that may arise&lt;br /&gt;
|Completed&lt;br /&gt;
|5/23/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|5/18/2015&lt;br /&gt;
|Miscellaneous&lt;br /&gt;
|Completed&lt;br /&gt;
|5/23/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
Give a simple list of the cost of your project broken down by components.  Do not write long stories here.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Line Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Number&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost ($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 120 Resistor&lt;br /&gt;
| Anchor Electronic&lt;br /&gt;
| N/A&lt;br /&gt;
| 10&lt;br /&gt;
| 1.00&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| IR LED 1.5 V 40mA&lt;br /&gt;
| Anchor Electronic&lt;br /&gt;
| N/A&lt;br /&gt;
| 4&lt;br /&gt;
| 1.00&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| HC-06 Bluetooth Module&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| 1&lt;br /&gt;
| 9.99&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| SJOne&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
| 1&lt;br /&gt;
| 80.00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
====Transmit IR LED:====&lt;br /&gt;
The IR LED transmitter is a simple circuit that connects to a PWM pin that is set to toggle at 38 Khz. The circuit needs a resister to create the voltage drop for the IR LED.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:IR LED Circuit.png|600px|centre|thumb|IR LED circuit]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Receive IR LED:====&lt;br /&gt;
The IR receiver is already part of the SJOne board.  On our revision 4 board, this is the TSOP75238TR IR Receiver Module by Vishay Semiconductors.  Other revision boards may have a slightly different part, but the operation and concepts are the same.&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver.png|400px|centre|thumb|IR Receiver Circuit]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The basic circuit is relatively simple.  Along with power and ground, an output signal is connected to two different parts of the board.&lt;br /&gt;
&lt;br /&gt;
The first connection is made to P1[18] on the LPC controller.  This GPIO pin will be configured to use the capture feature of the boards timer in order to &amp;quot;capture&amp;quot; the time a rising or falling signal event occurs.  This pin is labeled as &amp;quot;IR_DATA&amp;quot; on the board schematic and the associated GPIO function is referred to as CAP1[0] in the user manual.&lt;br /&gt;
The operation of the capture pin is described in the Hardware Interface section below.&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_LPC_Input.png|600px|centre|thumb|IR_DATA connection to CAP1[0]]]&lt;br /&gt;
&lt;br /&gt;
The second connection is to an external pin referenced in section 6D on page 3 of the board schematic.  This is mainly used for debugging and validating captured data on an oscilloscope.  Thanks Preet for adding this!  Both of these connections are displayed in the images below.&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_Test_Pin.png|365px|centre|thumb|External Pin]]&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;
====PWM to IR Transmitter LED:====&lt;br /&gt;
The PWM was used to generate the 38 Khz by creating an instance of PWM class. Then using the predefined function of &amp;quot;pwm.set&amp;quot; to toggle the pin at a duty cycle of about 25% and after certain amount of time we set the duty cycle to 0. Below is the standard behavior for NEC IR protocol explaining the amount of time that the PWM pin needs to toggle and time required to be off.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Protocol&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| On(µs)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Off(µs)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Total(µs)&lt;br /&gt;
|-&lt;br /&gt;
! Start&lt;br /&gt;
| 9000&lt;br /&gt;
| 4500&lt;br /&gt;
| 13500&lt;br /&gt;
|-&lt;br /&gt;
! 0 bit&lt;br /&gt;
| 560&lt;br /&gt;
| 560 &lt;br /&gt;
| 1120&lt;br /&gt;
|-&lt;br /&gt;
! 1 bit&lt;br /&gt;
| 560&lt;br /&gt;
| 1690 &lt;br /&gt;
| 2250&lt;br /&gt;
|-&lt;br /&gt;
! End&lt;br /&gt;
| 560&lt;br /&gt;
| N/A&lt;br /&gt;
| 560&lt;br /&gt;
|}&lt;br /&gt;
  &lt;br /&gt;
[[File:NEC_IR.JPG|600px|centre|thumb|In the above image is a capture of a NEC IR transmission using an oscilloscope.]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====IR Receiver to Capture Pin:====&lt;br /&gt;
The IR receiver outputs a logic one (high, 3.3v) signal when idle.  When active, the signal drops to a logic zero (low, 0v).  Therefore, the signal is active low, which may actually be inverted relative to the transmitted signal.  The images below show two examples of transmitted signals and receiver output.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:1200px;&amp;quot; |&lt;br /&gt;
|[[File:S15_244_RemoteLearner_IR_Receiver_Waveform1.png|400px|center|thumb|IR receiver output given typical pulse input signal]]&lt;br /&gt;
|[[File:S15_244_RemoteLearner_IR_Receiver_Waveform2.png|400px|center|thumb|IR receiver output given pulse burst input signal]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These images are from the IR receiver data sheet included in the development package of the SJOne board.  However, you can find it on Vishay's website as well.  This signal is physically connected to one of the capture pins on the LPC microcontroller.  In our example, the board is designed to take this input on P1[18] using CAP1[0].&lt;br /&gt;
&lt;br /&gt;
The capture feature is associated with one of the boards timers.  In our case, this is timer 1 (hence CAP1).  The [0] indicates port 0.  Timer 1 is used by the development package, so it should already be started for us.  All we need to do is configure the Capture Control Register to generate an input on both rising and falling edges.&lt;br /&gt;
&lt;br /&gt;
When this interrupt occurs, we get a tick count.  We don't need to know the time exactly, just the difference in times between captures.  Since the IR receiver idles high, we know the first interrupt will be for a falling edge.  We can perform the calculations according to this assumption.&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;
====IR Receive Task:====&lt;br /&gt;
&lt;br /&gt;
There are two components that make the IR receive functionality work.  The first is the task itself, which processes commands from the Bluetooth task and saves IR timings to the SD card.&lt;br /&gt;
&lt;br /&gt;
The task sleeps indefinitely until it receives a message on the mRXQueue.  If this message contains a learn command, it will attempt to take the mutex shared by the transmit task.  If it can take it, that means the system is not transmitting and it's safe to start recording timing signals.  If it can't take it, then the task will let the Bluetooth task know the system is busy and cannot learn new commands.&lt;br /&gt;
&lt;br /&gt;
However, if learning can continue, we signal the second part of the IR receive functionality.  We tell the IR_Sensor singleton class to clear any stored captures and wait until a new command is received or a timeout occurs.  Next, we retrieve the array of timings and store it on the SD card for the transmit task to use.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
    bool remoteRXTask::run(void *p)&lt;br /&gt;
    {&lt;br /&gt;
    xQueueReceive(mRxQueue,&amp;amp;mMsg,portMAX_DELAY);&lt;br /&gt;
    if ((mMsg.command == learn_cmd) &amp;amp;&amp;amp; (xSemaphoreTake(mIRMutex,0) == pdTRUE))&lt;br /&gt;
    {&lt;br /&gt;
        IS.clearCode();&lt;br /&gt;
        while(!IS.isIRCodeReceived())&lt;br /&gt;
        {&lt;br /&gt;
            vTaskDelayMs(100);&lt;br /&gt;
        }&lt;br /&gt;
        uint8_t max_timings = 255;&lt;br /&gt;
        uint16_t timings[max_timings] = {0};&lt;br /&gt;
        uint16_t count;&lt;br /&gt;
        IS.getLastIRCode(timings, &amp;amp;count, max_timings);&lt;br /&gt;
        //get+store the code and send feedback here&lt;br /&gt;
        sprintf(filename,&amp;quot;1:%s_%c.hex&amp;quot;,mMsg.msg,mMsg.button);&lt;br /&gt;
        Storage :: write(filename,(void *)&amp;amp;timings,count,0);&lt;br /&gt;
        xSemaphoreGive(mIRMutex);&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        strcpy(mMsg.msg,&amp;quot;*****Busy Transmitting***&amp;quot;);&lt;br /&gt;
        xQueueSend(mBtQueue,&amp;amp;mMsg,0);&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The code below is the core of what makes the IR learning possible.  If a rising or falling edge occurs on the capture pin, then an interrupt is generated.  In this case, storeIrCode() will be called which saves the timestamps to an array.  We set a timeout of 50ms, after which decodeIrCode() is called that calculates the differences in timestamps.  These differences are the timings we will store and later transmit.  &lt;br /&gt;
&lt;br /&gt;
The 50ms timeout was chosen because some remotes have more complicated commands that include two consecutive commands.  The time between those commands was measured to be about 40ms with the tested remotes.&lt;br /&gt;
&lt;br /&gt;
    #if (1 == SYS_CFG_SYS_TIMER)&lt;br /&gt;
        /* ISR for captured time of the capture input pin */&lt;br /&gt;
        if (intr_reason &amp;amp; timer_capt0_intr_ir_sensor_edge_time_captured)&lt;br /&gt;
        {&lt;br /&gt;
            gp_timer_ptr-&amp;gt;IR = timer_capt0_intr_ir_sensor_edge_time_captured;&lt;br /&gt;
            // Store the IR capture time and setup timeout of the IR signal (unless we reset it again)&lt;br /&gt;
            IS.storeIrCode(gp_timer_ptr-&amp;gt;CR0);&lt;br /&gt;
            //10k was too short of a timeout for long commands,&lt;br /&gt;
            //which sometimes have separations of up to 40ms&lt;br /&gt;
            gp_timer_ptr-&amp;gt;MR2 = 50000 + gp_timer_ptr-&amp;gt;TC;&lt;br /&gt;
        }&lt;br /&gt;
        /* MR2: End of IR capture (no IR capture after initial IR signal) */&lt;br /&gt;
        else if (intr_reason &amp;amp; timer_mr2_intr_ir_sensor_timeout)&lt;br /&gt;
        {&lt;br /&gt;
            gp_timer_ptr-&amp;gt;IR = timer_mr2_intr_ir_sensor_timeout;&lt;br /&gt;
            IS.decodeIrCode();&lt;br /&gt;
        }&lt;br /&gt;
        /* MR0 is used for the timer rollover count */&lt;br /&gt;
        else&lt;br /&gt;
    #endif&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    void IR_Sensor::storeIrCode(uint32_t value)&lt;br /&gt;
    {&lt;br /&gt;
        if (!m_ready_to_receive)&lt;br /&gt;
            return;&lt;br /&gt;
        // Just store the timestamp of this signal&lt;br /&gt;
        if(g_signal_count &amp;lt; MAX_EDGES_PER_IR_FRAME)&lt;br /&gt;
        {&lt;br /&gt;
            g_ir_edge_timings[g_signal_count++] = value;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    void IR_Sensor::decodeIrCode(void)&lt;br /&gt;
    {&lt;br /&gt;
        if (!m_ready_to_receive)&lt;br /&gt;
            return;&lt;br /&gt;
        for (int i = 0; i &amp;lt; g_signal_count-1; i++)&lt;br /&gt;
        {&lt;br /&gt;
            g_ir_cmd_timings[i] = g_ir_edge_timings[i+1]-g_ir_edge_timings[i];&lt;br /&gt;
        }&lt;br /&gt;
        m_code_received = true;&lt;br /&gt;
        m_ready_to_receive = false;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====IR Transmit Task:====&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The IR transmit task will be signaled by the Bluetooth task. After being signal the task will attempt to read from a file using the Storage class. If the file doesn't exist it will send an error message the terminal. If the file does exist then the task will read all the timing values into an array. The task will then enter a PortCritical area and transmit the IR signal by turning on and off the PWM pin. Once it is finished the IR Transmit task return the Mutex.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
        remoteTXTask(uint8_t priority) :scheduler_task(&amp;quot;rTX&amp;quot;, 2048, priority), pwm0(38Khz)&lt;br /&gt;
        bool run(void *p)&lt;br /&gt;
        {&lt;br /&gt;
            xQueueReceive;&lt;br /&gt;
            if ((command == send_cmd) &amp;amp;&amp;amp; xSemaphoreTakeAvailable)&lt;br /&gt;
            {&lt;br /&gt;
                u0_dbg_printf(&amp;quot;Transmitting...\n&amp;quot; );&lt;br /&gt;
                int size = readFile(mMsg.fileName);&lt;br /&gt;
                portENTER_CRITICAL();&lt;br /&gt;
                for(int i = 0; i &amp;lt; size; i++)&lt;br /&gt;
                {&lt;br /&gt;
                    if(i % 2 == 0) pwm1.set(25);&lt;br /&gt;
                    else pwm1.set(0);&lt;br /&gt;
                    delay_us(timing_values[i]);&lt;br /&gt;
                }&lt;br /&gt;
                pwm1.set(0);&lt;br /&gt;
                portEXIT_CRITICAL();&lt;br /&gt;
            }&lt;br /&gt;
            xSemaphoreGive(mIRMutex);&lt;br /&gt;
            return true;&lt;br /&gt;
        }&lt;br /&gt;
[[File:IRTask.jpg|250px|center|Flow Diagram for IR transmit Task|350px|thumb|Flow Chart : IR Transmit Task]]&lt;br /&gt;
&lt;br /&gt;
====Android Application with SJOne Board Software Design ====&lt;br /&gt;
&lt;br /&gt;
[[File:CMPE244_S15_TEAM2_Android_FlowChart.png|350px|left|thumb|Flow Chart: Android App with SJOne Board Software Design]]&lt;br /&gt;
&lt;br /&gt;
The Android application Bluetooth task is to provide &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void BluetoothTask(void *p) {&lt;br /&gt;
  //Initialize transmit, receive and bluetooth queues&lt;br /&gt;
  bool init();&lt;br /&gt;
  bool run()&lt;br /&gt;
  {&lt;br /&gt;
     //Get command from Android app&lt;br /&gt;
     uart3.gets();&lt;br /&gt;
     //Check if it is a transmit or learn command&lt;br /&gt;
     checkCommand();&lt;br /&gt;
     //Send item to the appropriate queue&lt;br /&gt;
     xQueueSend();&lt;br /&gt;
     //Sleep to reduce CPU usage&lt;br /&gt;
     vTaskDelay(10);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote Learner Android App ===&lt;br /&gt;
The software development environment for the Remote Learner android application is Android Studio 1.2.1.1. &lt;br /&gt;
&lt;br /&gt;
[[File:CMPE244_S15_TEAM2_Android_AndroidStudio.png|900px|center|thumb|Android App: Development Envirnoment]]&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:1200px;&amp;quot; |&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Unconnected.png|350px|left|thumb|Android App: Starting Screen]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_DeviceList.png|350px|left|thumb|Android App: Bluetooth Device List]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Connecting.png|350px|left|thumb|Android App: Connecting to Bluetooth Device]]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:1200px;&amp;quot; |&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Connected.png|350px|left|thumb|Android App: Bluetooth Device Connected]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_Learned.png|350px|left|thumb|Android App: Button Learned]]&lt;br /&gt;
|[[File:CMPE244_S15_TEAM2_Android_LearnFailed.png|350px|left|thumb|Android App: Button Learn Failed]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&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;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Issue #1 ===&lt;br /&gt;
'''PROBLEM:'''&lt;br /&gt;
&lt;br /&gt;
IR transmission signal was not being received by IR receiver. &lt;br /&gt;
&lt;br /&gt;
'''RESOLUTION:'''&lt;br /&gt;
&lt;br /&gt;
Used Oscilloscope to discover that PWM instance set to 38,000 Hz did not produce a 38 kHz. Had to adjust the value to about 3205 Hz to get a PWM signal that was about 38Khz. &lt;br /&gt;
&lt;br /&gt;
'''FUTURE RECOMMENDATIONS:'''&lt;br /&gt;
&lt;br /&gt;
Examine PWM code and determine if there is a way to enter the fequency in Khz.&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Issue #2 ===&lt;br /&gt;
'''PROBLEM:'''&lt;br /&gt;
&lt;br /&gt;
Putting IR transmission signal  in task was causing IR signal not to be received because task was being interrupted. &lt;br /&gt;
&lt;br /&gt;
'''RESOLUTION:'''&lt;br /&gt;
&lt;br /&gt;
Placed time sensitive code in a Port Critical section to prevent that section of code being interrupted.&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Testing ===&lt;br /&gt;
To test the IR transmitter we first used an oscilloscope to capture a IR signal from a remote control. After capturing the signal we determined the protocol. To replicate the signal we created an array with the timing values. The array values that were even index values represented the timing for the IR led to toggle on. The odd values represent the timing values that the IR LED need to be off. Using a for loop, we send the signal and tested using an oscilloscope first. After determining that the signal was similar to the capture, we tested with a few devices. The first device was an Apple remote to turn the volume up. Afterward we tested a different device using a different protocol. We were able to figure channel up/down and volume up/down and control a Sharp TV. The final test for integration was to control an LG TV. See demo video of the device controlling LG TV.&lt;br /&gt;
&lt;br /&gt;
=== Android App Testing ===&lt;br /&gt;
This section is for android app testing.&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;
=== 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_SJSU_S2015/ 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;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=14001</id>
		<title>S15: Remote Learner</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=14001"/>
				<updated>2015-05-23T05:47:43Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: /* Hardware Interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Grading Criteria ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;&lt;br /&gt;
*  How well is Software &amp;amp; Hardware Design described?&lt;br /&gt;
*  How well can this report be used to reproduce this project?&lt;br /&gt;
*  Code Quality&lt;br /&gt;
*  Overall Report Quality:&lt;br /&gt;
**  Software Block Diagrams&lt;br /&gt;
**  Hardware Block Diagrams&lt;br /&gt;
**:  Schematic Quality&lt;br /&gt;
**  Quality of technical challenges and solutions adopted.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Remote Learner ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
The objective of this project was to create a remote learner using the SJOne board. The Remote Learner would have the ability to be controlled by an Android application using Bluetooth. The application would tell the SJOne board to learn a remote control using the IR sensor or transmit the remote command via IR LED..&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
Show list of your objectives.  This section includes the high level details of your project.  You can write about the various sensors or peripherals you used to get your project completed.&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Bailey Wu - Android App and BT I/F&lt;br /&gt;
*  Yoni Klein - RX and IR Learning&lt;br /&gt;
*  Tejeswar - IR Protocol&lt;br /&gt;
*  Christopher Laurence - TX&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
=== Remote Learner ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1-2&lt;br /&gt;
|3/27/2015&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|Research about the basic of remote controller protocols&lt;br /&gt;
|Completed&lt;br /&gt;
|3/10/15&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|Research about transmit timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
Research about receive timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
|Completed&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|Accurately decode IR signals from a remote control&lt;br /&gt;
Accurately transmit IR signals to a device &lt;br /&gt;
|Completed&lt;br /&gt;
|5/2/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|Interface BT module and establish communication with the Android phone&lt;br /&gt;
Decide on a communication protocol between phone and board.&lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6-7&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|Research and add additional protocol support&lt;br /&gt;
|Completed&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|5/22/2015&lt;br /&gt;
|Final integration and testing.&lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Android Application ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|4/6/2015&lt;br /&gt;
|4/13/2015&lt;br /&gt;
|Research about Android application development&lt;br /&gt;
Research about Bluetooth module implementation with SJOne board&lt;br /&gt;
|Completed&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4/13/2015&lt;br /&gt;
|4/20/2015&lt;br /&gt;
|Implement and design a basic Android application on Android Studio&lt;br /&gt;
Implement the Bluetooth module using UART&lt;br /&gt;
|Ongoing&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/20/2015&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|Continue development of the Android application&lt;br /&gt;
Establish a connection between the SJOne board and Android application through Bluetooth &lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|5/4/2015&lt;br /&gt;
|Collaborate with team members to integrate the Android application and remote learner functions &lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|5/4/2015&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|Debug and troubleshoot any issues that may arise&lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|5/18/2015&lt;br /&gt;
|Miscellaneous&lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
Give a simple list of the cost of your project broken down by components.  Do not write long stories here.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Line Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Number&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost ($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 120 Resistor&lt;br /&gt;
| Anchor Electronic&lt;br /&gt;
| N/A&lt;br /&gt;
| 10&lt;br /&gt;
| 1.00&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| IR LED 1.5 V 40mA&lt;br /&gt;
| Anchor Electronic&lt;br /&gt;
| N/A&lt;br /&gt;
| 4&lt;br /&gt;
| 1.00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
The design section can go over your hardware and software design.  Organize this section using sub-sections that go over your design and implementation.&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;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td valign=&amp;quot;top&amp;quot; align=&amp;quot;justify&amp;quot; width=700px&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Transmit IR LED:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The IR LED transmitter is a simple circuit that connects to a PWM pin that is set to toggle at 38 Khz. The circuit needs a resister to create the voltage drop for the IR LED.&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[File:IR LED Circuit.png|600px|centre|thumb|IR LED circuit]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Receive IR LED:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The IR receiver is already part of the SJOne board.  On our revision 4 board, this is the TSOP75238TR IR Receiver Module by Vishay Semiconductors.  Other revision boards may have a slightly different part, but the operation and concepts are the same.&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver.png|400px|centre|thumb|IR Receiver Circuit]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The basic circuit is relatively simple.  Along with power and ground, an output signal is connected to two different parts of the board.&lt;br /&gt;
&lt;br /&gt;
The first connection is made to P1[18] on the LPC controller.  This GPIO pin will be configured to use the capture feature of the boards timer in order to &amp;quot;capture&amp;quot; the time a rising or falling signal event occurs.  This pin is labeled as &amp;quot;IR_DATA&amp;quot; on the board schematic and the associated GPIO function is referred to as CAP1[0] in the user manual.&lt;br /&gt;
The operation of the capture pin is described in the Hardware Interface section below.&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_LPC_Input.png|600px|centre|thumb|IR_DATA connection to CAP1[0]]]&lt;br /&gt;
&lt;br /&gt;
The second connection is to an external pin referenced in section 6D on page 3 of the board schematic.  This is mainly used for debugging and validating captured data on an oscilloscope.  Thanks Preet for adding this!  Both of these connections are displayed in the images below.&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_Test_Pin.png|365px|centre|thumb|External Pin]]&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;
&amp;lt;b&amp;gt;PWM to IR LED:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The PWM was used to generate the 38 Khz by creating an instance of PWM class. Then using the predefined function of &amp;quot;pwm.set&amp;quot; to toggle the pin at a duty cycle of about 25% and after certain amount of time we set the duty cycle to 0. Below is the standard behavior for NEC IR protocol explaining the amount of time that the PWM pin needs to toggle and time required to be off.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Protocol&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| On(µs)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Off(µs)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Total(µs)&lt;br /&gt;
|-&lt;br /&gt;
! Start&lt;br /&gt;
| 9000&lt;br /&gt;
| 4500&lt;br /&gt;
| 13500&lt;br /&gt;
|-&lt;br /&gt;
! 0 bit&lt;br /&gt;
| 560&lt;br /&gt;
| 560 &lt;br /&gt;
| 1120&lt;br /&gt;
|-&lt;br /&gt;
! 1 bit&lt;br /&gt;
| 560&lt;br /&gt;
| 1690 &lt;br /&gt;
| 2250&lt;br /&gt;
|-&lt;br /&gt;
! End&lt;br /&gt;
| 560&lt;br /&gt;
| N/A&lt;br /&gt;
| 560&lt;br /&gt;
|}&lt;br /&gt;
  &lt;br /&gt;
[[File:NEC_IR.JPG|500px]]&lt;br /&gt;
&amp;lt;br&amp;gt;In the above image is a capture of a NEC IR transmission using an oscilloscope.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;IR Receiver to Capture Pin:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The IR receiver outputs a logic one (high, 3.3v) signal when idle.  When active, the signal drops to a logic zero (low, 0v).  Therefore, the signal is active low, which may actually be inverted relative to the transmitted signal.  The images below show two examples of transmitted signals and receiver output.&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_Waveform1.png|400px|centre|thumb|IR receiver output given typical pulse input signal]]&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_Waveform2.png|400px|centre|thumb|IR receiver output given pulse burst input signal]]&lt;br /&gt;
&lt;br /&gt;
These images are from the IR receiver data sheet included in the development package of the SJOne board.  However, you can find it on Vishay's website as well.  This signal is physically connected to one of the capture pins on the LPC microcontroller.  In our example, the board is designed to take this input on P1[18] using CAP1[0].&lt;br /&gt;
&lt;br /&gt;
The capture feature is associated with one of the boards timers.  In our case, this is timer 1 (hence CAP1).  The [0] indicates port 0.  Timer 1 is used by the development package, so it should already be started for us.  All we need to do is configure the Capture Control Register to generate an input on both rising and falling edges.&lt;br /&gt;
&lt;br /&gt;
When this interrupt occurs, we get a tick count.  We don't need to know the time exactly, just the difference in times between captures.  Since the IR receiver idles high, we know the first interrupt will be for a falling edge.  We can perform the calculations according to this assumption.&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;
&amp;lt;b&amp;gt;IR Transmit Task:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The IR transmit task will be signaled by the Bluetooth task. After being signal the task will attempt to read from a file using the Storage class. If the file doesn't exist it will send an error message to the Bluetooth task. If the file does exist then the task will read all the timing values into an array. The task will then enter a PortCritical area and transmit the IR signal by turning on and off the PWM pin. Once it is finished the IR Transmit task will signal the Bluetooth task with a successful message.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:IRTask.jpg|250px|center|Flow Diagram for IR transmit Task]]&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;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Issue #1 ===&lt;br /&gt;
'''PROBLEM:'''&lt;br /&gt;
&lt;br /&gt;
IR transmission signal was not being received by IR receiver. &lt;br /&gt;
&lt;br /&gt;
'''RESOLUTION:'''&lt;br /&gt;
&lt;br /&gt;
Used Oscilloscope to discover that PWM instance set to 38,000 Hz did not produce a 38 kHz. Had to adjust the value to about 3205 Hz to get a PWM signal that was about 38Khz. &lt;br /&gt;
&lt;br /&gt;
'''FUTURE RECOMMENDATIONS:'''&lt;br /&gt;
&lt;br /&gt;
Examine PWM code and determine if there is a way to enter the fequency in Khz.&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Issue #2 ===&lt;br /&gt;
'''PROBLEM:'''&lt;br /&gt;
&lt;br /&gt;
Putting IR transmission signal  in task was causing IR signal not to be received because task was being interrupted. &lt;br /&gt;
&lt;br /&gt;
'''RESOLUTION:'''&lt;br /&gt;
&lt;br /&gt;
Placed time sensitive code in a Port Critical section to prevent that section of code being interrupted.&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;
=== 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_SJSU_S2015/ 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;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=13986</id>
		<title>S15: Remote Learner</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=13986"/>
				<updated>2015-05-23T05:18:25Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: /* Hardware Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Grading Criteria ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;&lt;br /&gt;
*  How well is Software &amp;amp; Hardware Design described?&lt;br /&gt;
*  How well can this report be used to reproduce this project?&lt;br /&gt;
*  Code Quality&lt;br /&gt;
*  Overall Report Quality:&lt;br /&gt;
**  Software Block Diagrams&lt;br /&gt;
**  Hardware Block Diagrams&lt;br /&gt;
**:  Schematic Quality&lt;br /&gt;
**  Quality of technical challenges and solutions adopted.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Remote Learner ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
The objective of this project was to create a remote learner using the SJOne board. The Remote Learner would have the ability to be controlled by an Android application using Bluetooth. The application would tell the SJOne board to learn a remote control using the IR sensor or transmit the remote command via IR LED..&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
Show list of your objectives.  This section includes the high level details of your project.  You can write about the various sensors or peripherals you used to get your project completed.&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Bailey Wu - Android App and BT I/F&lt;br /&gt;
*  Yoni Klein - RX and IR Learning&lt;br /&gt;
*  Tejeswar - IR Protocol&lt;br /&gt;
*  Christopher Laurence - TX&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
=== Remote Learner ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1-2&lt;br /&gt;
|3/27/2015&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|Research about the basic of remote controller protocols&lt;br /&gt;
|Completed&lt;br /&gt;
|3/10/15&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|Research about transmit timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
Research about receive timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
|Completed&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|Accurately decode IR signals from a remote control&lt;br /&gt;
Accurately transmit IR signals to a device &lt;br /&gt;
|Completed&lt;br /&gt;
|5/2/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|Interface BT module and establish communication with the Android phone&lt;br /&gt;
Decide on a communication protocol between phone and board.&lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6-7&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|Research and add additional protocol support&lt;br /&gt;
|Completed&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|5/22/2015&lt;br /&gt;
|Final integration and testing.&lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Android Application ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|4/6/2015&lt;br /&gt;
|4/13/2015&lt;br /&gt;
|Research about Android application development&lt;br /&gt;
Research about Bluetooth module implementation with SJOne board&lt;br /&gt;
|Completed&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4/13/2015&lt;br /&gt;
|4/20/2015&lt;br /&gt;
|Implement and design a basic Android application on Android Studio&lt;br /&gt;
Implement the Bluetooth module using UART&lt;br /&gt;
|Ongoing&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/20/2015&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|Continue development of the Android application&lt;br /&gt;
Establish a connection between the SJOne board and Android application through Bluetooth &lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|5/4/2015&lt;br /&gt;
|Collaborate with team members to integrate the Android application and remote learner functions &lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|5/4/2015&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|Debug and troubleshoot any issues that may arise&lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|5/18/2015&lt;br /&gt;
|Miscellaneous&lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
Give a simple list of the cost of your project broken down by components.  Do not write long stories here.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Line Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Number&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost ($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 120 Resistor&lt;br /&gt;
| Anchor Electronic&lt;br /&gt;
| N/A&lt;br /&gt;
| 10&lt;br /&gt;
| 1.00&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| IR LED 1.5 V 40mA&lt;br /&gt;
| Anchor Electronic&lt;br /&gt;
| N/A&lt;br /&gt;
| 4&lt;br /&gt;
| 1.00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
The design section can go over your hardware and software design.  Organize this section using sub-sections that go over your design and implementation.&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;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td valign=&amp;quot;top&amp;quot; align=&amp;quot;justify&amp;quot; width=700px&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Transmit IR LED:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The IR LED transmitter is a simple circuit that connects to a PWM pin that is set to toggle at 38 Khz. The circuit needs a resister to create the voltage drop for the IR LED.&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[File:IR LED Circuit.png|600px|centre|thumb|IR LED circuit]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Receive IR LED:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The IR receiver is already part of the SJOne board.  On our revision 4 board, this is the TSOP75238TR IR Receiver Module by Vishay Semiconductors.  Other revision boards may have a slightly different part, but the operation and concepts are the same.&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver.png|400px|centre|thumb|IR Receiver Circuit]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The basic circuit is relatively simple.  Along with power and ground, an output signal is connected to two different parts of the board.&lt;br /&gt;
&lt;br /&gt;
The first connection is made to P1[18] on the LPC controller.  This GPIO pin will be configured to use the capture feature of the boards timer in order to &amp;quot;capture&amp;quot; the time a rising or falling signal event occurs.  This pin is labeled as &amp;quot;IR_DATA&amp;quot; on the board schematic and the associated GPIO function is referred to as CAP1[0] in the user manual.&lt;br /&gt;
The operation of the capture pin is described in the Hardware Interface section below.&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_LPC_Input.png|600px|centre|thumb|IR_DATA connection to CAP1[0]]]&lt;br /&gt;
&lt;br /&gt;
The second connection is to an external pin referenced in section 6D on page 3 of the board schematic.  This is mainly used for debugging and validating captured data on an oscilloscope.  Thanks Preet for adding this!  Both of these connections are displayed in the images below.&lt;br /&gt;
&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_Test_Pin.png|365px|centre|thumb|External Pin]]&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;
&amp;lt;b&amp;gt;PWM to IR LED:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The PWM was used to generate the 38 Khz by creating an instance of PWM class. Then using the predefined function of &amp;quot;pwm.set&amp;quot; to toggle the pin at a duty cycle of about 25% and after certain amount of time we set the duty cycle to 0. Below is the standard behavior for NEC IR protocol explaining the amount of time that the PWM pin needs to toggle and time required to be off.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Protocol&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| On(µs)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Off(µs)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Total(µs)&lt;br /&gt;
|-&lt;br /&gt;
! Start&lt;br /&gt;
| 9000&lt;br /&gt;
| 4500&lt;br /&gt;
| 13500&lt;br /&gt;
|-&lt;br /&gt;
! 0 bit&lt;br /&gt;
| 560&lt;br /&gt;
| 560 &lt;br /&gt;
| 1120&lt;br /&gt;
|-&lt;br /&gt;
! 1 bit&lt;br /&gt;
| 560&lt;br /&gt;
| 1690 &lt;br /&gt;
| 2250&lt;br /&gt;
|-&lt;br /&gt;
! End&lt;br /&gt;
| 560&lt;br /&gt;
| N/A&lt;br /&gt;
| 560&lt;br /&gt;
|}&lt;br /&gt;
  &lt;br /&gt;
[[File:NEC_IR.JPG|500px]]&lt;br /&gt;
&amp;lt;br&amp;gt;In the above image is a capture of a NEC IR transmission using an oscilloscope.&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;
&amp;lt;b&amp;gt;IR Transmit Task:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The IR transmit task will be signaled by the Bluetooth task. After being signal the task will attempt to read from a file using the Storage class. If the file doesn't exist it will send an error message to the Bluetooth task. If the file does exist then the task will read all the timing values into an array. The task will then enter a PortCritical area and transmit the IR signal by turning on and off the PWM pin. Once it is finished the IR Transmit task will signal the Bluetooth task with a successful message.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:IRTask.jpg|250px|center|Flow Diagram for IR transmit Task]]&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;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Issue #1 ===&lt;br /&gt;
'''PROBLEM:'''&lt;br /&gt;
&lt;br /&gt;
IR transmission signal was not being received by IR receiver. &lt;br /&gt;
&lt;br /&gt;
'''RESOLUTION:'''&lt;br /&gt;
&lt;br /&gt;
Used Oscilloscope to discover that PWM instance set to 38,000 Hz did not produce a 38 kHz. Had to adjust the value to about 3205 Hz to get a PWM signal that was about 38Khz. &lt;br /&gt;
&lt;br /&gt;
'''FUTURE RECOMMENDATIONS:'''&lt;br /&gt;
&lt;br /&gt;
Examine PWM code and determine if there is a way to enter the fequency in Khz.&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Issue #2 ===&lt;br /&gt;
'''PROBLEM:'''&lt;br /&gt;
&lt;br /&gt;
Putting IR transmission signal  in task was causing IR signal not to be received because task was being interrupted. &lt;br /&gt;
&lt;br /&gt;
'''RESOLUTION:'''&lt;br /&gt;
&lt;br /&gt;
Placed time sensitive code in a Port Critical section to prevent that section of code being interrupted.&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;
=== 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_SJSU_S2015/ 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;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=13985</id>
		<title>S15: Remote Learner</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=13985"/>
				<updated>2015-05-23T05:15:21Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: /* Hardware Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Grading Criteria ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;&lt;br /&gt;
*  How well is Software &amp;amp; Hardware Design described?&lt;br /&gt;
*  How well can this report be used to reproduce this project?&lt;br /&gt;
*  Code Quality&lt;br /&gt;
*  Overall Report Quality:&lt;br /&gt;
**  Software Block Diagrams&lt;br /&gt;
**  Hardware Block Diagrams&lt;br /&gt;
**:  Schematic Quality&lt;br /&gt;
**  Quality of technical challenges and solutions adopted.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Remote Learner ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
The objective of this project was to create a remote learner using the SJOne board. The Remote Learner would have the ability to be controlled by an Android application using Bluetooth. The application would tell the SJOne board to learn a remote control using the IR sensor or transmit the remote command via IR LED..&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
Show list of your objectives.  This section includes the high level details of your project.  You can write about the various sensors or peripherals you used to get your project completed.&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Bailey Wu - Android App and BT I/F&lt;br /&gt;
*  Yoni Klein - RX and IR Learning&lt;br /&gt;
*  Tejeswar - IR Protocol&lt;br /&gt;
*  Christopher Laurence - TX&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
=== Remote Learner ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1-2&lt;br /&gt;
|3/27/2015&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|Research about the basic of remote controller protocols&lt;br /&gt;
|Completed&lt;br /&gt;
|3/10/15&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|Research about transmit timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
Research about receive timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
|Completed&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|Accurately decode IR signals from a remote control&lt;br /&gt;
Accurately transmit IR signals to a device &lt;br /&gt;
|Completed&lt;br /&gt;
|5/2/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|Interface BT module and establish communication with the Android phone&lt;br /&gt;
Decide on a communication protocol between phone and board.&lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6-7&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|Research and add additional protocol support&lt;br /&gt;
|Completed&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|5/22/2015&lt;br /&gt;
|Final integration and testing.&lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Android Application ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|4/6/2015&lt;br /&gt;
|4/13/2015&lt;br /&gt;
|Research about Android application development&lt;br /&gt;
Research about Bluetooth module implementation with SJOne board&lt;br /&gt;
|Completed&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4/13/2015&lt;br /&gt;
|4/20/2015&lt;br /&gt;
|Implement and design a basic Android application on Android Studio&lt;br /&gt;
Implement the Bluetooth module using UART&lt;br /&gt;
|Ongoing&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/20/2015&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|Continue development of the Android application&lt;br /&gt;
Establish a connection between the SJOne board and Android application through Bluetooth &lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|5/4/2015&lt;br /&gt;
|Collaborate with team members to integrate the Android application and remote learner functions &lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|5/4/2015&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|Debug and troubleshoot any issues that may arise&lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|5/18/2015&lt;br /&gt;
|Miscellaneous&lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
Give a simple list of the cost of your project broken down by components.  Do not write long stories here.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Line Item#&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Desciption&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Vendor&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Part Number&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Qty&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Cost ($)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 120 Resistor&lt;br /&gt;
| Anchor Electronic&lt;br /&gt;
| N/A&lt;br /&gt;
| 10&lt;br /&gt;
| 1.00&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| IR LED 1.5 V 40mA&lt;br /&gt;
| Anchor Electronic&lt;br /&gt;
| N/A&lt;br /&gt;
| 4&lt;br /&gt;
| 1.00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
The design section can go over your hardware and software design.  Organize this section using sub-sections that go over your design and implementation.&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;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td valign=&amp;quot;top&amp;quot; align=&amp;quot;justify&amp;quot; width=700px&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Transmit IR LED:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The IR LED transmitter is a simple circuit that connects to a PWM pin that is set to toggle at 38 Khz. The circuit needs a resister to create the voltage drop for the IR LED.&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
[[File:IR LED Circuit.png|600px|centre|thumb|IR LED circuit]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Receive IR LED:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The IR receiver is already part of the SJOne board.  On our revision 4 board, this is the TSOP75238TR IR Receiver Module by Vishay Semiconductors.  Other revision boards may have a slightly different part, but the operation and concepts are the same.&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver.png|400px|centre|thumb|IR Receiver Circuit]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The basic circuit is relatively simple.  Along with power and ground, an output signal is connected to two different parts of the board.&lt;br /&gt;
&lt;br /&gt;
The first connection is made to P1[18] on the LPC controller.  This GPIO pin will be configured to use the capture feature of the boards timer in order to &amp;quot;capture&amp;quot; the time a rising or falling signal event occurs.  This pin is labeled as &amp;quot;IR_DATA&amp;quot; on the board schematic and the associated GPIO function is referred to as CAP1[0] in the user manual.&lt;br /&gt;
The operation of the capture pin is described in the Hardware Interface section below.&lt;br /&gt;
&lt;br /&gt;
The second connection is to an external pin referenced in section 6D on page 3 of the board schematic.  This is mainly used for debugging and validating captured data on an oscilloscope.  Thanks Preet for adding this!  Both of these connections are displayed in the images below.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_LPC_Input.png|600px|left|thumb|IR_DATA connection to CAP1[0]]]&lt;br /&gt;
[[File:S15_244_RemoteLearner_IR_Receiver_Test_Pin.png|365px|right|thumb|External Pin]]&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;
&amp;lt;b&amp;gt;PWM to IR LED:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The PWM was used to generate the 38 Khz by creating an instance of PWM class. Then using the predefined function of &amp;quot;pwm.set&amp;quot; to toggle the pin at a duty cycle of about 25% and after certain amount of time we set the duty cycle to 0. Below is the standard behavior for NEC IR protocol explaining the amount of time that the PWM pin needs to toggle and time required to be off.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Protocol&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| On(µs)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Off(µs)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Total(µs)&lt;br /&gt;
|-&lt;br /&gt;
! Start&lt;br /&gt;
| 9000&lt;br /&gt;
| 4500&lt;br /&gt;
| 13500&lt;br /&gt;
|-&lt;br /&gt;
! 0 bit&lt;br /&gt;
| 560&lt;br /&gt;
| 560 &lt;br /&gt;
| 1120&lt;br /&gt;
|-&lt;br /&gt;
! 1 bit&lt;br /&gt;
| 560&lt;br /&gt;
| 1690 &lt;br /&gt;
| 2250&lt;br /&gt;
|-&lt;br /&gt;
! End&lt;br /&gt;
| 560&lt;br /&gt;
| N/A&lt;br /&gt;
| 560&lt;br /&gt;
|}&lt;br /&gt;
  &lt;br /&gt;
[[File:NEC_IR.JPG|500px]]&lt;br /&gt;
&amp;lt;br&amp;gt;In the above image is a capture of a NEC IR transmission using an oscilloscope.&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;
&amp;lt;b&amp;gt;IR Transmit Task:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The IR transmit task will be signaled by the Bluetooth task. After being signal the task will attempt to read from a file using the Storage class. If the file doesn't exist it will send an error message to the Bluetooth task. If the file does exist then the task will read all the timing values into an array. The task will then enter a PortCritical area and transmit the IR signal by turning on and off the PWM pin. Once it is finished the IR Transmit task will signal the Bluetooth task with a successful message.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:IRTask.jpg|250px|center|Flow Diagram for IR transmit Task]]&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;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Issue #1 ===&lt;br /&gt;
'''PROBLEM:'''&lt;br /&gt;
&lt;br /&gt;
IR transmission signal was not being received by IR receiver. &lt;br /&gt;
&lt;br /&gt;
'''RESOLUTION:'''&lt;br /&gt;
&lt;br /&gt;
Used Oscilloscope to discover that PWM instance set to 38,000 Hz did not produce a 38 kHz. Had to adjust the value to about 3205 Hz to get a PWM signal that was about 38Khz. &lt;br /&gt;
&lt;br /&gt;
'''FUTURE RECOMMENDATIONS:'''&lt;br /&gt;
&lt;br /&gt;
Examine PWM code and determine if there is a way to enter the fequency in Khz.&lt;br /&gt;
&lt;br /&gt;
=== IR Transmit Issue #2 ===&lt;br /&gt;
'''PROBLEM:'''&lt;br /&gt;
&lt;br /&gt;
Putting IR transmission signal  in task was causing IR signal not to be received because task was being interrupted. &lt;br /&gt;
&lt;br /&gt;
'''RESOLUTION:'''&lt;br /&gt;
&lt;br /&gt;
Placed time sensitive code in a Port Critical section to prevent that section of code being interrupted.&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;
=== 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_SJSU_S2015/ 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;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=File:S15_244_RemoteLearner_IR_Receiver_Waveform2.png&amp;diff=13978</id>
		<title>File:S15 244 RemoteLearner IR Receiver Waveform2.png</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=File:S15_244_RemoteLearner_IR_Receiver_Waveform2.png&amp;diff=13978"/>
				<updated>2015-05-23T05:01:42Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=File:S15_244_RemoteLearner_IR_Receiver_Waveform1.png&amp;diff=13977</id>
		<title>File:S15 244 RemoteLearner IR Receiver Waveform1.png</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=File:S15_244_RemoteLearner_IR_Receiver_Waveform1.png&amp;diff=13977"/>
				<updated>2015-05-23T05:01:29Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=File:S15_244_RemoteLearner_IR_Receiver_Test_Pin.png&amp;diff=13975</id>
		<title>File:S15 244 RemoteLearner IR Receiver Test Pin.png</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=File:S15_244_RemoteLearner_IR_Receiver_Test_Pin.png&amp;diff=13975"/>
				<updated>2015-05-23T05:01:19Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=File:S15_244_RemoteLearner_IR_Receiver_LPC_Input.png&amp;diff=13974</id>
		<title>File:S15 244 RemoteLearner IR Receiver LPC Input.png</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=File:S15_244_RemoteLearner_IR_Receiver_LPC_Input.png&amp;diff=13974"/>
				<updated>2015-05-23T05:01:06Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=File:S15_244_RemoteLearner_IR_Receiver.png&amp;diff=13973</id>
		<title>File:S15 244 RemoteLearner IR Receiver.png</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=File:S15_244_RemoteLearner_IR_Receiver.png&amp;diff=13973"/>
				<updated>2015-05-23T05:00:44Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=12353</id>
		<title>S15: Remote Learner</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=12353"/>
				<updated>2015-04-14T03:01:43Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: /* Remote Learner */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Grading Criteria ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;&lt;br /&gt;
*  How well is Software &amp;amp; Hardware Design described?&lt;br /&gt;
*  How well can this report be used to reproduce this project?&lt;br /&gt;
*  Code Quality&lt;br /&gt;
*  Overall Report Quality:&lt;br /&gt;
**  Software Block Diagrams&lt;br /&gt;
**  Hardware Block Diagrams&lt;br /&gt;
**:  Schematic Quality&lt;br /&gt;
**  Quality of technical challenges and solutions adopted.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Remote Learner ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
This section should be a couple lines to describe what your project does.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
Show list of your objectives.  This section includes the high level details of your project.  You can write about the various sensors or peripherals you used to get your project completed.&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Bailey Wu - Android App and BT I/F&lt;br /&gt;
*  Yoni Klein - RX and IR Learning&lt;br /&gt;
*  Tejeswar - IR Protocol&lt;br /&gt;
*  Christopher Lawrence - TX&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
=== Remote Learner ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1-2&lt;br /&gt;
|3/27/2015&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|Research about the basic of remote controller protocols&lt;br /&gt;
|Ongoing&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|Research about transmit timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
Research about receive timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
|In Progress&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|Accurately decode IR signals from a remote control&lt;br /&gt;
Accurately transmit IR signals to a device &lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|Interface BT module and establish communication with the Android phone&lt;br /&gt;
Decide on a communication protocol between phone and board.&lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6-7&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|Research and add additional protocol support&lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|5/22/2015&lt;br /&gt;
|Final integration and testing.&lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Android Application ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|4/6/2015&lt;br /&gt;
|4/13/2015&lt;br /&gt;
|Research about Android application development&lt;br /&gt;
Research about Bluetooth module implementation with SJOne board&lt;br /&gt;
|Completed&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4/13/2015&lt;br /&gt;
|4/20/2015&lt;br /&gt;
|Implement and design a basic Android application on a android emulator&lt;br /&gt;
Implement the Bluetooth module using UART driver&lt;br /&gt;
|Ongoing&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/20/2015&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|&lt;br /&gt;
|Ongoing&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|5/4/2015&lt;br /&gt;
|&lt;br /&gt;
|Ongoing&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|5/4/2015&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|&lt;br /&gt;
|Ongoing&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|5/18/2015&lt;br /&gt;
|&lt;br /&gt;
|Ongoing&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
Give a simple list of the cost of your project broken down by components.  Do not write long stories here.&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
The design section can go over your hardware and software design.  Organize this section using sub-sections that go over your design and implementation.&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;
=== 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;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&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;
=== 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_SJSU_S2015/ 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;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=12352</id>
		<title>S15: Remote Learner</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=12352"/>
				<updated>2015-04-14T02:59:36Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: /* Team Members &amp;amp; Responsibilities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Grading Criteria ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;&lt;br /&gt;
*  How well is Software &amp;amp; Hardware Design described?&lt;br /&gt;
*  How well can this report be used to reproduce this project?&lt;br /&gt;
*  Code Quality&lt;br /&gt;
*  Overall Report Quality:&lt;br /&gt;
**  Software Block Diagrams&lt;br /&gt;
**  Hardware Block Diagrams&lt;br /&gt;
**:  Schematic Quality&lt;br /&gt;
**  Quality of technical challenges and solutions adopted.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Remote Learner ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
This section should be a couple lines to describe what your project does.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
Show list of your objectives.  This section includes the high level details of your project.  You can write about the various sensors or peripherals you used to get your project completed.&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Bailey Wu - Android App and BT I/F&lt;br /&gt;
*  Yoni Klein - RX and IR Learning&lt;br /&gt;
*  Tejeswar - IR Protocol&lt;br /&gt;
*  Christopher Lawrence - TX&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
=== Remote Learner ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|3/27/2015&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|Research about the basic of remote controller protocols&lt;br /&gt;
|Ongoing&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|Research about transmit timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
Research about receive timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
|In Progress&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|Accurately decode IR signals from a remote control&lt;br /&gt;
Accurately transmit IR signals to a device &lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|Interface BT module and establish communication with the Android phone&lt;br /&gt;
Decide on a communication protocol between phone and board.&lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|Research and add additional protocol support&lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|5/22/2015&lt;br /&gt;
|Final integration and testing.&lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Android Application ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|4/6/2015&lt;br /&gt;
|4/13/2015&lt;br /&gt;
|Research about Android application development&lt;br /&gt;
Research about Bluetooth module implementation with SJOne board&lt;br /&gt;
|Completed&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4/13/2015&lt;br /&gt;
|4/20/2015&lt;br /&gt;
|Implement and design a basic Android application on a android emulator&lt;br /&gt;
Implement the Bluetooth module using UART driver&lt;br /&gt;
|Ongoing&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/20/2015&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|&lt;br /&gt;
|Ongoing&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/27/2015&lt;br /&gt;
|5/4/2015&lt;br /&gt;
|&lt;br /&gt;
|Ongoing&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|5/4/2015&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|&lt;br /&gt;
|Ongoing&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|5/11/2015&lt;br /&gt;
|5/18/2015&lt;br /&gt;
|&lt;br /&gt;
|Ongoing&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
Give a simple list of the cost of your project broken down by components.  Do not write long stories here.&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
The design section can go over your hardware and software design.  Organize this section using sub-sections that go over your design and implementation.&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;
=== 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;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&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;
=== 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_SJSU_S2015/ 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;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=12350</id>
		<title>S15: Remote Learner</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=12350"/>
				<updated>2015-04-14T02:56:41Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: /* Team Members &amp;amp; Responsibilities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Grading Criteria ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;&lt;br /&gt;
*  How well is Software &amp;amp; Hardware Design described?&lt;br /&gt;
*  How well can this report be used to reproduce this project?&lt;br /&gt;
*  Code Quality&lt;br /&gt;
*  Overall Report Quality:&lt;br /&gt;
**  Software Block Diagrams&lt;br /&gt;
**  Hardware Block Diagrams&lt;br /&gt;
**:  Schematic Quality&lt;br /&gt;
**  Quality of technical challenges and solutions adopted.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Remote Learner ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
This section should be a couple lines to describe what your project does.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
Show list of your objectives.  This section includes the high level details of your project.  You can write about the various sensors or peripherals you used to get your project completed.&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Team Member 1&lt;br /&gt;
**   Bailey Wu - Android App and BT I/F&lt;br /&gt;
*  Team Member 2&lt;br /&gt;
**   Yoni Klein - RX and IR Learning&lt;br /&gt;
*  Team Member 3&lt;br /&gt;
**   Tejeswar - IR Protocol&lt;br /&gt;
*  Team Member 4&lt;br /&gt;
**   Christopher Lawrence - TX&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
=== Remote Learner ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|3/27/2015&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|Research about the basic of remote controller protocols&lt;br /&gt;
|Ongoing&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|Research about transmit timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
Research about receive timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
|In Progress&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|Accurately decode IR signals from a remote control&lt;br /&gt;
Accurately transmit IR signals to a device &lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|Interface BT module and establish communication with the Android phone&lt;br /&gt;
Decide on a communication protocol between phone and board.&lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|Research and add additional protocol support&lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|5/22/2015&lt;br /&gt;
|Final integration and testing.&lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Android Application ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|3/27/2015&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|Research about Android application development&lt;br /&gt;
Research about Bluetooth module implementation with SJOne board&lt;br /&gt;
|Completed&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|Implement and design a basic Android application on a android emulator&lt;br /&gt;
Implement the Bluetooth module using UART driver&lt;br /&gt;
|Ongoing&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
Give a simple list of the cost of your project broken down by components.  Do not write long stories here.&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
The design section can go over your hardware and software design.  Organize this section using sub-sections that go over your design and implementation.&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;
=== 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;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&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;
=== 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_SJSU_S2015/ 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;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=12349</id>
		<title>S15: Remote Learner</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S15:_Remote_Learner&amp;diff=12349"/>
				<updated>2015-04-14T02:55:18Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: /* Remote Learner */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Grading Criteria ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;&lt;br /&gt;
*  How well is Software &amp;amp; Hardware Design described?&lt;br /&gt;
*  How well can this report be used to reproduce this project?&lt;br /&gt;
*  Code Quality&lt;br /&gt;
*  Overall Report Quality:&lt;br /&gt;
**  Software Block Diagrams&lt;br /&gt;
**  Hardware Block Diagrams&lt;br /&gt;
**:  Schematic Quality&lt;br /&gt;
**  Quality of technical challenges and solutions adopted.&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Remote Learner ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
This section should be a couple lines to describe what your project does.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
Show list of your objectives.  This section includes the high level details of your project.  You can write about the various sensors or peripherals you used to get your project completed.&lt;br /&gt;
&lt;br /&gt;
=== Team Members &amp;amp; Responsibilities ===&lt;br /&gt;
*  Team Member 1&lt;br /&gt;
**   Bailey Wu - &amp;lt;role&amp;gt;&lt;br /&gt;
*  Team Member 2&lt;br /&gt;
**   Yoni Klein - &amp;lt;role&amp;gt;&lt;br /&gt;
*  Team Member 3&lt;br /&gt;
**   Tejeswar - &amp;lt;role&amp;gt;&lt;br /&gt;
*  Team Member 4&lt;br /&gt;
**   Christopher Lawrence - &amp;lt;role&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
=== Remote Learner ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|3/27/2015&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|Research about the basic of remote controller protocols&lt;br /&gt;
|Ongoing&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|Research about transmit timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
Research about receive timing of the protocol and analyze the data with a oscilloscope &lt;br /&gt;
|In Progress&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|Accurately decode IR signals from a remote control&lt;br /&gt;
Accurately transmit IR signals to a device &lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|4/24/2015&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|Interface BT module and establish communication with the Android phone&lt;br /&gt;
Decide on a communication protocol between phone and board.&lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|5/1/2015&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|Research and add additional protocol support&lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|5/15/2015&lt;br /&gt;
|5/22/2015&lt;br /&gt;
|Final integration and testing.&lt;br /&gt;
|Planned&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Android Application ===&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;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|3/27/2015&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|Research about Android application development&lt;br /&gt;
Research about Bluetooth module implementation with SJOne board&lt;br /&gt;
|Completed&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|4/10/2015&lt;br /&gt;
|4/17/2015&lt;br /&gt;
|Implement and design a basic Android application on a android emulator&lt;br /&gt;
Implement the Bluetooth module using UART driver&lt;br /&gt;
|Ongoing&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
Give a simple list of the cost of your project broken down by components.  Do not write long stories here.&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
The design section can go over your hardware and software design.  Organize this section using sub-sections that go over your design and implementation.&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;
=== 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;
Include sub-sections that list out a problem and solution, such as:&lt;br /&gt;
&lt;br /&gt;
=== My Issue #1 ===&lt;br /&gt;
Discuss the issue and resolution.&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;
=== 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_SJSU_S2015/ 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;
=== References Used ===&lt;br /&gt;
List any references used in project.&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F14:_Team5-Self_Driving_Car_-_AUG&amp;diff=11555</id>
		<title>F14: Team5-Self Driving Car - AUG</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F14:_Team5-Self_Driving_Car_-_AUG&amp;diff=11555"/>
				<updated>2014-12-23T03:49:53Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: /* IO Task */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Self Driving Car ==&lt;br /&gt;
&lt;br /&gt;
== Objective and Scope ==&lt;br /&gt;
&lt;br /&gt;
[[File:CmpE243_F14_SelfDrivingCarT5_system_diagram.jpg|400px|thumb|right|Fig 2. System Block Diagram]]&lt;br /&gt;
This project is aimed at creating a self-driving car with obstacles avoidance and to steer to the gps location pointed by the android application with  the help of multiple controllers communicating using CAN bus.CAN(Control Area Network) is a communication protocol used widely in automotive application developed by BOSCH in 1986. The self-driving car consists of 6 different controllers for '''GPS''','''Sensor''','''Central''','''Motor''','''IO''' and '''Communication'''. The controllers communicate to other controller by CAN bus.We have implemented broadcast algorithm to broadcast all the data from each controller in different frequencies. The controller parses the data using the 29 bit identifier which has destination and source address.&lt;br /&gt;
&lt;br /&gt;
== Team Members &amp;amp; Responsibilities ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Team Members&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| Sensor Controller&lt;br /&gt;
| &lt;br /&gt;
# Bailey Wu&lt;br /&gt;
# Rishabh Sareen&lt;br /&gt;
# Rishab H&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| Motor Controller &lt;br /&gt;
| &lt;br /&gt;
# Abhraham Ruiz&lt;br /&gt;
# Arpit Amin&lt;br /&gt;
# Sree Harsha&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| I/O Controller (LCD Display)&lt;br /&gt;
| &lt;br /&gt;
# Yoni Klein&lt;br /&gt;
# Tejeswar&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| Communication Bridge + Android&lt;br /&gt;
| &lt;br /&gt;
# Shaw Ken Chang&lt;br /&gt;
# Arnold Bajet Jr.&lt;br /&gt;
# Thomas Pantels&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| Geographical Controller&lt;br /&gt;
| &lt;br /&gt;
# Himanshu Saini&lt;br /&gt;
# Divya Kamath &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| Central Controller&lt;br /&gt;
| &lt;br /&gt;
# Divya Kamath&lt;br /&gt;
# Tejeswar&lt;br /&gt;
# Sree Harsha&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| Car design and wiring&lt;br /&gt;
| &lt;br /&gt;
# Bailey Wu&lt;br /&gt;
# Himanshu Saini&lt;br /&gt;
# Sree Harsha&lt;br /&gt;
# Karthik Vadiraja&lt;br /&gt;
# Akash Ayare&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Git Setup&lt;br /&gt;
| Akash Ayare&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of this project was to design and implement a self-driving car. The team consisted of 15 people, divided into 6 teams corresponding to six controllers. The aim of this class was to understand the CAN protocol that is used extensively in vehicles. The self-driving car houses six controllers, all of them communicating using CAN. Each controller performs a unique task such as:&lt;br /&gt;
# '''Sensor Controller''': Interfaced to the front and back sensors. Periodically sends sensor data to the central controller. Crucial for obstacle detection and avoidance&lt;br /&gt;
# '''Motor Controller''': Controls the motors and steering of the car, based on commands received from central controller.&lt;br /&gt;
# '''Geographical Controller''': Interfaced to GPS and compass. Periodically sends location, heading and distance from destination. crucial for autonomous navigation of the car.&lt;br /&gt;
# '''Communication Controller''': Acts as a bridge for Android. Android app is used to set destination, calculate path to destination, start and stop the car. Data is sent to central and geographical Controller based on user input.&lt;br /&gt;
# '''Central Controller''': The brain of the car. Uses sensor and geographical data to steer the car in the right direction. Uses sensor data to detect and avoid obstacles. Uses geographical data to move towards desired location&lt;br /&gt;
# '''Display Controller''': Interfaced to an LCD screen which displays status of the car (reached/ not reached), CAN bus utilization, sensor data, bearing, heading etc.&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Geographical Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 1-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Order Components and Make a schedule&lt;br /&gt;
| Completed&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 8-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Decide commands that Geographical Controller will support&lt;br /&gt;
| Completed&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 7-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Complete CAN RX task and subscription handling. Verify communication with other controllers&lt;br /&gt;
| Completed&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| Interface GPS module and Compass and develop drivers if needed&lt;br /&gt;
| Completed&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| 30-Oct-2014&lt;br /&gt;
| Design and develop algorithm to calculate heading and bearing from GPS coordinates&lt;br /&gt;
| Completed. &lt;br /&gt;
| 30-Oct-2014 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| 5-Nov-2014&lt;br /&gt;
| Work on calibration of compass and heading calculation&lt;br /&gt;
| Completed&lt;br /&gt;
| 11-Dec-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 1-Nov-2014&lt;br /&gt;
| 10-Nov-2014&lt;br /&gt;
| Test with the central and Bluetooth controller &lt;br /&gt;
| Completed&lt;br /&gt;
| 14-Dec-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 10-Nov-2014&lt;br /&gt;
| 25-Nov-2014&lt;br /&gt;
| Begin testing with fully assembled car &lt;br /&gt;
| Completed&lt;br /&gt;
| 1-Dec-2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| 25-Nov-2014&lt;br /&gt;
| 10-Dec-2014&lt;br /&gt;
| Final Testing and changes as needed &lt;br /&gt;
| Completed&lt;br /&gt;
| 19-Dec-2014&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sensor Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/3/2014&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|Order ultrasonic sensor parts and develop simple test code for the sensors&lt;br /&gt;
|Done&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Wire the ultrasonic sensors, develop and implement the sensors using analog to digital converter&lt;br /&gt;
|Done&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|Collaborate with the other sub teams to finish the CAN bus communication and allow the self driving car to drive autonomously &lt;br /&gt;
|Done&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|-&lt;br /&gt;
|! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|11/1/2014&lt;br /&gt;
|Develop, implement and test the ultrasonic sensors using the pulse width modulation and universal asynchronous receiver/transmitter&lt;br /&gt;
|Done&lt;br /&gt;
|11/1/2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|11/2/2014&lt;br /&gt;
|11/9/2014&lt;br /&gt;
|Develop, implement and test the front and back infrared sensors using analog to digital converter&lt;br /&gt;
|Done&lt;br /&gt;
|11/9/2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|11/10/2014&lt;br /&gt;
|11/17/2014&lt;br /&gt;
|Develop, implement and test the current/voltage sensor for the battery packs of the self driving car using I2C&lt;br /&gt;
|Scheduled&lt;br /&gt;
|Removed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
|11/18/2014&lt;br /&gt;
|11/25/2014&lt;br /&gt;
|Collaborate with the other sub teams to make sure that the sensors are in working condition&lt;br /&gt;
|Done&lt;br /&gt;
|11/25/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
|11/26/2014&lt;br /&gt;
|12/5/2014&lt;br /&gt;
|Collaborate with the other sub teams to debug any problems that may encountered&lt;br /&gt;
|Done&lt;br /&gt;
|12/5/2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
|12/6/2014&lt;br /&gt;
|12/13/2014&lt;br /&gt;
|Prepare for demo&lt;br /&gt;
|Done&lt;br /&gt;
|12/19/2014&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''IO Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/14/2014&lt;br /&gt;
|Research and order LCD appropriate for this project&lt;br /&gt;
|Done&lt;br /&gt;
|10/11/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Implement CAN RX/Subscription task&lt;br /&gt;
|Done&lt;br /&gt;
|10/13/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Finalize Task Architecture&lt;br /&gt;
|Done&lt;br /&gt;
|11/1/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|10/18/2014&lt;br /&gt;
|10/21/2014&lt;br /&gt;
|Interface and test LCD&lt;br /&gt;
|Done&lt;br /&gt;
|10/20/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|10/21/2014&lt;br /&gt;
|10/28/2014&lt;br /&gt;
|Implement auto scrolling feature&lt;br /&gt;
|Done&lt;br /&gt;
|11/18/2014&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Communication Bridge + Android'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 16-Sep-2014&lt;br /&gt;
| 23-Sep-2014&lt;br /&gt;
| Test bluetooth module using computer serial port and an android app(simple bluetooth terminal app downloaded from google play).  Test the real life range and stability of the bluetooth module (HC-06).  Modify the bluetooth chat example to work with the bluetooth module.    &lt;br /&gt;
| Done&lt;br /&gt;
| 20-Sep-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 28-Sep-2014&lt;br /&gt;
| 12-Oct-2014&lt;br /&gt;
| Draw UI design layouts for a basic android application that can view Google map as well as send GPS data through bluetooth by clicking on the map. Study google maps API and make a simple app that will post a short toast that shows the GPS location after a long press event. &lt;br /&gt;
| Done&lt;br /&gt;
| 12-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 7-Oct-2014&lt;br /&gt;
| 11-Oct-2014&lt;br /&gt;
| Interface bluetooth module with SJSUOne board and able to verify that the connection is stable and that transaction via the bluetooth is accurate.  This is done by adding a test button where if you press the button it send a command to the board.  After receiving the command, the board should react with a response (LED light and/or text response to the android phone)&lt;br /&gt;
| Done&lt;br /&gt;
| 19-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 11-Oct-2014&lt;br /&gt;
| 19-Oct-2014&lt;br /&gt;
|Integrate Google Maps and Bluetooth component together in Android app.  After a long press on the map, the user should be prompted to start the car and set the location as the places the user selected.  Add a textView to display the location selected by pressing on the map.  Add a button for sending location to the car.  &lt;br /&gt;
| Done&lt;br /&gt;
| 27-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 19-Oct-2014&lt;br /&gt;
| 26-Oct-2014&lt;br /&gt;
| CAN infrastructure implmentation:  Use our team's common CAN infrasturcture code and modify it specifically for our controller.  First created the CAN communication table and then modify the infracturacture code to implement the broacasting as well as filtering of neccessary data.  This only focuses on broadcasting a stop/start command and the destination GPS data (set by android) as well as getting car's current location data from the geological controller.&lt;br /&gt;
|Done&lt;br /&gt;
| 07-Nov-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 26-Oct-2014&lt;br /&gt;
| 1-Nov-2014&lt;br /&gt;
| Test and implement car information reading as well as other functions of Android app&lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 2-Nov-2014&lt;br /&gt;
| 4-Nov-2014&lt;br /&gt;
| Iterate UI design&lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 5-Nov-2014&lt;br /&gt;
| 16-Nov-2014&lt;br /&gt;
| Implement 2nd UI design&lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Motor Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/1/2014&lt;br /&gt;
|10/8/2014&lt;br /&gt;
|PWM2 (used to control motors) and PWM3 (used to control servo) interface with the car servo and motor. Write a test code to operate the servo and motor from the terminal command.&lt;br /&gt;
|Completed and Tested&lt;br /&gt;
|10/11/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
|10/9/2014&lt;br /&gt;
|10/18/2014&lt;br /&gt;
|Design and code CAN receive task for subscription. Check for basic CAN message commands for throttle and steer control.&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|10/26/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|10/19/2014&lt;br /&gt;
|10/28/2014&lt;br /&gt;
|Design the CAN message table for motor control and servo control&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|10/26/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|10/29/2014&lt;br /&gt;
|11/07/2014&lt;br /&gt;
|Design acceleration Vs steer control function for smooth run. Check for other factors involved.&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|11/22/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|11/08/2014&lt;br /&gt;
|11/14/2014&lt;br /&gt;
|Research on RPM sensor. Interface the RPM sensor to calculate the Speed. Test the RPM sensor by running the car at different speed&lt;br /&gt;
|Completed and tested with a hall sensor&lt;br /&gt;
|11/22/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|11/15/2014&lt;br /&gt;
|11/21/2014&lt;br /&gt;
|Fine tune motor control code and integrate with all the controllers for proper working.&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|11/22/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
|11/22/2014&lt;br /&gt;
|11/28/2014&lt;br /&gt;
|Test and check if more features can be added to improve performance. Completed and tested&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|11/28/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
|11/29/2014&lt;br /&gt;
|12/05/2014&lt;br /&gt;
|Testing and Debugging.&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|12/05/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;|9&lt;br /&gt;
|12/06/2014&lt;br /&gt;
|12/18/2014&lt;br /&gt;
|Final Testing and getting the car ready for Demo.&lt;br /&gt;
|On Going&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
'''Central Controller'''&lt;br /&gt;
 &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 16-Sep-2014&lt;br /&gt;
| 23-Sep-2014&lt;br /&gt;
| Develop API for CAN bus communication.&lt;br /&gt;
| Done&lt;br /&gt;
| 23-Sep-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 11-Oct-2014&lt;br /&gt;
| 15-Oct-2014&lt;br /&gt;
| Develop communication table for all controllers.&lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 15-Oct-2014&lt;br /&gt;
| 20-Oct-2014&lt;br /&gt;
| Broadcast message and target message setup.  &lt;br /&gt;
| Done&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
| Co-ordinate all controllers and take major decisions. &lt;br /&gt;
| Done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| Complete Building and fine-tuning of RC car. &lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| Develop coordination mechanism to ensure controllers are initialized and ready &lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
| Develop kill switch &lt;br /&gt;
| Done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
| Build external power distribution circuit&lt;br /&gt;
| Done&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
| 04-Nov-2014&lt;br /&gt;
| Coordination algorithm between steering and throttle for smooth turns &lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| 04-Nov-2014&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| Collision avoidance algorithms &lt;br /&gt;
| Done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| 04-Nov-2014&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| Intermediate unit and functional tests&lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| 25-Nov-2014&lt;br /&gt;
| Functional tests and algorithm adjustments &lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 13&lt;br /&gt;
| 25-Nov-2014&lt;br /&gt;
| 02-Dec-2014&lt;br /&gt;
| Fine tuning and stretch goals (headlights, parallel parking, etc.)&lt;br /&gt;
| Done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 14&lt;br /&gt;
| 02-Dec-2014&lt;br /&gt;
| 09-Dec-2014&lt;br /&gt;
| Prepare for demo&lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Description&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Qty&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Price&lt;br /&gt;
|-&lt;br /&gt;
| LV-MaxSonar-EZ1 High Performance Ultrasonic Rangefinder&lt;br /&gt;
| 2&lt;br /&gt;
| 49.90&lt;br /&gt;
|-&lt;br /&gt;
| Analog Distance Sensor &lt;br /&gt;
| 1&lt;br /&gt;
| Free&lt;br /&gt;
|-&lt;br /&gt;
|1/10 Scale 4x4 Truck with Brushed Motor	&lt;br /&gt;
|1&lt;br /&gt;
|217.33&lt;br /&gt;
|-&lt;br /&gt;
|2 ft 12-Gauge Power Cables&lt;br /&gt;
|3	&lt;br /&gt;
|22.80	&lt;br /&gt;
|-&lt;br /&gt;
|Pair Power Socket	&lt;br /&gt;
|2&lt;br /&gt;
|2.16&lt;br /&gt;
|-	&lt;br /&gt;
|Standard Size Body Clips	&lt;br /&gt;
|12	&lt;br /&gt;
|2.16&lt;br /&gt;
|-&lt;br /&gt;
|4-pack AA Batteries&lt;br /&gt;
|1	&lt;br /&gt;
|3.45	&lt;br /&gt;
|-&lt;br /&gt;
|50-pack M3x15mm Stand-Off Spacer Female-Male&lt;br /&gt;
|1&lt;br /&gt;
|11.19&lt;br /&gt;
|-	&lt;br /&gt;
|100-pack 18-8 Flat Steel Washer	&lt;br /&gt;
|1	&lt;br /&gt;
|2.54&lt;br /&gt;
|-	&lt;br /&gt;
|100-pack M3x20mm Hex-Drive Screw&lt;br /&gt;
|1&lt;br /&gt;
|6.47	&lt;br /&gt;
|-&lt;br /&gt;
|100-pack M3 Steel Hex Nut&lt;br /&gt;
|1&lt;br /&gt;
|4.66&lt;br /&gt;
|-&lt;br /&gt;
|2-pin JST Connector Right Angle&lt;br /&gt;
|10&lt;br /&gt;
|6.84&lt;br /&gt;
|-&lt;br /&gt;
|4-pin JST Connector Right Angle&lt;br /&gt;
|10&lt;br /&gt;
|6.84&lt;br /&gt;
|-&lt;br /&gt;
|2-pin Female JST Cable (20 cm)&lt;br /&gt;
|10&lt;br /&gt;
|7.39&lt;br /&gt;
|-&lt;br /&gt;
|4-pin Female JST Cable (20 cm)&lt;br /&gt;
|10&lt;br /&gt;
|7.39&lt;br /&gt;
|-&lt;br /&gt;
|5 Volt Relay Breakout Board&lt;br /&gt;
|1&lt;br /&gt;
|4.95&lt;br /&gt;
|-&lt;br /&gt;
|5 Volt Voltage Regulator&lt;br /&gt;
|1&lt;br /&gt;
|1.07&lt;br /&gt;
|-&lt;br /&gt;
|Sharp Analog Distance Sensor 4-30 cm&lt;br /&gt;
|1&lt;br /&gt;
|9.95&lt;br /&gt;
|-&lt;br /&gt;
|3-pin Female JST PH-Style Cable (30 cm)&lt;br /&gt;
|1&lt;br /&gt;
|0.92&lt;br /&gt;
|-&lt;br /&gt;
|Double Sided Mounting Tape - 3 feet	&lt;br /&gt;
|1&lt;br /&gt;
|4.35&lt;br /&gt;
|-&lt;br /&gt;
|AC Adapter (LiPo Charger)&lt;br /&gt;
|1&lt;br /&gt;
|15.16&lt;br /&gt;
|-&lt;br /&gt;
|IEC Power Cable (LiPo Charger)&lt;br /&gt;
|1&lt;br /&gt;
|5.38&lt;br /&gt;
|-&lt;br /&gt;
|4mm Bullet Plugs to Universal Plug&lt;br /&gt;
|1&lt;br /&gt;
|13.38&lt;br /&gt;
|-&lt;br /&gt;
|Acrylic sheet + Sharpe mini&lt;br /&gt;
|1+1&lt;br /&gt;
|11.72&lt;br /&gt;
|-&lt;br /&gt;
|Molex Pin Header, Connector, wires and 100 zip ties&lt;br /&gt;
|10+4+1&lt;br /&gt;
|17.13&lt;br /&gt;
|-&lt;br /&gt;
|2 x 90 degree pin header, 2 x straight pin header&lt;br /&gt;
|2+2&lt;br /&gt;
|3.65&lt;br /&gt;
|-&lt;br /&gt;
|uni-polar hall sensor for tachometer feedback&lt;br /&gt;
|2&lt;br /&gt;
|2.18&lt;br /&gt;
|-&lt;br /&gt;
|Heavy Duty magnets&lt;br /&gt;
|2&lt;br /&gt;
|4.18&lt;br /&gt;
|-&lt;br /&gt;
|INA219 Voltage sensors 26V +/-3.2A&lt;br /&gt;
|2&lt;br /&gt;
|19.9&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|20x4 Serial LCD Module&lt;br /&gt;
|1&lt;br /&gt;
|29.99&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Backup Parts &amp;amp; cost ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Qty&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Description&lt;br /&gt;
! width=&amp;quot;110&amp;quot; align=&amp;quot;center&amp;quot;|Manufacturer&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Part Number&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Total Cost&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| LV-MaxSonar-EZ1 High Performance Ultrasonic Rangefinder&lt;br /&gt;
| MaxBotix Inc&lt;br /&gt;
| MB1010&lt;br /&gt;
| Free&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Analog Distance Sensor &lt;br /&gt;
| Sharp&lt;br /&gt;
|&lt;br /&gt;
| Free&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
[[File:CmpE243_F14_Team5_OverallHWDesign.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Motor Controller ==&lt;br /&gt;
&lt;br /&gt;
==== Summary ====&lt;br /&gt;
This module takes command input from central controller and steers the car to its destination; in addition, It has two main controlling parameters : Throttle and Steering. Throttle input moves the car forward and backward. Steer input turns the wheel left and right. The central controller takes feedback from the sensors and makes decision to move the car. Accordingly, it sends CAN commands accepted by the motor controller for navigation, and real time RPM signal to the controller.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Motor and Steer control : Technical Information&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Sl.No&lt;br /&gt;
! width=&amp;quot;90&amp;quot; align=&amp;quot;center&amp;quot;|Controller&lt;br /&gt;
! width=&amp;quot;90&amp;quot; align=&amp;quot;center&amp;quot;|Signal Type&lt;br /&gt;
! width=&amp;quot;90&amp;quot; align=&amp;quot;center&amp;quot;|Frequency&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Functionality&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1&lt;br /&gt;
| Motor Control&lt;br /&gt;
| PWM signal&lt;br /&gt;
| 50 Hz (20000us)&lt;br /&gt;
| 1000us (Full throttle forward) - 1500us (Stop)   - 2000us (Full throttle backward)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|2    &lt;br /&gt;
| Steer Control&lt;br /&gt;
| PWM signal &lt;br /&gt;
| 50 Hz (20000us)&lt;br /&gt;
|1000us (Turn left max)         - 1500us (Center) - 2000us (Turn right max)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Working =====&lt;br /&gt;
The car initially accepts the start command to begin navigation. Commands can then come to move the car forward or backward, steer left or right depending on intelligent decisions made by the central controller. The motor control has intelligence to avoid jerks and ensure smoother transitions between commands. The central controller gets the data from the sensors for obstacle avoidance. The car has a communication controller which gets the '''GPS''' data from the android application, the android application sets the destination latitude and longitude. The car decides the heading direction by the gps points and the compass and if it finds obstacle it will be controlled by the obstetrical avoidance and steer to the destination according to the algorithm below.&lt;br /&gt;
===== Flow Chart =====&lt;br /&gt;
&lt;br /&gt;
[[File:Cmpe243_F14_T5_motor_controller_flowchart1.png]]&lt;br /&gt;
&lt;br /&gt;
===== Kill switch =====&lt;br /&gt;
The remote control and receiver module pair up to provide a signal coverage of more than 100 meters. We make use of this to design our kill switch. When a constant PWM signal of 1000us is received from the remote, the car is in 'ARMED' state and moves the car according to CAN commands. The user has to hold the trigger gun for this state constantly and the car moves.&lt;br /&gt;
When the user releases the trigger gun, the car stops receiving the PWM signal of 1000us and the car goes to 'DISARMED' state.&lt;br /&gt;
In short, pull the trigger gun - ARMED, release the trigger gun - DISARMED.&lt;br /&gt;
&lt;br /&gt;
===== RPM =====&lt;br /&gt;
The RPM sensor is based on a hall sensor switch which detect the North and South pole of a magnet located in the main shaft in the car. The hall sensor part number is 3177, and it has three pin. This sensor is uni-polar which give an output high signal when the sensor captures the North pole of the magnet; subsequently, the sensor give output low signal when the sensor captures the South pole of the magnet. Therefore, by using a the 3177 and a magnet in the shaft. the SJOne board can capture the output signal from the hall sensor as it toggles per shaft revolution. &lt;br /&gt;
It is important to notice that the output signal of the 3177 is an open collector; therefore, we need a  10 Kohm resistor connected to Vcc.&lt;br /&gt;
&lt;br /&gt;
===== Pinout Table =====&lt;br /&gt;
&lt;br /&gt;
The following table shows the pinout of all component that are connected to SJONE board.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Component Pin&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Output Pin Source&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1 &lt;br /&gt;
|Hall Sensor (3177) Vcc ( 4.5 V to 18 V)&lt;br /&gt;
|Source&lt;br /&gt;
|SJOne P1_22&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|2 &lt;br /&gt;
|Hall Sensor (3177) Ground&lt;br /&gt;
|Ground&lt;br /&gt;
|SJOne&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|3&lt;br /&gt;
|Hall Sensor (3177) Output&lt;br /&gt;
|Output&lt;br /&gt;
|SJOne P1_22 with a 10 KOhm&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|4&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 1 TX&lt;br /&gt;
|SJOne P0_1(Tx)&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|5&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 2 GND&lt;br /&gt;
|SJOne GND&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|6&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 3 VCC&lt;br /&gt;
|SJOne 3.3v&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|7&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 4 RX&lt;br /&gt;
|SJOne P0_0(Rx)&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|8&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 6 CANL&lt;br /&gt;
|CAN Bus&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|10&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 7 CANH&lt;br /&gt;
|CAN Bus&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|11&lt;br /&gt;
|Servo&lt;br /&gt;
|VCC&lt;br /&gt;
|5V Power Rail&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|12&lt;br /&gt;
|Servo&lt;br /&gt;
|GND&lt;br /&gt;
|GND Power Rail&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|13&lt;br /&gt;
|Servo&lt;br /&gt;
|Signal&lt;br /&gt;
|PWM 2.1&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|14&lt;br /&gt;
|Electric Speed Control (ESC)&lt;br /&gt;
|VCC&lt;br /&gt;
|5V Power rail&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|15&lt;br /&gt;
|Electric Speed Control (ESC)&lt;br /&gt;
|GND&lt;br /&gt;
|GND Power Rail&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|16&lt;br /&gt;
|Electric Speed Control (ESC)&lt;br /&gt;
|Signal&lt;br /&gt;
|PWM 2.2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Block Diagram =====&lt;br /&gt;
The following Block diagram shows an overview of the connection between the SJOne board, ESC, and the Hall sensor:&lt;br /&gt;
&lt;br /&gt;
[[File:Motor Block Diagram 1.jpg|600px|thumb|center|Motor Controller Block Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Sensor Controller ==&lt;br /&gt;
===Sensor Controller Hardware Design and Architecture ===&lt;br /&gt;
&lt;br /&gt;
The figure below shows how all the sensors are inter-connected to the SJOne board and CAN bus. The sensors are connected to +5V to achieve the highest beam pattern that is available. The back infrared sensor is also connected to the +5V power source to obtain the longest range detection possible. Most important, the SJOne board is connected to the CAN bus to broadcast the available data to the rest of the controllers in the system.&lt;br /&gt;
&lt;br /&gt;
[[File:CmpE243_F14_T5_SensorHWDesign.JPG|700px|thumb| center |Fig . Sensor Controller Hardware Design]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When using multiple MaxSonar sensors, it is required to configure the sensors in ''Sequential Operation'' mode to obtain the best optimal performance in obstacle detection. On the other hand, if the sensors are left in continuous free run operation, which means the RX pin (Pin 4) are unconnected then at start-up the sensors will range at exactly the same time. Thus, the sensors are not synchronized and eventually result in frequency drifts that would likely cause interference between sensors for most applications.&lt;br /&gt;
&lt;br /&gt;
[[File:CmpE243_F14_T5_SingleSensor.jpg|500px|thumb| center |Fig . Single Sensor in free run operation mode - MaxBotix 2012]]&lt;br /&gt;
&lt;br /&gt;
The figure to the above shows a single MaxSonar ultrasonic sensor operating in continuous free run operation detecting an object at 96 inches. The signal of the ultrasonic sensor observe under the oscilloscope shows that the sensor is operating at its finesse performance without any interference.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The figure to the below shows that multiple MaxSonar ultrasonic sensors are operating in continuous free run operation. As you can see, the signal of a ultrasonic sensor observe under the oscilloscope shows that the signal has multiple spikes due to the interference of other sensors. Thus, the sensor becomes unsynchronized and the range reading become unstable. &lt;br /&gt;
&lt;br /&gt;
[[File:CmpE243_F14_T5_MultipleSensorsInterferences.jpg‎|500px|thumb| center |Fig . Multiple Sensors in free run operation mode - MaxBotix 2012]]&lt;br /&gt;
&lt;br /&gt;
To achieve the most optimal performance using multiple MaxSonar ultrasonic sensors, the figure below shows the implementation of all the sensors operating in sequential mode. The sensors can be started by pulling the RX pin (Pin 4) high for at least 20 uS and then for each reading this can be done as often as every 50 ms. This method would toggle each sensor when the user like to obtain an reading at any given moment. Thus, there will be no interference between each sensor. &lt;br /&gt;
&lt;br /&gt;
[[File:CmpE243_F14_T5_MultipleSensorsConfiguration.jpg‎ |500px|thumb| center |Fig . Multiple Sensors Configuration]]&lt;br /&gt;
&lt;br /&gt;
There are many other method to implement multiple MaxSonar ultrasonic sensors in a single system. This information can be obtained in the sensor datasheet.&lt;br /&gt;
&lt;br /&gt;
===Sensor Controller Software Design===&lt;br /&gt;
&lt;br /&gt;
== Central Controller ==&lt;br /&gt;
&lt;br /&gt;
The central controller is the brain of the car. It receives information from all the other controllers and decides which direction the car must move. The central controller periodically sends commands to the motor regarding the throttle, steering, steering angle and speed.&lt;br /&gt;
&lt;br /&gt;
In order to decide which direction to move, the central controller uses sensor data and geographical data. The current design uses a state machine. The car is initially in idle state. When it received a START command from the communication controller, the central sends the start motor command to the motor controller. After the start state, the central controller can be in one of the two states: avoid obstacle or adjust heading. The central controller uses the sensor data to detect obstacle. If there are no obstacles, then the central controller uses geographical information to adjust car heading. &lt;br /&gt;
&lt;br /&gt;
Once the heading and bearing match, the car moves straight ahead till the destination is reached. When the geographical controller sends a command indicating that the car has reached the destination, the car will stop.&lt;br /&gt;
&lt;br /&gt;
At any point during its course, if the car receives a STOP command from the communication controller, the car will stop&lt;br /&gt;
&lt;br /&gt;
[[File:Cmpe243F14_Team5_Central_StateTransition.JPG|700px|thumb|center|Fig. Central Controller State Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Geographical Controller ==&lt;br /&gt;
&lt;br /&gt;
The geographical controller is one of the six controllers mounted on the car. This controller provides the location and heading information to the central controller of the car. It also stores the destination (way-points). By calculating the distance from the current location to the destination or intermediate waypoint, the geo controller can determine if the car has reached its destination. When the car reaches the destination, the geo controller sends a message to the central controller indicating that destination has been reached. &lt;br /&gt;
&lt;br /&gt;
The devices connected to this controller are:&lt;br /&gt;
1. Magnetometer (digital compass)&lt;br /&gt;
2. GPS Logger&lt;br /&gt;
&lt;br /&gt;
The compass communicates via I2C and the GPS via UART.&lt;br /&gt;
&lt;br /&gt;
==== Parts Used ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Geographical Control - Parts Used&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;center&amp;quot;|Part Number&lt;br /&gt;
! align=&amp;quot;center&amp;quot;|Purpose&lt;br /&gt;
|-&lt;br /&gt;
| SparkFun Triple Axis Magnetometer Breakout - HMC5883L&lt;br /&gt;
| Compass&lt;br /&gt;
|-&lt;br /&gt;
| SparkFun Venus GPS Logger - SMA Connector&lt;br /&gt;
| GPS &lt;br /&gt;
|-&lt;br /&gt;
| Antenna GPS Embedded SMA - GPS-00177&lt;br /&gt;
| Antenna&lt;br /&gt;
|-&lt;br /&gt;
| ET-318 GPS Engine Board&lt;br /&gt;
| GPS&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Design ====&lt;br /&gt;
&lt;br /&gt;
'''Heading''' - The compass provides the heading. The heading is the direction in which the car is headed. The value is typically an angle from 0-360 degrees measured clockwise from North. The heading is calculated from the x-axis and y-axis values provided by the magnetometer. To use all 3-axis values, a tilt sensor must be used with the magnetometer for tilt compensation.&lt;br /&gt;
&lt;br /&gt;
'''GPS Module''' - The GPS module provides the time, latitude, longitude, direction and if the GPS data is valid. This latitude, longitude corresponds to the current location of the car.&lt;br /&gt;
&lt;br /&gt;
'''Destination''' - The destination is set by Android application/communication controller. The destination could be a single point or a list of waypoints, each being a latitude, longitude pair.&lt;br /&gt;
&lt;br /&gt;
'''Bearing''' - Using the destination lat,lon pair (set by the communication controller) and the current lat, lon pair (received from the GPS module), the geographical controller calculates the bearing. This angle, like the heading, is also typically between 0-360 degrees measured clockwise. Bearing represents the angle between the destination and current location. &lt;br /&gt;
&lt;br /&gt;
Both the heading and the bearing are sent periodically to the central controller. The central controller uses this information combined with the sensor data to steer the motors in the right direction.&lt;br /&gt;
&lt;br /&gt;
Example: If the current heading is 10 degrees ( car is travelling in a direction 10 degrees) from north. The bearing is 50 degrees ( the car is at an angle of 50 degrees away from the desired direction), the central controller must steer the car 40 degrees to the right.&lt;br /&gt;
&lt;br /&gt;
The geographical controller also calculates the distance between the current lat, lon and the destination lat, lon. This is used to determine if the car has reached the intended destination. When the car has reached the destination, geographical controller sends a message to the central controller to stop.&lt;br /&gt;
&lt;br /&gt;
==== Tasks ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Geographical Control - Tasks&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;center&amp;quot;|Task Name&lt;br /&gt;
! align=&amp;quot;center&amp;quot;|Purpose&lt;br /&gt;
|-&lt;br /&gt;
| Compass Task&lt;br /&gt;
| Updates the compass heading. Runs every 100ms and obtains compass data over I2C&lt;br /&gt;
|-&lt;br /&gt;
| GPS Task&lt;br /&gt;
| Updates the current latitude and longitude by reading GPS data sent over UART. GPS has been configured to run at 10Hz and sends data at a baud rate of 38400. &lt;br /&gt;
|-&lt;br /&gt;
| CAN Rx Task&lt;br /&gt;
| Handles data received over CAN. Task gets blocked if can receive queue is empty. &lt;br /&gt;
|-&lt;br /&gt;
| CAN Periodic Msg Task &lt;br /&gt;
[1 Hz]&lt;br /&gt;
| Periodic CAN message to send current lat,lon and destination lat, lon to central and display controller&lt;br /&gt;
|-&lt;br /&gt;
| CAN Periodic Msg Task &lt;br /&gt;
[20 Hz]&lt;br /&gt;
| Periodic CAN message to send compass heading and destination bearing to central controller.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== GEO CAN Controller Communication Table ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Geographical Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Number&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Type&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Purpose&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Data layout&lt;br /&gt;
|- &lt;br /&gt;
| 0x0301  &lt;br /&gt;
| Get Geo Data &lt;br /&gt;
| Request for GPS Data (lat,long)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x0302  &lt;br /&gt;
|    &amp;quot;  &lt;br /&gt;
| Request for current compass heading and destination heading&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x0304  &lt;br /&gt;
| &amp;quot; &lt;br /&gt;
| Request Time&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x0601  &lt;br /&gt;
| Response to 0x3xx request&lt;br /&gt;
| GPS Data (lat,long)&lt;br /&gt;
|&lt;br /&gt;
 dword[0] : [32-bit latitude]&lt;br /&gt;
 dword[1] : [32-bit longitude] &lt;br /&gt;
|-&lt;br /&gt;
| 0x0602  &lt;br /&gt;
| &amp;quot;&lt;br /&gt;
| Compass heading and destination bearing&lt;br /&gt;
|&lt;br /&gt;
 dword[0] : [32-bit compass heading]&lt;br /&gt;
 dword[1] : [32-bit destination bearing] &lt;br /&gt;
|-&lt;br /&gt;
| 0x0504  &lt;br /&gt;
| &amp;quot;&lt;br /&gt;
| Time &lt;br /&gt;
| &lt;br /&gt;
 dword[0] : [32-bit time 0x00hhmmss]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0501  &lt;br /&gt;
| Periodic Message&lt;br /&gt;
| GPS data, broadcast periodically  &lt;br /&gt;
|&lt;br /&gt;
 dword[0] : [32-bit longitude]&lt;br /&gt;
 dword[1] : [32-bit latitude]  &lt;br /&gt;
|-&lt;br /&gt;
| 0x0502  &lt;br /&gt;
| &amp;quot;&lt;br /&gt;
| Current and destination heading broadcast periodically  &lt;br /&gt;
|&lt;br /&gt;
 dword[0] : [32-bit compass heading]&lt;br /&gt;
 dword[1] : [32-bit bearing]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Challenges and Lessons Learnt ====&lt;br /&gt;
&lt;br /&gt;
# '''Start Geo work early''' : Most of the tasks of the geo controller can be done independent of the progress on the rest of the car. Start working early, test the GPS outside as much as possible.&lt;br /&gt;
# '''Compass calibration''' : Most compasses need calibration. During the course of our project, we used to magnetometers (since we accidently burned the first one). The first one was off by 5 degrees and the second one was off by about 20 degrees. Take care that the compass is mounted away from motors and other devices that can create a lot of noise for the compass&lt;br /&gt;
# '''GPS speed''' : We started by using the default speed of 1Hz on the GPS module. The data was sent to the central controller at 1 Hz. As we started testing we realized that this can be too slow and the car may go off course before the new data arrives. Using the commands in the datasheet, we configured the GPS to have an update rate of 10 Hz and a baud rate of 38400. While the datasheet said that the GPS can be configured for 20Hz and baud rate of 115200, we were unsuccessful in achieving that. For some reason, the SJOne board crashed every time we set the GPS for 115200. We did not successfully debug the issue. But changing the speed from 1Hz to 10Hz did make a lot of difference to the performance of the car steering.&lt;br /&gt;
# '''Picking the right GPS and compass''' : Both the compass and the GPS that we used served the purpose well. On sunny days, the GPS worked indoors too. Even though we used a 3 axis compass, we used only 2 axis readings from it to calculate the heading. A 3 axis compass paired with a tilt sensor would probably give better readings. But 2 axis readings served our purpose. &lt;br /&gt;
# '''GPS Drift''' : We noticed that the GPS values for the same locations drifted over time. There could be a 6 foot jump every few hours. The datasheet offers configurations to pin or unpin the gps values. We did not use the feature. But we did notice that because of the GPS drift, our car traveled differently on the same path at different times during the day. If we had more time, we could have fixed this and achieved a straight path for the car, instead of always veering to the left of right.&lt;br /&gt;
# '''Android App''' : The Android app is crucial since it provides the destination waypoints to the geo controller. We need to ensure that the dataset used by the android app is similar if not same as the values reported by the GPS. If the values differ a lot, then the car will not move along the intended path. The Android team and the GPS team must work closely and complete their testing well ahead, so that once the GPS and communication controllers are mounted it is only a matter of improving the behavior.&lt;br /&gt;
# '''Multiple Setups''' : Having multiple setups can be very helpful to debug issues, since it is easier to make changes on the temporary setup than on the car. Also, considering the size of the team, different teams might be using the car and the GPS team will always be the last team to get hold of the car.&lt;br /&gt;
&lt;br /&gt;
==== Review of Parts used ====&lt;br /&gt;
The parts used for this controller were good and I would use them again.&lt;br /&gt;
&lt;br /&gt;
== IO Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Summary ===&lt;br /&gt;
&lt;br /&gt;
The IO controller's purpose is to display useful information on an LCD screen for debugging and verification purposes.  Essentially, it monitors the CAN bus for other controllers' data as well as bus utilization.  The hardware and software design is described below, as well as the challenges we encountered along the way.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The hardware design of the IO controller is relatively simple.  The only requirements are the serial LCD module and the controller itself.  The LCD interfaces to the IO controller via UART protocol, while the IO controller interfaces to tater other controllers via CAN Protocol.  The [[F14: Team5-Self Driving Car - AUG#Design &amp;amp; Implementation|block diagram]] above shows gives a clear description of the IO controller's place in the system.&lt;br /&gt;
&lt;br /&gt;
The LCD chosen was a serial enabled 20x4 character display from [https://www.sparkfun.com/products/9568 Sparkfun].  It was chosen for it's larger character display (rather than 16x2) and because the serial &amp;quot;backpack was built into the PCB.  This backpack is used because the display controller communicates with a parallel interface. The serial &amp;quot;backpack&amp;quot; or converter interfaces the parallel connections with a serial one and provides a low level API to control the display.  An additional API was designed on top of this one to make programming simple and clear as well as implement some useful features (such as printing with printf style arguments).  It operates on 5V, so it could not be powered by the controller itself and need to use one of the 5V supplies on the car.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
==== RX Task ====&lt;br /&gt;
&lt;br /&gt;
The receiving task uses the interrupt driven CAN driver to process messages sent on the bus.  When a CAN message is received, the data is filtered and stored a global memory locations.  This data is later used by the IO task to format and print the desired information to the LCD.  No hardware filter was used, since the IO controller must monitor bus utilization and therefore listen to all messages.  No heavy calculations or blocking code is allowed in this task; it's purpose is to get the data out as fast as possible and wait for more.&lt;br /&gt;
&lt;br /&gt;
==== LCD API ====&lt;br /&gt;
&lt;br /&gt;
The LCD API uses a singleton template so that any task can invoke it and print something to the LCD.  Since the LCD doesn't care who prints what, care must be taken to ensure other tasks' data isn't unintentionally overwritten.  However, only a single task in our implementation is utilizing this API so it wasn't a problem.  The LCD communicates over UART, so the available UART driver was used (also a singleton template).  The data sheet from Sparkfun was used to create this API so that nearly all the LCD capabilities can be supported.  These features include:&lt;br /&gt;
&lt;br /&gt;
* Erase screen or individual line&lt;br /&gt;
* Write to screen, line or specific location&lt;br /&gt;
* Adjust backlight brightness&lt;br /&gt;
* Adjust cursor position and style&lt;br /&gt;
* Scroll text&lt;br /&gt;
* Turn display off or on&lt;br /&gt;
* Change baud rate&lt;br /&gt;
&lt;br /&gt;
==== IO Task ====&lt;br /&gt;
&lt;br /&gt;
[[File:CmpE243_F14_T5_LCDScreenDesign.png|700px|thumb|center|Fig. LCD screen object design]]&lt;br /&gt;
&lt;br /&gt;
The IO task utilizes the LCD API to display LCD &amp;quot;screens&amp;quot;.  A screen is a custom-defined object containing &amp;quot;line&amp;quot; objects.  Lines consist of a format sting (in the printf format) and optional variables.  All screens are stored in a vector, of which the front object is always displayed on the LCD.  To change the screen, the vector is simply rotated left or right (forward or backward).  For simplicity, the screens are rotated every second.  However the screens can be rotated by button press, timer, external interrupt or even CAN message.&lt;br /&gt;
&lt;br /&gt;
The data objects that are stored in shared memory by the RX task make up the variables in the format strings described above.  To accomplish this, the data types for these variables are char**, or a pointer to a char pointer.  That way, we can just supply the memory location of the char* that is constantly being updated by the RX task.  This simplifies the implementation of the IO Task and ensures the latest data is used when printing the screens.&lt;br /&gt;
&lt;br /&gt;
[[File:CmpE243_F14_T5_IOTaskFlowChart.png|700px|thumb|center|Fig. IO task flow chart]]&lt;br /&gt;
&lt;br /&gt;
== Controller Communication Table ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Controller ID Table&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Controller ID&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x01&lt;br /&gt;
| Master Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| Geographical Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x03&lt;br /&gt;
| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| Sensor Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x05&lt;br /&gt;
| IO Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x06&lt;br /&gt;
| Communication (Bluetooth Bridge/Android App) Controller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Central Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Number  &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Purpose &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Data layout &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1    &lt;br /&gt;
| 0x501  &lt;br /&gt;
| Send Throttle and steering to motor&lt;br /&gt;
| throttle&lt;br /&gt;
steering&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x502  &lt;br /&gt;
| Start car&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3 &lt;br /&gt;
| 0x503   &lt;br /&gt;
| Stop car&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 0x101   &lt;br /&gt;
| Broadcast request revision&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 0x102  &lt;br /&gt;
| Broadcast Set time&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 0x103  &lt;br /&gt;
| Request TX count (broadcast)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 0x104   &lt;br /&gt;
| Request RX count (broadcast)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 0x105   &lt;br /&gt;
| Send TX count (LCD)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| 0x106  &lt;br /&gt;
| Send RX count (LCD)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| 0x107  &lt;br /&gt;
| All controllers initialize&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Communication (Bluetooth Bridge/Android App) Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Number  &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Purpose &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Data layout &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1    &lt;br /&gt;
| 0x301  &lt;br /&gt;
| Broadcast Start command&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x302  &lt;br /&gt;
| Broadcast Stop command&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3  &lt;br /&gt;
| 0x303  &lt;br /&gt;
| Broadcast GPS destination set by Android &lt;br /&gt;
|byte [0-3] : (float), Longitude &lt;br /&gt;
byte [4-7] : (float), Latitude &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Sensor Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Number  &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Purpose &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Data layout &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1    &lt;br /&gt;
| 0x501  &lt;br /&gt;
| Broadcast front sensors values&lt;br /&gt;
| byte[0]: Right ultrasonic sensor value in inches&lt;br /&gt;
byte[1]: Front ultrasonic sensor value in inches&lt;br /&gt;
   &lt;br /&gt;
byte[2]: Left ultrasonic sensor value in inches&lt;br /&gt;
   &lt;br /&gt;
byte[3]: Front bottom infrared sensor value in inches&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x502  &lt;br /&gt;
| Broadcast back infrared sensor value&lt;br /&gt;
| byte[0]: Back infrared sensor value in inches&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3  &lt;br /&gt;
| 0x503  &lt;br /&gt;
| Broadcast battery sensor value &lt;br /&gt;
|byte[0]: current/voltage sensor value in percentage&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4  &lt;br /&gt;
| 0x504  &lt;br /&gt;
| Broadcast light sensor value	&lt;br /&gt;
|byte[0]: light sensor value as integer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5  &lt;br /&gt;
| 0x505  &lt;br /&gt;
| Broadcast tilt sensor value &lt;br /&gt;
|byte[0]: X-Axis tilt sensor value as integer&lt;br /&gt;
byte[1]: Y-Axis tilt sensor value as integer&lt;br /&gt;
&lt;br /&gt;
byte[2]: Z-Axis tilt sensor value as integer&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Motor/Servo Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Send Code&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Data &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1    &lt;br /&gt;
| 0x201    &lt;br /&gt;
| Heartbeat data     &lt;br /&gt;
| Controller id 1 byte&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x201    &lt;br /&gt;
| Heartbeat data&lt;br /&gt;
| Controller id 1 byte&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 0x201    &lt;br /&gt;
| Heartbeat data&lt;br /&gt;
| Controller id 1 byte&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 0x202&lt;br /&gt;
| Mem info data&lt;br /&gt;
| Sys-mem remaining 4bytes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 0x501&lt;br /&gt;
| RPM data send&lt;br /&gt;
| RPM (2 bytes)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 0x502&lt;br /&gt;
| Speed data send&lt;br /&gt;
| Speed (2bytes)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receive Code&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Response&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1 &lt;br /&gt;
| 0x300    &lt;br /&gt;
| Kill               &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x301    &lt;br /&gt;
| Stop               &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 0x302    &lt;br /&gt;
| Straight           &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 0x307    &lt;br /&gt;
| move forward 25%   &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 0x30C    &lt;br /&gt;
| move forward 50%   &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 0x311    &lt;br /&gt;
| move forward 75%   &lt;br /&gt;
| Receive only &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 0x315    &lt;br /&gt;
| move forward 100%  &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 0x31A    &lt;br /&gt;
| move backward 25%  &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| 0x31F    &lt;br /&gt;
| move backward 50%  &lt;br /&gt;
| Receive only &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| 0x324    &lt;br /&gt;
| move backward 75%  &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| 0x329    &lt;br /&gt;
| move backward 100% &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| 0x334    &lt;br /&gt;
| Steer right 25%    &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 13&lt;br /&gt;
| 0x339    &lt;br /&gt;
| Steer right 50%    &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 14&lt;br /&gt;
| 0x33E    &lt;br /&gt;
| Steer right 75%    &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 15&lt;br /&gt;
| 0x343    &lt;br /&gt;
| Steer right 100%   &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 16&lt;br /&gt;
| 0x348    &lt;br /&gt;
| Steer Left 25%     &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 17&lt;br /&gt;
| 0x34D    &lt;br /&gt;
| Steer left 50%     &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 18&lt;br /&gt;
| 0x352    &lt;br /&gt;
| Steer left 75%     &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 19&lt;br /&gt;
| 0x357    &lt;br /&gt;
| Steer left 100%    &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Io Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Number  &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Purpose &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Destination&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1    &lt;br /&gt;
| 0x301  &lt;br /&gt;
| Start command for car&lt;br /&gt;
| Central Controller&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x302 &lt;br /&gt;
| Stop command for car&lt;br /&gt;
| Central Controller&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3  &lt;br /&gt;
| 0x303  &lt;br /&gt;
| Go to a predefined Destination.  &lt;br /&gt;
| Central Controller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
=== Sensors ===&lt;br /&gt;
The first challenge was the positioning and spacing between the sensors. The sensors were mounted on a 3D printed bracket for initial testing but the angle between the brackets seemed to cause interference and was not giving optimum values. The sensors were then individually mounted further apart to reduce interference. The detection distance was tweaked by trial and error and finally settled on the value of 36 inches for the front, left and right sensors and  7 inches for the back sensor.&lt;br /&gt;
&lt;br /&gt;
The second challenge was dealing with erroneous values. Using ADC to interface sensors lead to certain erroneous values that didn't have the desired effect and after some testing, the sensor interface was changed to pulse width. This lead to more robust values after filtering.&lt;br /&gt;
&lt;br /&gt;
Another challenge was the initial skewed alignment. It was difficult to detect whether the direction of the running car was changing because of the motor response to sensor values or the alignment of the tires. The group eventually decided to get a new car that rectified the alignment issue.&lt;br /&gt;
&lt;br /&gt;
=== Sensors Configuration and Implementation ===&lt;br /&gt;
We used LV-MaxSonar series MB1010 high performance ultrasonic sensors  for our application. The sensors detects objects from 6 inch to 254 inches and can be interfaced to ADC or pulse width output. We found the ADC values were inconsistent and due to the constraint of number of ADC pins on SJONE board , we used PWM  to configure the sensors.&lt;br /&gt;
We mounted three sensors in front of the car and we found the values were not consistent as it was reflected from the ground, hence we elevated the sensor placement.&lt;br /&gt;
The sensor configuration is explained&lt;br /&gt;
[[File:CMPE243_F14_Group5_ultrasonic.png|200px|centre|thumb|Ultra SonicSensor]]&lt;br /&gt;
&lt;br /&gt;
===Motor Controller ===&lt;br /&gt;
&lt;br /&gt;
====Issue 1====&lt;br /&gt;
As we were using Electric Speed Control (ESC) to control the speed of motor we faced issues based on inconsistency of the speed. This could have been solved easily if we used H-bridge chip. When ESC was supplied with particular PWM signal it would work at desirable speed but when turning off the ESC and turning on the ESC the speed would change for the same PWM signal supplied. This inconsistency of the speed can easily damaged the motor as it was hard to predict when the motor will switch from forward to backward motion. So to fix this issue we had to connect the ESC to oscilloscope and turn on the transmitter. As soon as the transmitter is turned on the transmitter send a fix signal to ESC for some time that could have been in milli seconds. By doing this the ESC get initialized and once the ESC has initialized the transmitter can send a signal to go forward or reverse.&lt;br /&gt;
&lt;br /&gt;
So we wrote a code to initialize the ESC. Before we sends the signal to ESC to move forward or reverse we send a fix PWM signal to ESC for one second to initialize ESC and this signal was sent from the main function.&lt;br /&gt;
&lt;br /&gt;
====Issue 2====&lt;br /&gt;
The servo that came with the RC car wasn't fast enough to respond to left and right movement of the car. Car would hit the obstacle and than the wheel would rotate in opposite direction. So we change the servo with faster response time. &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;|Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Test Case&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Test Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Result&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|1||Initial CAN communication of all controllers ||Check if all the controllers are broadcasting the periodic message on CAN bus and receiving the data ||All controllers '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|2||Obstacle avoidance|| Obstacle  by integrating the ultrasonic sensor||Obstacle avoidance '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|3||LCD display || Displying all the values including CPU Utilization, CAN message count, and message from the controllers ||LCD display of all message '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|4||Building Android application ||Check if the Android application sends the destination by Bluetooth||Communication '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|5||Point to Point movement || Test Car runs by setting two way points||Point to point car movement '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|6||Checking if Car runs with multiple way points ||Check if the car works with multiple way points||Multiple way points steering  '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Challenges and Learning ==&lt;br /&gt;
&lt;br /&gt;
== Future Enhancement ==&lt;br /&gt;
=== Sensors ===&lt;br /&gt;
It would be ideal to add another infrared sensor to the front lower portion of the car for cliff detection. It would also be good to have a bigger 3D printed bracket to mount the sensors that match our measurements requirements. This would add to the visual appeal and also reduce tangling mess due to the wires.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Video ==&lt;br /&gt;
&lt;br /&gt;
Demo     :    http://youtu.be/a9ceLDJN67M&lt;br /&gt;
&lt;br /&gt;
Teampics :    http://youtu.be/TJW7AsHpXfE&lt;br /&gt;
&lt;br /&gt;
== Project Source Code ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
# Preetpal Kang, Lecture notes of CMPE 243, Computer Engineering, Charles W. Davidson College of Engineering, San Jose State University, Aug-Dec 2014.&lt;br /&gt;
# en.wikipedia.org/&lt;br /&gt;
# MaxBotix 2012, http://www.maxbotix.com/articles/031.htm&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=File:CmpE243_F14_T5_IOTaskFlowChart.png&amp;diff=11553</id>
		<title>File:CmpE243 F14 T5 IOTaskFlowChart.png</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=File:CmpE243_F14_T5_IOTaskFlowChart.png&amp;diff=11553"/>
				<updated>2014-12-23T03:48:58Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F14:_Team5-Self_Driving_Car_-_AUG&amp;diff=11537</id>
		<title>F14: Team5-Self Driving Car - AUG</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F14:_Team5-Self_Driving_Car_-_AUG&amp;diff=11537"/>
				<updated>2014-12-23T03:39:00Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: /* RX Task */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Self Driving Car ==&lt;br /&gt;
&lt;br /&gt;
== Objective and Scope ==&lt;br /&gt;
&lt;br /&gt;
This project is aimed at creating a self-driving car with obstacles avoidance and to steer to the gps location pointed by the android application with  the help of multiple controllers communicating using CAN bus.CAN(Control Area Network) is a communication protocol used widely in automotive application developed by BOSCH in 1986. The self-driving car consists of 6 different controllers for '''GPS''','''Sensor''','''Central''','''Motor''','''IO''' and '''Communication'''. The controllers communicate to other controller by CAN bus.We have implemented broadcast algorithm to broadcast all the data from each controller in different frequencies. The controller parses the data using the 29 bit identifier which has destination and source address.&lt;br /&gt;
&lt;br /&gt;
[[File:CmpE244_F14_SelfDrivingCarT5_basic_can_updated.JPG|700px|thumb|center|Fig 2. Build in Progress]]&lt;br /&gt;
[[/File:CmpE244_S14_Quadcopter_Propeller_direction2.JPG|400px|thumb|right|Fig 2. Propeller rotating direction]]&lt;br /&gt;
&lt;br /&gt;
== Team Members &amp;amp; Responsibilities ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Team Members&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| Sensor Controller&lt;br /&gt;
| &lt;br /&gt;
# Bailey Wu&lt;br /&gt;
# Rishabh Sareen&lt;br /&gt;
# Rishab H&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| Motor Controller &lt;br /&gt;
| &lt;br /&gt;
# Abhraham Ruiz&lt;br /&gt;
# Arpit Amin&lt;br /&gt;
# Sree Harsha&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| I/O Controller (LCD Display)&lt;br /&gt;
| &lt;br /&gt;
# Yoni Klein&lt;br /&gt;
# Tejeswar&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| Communication Bridge + Android&lt;br /&gt;
| &lt;br /&gt;
# Shaw Ken Chang&lt;br /&gt;
# Arnold Bajet Jr.&lt;br /&gt;
# Thomas Pantels&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| Geographical Controller&lt;br /&gt;
| &lt;br /&gt;
# Himanshu Saini&lt;br /&gt;
# Divya Kamath &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| Central Controller&lt;br /&gt;
| &lt;br /&gt;
# Divya Kamath&lt;br /&gt;
# Tejeswar&lt;br /&gt;
# Sree Harsha&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| Car design and wiring&lt;br /&gt;
| &lt;br /&gt;
# Bailey Wu&lt;br /&gt;
# Himanshu Saini&lt;br /&gt;
# Sree Harsha&lt;br /&gt;
# Karthik Vadiraja&lt;br /&gt;
# Akash Ayare&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Git Setup&lt;br /&gt;
| Akash Ayare&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of this project was to design and implement a self-driving car. The team consisted of 15 people, divided into 6 teams corresponding to six controllers. The aim of this class was to understand the CAN protocol that is used extensively in vehicles. The self-driving car houses six controllers, all of them communicating using CAN. Each controller performs a unique task such as:&lt;br /&gt;
# '''Sensor Controller''': Interfaced to the front and back sensors. Periodically sends sensor data to the central controller. Crucial for obstacle detection and avoidance&lt;br /&gt;
# '''Motor Controller''': Controls the motors and steering of the car, based on commands received from central controller.&lt;br /&gt;
# '''Geographical Controller''': Interfaced to GPS and compass. Periodically sends location, heading and distance from destination. crucial for autonomous navigation of the car.&lt;br /&gt;
# '''Communication Controller''': Acts as a bridge for Android. Android app is used to set destination, calculate path to destination, start and stop the car. Data is sent to central and geographical Controller based on user input.&lt;br /&gt;
# '''Central Controller''': The brain of the car. Uses sensor and geographical data to steer the car in the right direction. Uses sensor data to detect and avoid obstacles. Uses geographical data to move towards desired location&lt;br /&gt;
# '''Display Controller''': Interfaced to an LCD screen which displays status of the car (reached/ not reached), CAN bus utilization, sensor data, bearing, heading etc.&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Geographical Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 1-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Order Components and Make a schedule&lt;br /&gt;
| Completed&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 8-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Decide commands that Geographical Controller will support&lt;br /&gt;
| Completed&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 7-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Complete CAN RX task and subscription handling. Verify communication with other controllers&lt;br /&gt;
| Completed&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| Interface GPS module and Compass and develop drivers if needed&lt;br /&gt;
| Completed&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| 30-Oct-2014&lt;br /&gt;
| Design and develop algorithm to calculate heading and bearing from GPS coordinates&lt;br /&gt;
| Completed. &lt;br /&gt;
| 30-Oct-2014 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| 5-Nov-2014&lt;br /&gt;
| Work on calibration of compass and heading calculation&lt;br /&gt;
| Completed&lt;br /&gt;
| 11-Dec-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 1-Nov-2014&lt;br /&gt;
| 10-Nov-2014&lt;br /&gt;
| Test with the central and Bluetooth controller &lt;br /&gt;
| Completed&lt;br /&gt;
| 14-Dec-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 10-Nov-2014&lt;br /&gt;
| 25-Nov-2014&lt;br /&gt;
| Begin testing with fully assembled car &lt;br /&gt;
| Completed&lt;br /&gt;
| 1-Dec-2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| 25-Nov-2014&lt;br /&gt;
| 10-Dec-2014&lt;br /&gt;
| Final Testing and changes as needed &lt;br /&gt;
| Completed&lt;br /&gt;
| 19-Dec-2014&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sensor Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/3/2014&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|Order ultrasonic sensor parts and develop simple test code for the sensors&lt;br /&gt;
|Done&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Wire the ultrasonic sensors, develop and implement the sensors using analog to digital converter&lt;br /&gt;
|Done&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|Collaborate with the other sub teams to finish the CAN bus communication and allow the self driving car to drive autonomously &lt;br /&gt;
|Done&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|-&lt;br /&gt;
|! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|11/1/2014&lt;br /&gt;
|Develop, implement and test the ultrasonic sensors using the pulse width modulation and universal asynchronous receiver/transmitter&lt;br /&gt;
|Done&lt;br /&gt;
|11/1/2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|11/2/2014&lt;br /&gt;
|11/9/2014&lt;br /&gt;
|Develop, implement and test the front and back infrared sensors using analog to digital converter&lt;br /&gt;
|Done&lt;br /&gt;
|11/9/2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|11/10/2014&lt;br /&gt;
|11/17/2014&lt;br /&gt;
|Develop, implement and test the current/voltage sensor for the battery packs of the self driving car using I2C&lt;br /&gt;
|Scheduled&lt;br /&gt;
|Removed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
|11/18/2014&lt;br /&gt;
|11/25/2014&lt;br /&gt;
|Collaborate with the other sub teams to make sure that the sensors are in working condition&lt;br /&gt;
|Done&lt;br /&gt;
|11/25/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
|11/26/2014&lt;br /&gt;
|12/5/2014&lt;br /&gt;
|Collaborate with the other sub teams to debug any problems that may encountered&lt;br /&gt;
|Done&lt;br /&gt;
|12/5/2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
|12/6/2014&lt;br /&gt;
|12/13/2014&lt;br /&gt;
|Prepare for demo&lt;br /&gt;
|Done&lt;br /&gt;
|12/19/2014&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''IO Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/14/2014&lt;br /&gt;
|Research and order LCD appropriate for this project&lt;br /&gt;
|Done&lt;br /&gt;
|10/11/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Implement CAN RX/Subscription task&lt;br /&gt;
|Done&lt;br /&gt;
|10/13/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Finalize Task Architecture&lt;br /&gt;
|Done&lt;br /&gt;
|11/1/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|10/18/2014&lt;br /&gt;
|10/21/2014&lt;br /&gt;
|Interface and test LCD&lt;br /&gt;
|Done&lt;br /&gt;
|10/20/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|10/21/2014&lt;br /&gt;
|10/28/2014&lt;br /&gt;
|Implement auto scrolling feature&lt;br /&gt;
|Done&lt;br /&gt;
|11/18/2014&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Communication Bridge + Android'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 16-Sep-2014&lt;br /&gt;
| 23-Sep-2014&lt;br /&gt;
| Test bluetooth module using computer serial port and an android app(simple bluetooth terminal app downloaded from google play).  Test the real life range and stability of the bluetooth module (HC-06).  Modify the bluetooth chat example to work with the bluetooth module.    &lt;br /&gt;
| Done&lt;br /&gt;
| 20-Sep-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 28-Sep-2014&lt;br /&gt;
| 12-Oct-2014&lt;br /&gt;
| Draw UI design layouts for a basic android application that can view Google map as well as send GPS data through bluetooth by clicking on the map. Study google maps API and make a simple app that will post a short toast that shows the GPS location after a long press event. &lt;br /&gt;
| Done&lt;br /&gt;
| 12-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 7-Oct-2014&lt;br /&gt;
| 11-Oct-2014&lt;br /&gt;
| Interface bluetooth module with SJSUOne board and able to verify that the connection is stable and that transaction via the bluetooth is accurate.  This is done by adding a test button where if you press the button it send a command to the board.  After receiving the command, the board should react with a response (LED light and/or text response to the android phone)&lt;br /&gt;
| Done&lt;br /&gt;
| 19-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 11-Oct-2014&lt;br /&gt;
| 19-Oct-2014&lt;br /&gt;
|Integrate Google Maps and Bluetooth component together in Android app.  After a long press on the map, the user should be prompted to start the car and set the location as the places the user selected.  Add a textView to display the location selected by pressing on the map.  Add a button for sending location to the car.  &lt;br /&gt;
| Done&lt;br /&gt;
| 27-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 19-Oct-2014&lt;br /&gt;
| 26-Oct-2014&lt;br /&gt;
| CAN infrastructure implmentation:  Use our team's common CAN infrasturcture code and modify it specifically for our controller.  First created the CAN communication table and then modify the infracturacture code to implement the broacasting as well as filtering of neccessary data.  This only focuses on broadcasting a stop/start command and the destination GPS data (set by android) as well as getting car's current location data from the geological controller.&lt;br /&gt;
|Done&lt;br /&gt;
| 07-Nov-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 26-Oct-2014&lt;br /&gt;
| 1-Nov-2014&lt;br /&gt;
| Test and implement car information reading as well as other functions of Android app&lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 2-Nov-2014&lt;br /&gt;
| 4-Nov-2014&lt;br /&gt;
| Iterate UI design&lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 5-Nov-2014&lt;br /&gt;
| 16-Nov-2014&lt;br /&gt;
| Implement 2nd UI design&lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Motor Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/1/2014&lt;br /&gt;
|10/8/2014&lt;br /&gt;
|PWM2 (used to control motors) and PWM3 (used to control servo) interface with the car servo and motor. Write a test code to operate the servo and motor from the terminal command.&lt;br /&gt;
|Completed and Tested&lt;br /&gt;
|10/11/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
|10/9/2014&lt;br /&gt;
|10/18/2014&lt;br /&gt;
|Design and code CAN receive task for subscription. Check for basic CAN message commands for throttle and steer control.&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|10/26/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|10/19/2014&lt;br /&gt;
|10/28/2014&lt;br /&gt;
|Design the CAN message table for motor control and servo control&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|10/26/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|10/29/2014&lt;br /&gt;
|11/07/2014&lt;br /&gt;
|Design acceleration Vs steer control function for smooth run. Check for other factors involved.&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|11/22/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|11/08/2014&lt;br /&gt;
|11/14/2014&lt;br /&gt;
|Research on RPM sensor. Interface the RPM sensor to calculate the Speed. Test the RPM sensor by running the car at different speed&lt;br /&gt;
|Completed and tested with a hall sensor&lt;br /&gt;
|11/22/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|11/15/2014&lt;br /&gt;
|11/21/2014&lt;br /&gt;
|Fine tune motor control code and integrate with all the controllers for proper working.&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|11/22/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
|11/22/2014&lt;br /&gt;
|11/28/2014&lt;br /&gt;
|Test and check if more features can be added to improve performance. Completed and tested&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|11/28/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
|11/29/2014&lt;br /&gt;
|12/05/2014&lt;br /&gt;
|Testing and Debugging.&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|12/05/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;|9&lt;br /&gt;
|12/06/2014&lt;br /&gt;
|12/18/2014&lt;br /&gt;
|Final Testing and getting the car ready for Demo.&lt;br /&gt;
|On Going&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
'''Central Controller'''&lt;br /&gt;
 &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 16-Sep-2014&lt;br /&gt;
| 23-Sep-2014&lt;br /&gt;
| Develop API for CAN bus communication.&lt;br /&gt;
| Done&lt;br /&gt;
| 23-Sep-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 11-Oct-2014&lt;br /&gt;
| 15-Oct-2014&lt;br /&gt;
| Develop communication table for all controllers.&lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 15-Oct-2014&lt;br /&gt;
| 20-Oct-2014&lt;br /&gt;
| Broadcast message and target message setup.  &lt;br /&gt;
| Done&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
| Co-ordinate all controllers and take major decisions. &lt;br /&gt;
| Done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| Complete Building and fine-tuning of RC car. &lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| Develop coordination mechanism to ensure controllers are initialized and ready &lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
| Develop kill switch &lt;br /&gt;
| Done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
| Build external power distribution circuit&lt;br /&gt;
| Done&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
| 04-Nov-2014&lt;br /&gt;
| Coordination algorithm between steering and throttle for smooth turns &lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| 04-Nov-2014&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| Collision avoidance algorithms &lt;br /&gt;
| Done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| 04-Nov-2014&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| Intermediate unit and functional tests&lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| 25-Nov-2014&lt;br /&gt;
| Functional tests and algorithm adjustments &lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 13&lt;br /&gt;
| 25-Nov-2014&lt;br /&gt;
| 02-Dec-2014&lt;br /&gt;
| Fine tuning and stretch goals (headlights, parallel parking, etc.)&lt;br /&gt;
| Done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 14&lt;br /&gt;
| 02-Dec-2014&lt;br /&gt;
| 09-Dec-2014&lt;br /&gt;
| Prepare for demo&lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Description&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Qty&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Price&lt;br /&gt;
|-&lt;br /&gt;
| LV-MaxSonar-EZ1 High Performance Ultrasonic Rangefinder&lt;br /&gt;
| 2&lt;br /&gt;
| 49.90&lt;br /&gt;
|-&lt;br /&gt;
| Analog Distance Sensor &lt;br /&gt;
| 1&lt;br /&gt;
| Free&lt;br /&gt;
|-&lt;br /&gt;
|1/10 Scale 4x4 Truck with Brushed Motor	&lt;br /&gt;
|1&lt;br /&gt;
|217.33&lt;br /&gt;
|-&lt;br /&gt;
|2 ft 12-Gauge Power Cables&lt;br /&gt;
|3	&lt;br /&gt;
|22.80	&lt;br /&gt;
|-&lt;br /&gt;
|Pair Power Socket	&lt;br /&gt;
|2&lt;br /&gt;
|2.16&lt;br /&gt;
|-	&lt;br /&gt;
|Standard Size Body Clips	&lt;br /&gt;
|12	&lt;br /&gt;
|2.16&lt;br /&gt;
|-&lt;br /&gt;
|4-pack AA Batteries&lt;br /&gt;
|1	&lt;br /&gt;
|3.45	&lt;br /&gt;
|-&lt;br /&gt;
|50-pack M3x15mm Stand-Off Spacer Female-Male&lt;br /&gt;
|1&lt;br /&gt;
|11.19&lt;br /&gt;
|-	&lt;br /&gt;
|100-pack 18-8 Flat Steel Washer	&lt;br /&gt;
|1	&lt;br /&gt;
|2.54&lt;br /&gt;
|-	&lt;br /&gt;
|100-pack M3x20mm Hex-Drive Screw&lt;br /&gt;
|1&lt;br /&gt;
|6.47	&lt;br /&gt;
|-&lt;br /&gt;
|100-pack M3 Steel Hex Nut&lt;br /&gt;
|1&lt;br /&gt;
|4.66&lt;br /&gt;
|-&lt;br /&gt;
|2-pin JST Connector Right Angle&lt;br /&gt;
|10&lt;br /&gt;
|6.84&lt;br /&gt;
|-&lt;br /&gt;
|4-pin JST Connector Right Angle&lt;br /&gt;
|10&lt;br /&gt;
|6.84&lt;br /&gt;
|-&lt;br /&gt;
|2-pin Female JST Cable (20 cm)&lt;br /&gt;
|10&lt;br /&gt;
|7.39&lt;br /&gt;
|-&lt;br /&gt;
|4-pin Female JST Cable (20 cm)&lt;br /&gt;
|10&lt;br /&gt;
|7.39&lt;br /&gt;
|-&lt;br /&gt;
|5 Volt Relay Breakout Board&lt;br /&gt;
|1&lt;br /&gt;
|4.95&lt;br /&gt;
|-&lt;br /&gt;
|5 Volt Voltage Regulator&lt;br /&gt;
|1&lt;br /&gt;
|1.07&lt;br /&gt;
|-&lt;br /&gt;
|Sharp Analog Distance Sensor 4-30 cm&lt;br /&gt;
|1&lt;br /&gt;
|9.95&lt;br /&gt;
|-&lt;br /&gt;
|3-pin Female JST PH-Style Cable (30 cm)&lt;br /&gt;
|1&lt;br /&gt;
|0.92&lt;br /&gt;
|-&lt;br /&gt;
|Double Sided Mounting Tape - 3 feet	&lt;br /&gt;
|1&lt;br /&gt;
|4.35&lt;br /&gt;
|-&lt;br /&gt;
|AC Adapter (LiPo Charger)&lt;br /&gt;
|1&lt;br /&gt;
|15.16&lt;br /&gt;
|-&lt;br /&gt;
|IEC Power Cable (LiPo Charger)&lt;br /&gt;
|1&lt;br /&gt;
|5.38&lt;br /&gt;
|-&lt;br /&gt;
|4mm Bullet Plugs to Universal Plug&lt;br /&gt;
|1&lt;br /&gt;
|13.38&lt;br /&gt;
|-&lt;br /&gt;
|Acrylic sheet + Sharpe mini&lt;br /&gt;
|1+1&lt;br /&gt;
|11.72&lt;br /&gt;
|-&lt;br /&gt;
|Molex Pin Header, Connector, wires and 100 zip ties&lt;br /&gt;
|10+4+1&lt;br /&gt;
|17.13&lt;br /&gt;
|-&lt;br /&gt;
|2 x 90 degree pin header, 2 x straight pin header&lt;br /&gt;
|2+2&lt;br /&gt;
|3.65&lt;br /&gt;
|-&lt;br /&gt;
|uni-polar hall sensor for tachometer feedback&lt;br /&gt;
|2&lt;br /&gt;
|2.18&lt;br /&gt;
|-&lt;br /&gt;
|Heavy Duty magnets&lt;br /&gt;
|2&lt;br /&gt;
|4.18&lt;br /&gt;
|-&lt;br /&gt;
|INA219 Voltage sensors 26V +/-3.2A&lt;br /&gt;
|2&lt;br /&gt;
|19.9&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|20x4 Serial LCD Module&lt;br /&gt;
|1&lt;br /&gt;
|29.99&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Backup Parts &amp;amp; cost ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Qty&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Description&lt;br /&gt;
! width=&amp;quot;110&amp;quot; align=&amp;quot;center&amp;quot;|Manufacturer&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Part Number&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Total Cost&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| LV-MaxSonar-EZ1 High Performance Ultrasonic Rangefinder&lt;br /&gt;
| MaxBotix Inc&lt;br /&gt;
| MB1010&lt;br /&gt;
| Free&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Analog Distance Sensor &lt;br /&gt;
| Sharp&lt;br /&gt;
|&lt;br /&gt;
| Free&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
[[File:CmpE243_F14_Team5_OverallHWDesign.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Motor Controller ==&lt;br /&gt;
&lt;br /&gt;
==== Summary ====&lt;br /&gt;
This module takes command input from central controller and steers the car to its destination; in addition, It has two main controlling parameters : Throttle and Steering. Throttle input moves the car forward and backward. Steer input turns the wheel left and right. The central controller takes feedback from the sensors and makes decision to move the car. Accordingly, it sends CAN commands accepted by the motor controller for navigation, and real time RPM signal to the controller.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Motor and Steer control : Technical Information&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Sl.No&lt;br /&gt;
! width=&amp;quot;90&amp;quot; align=&amp;quot;center&amp;quot;|Controller&lt;br /&gt;
! width=&amp;quot;90&amp;quot; align=&amp;quot;center&amp;quot;|Signal Type&lt;br /&gt;
! width=&amp;quot;90&amp;quot; align=&amp;quot;center&amp;quot;|Frequency&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Functionality&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1&lt;br /&gt;
| Motor Control&lt;br /&gt;
| PWM signal&lt;br /&gt;
| 50 Hz (20000us)&lt;br /&gt;
| 1000us (Full throttle forward) - 1500us (Stop)   - 2000us (Full throttle backward)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|2    &lt;br /&gt;
| Steer Control&lt;br /&gt;
| PWM signal &lt;br /&gt;
| 50 Hz (20000us)&lt;br /&gt;
|1000us (Turn left max)         - 1500us (Center) - 2000us (Turn right max)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Working =====&lt;br /&gt;
The car initially accepts the start command to begin navigation. Commands can then come to move the car forward or backward, steer left or right depending on intelligent decisions made by the central controller. The motor control has intelligence to avoid jerks and ensure smoother transitions between commands. The central controller gets the data from the sensors for obstacle avoidance. The car has a communication controller which gets the '''GPS''' data from the android application, the android application sets the destination latitude and longitude. The car decides the heading direction by the gps points and the compass and if it finds obstacle it will be controlled by the obstetrical avoidance and steer to the destination according to the algorithm below.&lt;br /&gt;
===== Flow Chart =====&lt;br /&gt;
&lt;br /&gt;
[[File:Cmpe243_F14_T5_motor_controller_flowchart1.png]]&lt;br /&gt;
&lt;br /&gt;
===== Kill switch =====&lt;br /&gt;
The remote control and receiver module pair up to provide a signal coverage of more than 100 meters. We make use of this to design our kill switch. When a constant PWM signal of 1000us is received from the remote, the car is in 'ARMED' state and moves the car according to CAN commands. The user has to hold the trigger gun for this state constantly and the car moves.&lt;br /&gt;
When the user releases the trigger gun, the car stops receiving the PWM signal of 1000us and the car goes to 'DISARMED' state.&lt;br /&gt;
In short, pull the trigger gun - ARMED, release the trigger gun - DISARMED.&lt;br /&gt;
&lt;br /&gt;
===== RPM =====&lt;br /&gt;
The RPM sensor is based on a hall sensor switch which detect the North and South pole of a magnet located in the main shaft in the car. The hall sensor part number is 3177, and it has three pin. This sensor is uni-polar which give an output high signal when the sensor captures the North pole of the magnet; subsequently, the sensor give output low signal when the sensor captures the South pole of the magnet. Therefore, by using a the 3177 and a magnet in the shaft. the SJOne board can capture the output signal from the hall sensor as it toggles per shaft revolution. &lt;br /&gt;
It is important to notice that the output signal of the 3177 is an open collector; therefore, we need a  10 Kohm resistor connected to Vcc.&lt;br /&gt;
&lt;br /&gt;
===== Pinout Table =====&lt;br /&gt;
&lt;br /&gt;
The following table shows the pinout of all component that are connected to SJONE board.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Component Pin&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Output Pin Source&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1 &lt;br /&gt;
|Hall Sensor (3177) Vcc ( 4.5 V to 18 V)&lt;br /&gt;
|Source&lt;br /&gt;
|SJOne P1_22&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|2 &lt;br /&gt;
|Hall Sensor (3177) Ground&lt;br /&gt;
|Ground&lt;br /&gt;
|SJOne&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|3&lt;br /&gt;
|Hall Sensor (3177) Output&lt;br /&gt;
|Output&lt;br /&gt;
|SJOne P1_22 with a 10 KOhm&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|4&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 1 TX&lt;br /&gt;
|SJOne P0_1(Tx)&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|5&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 2 GND&lt;br /&gt;
|SJOne GND&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|6&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 3 VCC&lt;br /&gt;
|SJOne 3.3v&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|7&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 4 RX&lt;br /&gt;
|SJOne P0_0(Rx)&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|8&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 6 CANL&lt;br /&gt;
|CAN Bus&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|10&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 7 CANH&lt;br /&gt;
|CAN Bus&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|11&lt;br /&gt;
|Servo&lt;br /&gt;
|VCC&lt;br /&gt;
|5V Power Rail&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|12&lt;br /&gt;
|Servo&lt;br /&gt;
|GND&lt;br /&gt;
|GND Power Rail&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|13&lt;br /&gt;
|Servo&lt;br /&gt;
|Signal&lt;br /&gt;
|PWM 2.1&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|14&lt;br /&gt;
|Electric Speed Control (ESC)&lt;br /&gt;
|VCC&lt;br /&gt;
|5V Power rail&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|15&lt;br /&gt;
|Electric Speed Control (ESC)&lt;br /&gt;
|GND&lt;br /&gt;
|GND Power Rail&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|16&lt;br /&gt;
|Electric Speed Control (ESC)&lt;br /&gt;
|Signal&lt;br /&gt;
|PWM 2.2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Block Diagram =====&lt;br /&gt;
The following Block diagram shows an overview of the connection between the SJOne board, ESC, and the Hall sensor:&lt;br /&gt;
&lt;br /&gt;
[[File:Motor Block Diagram 1.jpg|600px|thumb|center|Motor Controller Block Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Sensor Controller ==&lt;br /&gt;
===Sensor Controller Hardware Design and Architecture ===&lt;br /&gt;
&lt;br /&gt;
[[File:CmpE243_F14_T5_SensorHWDesign.jpg|700px|thumb| center |Fig . Sensor Controller Hardware Design]&lt;br /&gt;
&lt;br /&gt;
When using multiple MaxSonar sensors, it is required to configure the sensors in ''Sequential Operation'' mode to obtain the best optimal performance in obstacle detection. On the other hand, if the sensors are left in continuous free run operation, which means the RX pin (Pin 4) are unconnected then at start-up the sensors will range at exactly the same time. Thus, the sensors are not synchronized and eventually result in frequency drifts that would likely cause interference between sensors for most applications.&lt;br /&gt;
&lt;br /&gt;
[[File:CmpE243_F14_T5_SensorHWDesign.JPG|500px|thumb| center |Fig . Single Sensor in free run operation mode - MaxBotix 2012]]&lt;br /&gt;
&lt;br /&gt;
The figure to the above shows a single MaxSonar ultrasonic sensor operating in continuous free run operation detecting an object at 96 inches. The signal of the ultrasonic sensor observe under the oscilloscope shows that the sensor is operating at its finesse performance without any interference.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The figure to the below shows that multiple MaxSonar ultrasonic sensors are operating in continuous free run operation. As you can see, the signal of a ultrasonic sensor observe under the oscilloscope shows that the signal has multiple spikes due to the interference of other sensors. Thus, the sensor becomes unsynchronized and the range reading become unstable. &lt;br /&gt;
&lt;br /&gt;
[[File:CmpE243_F14_T5_MultipleSensorsInterferences.jpg‎|500px|thumb| center |Fig . Multiple Sensors in free run operation mode - MaxBotix 2012]]&lt;br /&gt;
&lt;br /&gt;
To achieve the most optimal performance using multiple MaxSonar ultrasonic sensors, the figure below shows the implementation of all the sensors operating in sequential mode. The sensors can be started by pulling the RX pin (Pin 4) high for at least 20 uS and then for each reading this can be done as often as every 50 ms. This method would toggle each sensor when the user like to obtain an reading at any given moment. Thus, there will be no interference between each sensor. &lt;br /&gt;
&lt;br /&gt;
[[File:CmpE243_F14_T5_MultipleSensorsConfiguration.jpg‎ |500px|thumb| center |Fig . Multiple Sensors Configuration]]&lt;br /&gt;
&lt;br /&gt;
There are many other method to implement multiple MaxSonar ultrasonic sensors in a single system. This information can be obtained in the sensor datasheet.&lt;br /&gt;
&lt;br /&gt;
===Sensor Controller Software Design===&lt;br /&gt;
&lt;br /&gt;
== Central Controller ==&lt;br /&gt;
&lt;br /&gt;
The central controller is the brain of the car. It receives information from all the other controllers and decides which direction the car must move. The central controller periodically sends commands to the motor regarding the throttle, steering, steering angle and speed.&lt;br /&gt;
&lt;br /&gt;
In order to decide which direction to move, the central controller uses sensor data and geographical data. The current design uses a state machine. The car is initially in idle state. When it received a START command from the communication controller, the central sends the start motor command to the motor controller. After the start state, the central controller can be in one of the two states: avoid obstacle or adjust heading. The central controller uses the sensor data to detect obstacle. If there are no obstacles, then the central controller uses geographical information to adjust car heading. &lt;br /&gt;
&lt;br /&gt;
Once the heading and bearing match, the car moves straight ahead till the destination is reached. When the geographical controller sends a command indicating that the car has reached the destination, the car will stop.&lt;br /&gt;
&lt;br /&gt;
At any point during its course, if the car receives a STOP command from the communication controller, the car will stop&lt;br /&gt;
&lt;br /&gt;
[[File:Cmpe243F14_Team5_Central_StateTransition.JPG|700px|thumb|center|Fig. Central Controller State Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Geographical Controller ==&lt;br /&gt;
&lt;br /&gt;
The geographical controller is one of the six controllers mounted on the car. This controller provides the location and heading information to the central controller of the car. It also stores the destination (way-points). By calculating the distance from the current location to the destination or intermediate waypoint, the geo controller can determine if the car has reached its destination. When the car reaches the destination, the geo controller sends a message to the central controller indicating that destination has been reached. &lt;br /&gt;
&lt;br /&gt;
The devices connected to this controller are:&lt;br /&gt;
1. Magnetometer (digital compass)&lt;br /&gt;
2. GPS Logger&lt;br /&gt;
&lt;br /&gt;
The compass communicates via I2C and the GPS via UART.&lt;br /&gt;
&lt;br /&gt;
==== Parts Used ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Geographical Control - Parts Used&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;center&amp;quot;|Part Number&lt;br /&gt;
! align=&amp;quot;center&amp;quot;|Purpose&lt;br /&gt;
|-&lt;br /&gt;
| SparkFun Triple Axis Magnetometer Breakout - HMC5883L&lt;br /&gt;
| Compass&lt;br /&gt;
|-&lt;br /&gt;
| SparkFun Venus GPS Logger - SMA Connector&lt;br /&gt;
| GPS &lt;br /&gt;
|-&lt;br /&gt;
| Antenna GPS Embedded SMA - GPS-00177&lt;br /&gt;
| Antenna&lt;br /&gt;
|-&lt;br /&gt;
| ET-318 GPS Engine Board&lt;br /&gt;
| GPS&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Design ====&lt;br /&gt;
&lt;br /&gt;
'''Heading''' - The compass provides the heading. The heading is the direction in which the car is headed. The value is typically an angle from 0-360 degrees measured clockwise from North. The heading is calculated from the x-axis and y-axis values provided by the magnetometer. To use all 3-axis values, a tilt sensor must be used with the magnetometer for tilt compensation.&lt;br /&gt;
&lt;br /&gt;
'''GPS Module''' - The GPS module provides the time, latitude, longitude, direction and if the GPS data is valid. This latitude, longitude corresponds to the current location of the car.&lt;br /&gt;
&lt;br /&gt;
'''Destination''' - The destination is set by Android application/communication controller. The destination could be a single point or a list of waypoints, each being a latitude, longitude pair.&lt;br /&gt;
&lt;br /&gt;
'''Bearing''' - Using the destination lat,lon pair (set by the communication controller) and the current lat, lon pair (received from the GPS module), the geographical controller calculates the bearing. This angle, like the heading, is also typically between 0-360 degrees measured clockwise. Bearing represents the angle between the destination and current location. &lt;br /&gt;
&lt;br /&gt;
Both the heading and the bearing are sent periodically to the central controller. The central controller uses this information combined with the sensor data to steer the motors in the right direction.&lt;br /&gt;
&lt;br /&gt;
Example: If the current heading is 10 degrees ( car is travelling in a direction 10 degrees) from north. The bearing is 50 degrees ( the car is at an angle of 50 degrees away from the desired direction), the central controller must steer the car 40 degrees to the right.&lt;br /&gt;
&lt;br /&gt;
The geographical controller also calculates the distance between the current lat, lon and the destination lat, lon. This is used to determine if the car has reached the intended destination. When the car has reached the destination, geographical controller sends a message to the central controller to stop.&lt;br /&gt;
&lt;br /&gt;
==== Tasks ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Geographical Control - Tasks&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;center&amp;quot;|Task Name&lt;br /&gt;
! align=&amp;quot;center&amp;quot;|Purpose&lt;br /&gt;
|-&lt;br /&gt;
| Compass Task&lt;br /&gt;
| Updates the compass heading. Runs every 100ms and obtains compass data over I2C&lt;br /&gt;
|-&lt;br /&gt;
| GPS Task&lt;br /&gt;
| Updates the current latitude and longitude by reading GPS data sent over UART. GPS has been configured to run at 10Hz and sends data at a baud rate of 38400. &lt;br /&gt;
|-&lt;br /&gt;
| CAN Rx Task&lt;br /&gt;
| Handles data received over CAN. Task gets blocked if can receive queue is empty. &lt;br /&gt;
|-&lt;br /&gt;
| CAN Periodic Msg Task &lt;br /&gt;
[1 Hz]&lt;br /&gt;
| Periodic CAN message to send current lat,lon and destination lat, lon to central and display controller&lt;br /&gt;
|-&lt;br /&gt;
| CAN Periodic Msg Task &lt;br /&gt;
[20 Hz]&lt;br /&gt;
| Periodic CAN message to send compass heading and destination bearing to central controller.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== GEO CAN Controller Communication Table ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Geographical Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Number&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Type&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Purpose&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Data layout&lt;br /&gt;
|- &lt;br /&gt;
| 0x0301  &lt;br /&gt;
| Get Geo Data &lt;br /&gt;
| Request for GPS Data (lat,long)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x0302  &lt;br /&gt;
|    &amp;quot;  &lt;br /&gt;
| Request for current compass heading and destination heading&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x0304  &lt;br /&gt;
| &amp;quot; &lt;br /&gt;
| Request Time&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x0601  &lt;br /&gt;
| Response to 0x3xx request&lt;br /&gt;
| GPS Data (lat,long)&lt;br /&gt;
|&lt;br /&gt;
 dword[0] : [32-bit latitude]&lt;br /&gt;
 dword[1] : [32-bit longitude] &lt;br /&gt;
|-&lt;br /&gt;
| 0x0602  &lt;br /&gt;
| &amp;quot;&lt;br /&gt;
| Compass heading and destination bearing&lt;br /&gt;
|&lt;br /&gt;
 dword[0] : [32-bit compass heading]&lt;br /&gt;
 dword[1] : [32-bit destination bearing] &lt;br /&gt;
|-&lt;br /&gt;
| 0x0504  &lt;br /&gt;
| &amp;quot;&lt;br /&gt;
| Time &lt;br /&gt;
| &lt;br /&gt;
 dword[0] : [32-bit time 0x00hhmmss]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0501  &lt;br /&gt;
| Periodic Message&lt;br /&gt;
| GPS data, broadcast periodically  &lt;br /&gt;
|&lt;br /&gt;
 dword[0] : [32-bit longitude]&lt;br /&gt;
 dword[1] : [32-bit latitude]  &lt;br /&gt;
|-&lt;br /&gt;
| 0x0502  &lt;br /&gt;
| &amp;quot;&lt;br /&gt;
| Current and destination heading broadcast periodically  &lt;br /&gt;
|&lt;br /&gt;
 dword[0] : [32-bit compass heading]&lt;br /&gt;
 dword[1] : [32-bit bearing]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Challenges and Lessons Learnt ====&lt;br /&gt;
&lt;br /&gt;
# '''Start Geo work early''' : Most of the tasks of the geo controller can be done independent of the progress on the rest of the car. Start working early, test the GPS outside as much as possible.&lt;br /&gt;
# '''Compass calibration''' : Most compasses need calibration. During the course of our project, we used to magnetometers (since we accidently burned the first one). The first one was off by 5 degrees and the second one was off by about 20 degrees. Take care that the compass is mounted away from motors and other devices that can create a lot of noise for the compass&lt;br /&gt;
# '''GPS speed''' : We started by using the default speed of 1Hz on the GPS module. The data was sent to the central controller at 1 Hz. As we started testing we realized that this can be too slow and the car may go off course before the new data arrives. Using the commands in the datasheet, we configured the GPS to have an update rate of 10 Hz and a baud rate of 38400. While the datasheet said that the GPS can be configured for 20Hz and baud rate of 115200, we were unsuccessful in achieving that. For some reason, the SJOne board crashed every time we set the GPS for 115200. We did not successfully debug the issue. But changing the speed from 1Hz to 10Hz did make a lot of difference to the performance of the car steering.&lt;br /&gt;
# '''Picking the right GPS and compass''' : Both the compass and the GPS that we used served the purpose well. On sunny days, the GPS worked indoors too. Even though we used a 3 axis compass, we used only 2 axis readings from it to calculate the heading. A 3 axis compass paired with a tilt sensor would probably give better readings. But 2 axis readings served our purpose. &lt;br /&gt;
# '''GPS Drift''' : We noticed that the GPS values for the same locations drifted over time. There could be a 6 foot jump every few hours. The datasheet offers configurations to pin or unpin the gps values. We did not use the feature. But we did notice that because of the GPS drift, our car traveled differently on the same path at different times during the day. If we had more time, we could have fixed this and achieved a straight path for the car, instead of always veering to the left of right.&lt;br /&gt;
# '''Android App''' : The Android app is crucial since it provides the destination waypoints to the geo controller. We need to ensure that the dataset used by the android app is similar if not same as the values reported by the GPS. If the values differ a lot, then the car will not move along the intended path. The Android team and the GPS team must work closely and complete their testing well ahead, so that once the GPS and communication controllers are mounted it is only a matter of improving the behavior.&lt;br /&gt;
# '''Multiple Setups''' : Having multiple setups can be very helpful to debug issues, since it is easier to make changes on the temporary setup than on the car. Also, considering the size of the team, different teams might be using the car and the GPS team will always be the last team to get hold of the car.&lt;br /&gt;
&lt;br /&gt;
==== Review of Parts used ====&lt;br /&gt;
The parts used for this controller were good and I would use them again.&lt;br /&gt;
&lt;br /&gt;
== IO Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Summary ===&lt;br /&gt;
&lt;br /&gt;
The IO controller's purpose is to display useful information on an LCD screen for debugging and verification purposes.  Essentially, it monitors the CAN bus for other controllers' data as well as bus utilization.  The hardware and software design is described below, as well as the challenges we encountered along the way.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The hardware design of the IO controller is relatively simple.  The only requirements are the serial LCD module and the controller itself.  The LCD interfaces to the IO controller via UART protocol, while the IO controller interfaces to tater other controllers via CAN Protocol.  The [[F14: Team5-Self Driving Car - AUG#Design &amp;amp; Implementation|block diagram]] above shows gives a clear description of the IO controller's place in the system.&lt;br /&gt;
&lt;br /&gt;
The LCD chosen was a serial enabled 20x4 character display from [https://www.sparkfun.com/products/9568 Sparkfun].  It was chosen for it's larger character display (rather than 16x2) and because the serial &amp;quot;backpack was built into the PCB.  This backpack is used because the display controller communicates with a parallel interface. The serial &amp;quot;backpack&amp;quot; or converter interfaces the parallel connections with a serial one and provides a low level API to control the display.  An additional API was designed on top of this one to make programming simple and clear as well as implement some useful features (such as printing with printf style arguments).  It operates on 5V, so it could not be powered by the controller itself and need to use one of the 5V supplies on the car.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
==== RX Task ====&lt;br /&gt;
&lt;br /&gt;
The receiving task uses the interrupt driven CAN driver to process messages sent on the bus.  When a CAN message is received, the data is filtered and stored a global memory locations.  This data is later used by the IO task to format and print the desired information to the LCD.  No hardware filter was used, since the IO controller must monitor bus utilization and therefore listen to all messages.  No heavy calculations or blocking code is allowed in this task; it's purpose is to get the data out as fast as possible and wait for more.&lt;br /&gt;
&lt;br /&gt;
==== LCD API ====&lt;br /&gt;
&lt;br /&gt;
The LCD API uses a singleton template so that any task can invoke it and print something to the LCD.  Since the LCD doesn't care who prints what, care must be taken to ensure other tasks' data isn't unintentionally overwritten.  However, only a single task in our implementation is utilizing this API so it wasn't a problem.  The LCD communicates over UART, so the available UART driver was used (also a singleton template).  The data sheet from Sparkfun was used to create this API so that nearly all the LCD capabilities can be supported.  These features include:&lt;br /&gt;
&lt;br /&gt;
* Erase screen or individual line&lt;br /&gt;
* Write to screen, line or specific location&lt;br /&gt;
* Adjust backlight brightness&lt;br /&gt;
* Adjust cursor position and style&lt;br /&gt;
* Scroll text&lt;br /&gt;
* Turn display off or on&lt;br /&gt;
* Change baud rate&lt;br /&gt;
&lt;br /&gt;
==== IO Task ====&lt;br /&gt;
&lt;br /&gt;
[[File:CmpE243_F14_T5_LCDScreenDesign.png|700px|thumb|center|Fig. LCD screen object design]]&lt;br /&gt;
&lt;br /&gt;
The IO task utilizes the LCD API to display LCD &amp;quot;screens&amp;quot;.  A screen is a custom-defined object containing &amp;quot;line&amp;quot; objects.  Lines consist of a format sting (in the printf format) and optional variables.  All screens are stored in a vector, of which the front object is always displayed on the LCD.  To change the screen, the vector is simply rotated left or right (forward or backward).  For simplicity, the screens are rotated every second.  However the screens can be rotated by button press, timer, external interrupt or even CAN message.&lt;br /&gt;
&lt;br /&gt;
The data objects that are stored in shared memory by the RX task make up the variables in the format strings described above.  To accomplish this, the data types for these variables are char**, or a pointer to a char pointer.  That way, we can just supply the memory location of the char* that is constantly being updated by the RX task.  This simplifies the implementation of the IO Task and ensures the latest data is used when printing the screens.&lt;br /&gt;
&lt;br /&gt;
(flow chart for IO Task)&lt;br /&gt;
&lt;br /&gt;
== Controller Communication Table ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Controller ID Table&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Controller ID&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x01&lt;br /&gt;
| Master Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| Geographical Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x03&lt;br /&gt;
| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| Sensor Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x05&lt;br /&gt;
| IO Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x06&lt;br /&gt;
| Communication (Bluetooth Bridge/Android App) Controller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Central Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Number  &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Purpose &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Data layout &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1    &lt;br /&gt;
| 0x501  &lt;br /&gt;
| Send Throttle and steering to motor&lt;br /&gt;
| throttle&lt;br /&gt;
steering&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x502  &lt;br /&gt;
| Start car&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3 &lt;br /&gt;
| 0x503   &lt;br /&gt;
| Stop car&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 0x101   &lt;br /&gt;
| Broadcast request revision&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 0x102  &lt;br /&gt;
| Broadcast Set time&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 0x103  &lt;br /&gt;
| Request TX count (broadcast)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 0x104   &lt;br /&gt;
| Request RX count (broadcast)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 0x105   &lt;br /&gt;
| Send TX count (LCD)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| 0x106  &lt;br /&gt;
| Send RX count (LCD)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| 0x107  &lt;br /&gt;
| All controllers initialize&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Communication (Bluetooth Bridge/Android App) Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Number  &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Purpose &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Data layout &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1    &lt;br /&gt;
| 0x301  &lt;br /&gt;
| Broadcast Start command&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x302  &lt;br /&gt;
| Broadcast Stop command&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3  &lt;br /&gt;
| 0x303  &lt;br /&gt;
| Broadcast GPS destination set by Android &lt;br /&gt;
|byte [0-3] : (float), Longitude &lt;br /&gt;
byte [4-7] : (float), Latitude &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Sensor Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Number  &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Purpose &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Data layout &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1    &lt;br /&gt;
| 0x501  &lt;br /&gt;
| Broadcast front sensors values&lt;br /&gt;
| byte[0]: Right ultrasonic sensor value in inches&lt;br /&gt;
byte[1]: Front ultrasonic sensor value in inches&lt;br /&gt;
   &lt;br /&gt;
byte[2]: Left ultrasonic sensor value in inches&lt;br /&gt;
   &lt;br /&gt;
byte[3]: Front bottom infrared sensor value in inches&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x502  &lt;br /&gt;
| Broadcast back infrared sensor value&lt;br /&gt;
| byte[0]: Back infrared sensor value in inches&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3  &lt;br /&gt;
| 0x503  &lt;br /&gt;
| Broadcast battery sensor value &lt;br /&gt;
|byte[0]: current/voltage sensor value in percentage&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4  &lt;br /&gt;
| 0x504  &lt;br /&gt;
| Broadcast light sensor value	&lt;br /&gt;
|byte[0]: light sensor value as integer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5  &lt;br /&gt;
| 0x505  &lt;br /&gt;
| Broadcast tilt sensor value &lt;br /&gt;
|byte[0]: X-Axis tilt sensor value as integer&lt;br /&gt;
byte[1]: Y-Axis tilt sensor value as integer&lt;br /&gt;
&lt;br /&gt;
byte[2]: Z-Axis tilt sensor value as integer&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Motor/Servo Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Send Code&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Data &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1    &lt;br /&gt;
| 0x201    &lt;br /&gt;
| Heartbeat data     &lt;br /&gt;
| Controller id 1 byte&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x201    &lt;br /&gt;
| Heartbeat data&lt;br /&gt;
| Controller id 1 byte&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 0x201    &lt;br /&gt;
| Heartbeat data&lt;br /&gt;
| Controller id 1 byte&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 0x202&lt;br /&gt;
| Mem info data&lt;br /&gt;
| Sys-mem remaining 4bytes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 0x501&lt;br /&gt;
| RPM data send&lt;br /&gt;
| RPM (2 bytes)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 0x502&lt;br /&gt;
| Speed data send&lt;br /&gt;
| Speed (2bytes)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receive Code&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Response&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1 &lt;br /&gt;
| 0x300    &lt;br /&gt;
| Kill               &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x301    &lt;br /&gt;
| Stop               &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 0x302    &lt;br /&gt;
| Straight           &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 0x307    &lt;br /&gt;
| move forward 25%   &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 0x30C    &lt;br /&gt;
| move forward 50%   &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 0x311    &lt;br /&gt;
| move forward 75%   &lt;br /&gt;
| Receive only &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 0x315    &lt;br /&gt;
| move forward 100%  &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 0x31A    &lt;br /&gt;
| move backward 25%  &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| 0x31F    &lt;br /&gt;
| move backward 50%  &lt;br /&gt;
| Receive only &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| 0x324    &lt;br /&gt;
| move backward 75%  &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| 0x329    &lt;br /&gt;
| move backward 100% &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| 0x334    &lt;br /&gt;
| Steer right 25%    &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 13&lt;br /&gt;
| 0x339    &lt;br /&gt;
| Steer right 50%    &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 14&lt;br /&gt;
| 0x33E    &lt;br /&gt;
| Steer right 75%    &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 15&lt;br /&gt;
| 0x343    &lt;br /&gt;
| Steer right 100%   &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 16&lt;br /&gt;
| 0x348    &lt;br /&gt;
| Steer Left 25%     &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 17&lt;br /&gt;
| 0x34D    &lt;br /&gt;
| Steer left 50%     &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 18&lt;br /&gt;
| 0x352    &lt;br /&gt;
| Steer left 75%     &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 19&lt;br /&gt;
| 0x357    &lt;br /&gt;
| Steer left 100%    &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Io Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Number  &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Purpose &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Destination&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1    &lt;br /&gt;
| 0x301  &lt;br /&gt;
| Start command for car&lt;br /&gt;
| Central Controller&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x302 &lt;br /&gt;
| Stop command for car&lt;br /&gt;
| Central Controller&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3  &lt;br /&gt;
| 0x303  &lt;br /&gt;
| Go to a predefined Destination.  &lt;br /&gt;
| Central Controller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
=== Sensors ===&lt;br /&gt;
The first challenge was the positioning and spacing between the sensors. The sensors were mounted on a 3D printed bracket for initial testing but the angle between the brackets seemed to cause interference and was not giving optimum values. The sensors were then individually mounted further apart to reduce interference. The detection distance was tweaked by trial and error and finally settled on the value of 36 inches for the front, left and right sensors and  7 inches for the back sensor.&lt;br /&gt;
&lt;br /&gt;
The second challenge was dealing with erroneous values. Using ADC to interface sensors lead to certain erroneous values that didn't have the desired effect and after some testing, the sensor interface was changed to pulse width. This lead to more robust values after filtering.&lt;br /&gt;
&lt;br /&gt;
Another challenge was the initial skewed alignment. It was difficult to detect whether the direction of the running car was changing because of the motor response to sensor values or the alignment of the tires. The group eventually decided to get a new car that rectified the alignment issue.&lt;br /&gt;
&lt;br /&gt;
=== Sensors Configuration and Implementation ===&lt;br /&gt;
We used LV-MaxSonar series MB1010 high performance ultrasonic sensors  for our application. The sensors detects objects from 6 inch to 254 inches and can be interfaced to ADC or pulse width output. We found the ADC values were inconsistent and due to the constraint of number of ADC pins on SJONE board , we used PWM  to configure the sensors.&lt;br /&gt;
We mounted three sensors in front of the car and we found the values were not consistent as it was reflected from the ground, hence we elevated the sensor placement.&lt;br /&gt;
The sensor configuration is explained&lt;br /&gt;
[[File:CMPE243_F14_Group5_ultrasonic.png|200px|centre|thumb|Ultra SonicSensor]]&lt;br /&gt;
&lt;br /&gt;
===Motor Controller ===&lt;br /&gt;
&lt;br /&gt;
====Issue 1====&lt;br /&gt;
As we were using Electric Speed Control (ESC) to control the speed of motor we faced issues based on inconsistency of the speed. This could have been solved easily if we used H-bridge chip. When ESC was supplied with particular PWM signal it would work at desirable speed but when turning off the ESC and turning on the ESC the speed would change for the same PWM signal supplied. This inconsistency of the speed can easily damaged the motor as it was hard to predict when the motor will switch from forward to backward motion. So to fix this issue we had to connect the ESC to oscilloscope and turn on the transmitter. As soon as the transmitter is turned on the transmitter send a fix signal to ESC for some time that could have been in milli seconds. By doing this the ESC get initialized and once the ESC has initialized the transmitter can send a signal to go forward or reverse.&lt;br /&gt;
&lt;br /&gt;
So we wrote a code to initialize the ESC. Before we sends the signal to ESC to move forward or reverse we send a fix PWM signal to ESC for one second to initialize ESC and this signal was sent from the main function.&lt;br /&gt;
&lt;br /&gt;
====Issue 2====&lt;br /&gt;
The servo that came with the RC car wasn't fast enough to respond to left and right movement of the car. Car would hit the obstacle and than the wheel would rotate in opposite direction. So we change the servo with faster response time. &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;|Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Test Case&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Test Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Result&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|1||Initial CAN communication of all controllers ||Check if all the controllers are broadcasting the periodic message on CAN bus and receiving the data ||All controllers '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|2||Obstacle avoidance|| Obstacle  by integrating the ultrasonic sensor||Obstacle avoidance '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|3||LCD display || Displying all the values including CPU Utilization, CAN message count, and message from the controllers ||LCD display of all message '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|4||Building Android application ||Check if the Android application sends the destination by Bluetooth||Communication '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|5||Point to Point movement || Test Car runs by setting two way points||Point to point car movement '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|6||Checking if Car runs with multiple way points ||Check if the car works with multiple way points||Multiple way points steering  '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Challenges and Learning ==&lt;br /&gt;
&lt;br /&gt;
== Future Enhancement ==&lt;br /&gt;
=== Sensors ===&lt;br /&gt;
It would be ideal to add another infrared sensor to the front lower portion of the car for cliff detection. It would also be good to have a bigger 3D printed bracket to mount the sensors that match our measurements requirements. This would add to the visual appeal and also reduce tangling mess due to the wires.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Video ==&lt;br /&gt;
&lt;br /&gt;
Demo     :    http://youtu.be/a9ceLDJN67M&lt;br /&gt;
&lt;br /&gt;
Teampics :    http://youtu.be/TJW7AsHpXfE&lt;br /&gt;
&lt;br /&gt;
== Project Source Code ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
# Preetpal Kang, Lecture notes of CMPE 243, Computer Engineering, Charles W. Davidson College of Engineering, San Jose State University, Aug-Dec 2014.&lt;br /&gt;
# en.wikipedia.org/&lt;br /&gt;
# MaxBotix 2012, http://www.maxbotix.com/articles/031.htm&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F14:_Team5-Self_Driving_Car_-_AUG&amp;diff=11534</id>
		<title>F14: Team5-Self Driving Car - AUG</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F14:_Team5-Self_Driving_Car_-_AUG&amp;diff=11534"/>
				<updated>2014-12-23T03:38:20Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: /* IO Controller */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Self Driving Car ==&lt;br /&gt;
&lt;br /&gt;
== Objective and Scope ==&lt;br /&gt;
&lt;br /&gt;
This project is aimed at creating a self-driving car with obstacles avoidance and to steer to the gps location pointed by the android application with  the help of multiple controllers communicating using CAN bus.CAN(Control Area Network) is a communication protocol used widely in automotive application developed by BOSCH in 1986. The self-driving car consists of 6 different controllers for '''GPS''','''Sensor''','''Central''','''Motor''','''IO''' and '''Communication'''. The controllers communicate to other controller by CAN bus.We have implemented broadcast algorithm to broadcast all the data from each controller in different frequencies. The controller parses the data using the 29 bit identifier which has destination and source address.&lt;br /&gt;
&lt;br /&gt;
[[File:CmpE244_F14_SelfDrivingCarT5_basic_can_updated.JPG|700px|thumb|center|Fig 2. Build in Progress]]&lt;br /&gt;
&lt;br /&gt;
== Team Members &amp;amp; Responsibilities ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Team Members&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| Sensor Controller&lt;br /&gt;
| &lt;br /&gt;
# Bailey Wu&lt;br /&gt;
# Rishabh Sareen&lt;br /&gt;
# Rishab H&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| Motor Controller &lt;br /&gt;
| &lt;br /&gt;
# Abhraham Ruiz&lt;br /&gt;
# Arpit Amin&lt;br /&gt;
# Sree Harsha&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| I/O Controller (LCD Display)&lt;br /&gt;
| &lt;br /&gt;
# Yoni Klein&lt;br /&gt;
# Tejeswar&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| Communication Bridge + Android&lt;br /&gt;
| &lt;br /&gt;
# Shaw Ken Chang&lt;br /&gt;
# Arnold Bajet Jr.&lt;br /&gt;
# Thomas Pantels&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| Geographical Controller&lt;br /&gt;
| &lt;br /&gt;
# Himanshu Saini&lt;br /&gt;
# Divya Kamath &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| Central Controller&lt;br /&gt;
| &lt;br /&gt;
# Divya Kamath&lt;br /&gt;
# Tejeswar&lt;br /&gt;
# Sree Harsha&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| Car design and wiring&lt;br /&gt;
| &lt;br /&gt;
# Bailey Wu&lt;br /&gt;
# Himanshu Saini&lt;br /&gt;
# Sree Harsha&lt;br /&gt;
# Karthik Vadiraja&lt;br /&gt;
# Akash Ayare&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Git Setup&lt;br /&gt;
| Akash Ayare&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of this project was to design and implement a self-driving car. The team consisted of 15 people, divided into 6 teams corresponding to six controllers. The aim of this class was to understand the CAN protocol that is used extensively in vehicles. The self-driving car houses six controllers, all of them communicating using CAN. Each controller performs a unique task such as:&lt;br /&gt;
# '''Sensor Controller''': Interfaced to the front and back sensors. Periodically sends sensor data to the central controller. Crucial for obstacle detection and avoidance&lt;br /&gt;
# '''Motor Controller''': Controls the motors and steering of the car, based on commands received from central controller.&lt;br /&gt;
# '''Geographical Controller''': Interfaced to GPS and compass. Periodically sends location, heading and distance from destination. crucial for autonomous navigation of the car.&lt;br /&gt;
# '''Communication Controller''': Acts as a bridge for Android. Android app is used to set destination, calculate path to destination, start and stop the car. Data is sent to central and geographical Controller based on user input.&lt;br /&gt;
# '''Central Controller''': The brain of the car. Uses sensor and geographical data to steer the car in the right direction. Uses sensor data to detect and avoid obstacles. Uses geographical data to move towards desired location&lt;br /&gt;
# '''Display Controller''': Interfaced to an LCD screen which displays status of the car (reached/ not reached), CAN bus utilization, sensor data, bearing, heading etc.&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Geographical Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 1-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Order Components and Make a schedule&lt;br /&gt;
| Completed&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 8-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Decide commands that Geographical Controller will support&lt;br /&gt;
| Completed&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 7-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Complete CAN RX task and subscription handling. Verify communication with other controllers&lt;br /&gt;
| Completed&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| Interface GPS module and Compass and develop drivers if needed&lt;br /&gt;
| Completed&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| 30-Oct-2014&lt;br /&gt;
| Design and develop algorithm to calculate heading and bearing from GPS coordinates&lt;br /&gt;
| Completed. &lt;br /&gt;
| 30-Oct-2014 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| 5-Nov-2014&lt;br /&gt;
| Work on calibration of compass and heading calculation&lt;br /&gt;
| Completed&lt;br /&gt;
| 11-Dec-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 1-Nov-2014&lt;br /&gt;
| 10-Nov-2014&lt;br /&gt;
| Test with the central and Bluetooth controller &lt;br /&gt;
| Completed&lt;br /&gt;
| 14-Dec-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 10-Nov-2014&lt;br /&gt;
| 25-Nov-2014&lt;br /&gt;
| Begin testing with fully assembled car &lt;br /&gt;
| Completed&lt;br /&gt;
| 1-Dec-2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| 25-Nov-2014&lt;br /&gt;
| 10-Dec-2014&lt;br /&gt;
| Final Testing and changes as needed &lt;br /&gt;
| Completed&lt;br /&gt;
| 19-Dec-2014&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sensor Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/3/2014&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|Order ultrasonic sensor parts and develop simple test code for the sensors&lt;br /&gt;
|Done&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Wire the ultrasonic sensors, develop and implement the sensors using analog to digital converter&lt;br /&gt;
|Done&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|Collaborate with the other sub teams to finish the CAN bus communication and allow the self driving car to drive autonomously &lt;br /&gt;
|Done&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|-&lt;br /&gt;
|! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|11/1/2014&lt;br /&gt;
|Develop, implement and test the ultrasonic sensors using the pulse width modulation and universal asynchronous receiver/transmitter&lt;br /&gt;
|Done&lt;br /&gt;
|11/1/2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|11/2/2014&lt;br /&gt;
|11/9/2014&lt;br /&gt;
|Develop, implement and test the front and back infrared sensors using analog to digital converter&lt;br /&gt;
|Done&lt;br /&gt;
|11/9/2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|11/10/2014&lt;br /&gt;
|11/17/2014&lt;br /&gt;
|Develop, implement and test the current/voltage sensor for the battery packs of the self driving car using I2C&lt;br /&gt;
|Scheduled&lt;br /&gt;
|Removed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
|11/18/2014&lt;br /&gt;
|11/25/2014&lt;br /&gt;
|Collaborate with the other sub teams to make sure that the sensors are in working condition&lt;br /&gt;
|Done&lt;br /&gt;
|11/25/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
|11/26/2014&lt;br /&gt;
|12/5/2014&lt;br /&gt;
|Collaborate with the other sub teams to debug any problems that may encountered&lt;br /&gt;
|Done&lt;br /&gt;
|12/5/2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
|12/6/2014&lt;br /&gt;
|12/13/2014&lt;br /&gt;
|Prepare for demo&lt;br /&gt;
|Done&lt;br /&gt;
|12/19/2014&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''IO Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/14/2014&lt;br /&gt;
|Research and order LCD appropriate for this project&lt;br /&gt;
|Done&lt;br /&gt;
|10/11/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Implement CAN RX/Subscription task&lt;br /&gt;
|Done&lt;br /&gt;
|10/13/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Finalize Task Architecture&lt;br /&gt;
|Done&lt;br /&gt;
|11/1/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|10/18/2014&lt;br /&gt;
|10/21/2014&lt;br /&gt;
|Interface and test LCD&lt;br /&gt;
|Done&lt;br /&gt;
|10/20/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|10/21/2014&lt;br /&gt;
|10/28/2014&lt;br /&gt;
|Implement auto scrolling feature&lt;br /&gt;
|Done&lt;br /&gt;
|11/18/2014&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Communication Bridge + Android'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 16-Sep-2014&lt;br /&gt;
| 23-Sep-2014&lt;br /&gt;
| Test bluetooth module using computer serial port and an android app(simple bluetooth terminal app downloaded from google play).  Test the real life range and stability of the bluetooth module (HC-06).  Modify the bluetooth chat example to work with the bluetooth module.    &lt;br /&gt;
| Done&lt;br /&gt;
| 20-Sep-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 28-Sep-2014&lt;br /&gt;
| 12-Oct-2014&lt;br /&gt;
| Draw UI design layouts for a basic android application that can view Google map as well as send GPS data through bluetooth by clicking on the map. Study google maps API and make a simple app that will post a short toast that shows the GPS location after a long press event. &lt;br /&gt;
| Done&lt;br /&gt;
| 12-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 7-Oct-2014&lt;br /&gt;
| 11-Oct-2014&lt;br /&gt;
| Interface bluetooth module with SJSUOne board and able to verify that the connection is stable and that transaction via the bluetooth is accurate.  This is done by adding a test button where if you press the button it send a command to the board.  After receiving the command, the board should react with a response (LED light and/or text response to the android phone)&lt;br /&gt;
| Done&lt;br /&gt;
| 19-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 11-Oct-2014&lt;br /&gt;
| 19-Oct-2014&lt;br /&gt;
|Integrate Google Maps and Bluetooth component together in Android app.  After a long press on the map, the user should be prompted to start the car and set the location as the places the user selected.  Add a textView to display the location selected by pressing on the map.  Add a button for sending location to the car.  &lt;br /&gt;
| Done&lt;br /&gt;
| 27-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 19-Oct-2014&lt;br /&gt;
| 26-Oct-2014&lt;br /&gt;
| CAN infrastructure implmentation:  Use our team's common CAN infrasturcture code and modify it specifically for our controller.  First created the CAN communication table and then modify the infracturacture code to implement the broacasting as well as filtering of neccessary data.  This only focuses on broadcasting a stop/start command and the destination GPS data (set by android) as well as getting car's current location data from the geological controller.&lt;br /&gt;
|Done&lt;br /&gt;
| 07-Nov-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 26-Oct-2014&lt;br /&gt;
| 1-Nov-2014&lt;br /&gt;
| Test and implement car information reading as well as other functions of Android app&lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 2-Nov-2014&lt;br /&gt;
| 4-Nov-2014&lt;br /&gt;
| Iterate UI design&lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 5-Nov-2014&lt;br /&gt;
| 16-Nov-2014&lt;br /&gt;
| Implement 2nd UI design&lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Motor Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/1/2014&lt;br /&gt;
|10/8/2014&lt;br /&gt;
|PWM2 (used to control motors) and PWM3 (used to control servo) interface with the car servo and motor. Write a test code to operate the servo and motor from the terminal command.&lt;br /&gt;
|Completed and Tested&lt;br /&gt;
|10/11/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
|10/9/2014&lt;br /&gt;
|10/18/2014&lt;br /&gt;
|Design and code CAN receive task for subscription. Check for basic CAN message commands for throttle and steer control.&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|10/26/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|10/19/2014&lt;br /&gt;
|10/28/2014&lt;br /&gt;
|Design the CAN message table for motor control and servo control&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|10/26/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|10/29/2014&lt;br /&gt;
|11/07/2014&lt;br /&gt;
|Design acceleration Vs steer control function for smooth run. Check for other factors involved.&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|11/22/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|11/08/2014&lt;br /&gt;
|11/14/2014&lt;br /&gt;
|Research on RPM sensor. Interface the RPM sensor to calculate the Speed. Test the RPM sensor by running the car at different speed&lt;br /&gt;
|Completed and tested with a hall sensor&lt;br /&gt;
|11/22/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|11/15/2014&lt;br /&gt;
|11/21/2014&lt;br /&gt;
|Fine tune motor control code and integrate with all the controllers for proper working.&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|11/22/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
|11/22/2014&lt;br /&gt;
|11/28/2014&lt;br /&gt;
|Test and check if more features can be added to improve performance. Completed and tested&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|11/28/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
|11/29/2014&lt;br /&gt;
|12/05/2014&lt;br /&gt;
|Testing and Debugging.&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|12/05/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;|9&lt;br /&gt;
|12/06/2014&lt;br /&gt;
|12/18/2014&lt;br /&gt;
|Final Testing and getting the car ready for Demo.&lt;br /&gt;
|On Going&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
'''Central Controller'''&lt;br /&gt;
 &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 16-Sep-2014&lt;br /&gt;
| 23-Sep-2014&lt;br /&gt;
| Develop API for CAN bus communication.&lt;br /&gt;
| Done&lt;br /&gt;
| 23-Sep-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 11-Oct-2014&lt;br /&gt;
| 15-Oct-2014&lt;br /&gt;
| Develop communication table for all controllers.&lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 15-Oct-2014&lt;br /&gt;
| 20-Oct-2014&lt;br /&gt;
| Broadcast message and target message setup.  &lt;br /&gt;
| Done&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
| Co-ordinate all controllers and take major decisions. &lt;br /&gt;
| Done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| Complete Building and fine-tuning of RC car. &lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| Develop coordination mechanism to ensure controllers are initialized and ready &lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
| Develop kill switch &lt;br /&gt;
| Done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
| Build external power distribution circuit&lt;br /&gt;
| Done&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
| 04-Nov-2014&lt;br /&gt;
| Coordination algorithm between steering and throttle for smooth turns &lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| 04-Nov-2014&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| Collision avoidance algorithms &lt;br /&gt;
| Done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| 04-Nov-2014&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| Intermediate unit and functional tests&lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| 25-Nov-2014&lt;br /&gt;
| Functional tests and algorithm adjustments &lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 13&lt;br /&gt;
| 25-Nov-2014&lt;br /&gt;
| 02-Dec-2014&lt;br /&gt;
| Fine tuning and stretch goals (headlights, parallel parking, etc.)&lt;br /&gt;
| Done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 14&lt;br /&gt;
| 02-Dec-2014&lt;br /&gt;
| 09-Dec-2014&lt;br /&gt;
| Prepare for demo&lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Description&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Qty&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Price&lt;br /&gt;
|-&lt;br /&gt;
| LV-MaxSonar-EZ1 High Performance Ultrasonic Rangefinder&lt;br /&gt;
| 2&lt;br /&gt;
| 49.90&lt;br /&gt;
|-&lt;br /&gt;
| Analog Distance Sensor &lt;br /&gt;
| 1&lt;br /&gt;
| Free&lt;br /&gt;
|-&lt;br /&gt;
|1/10 Scale 4x4 Truck with Brushed Motor	&lt;br /&gt;
|1&lt;br /&gt;
|217.33&lt;br /&gt;
|-&lt;br /&gt;
|2 ft 12-Gauge Power Cables&lt;br /&gt;
|3	&lt;br /&gt;
|22.80	&lt;br /&gt;
|-&lt;br /&gt;
|Pair Power Socket	&lt;br /&gt;
|2&lt;br /&gt;
|2.16&lt;br /&gt;
|-	&lt;br /&gt;
|Standard Size Body Clips	&lt;br /&gt;
|12	&lt;br /&gt;
|2.16&lt;br /&gt;
|-&lt;br /&gt;
|4-pack AA Batteries&lt;br /&gt;
|1	&lt;br /&gt;
|3.45	&lt;br /&gt;
|-&lt;br /&gt;
|50-pack M3x15mm Stand-Off Spacer Female-Male&lt;br /&gt;
|1&lt;br /&gt;
|11.19&lt;br /&gt;
|-	&lt;br /&gt;
|100-pack 18-8 Flat Steel Washer	&lt;br /&gt;
|1	&lt;br /&gt;
|2.54&lt;br /&gt;
|-	&lt;br /&gt;
|100-pack M3x20mm Hex-Drive Screw&lt;br /&gt;
|1&lt;br /&gt;
|6.47	&lt;br /&gt;
|-&lt;br /&gt;
|100-pack M3 Steel Hex Nut&lt;br /&gt;
|1&lt;br /&gt;
|4.66&lt;br /&gt;
|-&lt;br /&gt;
|2-pin JST Connector Right Angle&lt;br /&gt;
|10&lt;br /&gt;
|6.84&lt;br /&gt;
|-&lt;br /&gt;
|4-pin JST Connector Right Angle&lt;br /&gt;
|10&lt;br /&gt;
|6.84&lt;br /&gt;
|-&lt;br /&gt;
|2-pin Female JST Cable (20 cm)&lt;br /&gt;
|10&lt;br /&gt;
|7.39&lt;br /&gt;
|-&lt;br /&gt;
|4-pin Female JST Cable (20 cm)&lt;br /&gt;
|10&lt;br /&gt;
|7.39&lt;br /&gt;
|-&lt;br /&gt;
|5 Volt Relay Breakout Board&lt;br /&gt;
|1&lt;br /&gt;
|4.95&lt;br /&gt;
|-&lt;br /&gt;
|5 Volt Voltage Regulator&lt;br /&gt;
|1&lt;br /&gt;
|1.07&lt;br /&gt;
|-&lt;br /&gt;
|Sharp Analog Distance Sensor 4-30 cm&lt;br /&gt;
|1&lt;br /&gt;
|9.95&lt;br /&gt;
|-&lt;br /&gt;
|3-pin Female JST PH-Style Cable (30 cm)&lt;br /&gt;
|1&lt;br /&gt;
|0.92&lt;br /&gt;
|-&lt;br /&gt;
|Double Sided Mounting Tape - 3 feet	&lt;br /&gt;
|1&lt;br /&gt;
|4.35&lt;br /&gt;
|-&lt;br /&gt;
|AC Adapter (LiPo Charger)&lt;br /&gt;
|1&lt;br /&gt;
|15.16&lt;br /&gt;
|-&lt;br /&gt;
|IEC Power Cable (LiPo Charger)&lt;br /&gt;
|1&lt;br /&gt;
|5.38&lt;br /&gt;
|-&lt;br /&gt;
|4mm Bullet Plugs to Universal Plug&lt;br /&gt;
|1&lt;br /&gt;
|13.38&lt;br /&gt;
|-&lt;br /&gt;
|Acrylic sheet + Sharpe mini&lt;br /&gt;
|1+1&lt;br /&gt;
|11.72&lt;br /&gt;
|-&lt;br /&gt;
|Molex Pin Header, Connector, wires and 100 zip ties&lt;br /&gt;
|10+4+1&lt;br /&gt;
|17.13&lt;br /&gt;
|-&lt;br /&gt;
|2 x 90 degree pin header, 2 x straight pin header&lt;br /&gt;
|2+2&lt;br /&gt;
|3.65&lt;br /&gt;
|-&lt;br /&gt;
|uni-polar hall sensor for tachometer feedback&lt;br /&gt;
|2&lt;br /&gt;
|2.18&lt;br /&gt;
|-&lt;br /&gt;
|Heavy Duty magnets&lt;br /&gt;
|2&lt;br /&gt;
|4.18&lt;br /&gt;
|-&lt;br /&gt;
|INA219 Voltage sensors 26V +/-3.2A&lt;br /&gt;
|2&lt;br /&gt;
|19.9&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|20x4 Serial LCD Module&lt;br /&gt;
|1&lt;br /&gt;
|29.99&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Backup Parts &amp;amp; cost ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Qty&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Description&lt;br /&gt;
! width=&amp;quot;110&amp;quot; align=&amp;quot;center&amp;quot;|Manufacturer&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Part Number&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Total Cost&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| LV-MaxSonar-EZ1 High Performance Ultrasonic Rangefinder&lt;br /&gt;
| MaxBotix Inc&lt;br /&gt;
| MB1010&lt;br /&gt;
| Free&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Analog Distance Sensor &lt;br /&gt;
| Sharp&lt;br /&gt;
|&lt;br /&gt;
| Free&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
[[File:CmpE243_F14_Team5_OverallHWDesign.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Motor Controller ==&lt;br /&gt;
&lt;br /&gt;
==== Summary ====&lt;br /&gt;
This module takes command input from central controller and steers the car to its destination; in addition, It has two main controlling parameters : Throttle and Steering. Throttle input moves the car forward and backward. Steer input turns the wheel left and right. The central controller takes feedback from the sensors and makes decision to move the car. Accordingly, it sends CAN commands accepted by the motor controller for navigation, and real time RPM signal to the controller.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Motor and Steer control : Technical Information&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Sl.No&lt;br /&gt;
! width=&amp;quot;90&amp;quot; align=&amp;quot;center&amp;quot;|Controller&lt;br /&gt;
! width=&amp;quot;90&amp;quot; align=&amp;quot;center&amp;quot;|Signal Type&lt;br /&gt;
! width=&amp;quot;90&amp;quot; align=&amp;quot;center&amp;quot;|Frequency&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Functionality&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1&lt;br /&gt;
| Motor Control&lt;br /&gt;
| PWM signal&lt;br /&gt;
| 50 Hz (20000us)&lt;br /&gt;
| 1000us (Full throttle forward) - 1500us (Stop)   - 2000us (Full throttle backward)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|2    &lt;br /&gt;
| Steer Control&lt;br /&gt;
| PWM signal &lt;br /&gt;
| 50 Hz (20000us)&lt;br /&gt;
|1000us (Turn left max)         - 1500us (Center) - 2000us (Turn right max)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Working =====&lt;br /&gt;
The car initially accepts the start command to begin navigation. Commands can then come to move the car forward or backward, steer left or right depending on intelligent decisions made by the central controller. The motor control has intelligence to avoid jerks and ensure smoother transitions between commands. The central controller gets the data from the sensors for obstacle avoidance. The car has a communication controller which gets the '''GPS''' data from the android application, the android application sets the destination latitude and longitude. The car decides the heading direction by the gps points and the compass and if it finds obstacle it will be controlled by the obstetrical avoidance and steer to the destination according to the algorithm below.&lt;br /&gt;
===== Flow Chart =====&lt;br /&gt;
&lt;br /&gt;
[[File:Cmpe243_F14_T5_motor_controller_flowchart1.png]]&lt;br /&gt;
&lt;br /&gt;
===== Kill switch =====&lt;br /&gt;
The remote control and receiver module pair up to provide a signal coverage of more than 100 meters. We make use of this to design our kill switch. When a constant PWM signal of 1000us is received from the remote, the car is in 'ARMED' state and moves the car according to CAN commands. The user has to hold the trigger gun for this state constantly and the car moves.&lt;br /&gt;
When the user releases the trigger gun, the car stops receiving the PWM signal of 1000us and the car goes to 'DISARMED' state.&lt;br /&gt;
In short, pull the trigger gun - ARMED, release the trigger gun - DISARMED.&lt;br /&gt;
&lt;br /&gt;
===== RPM =====&lt;br /&gt;
The RPM sensor is based on a hall sensor switch which detect the North and South pole of a magnet located in the main shaft in the car. The hall sensor part number is 3177, and it has three pin. This sensor is uni-polar which give an output high signal when the sensor captures the North pole of the magnet; subsequently, the sensor give output low signal when the sensor captures the South pole of the magnet. Therefore, by using a the 3177 and a magnet in the shaft. the SJOne board can capture the output signal from the hall sensor as it toggles per shaft revolution. &lt;br /&gt;
It is important to notice that the output signal of the 3177 is an open collector; therefore, we need a  10 Kohm resistor connected to Vcc.&lt;br /&gt;
&lt;br /&gt;
===== Pinout Table =====&lt;br /&gt;
&lt;br /&gt;
The following table shows the pinout of all component that are connected to SJONE board.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Component Pin&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Output Pin Source&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1 &lt;br /&gt;
|Hall Sensor (3177) Vcc ( 4.5 V to 18 V)&lt;br /&gt;
|Source&lt;br /&gt;
|SJOne P1_22&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|2 &lt;br /&gt;
|Hall Sensor (3177) Ground&lt;br /&gt;
|Ground&lt;br /&gt;
|SJOne&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|3&lt;br /&gt;
|Hall Sensor (3177) Output&lt;br /&gt;
|Output&lt;br /&gt;
|SJOne P1_22 with a 10 KOhm&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|4&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 1 TX&lt;br /&gt;
|SJOne P0_1(Tx)&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|5&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 2 GND&lt;br /&gt;
|SJOne GND&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|6&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 3 VCC&lt;br /&gt;
|SJOne 3.3v&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|7&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 4 RX&lt;br /&gt;
|SJOne P0_0(Rx)&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|8&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 6 CANL&lt;br /&gt;
|CAN Bus&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|10&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 7 CANH&lt;br /&gt;
|CAN Bus&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|11&lt;br /&gt;
|Servo&lt;br /&gt;
|VCC&lt;br /&gt;
|5V Power Rail&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|12&lt;br /&gt;
|Servo&lt;br /&gt;
|GND&lt;br /&gt;
|GND Power Rail&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|13&lt;br /&gt;
|Servo&lt;br /&gt;
|Signal&lt;br /&gt;
|PWM 2.1&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|14&lt;br /&gt;
|Electric Speed Control (ESC)&lt;br /&gt;
|VCC&lt;br /&gt;
|5V Power rail&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|15&lt;br /&gt;
|Electric Speed Control (ESC)&lt;br /&gt;
|GND&lt;br /&gt;
|GND Power Rail&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|16&lt;br /&gt;
|Electric Speed Control (ESC)&lt;br /&gt;
|Signal&lt;br /&gt;
|PWM 2.2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Block Diagram =====&lt;br /&gt;
The following Block diagram shows an overview of the connection between the SJOne board, ESC, and the Hall sensor:&lt;br /&gt;
&lt;br /&gt;
[[File:Motor Block Diagram 1.jpg|600px|thumb|center|Motor Controller Block Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Sensor Controller ==&lt;br /&gt;
===Sensor Controller Hardware Design and Architecture ===&lt;br /&gt;
[[File:CmpE243 F14 T5 SensorHWDesign.JPG|700px|thumb| center |Fig . Sensor Controller Hardware Design]&lt;br /&gt;
&lt;br /&gt;
When using multiple MaxSonar sensors, it is required to configure the sensors in ''Sequential Operation'' mode to obtain the best optimal performance in obstacle detection. On the other hand, if the sensors are left in continuous free run operation, which means the RX pin (Pin 4) are unconnected then at start-up the sensors will range at exactly the same time. Thus, the sensors are not synchronized and eventually result in frequency drifts that would likely cause interference between sensors for most applications.&lt;br /&gt;
&lt;br /&gt;
[[File:CmpE243_F14_T5_SingleSensor.jpg|500px|thumb| center |Fig . Single Sensor in free run operation mode - MaxBotix 2012]]&lt;br /&gt;
&lt;br /&gt;
The figure to the above shows a single MaxSonar ultrasonic sensor operating in continuous free run operation detecting an object at 96 inches. The signal of the ultrasonic sensor observe under the oscilloscope shows that the sensor is operating at its finesse performance without any interference.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The figure to the below shows that multiple MaxSonar ultrasonic sensors are operating in continuous free run operation. As you can see, the signal of a ultrasonic sensor observe under the oscilloscope shows that the signal has multiple spikes due to the interference of other sensors. Thus, the sensor becomes unsynchronized and the range reading become unstable. &lt;br /&gt;
&lt;br /&gt;
[[File:CmpE243_F14_T5_MultipleSensorsInterferences.jpg‎|500px|thumb| center |Fig . Multiple Sensors in free run operation mode - MaxBotix 2012]]&lt;br /&gt;
&lt;br /&gt;
To achieve the most optimal performance using multiple MaxSonar ultrasonic sensors, the figure below shows the implementation of all the sensors operating in sequential mode. The sensors can be started by pulling the RX pin (Pin 4) high for at least 20 uS and then for each reading this can be done as often as every 50 ms. This method would toggle each sensor when the user like to obtain an reading at any given moment. Thus, there will be no interference between each sensor. &lt;br /&gt;
&lt;br /&gt;
[[File:CmpE243_F14_T5_MultipleSensorsConfiguration.jpg‎ |500px|thumb| center |Fig . Multiple Sensors Configuration]]&lt;br /&gt;
&lt;br /&gt;
There are many other method to implement multiple MaxSonar ultrasonic sensors in a single system. This information can be obtained in the sensor datasheet.&lt;br /&gt;
&lt;br /&gt;
===Sensor Controller Software Design===&lt;br /&gt;
&lt;br /&gt;
== Central Controller ==&lt;br /&gt;
&lt;br /&gt;
The central controller is the brain of the car. It receives information from all the other controllers and decides which direction the car must move. The central controller periodically sends commands to the motor regarding the throttle, steering, steering angle and speed.&lt;br /&gt;
&lt;br /&gt;
In order to decide which direction to move, the central controller uses sensor data and geographical data. The current design uses a state machine. The car is initially in idle state. When it received a START command from the communication controller, the central sends the start motor command to the motor controller. After the start state, the central controller can be in one of the two states: avoid obstacle or adjust heading. The central controller uses the sensor data to detect obstacle. If there are no obstacles, then the central controller uses geographical information to adjust car heading. &lt;br /&gt;
&lt;br /&gt;
Once the heading and bearing match, the car moves straight ahead till the destination is reached. When the geographical controller sends a command indicating that the car has reached the destination, the car will stop.&lt;br /&gt;
&lt;br /&gt;
At any point during its course, if the car receives a STOP command from the communication controller, the car will stop&lt;br /&gt;
&lt;br /&gt;
[[File:Cmpe243F14_Team5_Central_StateTransition.JPG|700px|thumb|center|Fig. Central Controller State Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Geographical Controller ==&lt;br /&gt;
&lt;br /&gt;
The geographical controller is one of the six controllers mounted on the car. This controller provides the location and heading information to the central controller of the car. It also stores the destination (way-points). By calculating the distance from the current location to the destination or intermediate waypoint, the geo controller can determine if the car has reached its destination. When the car reaches the destination, the geo controller sends a message to the central controller indicating that destination has been reached. &lt;br /&gt;
&lt;br /&gt;
The devices connected to this controller are:&lt;br /&gt;
1. Magnetometer (digital compass)&lt;br /&gt;
2. GPS Logger&lt;br /&gt;
&lt;br /&gt;
The compass communicates via I2C and the GPS via UART.&lt;br /&gt;
&lt;br /&gt;
==== Parts Used ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Geographical Control - Parts Used&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;center&amp;quot;|Part Number&lt;br /&gt;
! align=&amp;quot;center&amp;quot;|Purpose&lt;br /&gt;
|-&lt;br /&gt;
| SparkFun Triple Axis Magnetometer Breakout - HMC5883L&lt;br /&gt;
| Compass&lt;br /&gt;
|-&lt;br /&gt;
| SparkFun Venus GPS Logger - SMA Connector&lt;br /&gt;
| GPS &lt;br /&gt;
|-&lt;br /&gt;
| Antenna GPS Embedded SMA - GPS-00177&lt;br /&gt;
| Antenna&lt;br /&gt;
|-&lt;br /&gt;
| ET-318 GPS Engine Board&lt;br /&gt;
| GPS&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Design ====&lt;br /&gt;
&lt;br /&gt;
'''Heading''' - The compass provides the heading. The heading is the direction in which the car is headed. The value is typically an angle from 0-360 degrees measured clockwise from North. The heading is calculated from the x-axis and y-axis values provided by the magnetometer. To use all 3-axis values, a tilt sensor must be used with the magnetometer for tilt compensation.&lt;br /&gt;
&lt;br /&gt;
'''GPS Module''' - The GPS module provides the time, latitude, longitude, direction and if the GPS data is valid. This latitude, longitude corresponds to the current location of the car.&lt;br /&gt;
&lt;br /&gt;
'''Destination''' - The destination is set by Android application/communication controller. The destination could be a single point or a list of waypoints, each being a latitude, longitude pair.&lt;br /&gt;
&lt;br /&gt;
'''Bearing''' - Using the destination lat,lon pair (set by the communication controller) and the current lat, lon pair (received from the GPS module), the geographical controller calculates the bearing. This angle, like the heading, is also typically between 0-360 degrees measured clockwise. Bearing represents the angle between the destination and current location. &lt;br /&gt;
&lt;br /&gt;
Both the heading and the bearing are sent periodically to the central controller. The central controller uses this information combined with the sensor data to steer the motors in the right direction.&lt;br /&gt;
&lt;br /&gt;
Example: If the current heading is 10 degrees ( car is travelling in a direction 10 degrees) from north. The bearing is 50 degrees ( the car is at an angle of 50 degrees away from the desired direction), the central controller must steer the car 40 degrees to the right.&lt;br /&gt;
&lt;br /&gt;
The geographical controller also calculates the distance between the current lat, lon and the destination lat, lon. This is used to determine if the car has reached the intended destination. When the car has reached the destination, geographical controller sends a message to the central controller to stop.&lt;br /&gt;
&lt;br /&gt;
==== Tasks ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Geographical Control - Tasks&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;center&amp;quot;|Task Name&lt;br /&gt;
! align=&amp;quot;center&amp;quot;|Purpose&lt;br /&gt;
|-&lt;br /&gt;
| Compass Task&lt;br /&gt;
| Updates the compass heading. Runs every 100ms and obtains compass data over I2C&lt;br /&gt;
|-&lt;br /&gt;
| GPS Task&lt;br /&gt;
| Updates the current latitude and longitude by reading GPS data sent over UART. GPS has been configured to run at 10Hz and sends data at a baud rate of 38400. &lt;br /&gt;
|-&lt;br /&gt;
| CAN Rx Task&lt;br /&gt;
| Handles data received over CAN. Task gets blocked if can receive queue is empty. &lt;br /&gt;
|-&lt;br /&gt;
| CAN Periodic Msg Task &lt;br /&gt;
[1 Hz]&lt;br /&gt;
| Periodic CAN message to send current lat,lon and destination lat, lon to central and display controller&lt;br /&gt;
|-&lt;br /&gt;
| CAN Periodic Msg Task &lt;br /&gt;
[20 Hz]&lt;br /&gt;
| Periodic CAN message to send compass heading and destination bearing to central controller.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== GEO CAN Controller Communication Table ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Geographical Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Number&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Type&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Purpose&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Data layout&lt;br /&gt;
|- &lt;br /&gt;
| 0x0301  &lt;br /&gt;
| Get Geo Data &lt;br /&gt;
| Request for GPS Data (lat,long)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x0302  &lt;br /&gt;
|    &amp;quot;  &lt;br /&gt;
| Request for current compass heading and destination heading&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x0304  &lt;br /&gt;
| &amp;quot; &lt;br /&gt;
| Request Time&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x0601  &lt;br /&gt;
| Response to 0x3xx request&lt;br /&gt;
| GPS Data (lat,long)&lt;br /&gt;
|&lt;br /&gt;
 dword[0] : [32-bit latitude]&lt;br /&gt;
 dword[1] : [32-bit longitude] &lt;br /&gt;
|-&lt;br /&gt;
| 0x0602  &lt;br /&gt;
| &amp;quot;&lt;br /&gt;
| Compass heading and destination bearing&lt;br /&gt;
|&lt;br /&gt;
 dword[0] : [32-bit compass heading]&lt;br /&gt;
 dword[1] : [32-bit destination bearing] &lt;br /&gt;
|-&lt;br /&gt;
| 0x0504  &lt;br /&gt;
| &amp;quot;&lt;br /&gt;
| Time &lt;br /&gt;
| &lt;br /&gt;
 dword[0] : [32-bit time 0x00hhmmss]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0501  &lt;br /&gt;
| Periodic Message&lt;br /&gt;
| GPS data, broadcast periodically  &lt;br /&gt;
|&lt;br /&gt;
 dword[0] : [32-bit longitude]&lt;br /&gt;
 dword[1] : [32-bit latitude]  &lt;br /&gt;
|-&lt;br /&gt;
| 0x0502  &lt;br /&gt;
| &amp;quot;&lt;br /&gt;
| Current and destination heading broadcast periodically  &lt;br /&gt;
|&lt;br /&gt;
 dword[0] : [32-bit compass heading]&lt;br /&gt;
 dword[1] : [32-bit bearing]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Challenges and Lessons Learnt ====&lt;br /&gt;
&lt;br /&gt;
# '''Start Geo work early''' : Most of the tasks of the geo controller can be done independent of the progress on the rest of the car. Start working early, test the GPS outside as much as possible.&lt;br /&gt;
# '''Compass calibration''' : Most compasses need calibration. During the course of our project, we used to magnetometers (since we accidently burned the first one). The first one was off by 5 degrees and the second one was off by about 20 degrees. Take care that the compass is mounted away from motors and other devices that can create a lot of noise for the compass&lt;br /&gt;
# '''GPS speed''' : We started by using the default speed of 1Hz on the GPS module. The data was sent to the central controller at 1 Hz. As we started testing we realized that this can be too slow and the car may go off course before the new data arrives. Using the commands in the datasheet, we configured the GPS to have an update rate of 10 Hz and a baud rate of 38400. While the datasheet said that the GPS can be configured for 20Hz and baud rate of 115200, we were unsuccessful in achieving that. For some reason, the SJOne board crashed every time we set the GPS for 115200. We did not successfully debug the issue. But changing the speed from 1Hz to 10Hz did make a lot of difference to the performance of the car steering.&lt;br /&gt;
# '''Picking the right GPS and compass''' : Both the compass and the GPS that we used served the purpose well. On sunny days, the GPS worked indoors too. Even though we used a 3 axis compass, we used only 2 axis readings from it to calculate the heading. A 3 axis compass paired with a tilt sensor would probably give better readings. But 2 axis readings served our purpose. &lt;br /&gt;
# '''GPS Drift''' : We noticed that the GPS values for the same locations drifted over time. There could be a 6 foot jump every few hours. The datasheet offers configurations to pin or unpin the gps values. We did not use the feature. But we did notice that because of the GPS drift, our car traveled differently on the same path at different times during the day. If we had more time, we could have fixed this and achieved a straight path for the car, instead of always veering to the left of right.&lt;br /&gt;
# '''Android App''' : The Android app is crucial since it provides the destination waypoints to the geo controller. We need to ensure that the dataset used by the android app is similar if not same as the values reported by the GPS. If the values differ a lot, then the car will not move along the intended path. The Android team and the GPS team must work closely and complete their testing well ahead, so that once the GPS and communication controllers are mounted it is only a matter of improving the behavior.&lt;br /&gt;
# '''Multiple Setups''' : Having multiple setups can be very helpful to debug issues, since it is easier to make changes on the temporary setup than on the car. Also, considering the size of the team, different teams might be using the car and the GPS team will always be the last team to get hold of the car.&lt;br /&gt;
&lt;br /&gt;
==== Review of Parts used ====&lt;br /&gt;
The parts used for this controller were good and I would use them again.&lt;br /&gt;
&lt;br /&gt;
== IO Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Summary ===&lt;br /&gt;
&lt;br /&gt;
The IO controller's purpose is to display useful information on an LCD screen for debugging and verification purposes.  Essentially, it monitors the CAN bus for other controllers' data as well as bus utilization.  The hardware and software design is described below, as well as the challenges we encountered along the way.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The hardware design of the IO controller is relatively simple.  The only requirements are the serial LCD module and the controller itself.  The LCD interfaces to the IO controller via UART protocol, while the IO controller interfaces to tater other controllers via CAN Protocol.  The [[F14: Team5-Self Driving Car - AUG#Design &amp;amp; Implementation|block diagram]] above shows gives a clear description of the IO controller's place in the system.&lt;br /&gt;
&lt;br /&gt;
The LCD chosen was a serial enabled 20x4 character display from [https://www.sparkfun.com/products/9568 Sparkfun].  It was chosen for it's larger character display (rather than 16x2) and because the serial &amp;quot;backpack was built into the PCB.  This backpack is used because the display controller communicates with a parallel interface. The serial &amp;quot;backpack&amp;quot; or converter interfaces the parallel connections with a serial one and provides a low level API to control the display.  An additional API was designed on top of this one to make programming simple and clear as well as implement some useful features (such as printing with printf style arguments).  It operates on 5V, so it could not be powered by the controller itself and need to use one of the 5V supplies on the car.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
==== RX Task ====&lt;br /&gt;
&lt;br /&gt;
The receiving task uses the interrupt driven CAN driver to process messages sent on the bus.  When a CAN message is received, the data is filtered and stored a global memory locations.  This data is later used by the IO task to format and print the desired information to the LCD.  No hardware filter was used, since the IO controller must monitor bus utilization and therefore listen to all messages.  No heavy calculations or blocking code is allowed in this task; it's purpose is to get the data out as fast as possible and wait for more.&lt;br /&gt;
&lt;br /&gt;
(flow chart for RX task)&lt;br /&gt;
&lt;br /&gt;
==== LCD API ====&lt;br /&gt;
&lt;br /&gt;
The LCD API uses a singleton template so that any task can invoke it and print something to the LCD.  Since the LCD doesn't care who prints what, care must be taken to ensure other tasks' data isn't unintentionally overwritten.  However, only a single task in our implementation is utilizing this API so it wasn't a problem.  The LCD communicates over UART, so the available UART driver was used (also a singleton template).  The data sheet from Sparkfun was used to create this API so that nearly all the LCD capabilities can be supported.  These features include:&lt;br /&gt;
&lt;br /&gt;
* Erase screen or individual line&lt;br /&gt;
* Write to screen, line or specific location&lt;br /&gt;
* Adjust backlight brightness&lt;br /&gt;
* Adjust cursor position and style&lt;br /&gt;
* Scroll text&lt;br /&gt;
* Turn display off or on&lt;br /&gt;
* Change baud rate&lt;br /&gt;
&lt;br /&gt;
==== IO Task ====&lt;br /&gt;
&lt;br /&gt;
[[File:CmpE243_F14_T5_LCDScreenDesign.png|700px|thumb|center|Fig. LCD screen object design]]&lt;br /&gt;
&lt;br /&gt;
The IO task utilizes the LCD API to display LCD &amp;quot;screens&amp;quot;.  A screen is a custom-defined object containing &amp;quot;line&amp;quot; objects.  Lines consist of a format sting (in the printf format) and optional variables.  All screens are stored in a vector, of which the front object is always displayed on the LCD.  To change the screen, the vector is simply rotated left or right (forward or backward).  For simplicity, the screens are rotated every second.  However the screens can be rotated by button press, timer, external interrupt or even CAN message.&lt;br /&gt;
&lt;br /&gt;
The data objects that are stored in shared memory by the RX task make up the variables in the format strings described above.  To accomplish this, the data types for these variables are char**, or a pointer to a char pointer.  That way, we can just supply the memory location of the char* that is constantly being updated by the RX task.  This simplifies the implementation of the IO Task and ensures the latest data is used when printing the screens.&lt;br /&gt;
&lt;br /&gt;
(flow chart for IO Task)&lt;br /&gt;
&lt;br /&gt;
== Controller Communication Table ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Controller ID Table&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Controller ID&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x01&lt;br /&gt;
| Master Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| Geographical Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x03&lt;br /&gt;
| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| Sensor Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x05&lt;br /&gt;
| IO Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x06&lt;br /&gt;
| Communication (Bluetooth Bridge/Android App) Controller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Central Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Number  &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Purpose &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Data layout &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1    &lt;br /&gt;
| 0x501  &lt;br /&gt;
| Send Throttle and steering to motor&lt;br /&gt;
| throttle&lt;br /&gt;
steering&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x502  &lt;br /&gt;
| Start car&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3 &lt;br /&gt;
| 0x503   &lt;br /&gt;
| Stop car&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 0x101   &lt;br /&gt;
| Broadcast request revision&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 0x102  &lt;br /&gt;
| Broadcast Set time&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 0x103  &lt;br /&gt;
| Request TX count (broadcast)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 0x104   &lt;br /&gt;
| Request RX count (broadcast)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 0x105   &lt;br /&gt;
| Send TX count (LCD)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| 0x106  &lt;br /&gt;
| Send RX count (LCD)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| 0x107  &lt;br /&gt;
| All controllers initialize&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Communication (Bluetooth Bridge/Android App) Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Number  &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Purpose &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Data layout &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1    &lt;br /&gt;
| 0x301  &lt;br /&gt;
| Broadcast Start command&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x302  &lt;br /&gt;
| Broadcast Stop command&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3  &lt;br /&gt;
| 0x303  &lt;br /&gt;
| Broadcast GPS destination set by Android &lt;br /&gt;
|byte [0-3] : (float), Longitude &lt;br /&gt;
byte [4-7] : (float), Latitude &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Sensor Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Number  &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Purpose &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Data layout &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1    &lt;br /&gt;
| 0x501  &lt;br /&gt;
| Broadcast front sensors values&lt;br /&gt;
| byte[0]: Right ultrasonic sensor value in inches&lt;br /&gt;
byte[1]: Front ultrasonic sensor value in inches&lt;br /&gt;
   &lt;br /&gt;
byte[2]: Left ultrasonic sensor value in inches&lt;br /&gt;
   &lt;br /&gt;
byte[3]: Front bottom infrared sensor value in inches&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x502  &lt;br /&gt;
| Broadcast back infrared sensor value&lt;br /&gt;
| byte[0]: Back infrared sensor value in inches&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3  &lt;br /&gt;
| 0x503  &lt;br /&gt;
| Broadcast battery sensor value &lt;br /&gt;
|byte[0]: current/voltage sensor value in percentage&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4  &lt;br /&gt;
| 0x504  &lt;br /&gt;
| Broadcast light sensor value	&lt;br /&gt;
|byte[0]: light sensor value as integer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5  &lt;br /&gt;
| 0x505  &lt;br /&gt;
| Broadcast tilt sensor value &lt;br /&gt;
|byte[0]: X-Axis tilt sensor value as integer&lt;br /&gt;
byte[1]: Y-Axis tilt sensor value as integer&lt;br /&gt;
&lt;br /&gt;
byte[2]: Z-Axis tilt sensor value as integer&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Motor/Servo Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Send Code&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Data &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1    &lt;br /&gt;
| 0x201    &lt;br /&gt;
| Heartbeat data     &lt;br /&gt;
| Controller id 1 byte&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x201    &lt;br /&gt;
| Heartbeat data&lt;br /&gt;
| Controller id 1 byte&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 0x201    &lt;br /&gt;
| Heartbeat data&lt;br /&gt;
| Controller id 1 byte&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 0x202&lt;br /&gt;
| Mem info data&lt;br /&gt;
| Sys-mem remaining 4bytes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 0x501&lt;br /&gt;
| RPM data send&lt;br /&gt;
| RPM (2 bytes)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 0x502&lt;br /&gt;
| Speed data send&lt;br /&gt;
| Speed (2bytes)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receive Code&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Response&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1 &lt;br /&gt;
| 0x300    &lt;br /&gt;
| Kill               &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x301    &lt;br /&gt;
| Stop               &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 0x302    &lt;br /&gt;
| Straight           &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 0x307    &lt;br /&gt;
| move forward 25%   &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 0x30C    &lt;br /&gt;
| move forward 50%   &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 0x311    &lt;br /&gt;
| move forward 75%   &lt;br /&gt;
| Receive only &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 0x315    &lt;br /&gt;
| move forward 100%  &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 0x31A    &lt;br /&gt;
| move backward 25%  &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| 0x31F    &lt;br /&gt;
| move backward 50%  &lt;br /&gt;
| Receive only &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| 0x324    &lt;br /&gt;
| move backward 75%  &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| 0x329    &lt;br /&gt;
| move backward 100% &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| 0x334    &lt;br /&gt;
| Steer right 25%    &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 13&lt;br /&gt;
| 0x339    &lt;br /&gt;
| Steer right 50%    &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 14&lt;br /&gt;
| 0x33E    &lt;br /&gt;
| Steer right 75%    &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 15&lt;br /&gt;
| 0x343    &lt;br /&gt;
| Steer right 100%   &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 16&lt;br /&gt;
| 0x348    &lt;br /&gt;
| Steer Left 25%     &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 17&lt;br /&gt;
| 0x34D    &lt;br /&gt;
| Steer left 50%     &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 18&lt;br /&gt;
| 0x352    &lt;br /&gt;
| Steer left 75%     &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 19&lt;br /&gt;
| 0x357    &lt;br /&gt;
| Steer left 100%    &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Io Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Number  &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Purpose &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Destination&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1    &lt;br /&gt;
| 0x301  &lt;br /&gt;
| Start command for car&lt;br /&gt;
| Central Controller&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x302 &lt;br /&gt;
| Stop command for car&lt;br /&gt;
| Central Controller&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3  &lt;br /&gt;
| 0x303  &lt;br /&gt;
| Go to a predefined Destination.  &lt;br /&gt;
| Central Controller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
=== Sensors ===&lt;br /&gt;
The first challenge was the positioning and spacing between the sensors. The sensors were mounted on a 3D printed bracket for initial testing but the angle between the brackets seemed to cause interference and was not giving optimum values. The sensors were then individually mounted further apart to reduce interference. The detection distance was tweaked by trial and error and finally settled on the value of 36 inches for the front, left and right sensors and  7 inches for the back sensor.&lt;br /&gt;
&lt;br /&gt;
The second challenge was dealing with erroneous values. Using ADC to interface sensors lead to certain erroneous values that didn't have the desired effect and after some testing, the sensor interface was changed to pulse width. This lead to more robust values after filtering.&lt;br /&gt;
&lt;br /&gt;
Another challenge was the initial skewed alignment. It was difficult to detect whether the direction of the running car was changing because of the motor response to sensor values or the alignment of the tires. The group eventually decided to get a new car that rectified the alignment issue.&lt;br /&gt;
&lt;br /&gt;
=== Sensors Configuration and Implementation ===&lt;br /&gt;
We used LV-MaxSonar series MB1010 high performance ultrasonic sensors  for our application. The sensors detects objects from 6 inch to 254 inches and can be interfaced to ADC or pulse width output. We found the ADC values were inconsistent and due to the constraint of number of ADC pins on SJONE board , we used PWM  to configure the sensors.&lt;br /&gt;
We mounted three sensors in front of the car and we found the values were not consistent as it was reflected from the ground, hence we elevated the sensor placement.&lt;br /&gt;
The sensor configuration is explained&lt;br /&gt;
[[File:CMPE243_F14_Group5_ultrasonic.png|200px|centre|thumb|Ultra SonicSensor]]&lt;br /&gt;
&lt;br /&gt;
===Motor Controller ===&lt;br /&gt;
&lt;br /&gt;
====Issue 1====&lt;br /&gt;
As we were using Electric Speed Control (ESC) to control the speed of motor we faced issues based on inconsistency of the speed. This could have been solved easily if we used H-bridge chip. When ESC was supplied with particular PWM signal it would work at desirable speed but when turning off the ESC and turning on the ESC the speed would change for the same PWM signal supplied. This inconsistency of the speed can easily damaged the motor as it was hard to predict when the motor will switch from forward to backward motion. So to fix this issue we had to connect the ESC to oscilloscope and turn on the transmitter. As soon as the transmitter is turned on the transmitter send a fix signal to ESC for some time that could have been in milli seconds. By doing this the ESC get initialized and once the ESC has initialized the transmitter can send a signal to go forward or reverse.&lt;br /&gt;
&lt;br /&gt;
So we wrote a code to initialize the ESC. Before we sends the signal to ESC to move forward or reverse we send a fix PWM signal to ESC for one second to initialize ESC and this signal was sent from the main function.&lt;br /&gt;
&lt;br /&gt;
====Issue 2====&lt;br /&gt;
The servo that came with the RC car wasn't fast enough to respond to left and right movement of the car. Car would hit the obstacle and than the wheel would rotate in opposite direction. So we change the servo with faster response time. &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;|Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Test Case&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Test Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Result&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|1||Initial CAN communication of all controllers ||Check if all the controllers are broadcasting the periodic message on CAN bus and receiving the data ||All controllers '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|2||Obstacle avoidance|| Obstacle  by integrating the ultrasonic sensor||Obstacle avoidance '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|3||LCD display || Displying all the values including CPU Utilization, CAN message count, and message from the controllers ||LCD display of all message '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|4||Building Android application ||Check if the Android application sends the destination by Bluetooth||Communication '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|5||Point to Point movement || Test Car runs by setting two way points||Point to point car movement '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|6||Checking if Car runs with multiple way points ||Check if the car works with multiple way points||Multiple way points steering  '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Challenges and Learning ==&lt;br /&gt;
&lt;br /&gt;
== Future Enhancement ==&lt;br /&gt;
=== Sensors ===&lt;br /&gt;
It would be ideal to add another infrared sensor to the front lower portion of the car for cliff detection. It would also be good to have a bigger 3D printed bracket to mount the sensors that match our measurements requirements. This would add to the visual appeal and also reduce tangling mess due to the wires.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Video ==&lt;br /&gt;
&lt;br /&gt;
Demo     :    http://youtu.be/a9ceLDJN67M&lt;br /&gt;
&lt;br /&gt;
Teampics :    http://youtu.be/TJW7AsHpXfE&lt;br /&gt;
&lt;br /&gt;
== Project Source Code ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
# Preetpal Kang, Lecture notes of CMPE 243, Computer Engineering, Charles W. Davidson College of Engineering, San Jose State University, Aug-Dec 2014.&lt;br /&gt;
# en.wikipedia.org/&lt;br /&gt;
# MaxBotix 2012, http://www.maxbotix.com/articles/031.htm&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F14:_Team5-Self_Driving_Car_-_AUG&amp;diff=11470</id>
		<title>F14: Team5-Self Driving Car - AUG</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F14:_Team5-Self_Driving_Car_-_AUG&amp;diff=11470"/>
				<updated>2014-12-23T01:21:45Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: /* IO Task */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Self Driving Car ==&lt;br /&gt;
&lt;br /&gt;
== Objective and Scope ==&lt;br /&gt;
&lt;br /&gt;
This project is aimed at creating a self-driving car with obstacles avoidance and to steer to the gps location pointed by the android application with  the help of multiple controllers communicating using CAN bus.CAN(Control Area Network) is a communication protocol used widely in automotive application developed by BOSCH in 1986. The self-driving car consists of 6 different controllers for '''GPS''','''Sensor''','''Central''','''Motor''','''IO''' and '''Communication'''. The controllers communicate to other controller by CAN bus.We have implemented broadcast algorithm to broadcast all the data from each controller in different frequencies. The controller parses the data using the 29 bit identifier which has destination and source address.&lt;br /&gt;
&lt;br /&gt;
[[File:CmpE244_F14_SelfDrivingCarT5_basic_can_updated.JPG|700px|thumb|center|Fig 2. Build in Progress]]&lt;br /&gt;
&lt;br /&gt;
== Team Members &amp;amp; Responsibilities ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Team Members&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| Sensor Controller&lt;br /&gt;
| &lt;br /&gt;
# Bailey Wu&lt;br /&gt;
# Rishabh Sareen&lt;br /&gt;
# Rishab H&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| Motor Controller &lt;br /&gt;
| &lt;br /&gt;
# Abhraham Ruiz&lt;br /&gt;
# Arpit Amin&lt;br /&gt;
# Sree Harsha&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| I/O Controller (LCD Display)&lt;br /&gt;
| &lt;br /&gt;
# Yoni Klein&lt;br /&gt;
# Tejeswar&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| Communication Bridge + Android&lt;br /&gt;
| &lt;br /&gt;
# Shaw Ken Chang&lt;br /&gt;
# Arnold Bajet Jr.&lt;br /&gt;
# Thomas Pantels&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| Geographical Controller&lt;br /&gt;
| &lt;br /&gt;
# Himanshu Saini&lt;br /&gt;
# Divya Kamath &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| Central Controller&lt;br /&gt;
| &lt;br /&gt;
# Divya Kamath&lt;br /&gt;
# Tejeswar&lt;br /&gt;
# Sree Harsha&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| Car design and wiring&lt;br /&gt;
| &lt;br /&gt;
# Bailey Wu&lt;br /&gt;
# Himanshu Saini&lt;br /&gt;
# Sree Harsha&lt;br /&gt;
# Karthik Vadiraja&lt;br /&gt;
# Akash Ayare&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| Git Setup&lt;br /&gt;
| Akash Ayare&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of this project was to design and implement a self-driving car. The team consisted of 15 people, divided into 6 teams corresponding to six controllers. The aim of this class was to understand the CAN protocol that is used extensively in vehicles. The self-driving car houses six controllers, all of them communicating using CAN. Each controller performs a unique task such as:&lt;br /&gt;
# '''Sensor Controller''': Interfaced to the front and back sensors. Periodically sends sensor data to the central controller. Crucial for obstacle detection and avoidance&lt;br /&gt;
# '''Motor Controller''': Controls the motors and steering of the car, based on commands received from central controller.&lt;br /&gt;
# '''Geographical Controller''': Interfaced to GPS and compass. Periodically sends location, heading and distance from destination. crucial for autonomous navigation of the car.&lt;br /&gt;
# '''Communication Controller''': Acts as a bridge for Android. Android app is used to set destination, calculate path to destination, start and stop the car. Data is sent to central and geographical Controller based on user input.&lt;br /&gt;
# '''Central Controller''': The brain of the car. Uses sensor and geographical data to steer the car in the right direction. Uses sensor data to detect and avoid obstacles. Uses geographical data to move towards desired location&lt;br /&gt;
# '''Display Controller''': Interfaced to an LCD screen which displays status of the car (reached/ not reached), CAN bus utilization, sensor data, bearing, heading etc.&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Geographical Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 1-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Order Components and Make a schedule&lt;br /&gt;
| Completed&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 8-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Decide commands that Geographical Controller will support&lt;br /&gt;
| Completed&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 7-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Complete CAN RX task and subscription handling. Verify communication with other controllers&lt;br /&gt;
| Completed&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| Interface GPS module and Compass and develop drivers if needed&lt;br /&gt;
| Completed&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| 30-Oct-2014&lt;br /&gt;
| Design and develop algorithm to calculate heading and bearing from GPS coordinates&lt;br /&gt;
| Completed. &lt;br /&gt;
| 30-Oct-2014 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| 5-Nov-2014&lt;br /&gt;
| Work on calibration of compass and heading calculation&lt;br /&gt;
| Completed&lt;br /&gt;
| 11-Dec-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 1-Nov-2014&lt;br /&gt;
| 10-Nov-2014&lt;br /&gt;
| Test with the central and Bluetooth controller &lt;br /&gt;
| Completed&lt;br /&gt;
| 14-Dec-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 10-Nov-2014&lt;br /&gt;
| 25-Nov-2014&lt;br /&gt;
| Begin testing with fully assembled car &lt;br /&gt;
| Completed&lt;br /&gt;
| 1-Dec-2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| 25-Nov-2014&lt;br /&gt;
| 10-Dec-2014&lt;br /&gt;
| Final Testing and changes as needed &lt;br /&gt;
| Completed&lt;br /&gt;
| 19-Dec-2014&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sensor Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/3/2014&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|Order ultrasonic sensor parts and develop simple test code for the sensors&lt;br /&gt;
|Done&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Wire the ultrasonic sensors, develop and implement the sensors using analog to digital converter&lt;br /&gt;
|Done&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|Collaborate with the other sub teams to finish the CAN bus communication and allow the self driving car to drive autonomously &lt;br /&gt;
|Done&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|-&lt;br /&gt;
|! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|11/1/2014&lt;br /&gt;
|Develop, implement and test the ultrasonic sensors using the pulse width modulation and universal asynchronous receiver/transmitter&lt;br /&gt;
|Done&lt;br /&gt;
|11/1/2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|11/2/2014&lt;br /&gt;
|11/9/2014&lt;br /&gt;
|Develop, implement and test the front and back infrared sensors using analog to digital converter&lt;br /&gt;
|Done&lt;br /&gt;
|11/9/2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|11/10/2014&lt;br /&gt;
|11/17/2014&lt;br /&gt;
|Develop, implement and test the current/voltage sensor for the battery packs of the self driving car using I2C&lt;br /&gt;
|Scheduled&lt;br /&gt;
|Removed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
|11/18/2014&lt;br /&gt;
|11/25/2014&lt;br /&gt;
|Collaborate with the other sub teams to make sure that the sensors are in working condition&lt;br /&gt;
|Done&lt;br /&gt;
|11/25/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
|11/26/2014&lt;br /&gt;
|12/5/2014&lt;br /&gt;
|Collaborate with the other sub teams to debug any problems that may encountered&lt;br /&gt;
|Done&lt;br /&gt;
|12/5/2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
|12/6/2014&lt;br /&gt;
|12/13/2014&lt;br /&gt;
|Prepare for demo&lt;br /&gt;
|Done&lt;br /&gt;
|12/19/2014&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''IO Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/14/2014&lt;br /&gt;
|Research and order LCD appropriate for this project&lt;br /&gt;
|Done&lt;br /&gt;
|10/11/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Implement CAN RX/Subscription task&lt;br /&gt;
|Done&lt;br /&gt;
|10/13/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Finalize Task Architecture&lt;br /&gt;
|Done&lt;br /&gt;
|11/1/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|10/18/2014&lt;br /&gt;
|10/21/2014&lt;br /&gt;
|Interface and test LCD&lt;br /&gt;
|Done&lt;br /&gt;
|10/20/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|10/21/2014&lt;br /&gt;
|10/28/2014&lt;br /&gt;
|Implement auto scrolling feature&lt;br /&gt;
|Done&lt;br /&gt;
|11/18/2014&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Communication Bridge + Android'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 16-Sep-2014&lt;br /&gt;
| 23-Sep-2014&lt;br /&gt;
| Test bluetooth module using computer serial port and an android app(simple bluetooth terminal app downloaded from google play).  Test the real life range and stability of the bluetooth module (HC-06).  Modify the bluetooth chat example to work with the bluetooth module.    &lt;br /&gt;
| Done&lt;br /&gt;
| 20-Sep-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 28-Sep-2014&lt;br /&gt;
| 12-Oct-2014&lt;br /&gt;
| Draw UI design layouts for a basic android application that can view Google map as well as send GPS data through bluetooth by clicking on the map. Study google maps API and make a simple app that will post a short toast that shows the GPS location after a long press event. &lt;br /&gt;
| Done&lt;br /&gt;
| 12-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 7-Oct-2014&lt;br /&gt;
| 11-Oct-2014&lt;br /&gt;
| Interface bluetooth module with SJSUOne board and able to verify that the connection is stable and that transaction via the bluetooth is accurate.  This is done by adding a test button where if you press the button it send a command to the board.  After receiving the command, the board should react with a response (LED light and/or text response to the android phone)&lt;br /&gt;
| Done&lt;br /&gt;
| 19-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 11-Oct-2014&lt;br /&gt;
| 19-Oct-2014&lt;br /&gt;
|Integrate Google Maps and Bluetooth component together in Android app.  After a long press on the map, the user should be prompted to start the car and set the location as the places the user selected.  Add a textView to display the location selected by pressing on the map.  Add a button for sending location to the car.  &lt;br /&gt;
| Done&lt;br /&gt;
| 27-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 19-Oct-2014&lt;br /&gt;
| 26-Oct-2014&lt;br /&gt;
| CAN infrastructure implmentation:  Use our team's common CAN infrasturcture code and modify it specifically for our controller.  First created the CAN communication table and then modify the infracturacture code to implement the broacasting as well as filtering of neccessary data.  This only focuses on broadcasting a stop/start command and the destination GPS data (set by android) as well as getting car's current location data from the geological controller.&lt;br /&gt;
|Done&lt;br /&gt;
| 07-Nov-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 26-Oct-2014&lt;br /&gt;
| 1-Nov-2014&lt;br /&gt;
| Test and implement car information reading as well as other functions of Android app&lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 2-Nov-2014&lt;br /&gt;
| 4-Nov-2014&lt;br /&gt;
| Iterate UI design&lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 5-Nov-2014&lt;br /&gt;
| 16-Nov-2014&lt;br /&gt;
| Implement 2nd UI design&lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Motor Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/1/2014&lt;br /&gt;
|10/8/2014&lt;br /&gt;
|PWM2 (used to control motors) and PWM3 (used to control servo) interface with the car servo and motor. Write a test code to operate the servo and motor from the terminal command.&lt;br /&gt;
|Completed and Tested&lt;br /&gt;
|10/11/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
|10/9/2014&lt;br /&gt;
|10/18/2014&lt;br /&gt;
|Design and code CAN receive task for subscription. Check for basic CAN message commands for throttle and steer control.&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|10/26/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|10/19/2014&lt;br /&gt;
|10/28/2014&lt;br /&gt;
|Design the CAN message table for motor control and servo control&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|10/26/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|10/29/2014&lt;br /&gt;
|11/07/2014&lt;br /&gt;
|Design acceleration Vs steer control function for smooth run. Check for other factors involved.&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|11/22/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|11/08/2014&lt;br /&gt;
|11/14/2014&lt;br /&gt;
|Research on RPM sensor. Interface the RPM sensor to calculate the Speed. Test the RPM sensor by running the car at different speed&lt;br /&gt;
|Completed and tested with a hall sensor&lt;br /&gt;
|11/22/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|11/15/2014&lt;br /&gt;
|11/21/2014&lt;br /&gt;
|Fine tune motor control code and integrate with all the controllers for proper working.&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|11/22/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
|11/22/2014&lt;br /&gt;
|11/28/2014&lt;br /&gt;
|Test and check if more features can be added to improve performance. Completed and tested&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|11/28/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
|11/29/2014&lt;br /&gt;
|12/05/2014&lt;br /&gt;
|Testing and Debugging.&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|12/05/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;|9&lt;br /&gt;
|12/06/2014&lt;br /&gt;
|12/18/2014&lt;br /&gt;
|Final Testing and getting the car ready for Demo.&lt;br /&gt;
|On Going&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
'''Central Controller'''&lt;br /&gt;
 &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 16-Sep-2014&lt;br /&gt;
| 23-Sep-2014&lt;br /&gt;
| Develop API for CAN bus communication.&lt;br /&gt;
| Done&lt;br /&gt;
| 23-Sep-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 11-Oct-2014&lt;br /&gt;
| 15-Oct-2014&lt;br /&gt;
| Develop communication table for all controllers.&lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 15-Oct-2014&lt;br /&gt;
| 20-Oct-2014&lt;br /&gt;
| Broadcast message and target message setup.  &lt;br /&gt;
| Done&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
| Co-ordinate all controllers and take major decisions. &lt;br /&gt;
| Done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| Complete Building and fine-tuning of RC car. &lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| Develop coordination mechanism to ensure controllers are initialized and ready &lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
| Develop kill switch &lt;br /&gt;
| Done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
| Build external power distribution circuit&lt;br /&gt;
| Done&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
| 04-Nov-2014&lt;br /&gt;
| Coordination algorithm between steering and throttle for smooth turns &lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| 04-Nov-2014&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| Collision avoidance algorithms &lt;br /&gt;
| Done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| 04-Nov-2014&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| Intermediate unit and functional tests&lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| 25-Nov-2014&lt;br /&gt;
| Functional tests and algorithm adjustments &lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 13&lt;br /&gt;
| 25-Nov-2014&lt;br /&gt;
| 02-Dec-2014&lt;br /&gt;
| Fine tuning and stretch goals (headlights, parallel parking, etc.)&lt;br /&gt;
| Done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 14&lt;br /&gt;
| 02-Dec-2014&lt;br /&gt;
| 09-Dec-2014&lt;br /&gt;
| Prepare for demo&lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Description&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Qty&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Price&lt;br /&gt;
|-&lt;br /&gt;
| LV-MaxSonar-EZ1 High Performance Ultrasonic Rangefinder&lt;br /&gt;
| 2&lt;br /&gt;
| 49.90&lt;br /&gt;
|-&lt;br /&gt;
| Analog Distance Sensor &lt;br /&gt;
| 1&lt;br /&gt;
| Free&lt;br /&gt;
|-&lt;br /&gt;
|1/10 Scale 4x4 Truck with Brushed Motor	&lt;br /&gt;
|1&lt;br /&gt;
|217.33&lt;br /&gt;
|-&lt;br /&gt;
|2 ft 12-Gauge Power Cables&lt;br /&gt;
|3	&lt;br /&gt;
|22.80	&lt;br /&gt;
|-&lt;br /&gt;
|Pair Power Socket	&lt;br /&gt;
|2&lt;br /&gt;
|2.16&lt;br /&gt;
|-	&lt;br /&gt;
|Standard Size Body Clips	&lt;br /&gt;
|12	&lt;br /&gt;
|2.16&lt;br /&gt;
|-&lt;br /&gt;
|4-pack AA Batteries&lt;br /&gt;
|1	&lt;br /&gt;
|3.45	&lt;br /&gt;
|-&lt;br /&gt;
|50-pack M3x15mm Stand-Off Spacer Female-Male&lt;br /&gt;
|1&lt;br /&gt;
|11.19&lt;br /&gt;
|-	&lt;br /&gt;
|100-pack 18-8 Flat Steel Washer	&lt;br /&gt;
|1	&lt;br /&gt;
|2.54&lt;br /&gt;
|-	&lt;br /&gt;
|100-pack M3x20mm Hex-Drive Screw&lt;br /&gt;
|1&lt;br /&gt;
|6.47	&lt;br /&gt;
|-&lt;br /&gt;
|100-pack M3 Steel Hex Nut&lt;br /&gt;
|1&lt;br /&gt;
|4.66&lt;br /&gt;
|-&lt;br /&gt;
|2-pin JST Connector Right Angle&lt;br /&gt;
|10&lt;br /&gt;
|6.84&lt;br /&gt;
|-&lt;br /&gt;
|4-pin JST Connector Right Angle&lt;br /&gt;
|10&lt;br /&gt;
|6.84&lt;br /&gt;
|-&lt;br /&gt;
|2-pin Female JST Cable (20 cm)&lt;br /&gt;
|10&lt;br /&gt;
|7.39&lt;br /&gt;
|-&lt;br /&gt;
|4-pin Female JST Cable (20 cm)&lt;br /&gt;
|10&lt;br /&gt;
|7.39&lt;br /&gt;
|-&lt;br /&gt;
|5 Volt Relay Breakout Board&lt;br /&gt;
|1&lt;br /&gt;
|4.95&lt;br /&gt;
|-&lt;br /&gt;
|5 Volt Voltage Regulator&lt;br /&gt;
|1&lt;br /&gt;
|1.07&lt;br /&gt;
|-&lt;br /&gt;
|Sharp Analog Distance Sensor 4-30 cm&lt;br /&gt;
|1&lt;br /&gt;
|9.95&lt;br /&gt;
|-&lt;br /&gt;
|3-pin Female JST PH-Style Cable (30 cm)&lt;br /&gt;
|1&lt;br /&gt;
|0.92&lt;br /&gt;
|-&lt;br /&gt;
|Double Sided Mounting Tape - 3 feet	&lt;br /&gt;
|1&lt;br /&gt;
|4.35&lt;br /&gt;
|-&lt;br /&gt;
|AC Adapter (LiPo Charger)&lt;br /&gt;
|1&lt;br /&gt;
|15.16&lt;br /&gt;
|-&lt;br /&gt;
|IEC Power Cable (LiPo Charger)&lt;br /&gt;
|1&lt;br /&gt;
|5.38&lt;br /&gt;
|-&lt;br /&gt;
|4mm Bullet Plugs to Universal Plug&lt;br /&gt;
|1&lt;br /&gt;
|13.38&lt;br /&gt;
|-&lt;br /&gt;
|Acrylic sheet + Sharpe mini&lt;br /&gt;
|1+1&lt;br /&gt;
|11.72&lt;br /&gt;
|-&lt;br /&gt;
|Molex Pin Header, Connector, wires and 100 zip ties&lt;br /&gt;
|10+4+1&lt;br /&gt;
|17.13&lt;br /&gt;
|-&lt;br /&gt;
|2 x 90 degree pin header, 2 x straight pin header&lt;br /&gt;
|2+2&lt;br /&gt;
|3.65&lt;br /&gt;
|-&lt;br /&gt;
|uni-polar hall sensor for tachometer feedback&lt;br /&gt;
|2&lt;br /&gt;
|2.18&lt;br /&gt;
|-&lt;br /&gt;
|Heavy Duty magnets&lt;br /&gt;
|2&lt;br /&gt;
|4.18&lt;br /&gt;
|-&lt;br /&gt;
|INA219 Voltage sensors 26V +/-3.2A&lt;br /&gt;
|2&lt;br /&gt;
|19.9&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|20x4 Serial LCD Module&lt;br /&gt;
|1&lt;br /&gt;
|29.99&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Backup Parts &amp;amp; cost ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Qty&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Description&lt;br /&gt;
! width=&amp;quot;110&amp;quot; align=&amp;quot;center&amp;quot;|Manufacturer&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Part Number&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Total Cost&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| LV-MaxSonar-EZ1 High Performance Ultrasonic Rangefinder&lt;br /&gt;
| MaxBotix Inc&lt;br /&gt;
| MB1010&lt;br /&gt;
| Free&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Analog Distance Sensor &lt;br /&gt;
| Sharp&lt;br /&gt;
|&lt;br /&gt;
| Free&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
[[File:CmpE243_F14_Team5_OverallHWDesign.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Motor Controller ==&lt;br /&gt;
&lt;br /&gt;
==== Summary ====&lt;br /&gt;
This module takes command input from central controller and steers the car to its destination; in addition, It has two main controlling parameters : Throttle and Steering. Throttle input moves the car forward and backward. Steer input turns the wheel left and right. The central controller takes feedback from the sensors and makes decision to move the car. Accordingly, it sends CAN commands accepted by the motor controller for navigation, and real time RPM signal to the controller.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Motor and Steer control : Technical Information&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Sl.No&lt;br /&gt;
! width=&amp;quot;90&amp;quot; align=&amp;quot;center&amp;quot;|Controller&lt;br /&gt;
! width=&amp;quot;90&amp;quot; align=&amp;quot;center&amp;quot;|Signal Type&lt;br /&gt;
! width=&amp;quot;90&amp;quot; align=&amp;quot;center&amp;quot;|Frequency&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Functionality&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1&lt;br /&gt;
| Motor Control&lt;br /&gt;
| PWM signal&lt;br /&gt;
| 50 Hz (20000us)&lt;br /&gt;
| 1000us (Full throttle forward) - 1500us (Stop)   - 2000us (Full throttle backward)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|2    &lt;br /&gt;
| Steer Control&lt;br /&gt;
| PWM signal &lt;br /&gt;
| 50 Hz (20000us)&lt;br /&gt;
|1000us (Turn left max)         - 1500us (Center) - 2000us (Turn right max)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Working =====&lt;br /&gt;
The car initially accepts the start command to begin navigation. Commands can then come to move the car forward or backward, steer left or right depending on intelligent decisions made by the central controller. The motor control has intelligence to avoid jerks and ensure smoother transitions between commands. The central controller gets the data from the sensors for obstacle avoidance. The car has a communication controller which gets the '''GPS''' data from the android application, the android application sets the destination latitude and longitude. The car decides the heading direction by the gps points and the compass and if it finds obstacle it will be controlled by the obstetrical avoidance and steer to the destination according to the algorithm below.&lt;br /&gt;
===== Flow Chart =====&lt;br /&gt;
&lt;br /&gt;
[[File:Cmpe243_F14_T5_motor_controller_flowchart1.png]]&lt;br /&gt;
&lt;br /&gt;
===== Kill switch =====&lt;br /&gt;
The remote control and receiver module pair up to provide a signal coverage of more than 100 meters. We make use of this to design our kill switch. When a constant PWM signal of 1000us is received from the remote, the car is in 'ARMED' state and moves the car according to CAN commands. The user has to hold the trigger gun for this state constantly and the car moves.&lt;br /&gt;
When the user releases the trigger gun, the car stops receiving the PWM signal of 1000us and the car goes to 'DISARMED' state.&lt;br /&gt;
In short, pull the trigger gun - ARMED, release the trigger gun - DISARMED.&lt;br /&gt;
&lt;br /&gt;
===== RPM =====&lt;br /&gt;
The RPM sensor is based on a hall sensor switch which detect the North and South pole of a magnet located in the main shaft in the car. The hall sensor part number is 3177, and it has three pin. This sensor is uni-polar which give an output high signal when the sensor captures the North pole of the magnet; subsequently, the sensor give output low signal when the sensor captures the South pole of the magnet. Therefore, by using a the 3177 and a magnet in the shaft. the SJOne board can capture the output signal from the hall sensor as it toggles per shaft revolution. &lt;br /&gt;
It is important to notice that the output signal of the 3177 is an open collector; therefore, we need a  10 Kohm resistor connected to Vcc.&lt;br /&gt;
&lt;br /&gt;
===== Pinout Table =====&lt;br /&gt;
&lt;br /&gt;
The following table shows the pinout of all component that are connected to SJONE board.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Component Pin&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Output Pin Source&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1 &lt;br /&gt;
|Hall Sensor (3177) Vcc ( 4.5 V to 18 V)&lt;br /&gt;
|Source&lt;br /&gt;
|SJOne P1_22&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|2 &lt;br /&gt;
|Hall Sensor (3177) Ground&lt;br /&gt;
|Ground&lt;br /&gt;
|SJOne&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|3&lt;br /&gt;
|Hall Sensor (3177) Output&lt;br /&gt;
|Output&lt;br /&gt;
|SJOne P1_22 with a 10 KOhm&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|4&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 1 TX&lt;br /&gt;
|SJOne P0_1(Tx)&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|5&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 2 GND&lt;br /&gt;
|SJOne GND&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|6&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 3 VCC&lt;br /&gt;
|SJOne 3.3v&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|7&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 4 RX&lt;br /&gt;
|SJOne P0_0(Rx)&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|8&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 6 CANL&lt;br /&gt;
|CAN Bus&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|10&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 7 CANH&lt;br /&gt;
|CAN Bus&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|11&lt;br /&gt;
|Servo&lt;br /&gt;
|VCC&lt;br /&gt;
|5V Power Rail&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|12&lt;br /&gt;
|Servo&lt;br /&gt;
|GND&lt;br /&gt;
|GND Power Rail&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|13&lt;br /&gt;
|Servo&lt;br /&gt;
|Signal&lt;br /&gt;
|PWM 2.1&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|14&lt;br /&gt;
|Electric Speed Control (ESC)&lt;br /&gt;
|VCC&lt;br /&gt;
|5V Power rail&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|15&lt;br /&gt;
|Electric Speed Control (ESC)&lt;br /&gt;
|GND&lt;br /&gt;
|GND Power Rail&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|16&lt;br /&gt;
|Electric Speed Control (ESC)&lt;br /&gt;
|Signal&lt;br /&gt;
|PWM 2.2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Block Diagram =====&lt;br /&gt;
The following Block diagram shows an overview of the connection between the SJOne board, ESC, and the Hall sensor:&lt;br /&gt;
&lt;br /&gt;
[[File:Motor Block Diagram 1.jpg|600px|thumb|center|Motor Controller Block Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Sensor Controller ==&lt;br /&gt;
===Using Multiple MaxSonar Sensors===&lt;br /&gt;
&lt;br /&gt;
When using multiple MaxSonar sensors, it is required to configure the sensors in ''Sequential Operation'' mode to obtain the best optimal performance in obstacle detection. On the other hand, if the sensors are left in continuous free run operation, which means the RX pin (Pin 4) are unconnected then at start-up the sensors will range at exactly the same time. Thus, the sensors are not synchronized and eventually result in frequency drifts that would likely cause interference between sensors for most applications.&lt;br /&gt;
&lt;br /&gt;
[[File:CmpE243_F14_T5_SingleSensor.jpg|500px|thumb| center |Fig . Single Sensor in free run operation mode - MaxBotix 2012]]&lt;br /&gt;
&lt;br /&gt;
The figure to the above shows a single MaxSonar ultrasonic sensor operating in continuous free run operation detecting an object at 96 inches. The signal of the ultrasonic sensor observe under the oscilloscope shows that the sensor is operating at its finesse performance without any interference.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The figure to the below shows that multiple MaxSonar ultrasonic sensors are operating in continuous free run operation. As you can see, the signal of a ultrasonic sensor observe under the oscilloscope shows that the signal has multiple spikes due to the interference of other sensors. Thus, the sensor becomes unsynchronized and the range reading become unstable. &lt;br /&gt;
&lt;br /&gt;
[[File:CmpE243_F14_T5_MultipleSensorsInterferences.jpg‎|500px|thumb| center |Fig . Multiple Sensors in free run operation mode - MaxBotix 2012]]&lt;br /&gt;
&lt;br /&gt;
To achieve the most optimal performance using multiple MaxSonar ultrasonic sensors, the figure below shows the implementation of all the sensors operating in sequential mode. The sensors can be started by pulling the RX pin (Pin 4) high for at least 20 uS and then for each reading this can be done as often as every 50 ms. This method would toggle each sensor when the user like to obtain an reading at any given moment. Thus, there will be no interference between each sensor. &lt;br /&gt;
&lt;br /&gt;
[[File:CmpE243_F14_T5_MultipleSensorsConfiguration.jpg‎ |500px|thumb| center |Fig . Multiple Sensors Configuration]]&lt;br /&gt;
&lt;br /&gt;
There are many other method to implement multiple MaxSonar ultrasonic sensors in a single system. This information can be obtained in the sensor datasheet.&lt;br /&gt;
&lt;br /&gt;
== Central Controller ==&lt;br /&gt;
&lt;br /&gt;
The central controller is the brain of the car. It receives information from all the other controllers and decides which direction the car must move. The central controller periodically sends commands to the motor regarding the throttle, steering, steering angle and speed.&lt;br /&gt;
&lt;br /&gt;
In order to decide which direction to move, the central controller uses sensor data and geographical data. The current design uses a state machine. The car is initially in idle state. When it received a START command from the communication controller, the central sends the start motor command to the motor controller. After the start state, the central controller can be in one of the two states: avoid obstacle or adjust heading. The central controller uses the sensor data to detect obstacle. If there are no obstacles, then the central controller uses geographical information to adjust car heading. &lt;br /&gt;
&lt;br /&gt;
Once the heading and bearing match, the car moves straight ahead till the destination is reached. When the geographical controller sends a command indicating that the car has reached the destination, the car will stop.&lt;br /&gt;
&lt;br /&gt;
At any point during its course, if the car receives a STOP command from the communication controller, the car will stop&lt;br /&gt;
&lt;br /&gt;
[[File:Cmpe243F14_Team5_Central_StateTransition.JPG|700px|thumb|center|Fig. Central Controller State Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Geographical Controller ==&lt;br /&gt;
&lt;br /&gt;
The geographical controller is one of the six controllers mounted on the car. This controller provides the location and heading information to the central controller of the car. It also stores the destination (way-points). By calculating the distance from the current location to the destination or intermediate waypoint, the geo controller can determine if the car has reached its destination. When the car reaches the destination, the geo controller sends a message to the central controller indicating that destination has been reached. &lt;br /&gt;
&lt;br /&gt;
The devices connected to this controller are:&lt;br /&gt;
1. Magnetometer (digital compass)&lt;br /&gt;
2. GPS Logger&lt;br /&gt;
&lt;br /&gt;
The compass communicates via I2C and the GPS via UART.&lt;br /&gt;
&lt;br /&gt;
==== Parts Used ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Geographical Control - Parts Used&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;center&amp;quot;|Part Number&lt;br /&gt;
! align=&amp;quot;center&amp;quot;|Purpose&lt;br /&gt;
|-&lt;br /&gt;
| SparkFun Triple Axis Magnetometer Breakout - HMC5883L&lt;br /&gt;
| Compass&lt;br /&gt;
|-&lt;br /&gt;
| SparkFun Venus GPS Logger - SMA Connector&lt;br /&gt;
| GPS &lt;br /&gt;
|-&lt;br /&gt;
| Antenna GPS Embedded SMA - GPS-00177&lt;br /&gt;
| Antenna&lt;br /&gt;
|-&lt;br /&gt;
| ET-318 GPS Engine Board&lt;br /&gt;
| GPS&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Design ====&lt;br /&gt;
&lt;br /&gt;
'''Heading''' - The compass provides the heading. The heading is the direction in which the car is headed. The value is typically an angle from 0-360 degrees measured clockwise from North. The heading is calculated from the x-axis and y-axis values provided by the magnetometer. To use all 3-axis values, a tilt sensor must be used with the magnetometer for tilt compensation.&lt;br /&gt;
&lt;br /&gt;
'''GPS Module''' - The GPS module provides the time, latitude, longitude, direction and if the GPS data is valid. This latitude, longitude corresponds to the current location of the car.&lt;br /&gt;
&lt;br /&gt;
'''Destination''' - The destination is set by Android application/communication controller. The destination could be a single point or a list of waypoints, each being a latitude, longitude pair.&lt;br /&gt;
&lt;br /&gt;
'''Bearing''' - Using the destination lat,lon pair (set by the communication controller) and the current lat, lon pair (received from the GPS module), the geographical controller calculates the bearing. This angle, like the heading, is also typically between 0-360 degrees measured clockwise. Bearing represents the angle between the destination and current location. &lt;br /&gt;
&lt;br /&gt;
Both the heading and the bearing are sent periodically to the central controller. The central controller uses this information combined with the sensor data to steer the motors in the right direction.&lt;br /&gt;
&lt;br /&gt;
Example: If the current heading is 10 degrees ( car is travelling in a direction 10 degrees) from north. The bearing is 50 degrees ( the car is at an angle of 50 degrees away from the desired direction), the central controller must steer the car 40 degrees to the right.&lt;br /&gt;
&lt;br /&gt;
The geographical controller also calculates the distance between the current lat, lon and the destination lat, lon. This is used to determine if the car has reached the intended destination. When the car has reached the destination, geographical controller sends a message to the central controller to stop.&lt;br /&gt;
&lt;br /&gt;
==== Tasks ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Geographical Control - Tasks&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;center&amp;quot;|Task Name&lt;br /&gt;
! align=&amp;quot;center&amp;quot;|Purpose&lt;br /&gt;
|-&lt;br /&gt;
| Compass Task&lt;br /&gt;
| Updates the compass heading. Runs every 100ms and obtains compass data over I2C&lt;br /&gt;
|-&lt;br /&gt;
| GPS Task&lt;br /&gt;
| Updates the current latitude and longitude by reading GPS data sent over UART. GPS has been configured to run at 10Hz and sends data at a baud rate of 38400. &lt;br /&gt;
|-&lt;br /&gt;
| CAN Rx Task&lt;br /&gt;
| Handles data received over CAN. Task gets blocked if can receive queue is empty. &lt;br /&gt;
|-&lt;br /&gt;
| CAN Periodic Msg Task &lt;br /&gt;
[1 Hz]&lt;br /&gt;
| Periodic CAN message to send current lat,lon and destination lat, lon to central and display controller&lt;br /&gt;
|-&lt;br /&gt;
| CAN Periodic Msg Task &lt;br /&gt;
[20 Hz]&lt;br /&gt;
| Periodic CAN message to send compass heading and destination bearing to central controller.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== GEO CAN Controller Communication Table ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Geographical Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Number&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Type&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Purpose&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Data layout&lt;br /&gt;
|- &lt;br /&gt;
| 0x0301  &lt;br /&gt;
| Get Geo Data &lt;br /&gt;
| Request for GPS Data (lat,long)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x0302  &lt;br /&gt;
|    &amp;quot;  &lt;br /&gt;
| Request for current compass heading and destination heading&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x0304  &lt;br /&gt;
| &amp;quot; &lt;br /&gt;
| Request Time&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x0601  &lt;br /&gt;
| Response to 0x3xx request&lt;br /&gt;
| GPS Data (lat,long)&lt;br /&gt;
|&lt;br /&gt;
 dword[0] : [32-bit latitude]&lt;br /&gt;
 dword[1] : [32-bit longitude] &lt;br /&gt;
|-&lt;br /&gt;
| 0x0602  &lt;br /&gt;
| &amp;quot;&lt;br /&gt;
| Compass heading and destination bearing&lt;br /&gt;
|&lt;br /&gt;
 dword[0] : [32-bit compass heading]&lt;br /&gt;
 dword[1] : [32-bit destination bearing] &lt;br /&gt;
|-&lt;br /&gt;
| 0x0504  &lt;br /&gt;
| &amp;quot;&lt;br /&gt;
| Time &lt;br /&gt;
| &lt;br /&gt;
 dword[0] : [32-bit time 0x00hhmmss]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0501  &lt;br /&gt;
| Periodic Message&lt;br /&gt;
| GPS data, broadcast periodically  &lt;br /&gt;
|&lt;br /&gt;
 dword[0] : [32-bit longitude]&lt;br /&gt;
 dword[1] : [32-bit latitude]  &lt;br /&gt;
|-&lt;br /&gt;
| 0x0502  &lt;br /&gt;
| &amp;quot;&lt;br /&gt;
| Current and destination heading broadcast periodically  &lt;br /&gt;
|&lt;br /&gt;
 dword[0] : [32-bit compass heading]&lt;br /&gt;
 dword[1] : [32-bit bearing]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Challenges and Lessons Learnt ====&lt;br /&gt;
&lt;br /&gt;
# '''Start Geo work early''' : Most of the tasks of the geo controller can be done independent of the progress on the rest of the car. Start working early, test the GPS outside as much as possible.&lt;br /&gt;
# '''Compass calibration''' : Most compasses need calibration. During the course of our project, we used to magnetometers (since we accidently burned the first one). The first one was off by 5 degrees and the second one was off by about 20 degrees. Take care that the compass is mounted away from motors and other devices that can create a lot of noise for the compass&lt;br /&gt;
# '''GPS speed''' : We started by using the default speed of 1Hz on the GPS module. The data was sent to the central controller at 1 Hz. As we started testing we realized that this can be too slow and the car may go off course before the new data arrives. Using the commands in the datasheet, we configured the GPS to have an update rate of 10 Hz and a baud rate of 38400. While the datasheet said that the GPS can be configured for 20Hz and baud rate of 115200, we were unsuccessful in achieving that. For some reason, the SJOne board crashed every time we set the GPS for 115200. We did not successfully debug the issue. But changing the speed from 1Hz to 10Hz did make a lot of difference to the performance of the car steering.&lt;br /&gt;
# '''Picking the right GPS and compass''' : Both the compass and the GPS that we used served the purpose well. On sunny days, the GPS worked indoors too. Even though we used a 3 axis compass, we used only 2 axis readings from it to calculate the heading. A 3 axis compass paired with a tilt sensor would probably give better readings. But 2 axis readings served our purpose. &lt;br /&gt;
# '''GPS Drift''' : We noticed that the GPS values for the same locations drifted over time. There could be a 6 foot jump every few hours. The datasheet offers configurations to pin or unpin the gps values. We did not use the feature. But we did notice that because of the GPS drift, our car traveled differently on the same path at different times during the day. If we had more time, we could have fixed this and achieved a straight path for the car, instead of always veering to the left of right.&lt;br /&gt;
# '''Android App''' : The Android app is crucial since it provides the destination waypoints to the geo controller. We need to ensure that the dataset used by the android app is similar if not same as the values reported by the GPS. If the values differ a lot, then the car will not move along the intended path. The Android team and the GPS team must work closely and complete their testing well ahead, so that once the GPS and communication controllers are mounted it is only a matter of improving the behavior.&lt;br /&gt;
# '''Multiple Setups''' : Having multiple setups can be very helpful to debug issues, since it is easier to make changes on the temporary setup than on the car. Also, considering the size of the team, different teams might be using the car and the GPS team will always be the last team to get hold of the car.&lt;br /&gt;
&lt;br /&gt;
==== Review of Parts used ====&lt;br /&gt;
The parts used for this controller were good and I would use them again.&lt;br /&gt;
&lt;br /&gt;
== IO Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Summary ===&lt;br /&gt;
&lt;br /&gt;
The IO controller's purpose is to display useful information on an LCD screen for debugging and verification purposes.  Essentially, it monitors the CAN bus for other controllers' data as well as bus utilization.  The hardware and software design is described below, as well as the challenges we encountered along the way.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
(block diagram of sj one board and lcd + CAN interface)&lt;br /&gt;
&lt;br /&gt;
The hardware design of the IO controller is relatively simple.  The only requirements are the serial LCD module and the controller itself.  The LCD interfaces to the IO controller via UART protocol, while the IO controller interfaces to tater other controllers via CAN Protocol.&lt;br /&gt;
&lt;br /&gt;
The LCD chosen was a serial enabled 20x4 character display from [https://www.sparkfun.com/products/9568 Sparkfun].  It was chosen for it's larger character display (rather than 16x2) and because the serial &amp;quot;backpack was built into the PCB.  This backpack is used because the display controller communicates with a parallel interface. The serial &amp;quot;backpack&amp;quot; or converter interfaces the parallel connections with a serial one and provides a low level API to control the display.  An additional API was designed on top of this one to make programming simple and clear as well as implement some useful features (such as printing with printf style arguments).  It operates on 5V, so it could not be powered by the controller itself and need to use one of the 5V supplies on the car.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
==== RX Task ====&lt;br /&gt;
&lt;br /&gt;
The receiving task uses the interrupt driven CAN driver to process messages sent on the bus.  When a CAN message is received, the data is filtered and stored a global memory locations.  This data is later used by the IO task to format and print the desired information to the LCD.  No hardware filter was used, since the IO controller must monitor bus utilization and therefore listen to all messages.  No heavy calculations or blocking code is allowed in this task; it's purpose is to get the data out as fast as possible and wait for more.&lt;br /&gt;
&lt;br /&gt;
(flow chart for RX task)&lt;br /&gt;
&lt;br /&gt;
==== LCD API ====&lt;br /&gt;
&lt;br /&gt;
The LCD API uses a singleton template so that any task can invoke it and print something to the LCD.  Since the LCD doesn't care who prints what, care must be taken to ensure other tasks' data isn't unintentionally overwritten.  However, only a single task in our implementation is utilizing this API so it wasn't a problem.  The LCD communicates over UART, so the available UART driver was used (also a singleton template).  The data sheet from Sparkfun was used to create this API so that nearly all the LCD capabilities can be supported.  These features include:&lt;br /&gt;
&lt;br /&gt;
* Erase screen or individual line&lt;br /&gt;
* Write to screen, line or specific location&lt;br /&gt;
* Adjust backlight brightness&lt;br /&gt;
* Adjust cursor position and style&lt;br /&gt;
* Scroll text&lt;br /&gt;
* Turn display off or on&lt;br /&gt;
* Change baud rate&lt;br /&gt;
&lt;br /&gt;
==== IO Task ====&lt;br /&gt;
&lt;br /&gt;
[[File:CmpE243_F14_T5_LCDScreenDesign.png|700px|thumb|center|Fig. LCD screen object design]]&lt;br /&gt;
&lt;br /&gt;
The IO task utilizes the LCD API to display LCD &amp;quot;screens&amp;quot;.  A screen is a custom-defined object containing &amp;quot;line&amp;quot; objects.  Lines consist of a format sting (in the printf format) and optional variables.  All screens are stored in a vector, of which the front object is always displayed on the LCD.  To change the screen, the vector is simply rotated left or right (forward or backward).  For simplicity, the screens are rotated every second.  However the screens can be rotated by button press, timer, external interrupt or even CAN message.&lt;br /&gt;
&lt;br /&gt;
The data objects that are stored in shared memory by the RX task make up the variables in the format strings described above.  To accomplish this, the data types for these variables are char**, or a pointer to a char pointer.  That way, we can just supply the memory location of the char* that is constantly being updated by the RX task.  This simplifies the implementation of the IO Task and ensures the latest data is used when printing the screens.&lt;br /&gt;
&lt;br /&gt;
(flow chart for IO Task)&lt;br /&gt;
&lt;br /&gt;
== Controller Communication Table ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Controller ID Table&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Controller ID&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x01&lt;br /&gt;
| Master Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| Geographical Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x03&lt;br /&gt;
| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| Sensor Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x05&lt;br /&gt;
| IO Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x06&lt;br /&gt;
| Communication (Bluetooth Bridge/Android App) Controller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Central Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Number  &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Purpose &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Data layout &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1    &lt;br /&gt;
| 0x501  &lt;br /&gt;
| Send Throttle and steering to motor&lt;br /&gt;
| throttle&lt;br /&gt;
steering&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x502  &lt;br /&gt;
| Start car&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3 &lt;br /&gt;
| 0x503   &lt;br /&gt;
| Stop car&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 0x101   &lt;br /&gt;
| Broadcast request revision&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 0x102  &lt;br /&gt;
| Broadcast Set time&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 0x103  &lt;br /&gt;
| Request TX count (broadcast)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 0x104   &lt;br /&gt;
| Request RX count (broadcast)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 0x105   &lt;br /&gt;
| Send TX count (LCD)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| 0x106  &lt;br /&gt;
| Send RX count (LCD)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| 0x107  &lt;br /&gt;
| All controllers initialize&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Communication (Bluetooth Bridge/Android App) Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Number  &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Purpose &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Data layout &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1    &lt;br /&gt;
| 0x301  &lt;br /&gt;
| Broadcast Start command&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x302  &lt;br /&gt;
| Broadcast Stop command&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3  &lt;br /&gt;
| 0x303  &lt;br /&gt;
| Broadcast GPS destination set by Android &lt;br /&gt;
|byte [0-3] : (float), Longitude &lt;br /&gt;
byte [4-7] : (float), Latitude &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Sensor Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Number  &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Purpose &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Data layout &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1    &lt;br /&gt;
| 0x501  &lt;br /&gt;
| Broadcast front sensors values&lt;br /&gt;
| byte[0]: Right ultrasonic sensor value in inches&lt;br /&gt;
byte[1]: Front ultrasonic sensor value in inches&lt;br /&gt;
   &lt;br /&gt;
byte[2]: Left ultrasonic sensor value in inches&lt;br /&gt;
   &lt;br /&gt;
byte[3]: Front bottom infrared sensor value in inches&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x502  &lt;br /&gt;
| Broadcast back infrared sensor value&lt;br /&gt;
| byte[0]: Back infrared sensor value in inches&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3  &lt;br /&gt;
| 0x503  &lt;br /&gt;
| Broadcast battery sensor value &lt;br /&gt;
|byte[0]: current/voltage sensor value in percentage&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4  &lt;br /&gt;
| 0x504  &lt;br /&gt;
| Broadcast light sensor value	&lt;br /&gt;
|byte[0]: light sensor value as integer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5  &lt;br /&gt;
| 0x505  &lt;br /&gt;
| Broadcast tilt sensor value &lt;br /&gt;
|byte[0]: X-Axis tilt sensor value as integer&lt;br /&gt;
byte[1]: Y-Axis tilt sensor value as integer&lt;br /&gt;
&lt;br /&gt;
byte[2]: Z-Axis tilt sensor value as integer&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Motor/Servo Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Send Code&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Data &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1    &lt;br /&gt;
| 0x201    &lt;br /&gt;
| Heartbeat data     &lt;br /&gt;
| Controller id 1 byte&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x201    &lt;br /&gt;
| Heartbeat data&lt;br /&gt;
| Controller id 1 byte&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 0x201    &lt;br /&gt;
| Heartbeat data&lt;br /&gt;
| Controller id 1 byte&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 0x202&lt;br /&gt;
| Mem info data&lt;br /&gt;
| Sys-mem remaining 4bytes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 0x501&lt;br /&gt;
| RPM data send&lt;br /&gt;
| RPM (2 bytes)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 0x502&lt;br /&gt;
| Speed data send&lt;br /&gt;
| Speed (2bytes)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receive Code&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Response&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1 &lt;br /&gt;
| 0x300    &lt;br /&gt;
| Kill               &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x301    &lt;br /&gt;
| Stop               &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 0x302    &lt;br /&gt;
| Straight           &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 0x307    &lt;br /&gt;
| move forward 25%   &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 0x30C    &lt;br /&gt;
| move forward 50%   &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 0x311    &lt;br /&gt;
| move forward 75%   &lt;br /&gt;
| Receive only &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 0x315    &lt;br /&gt;
| move forward 100%  &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 0x31A    &lt;br /&gt;
| move backward 25%  &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| 0x31F    &lt;br /&gt;
| move backward 50%  &lt;br /&gt;
| Receive only &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| 0x324    &lt;br /&gt;
| move backward 75%  &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| 0x329    &lt;br /&gt;
| move backward 100% &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| 0x334    &lt;br /&gt;
| Steer right 25%    &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 13&lt;br /&gt;
| 0x339    &lt;br /&gt;
| Steer right 50%    &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 14&lt;br /&gt;
| 0x33E    &lt;br /&gt;
| Steer right 75%    &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 15&lt;br /&gt;
| 0x343    &lt;br /&gt;
| Steer right 100%   &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 16&lt;br /&gt;
| 0x348    &lt;br /&gt;
| Steer Left 25%     &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 17&lt;br /&gt;
| 0x34D    &lt;br /&gt;
| Steer left 50%     &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 18&lt;br /&gt;
| 0x352    &lt;br /&gt;
| Steer left 75%     &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 19&lt;br /&gt;
| 0x357    &lt;br /&gt;
| Steer left 100%    &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Io Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Number  &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Purpose &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Destination&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1    &lt;br /&gt;
| 0x301  &lt;br /&gt;
| Start command for car&lt;br /&gt;
| Central Controller&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x302 &lt;br /&gt;
| Stop command for car&lt;br /&gt;
| Central Controller&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3  &lt;br /&gt;
| 0x303  &lt;br /&gt;
| Go to a predefined Destination.  &lt;br /&gt;
| Central Controller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
=== Sensors ===&lt;br /&gt;
The first challenge was the positioning and spacing between the sensors. The sensors were mounted on a 3D printed bracket for initial testing but the angle between the brackets seemed to cause interference and was not giving optimum values. The sensors were then individually mounted further apart to reduce interference. The detection distance was tweaked by trial and error and finally settled on the value of 36 inches for the front, left and right sensors and  7 inches for the back sensor.&lt;br /&gt;
&lt;br /&gt;
The second challenge was dealing with erroneous values. Using ADC to interface sensors lead to certain erroneous values that didn't have the desired effect and after some testing, the sensor interface was changed to pulse width. This lead to more robust values after filtering.&lt;br /&gt;
&lt;br /&gt;
Another challenge was the initial skewed alignment. It was difficult to detect whether the direction of the running car was changing because of the motor response to sensor values or the alignment of the tires. The group eventually decided to get a new car that rectified the alignment issue.&lt;br /&gt;
&lt;br /&gt;
=== Sensors Configuration and Implementation ===&lt;br /&gt;
We used LV-MaxSonar series MB1010 high performance ultrasonic sensors  for our application. The sensors detects objects from 6 inch to 254 inches and can be interfaced to ADC or pulse width output. We found the ADC values were inconsistent and due to the constraint of number of ADC pins on SJONE board , we used PWM  to configure the sensors.&lt;br /&gt;
We mounted three sensors in front of the car and we found the values were not consistent as it was reflected from the ground, hence we elevated the sensor placement.&lt;br /&gt;
The sensor configuration is explained&lt;br /&gt;
[[File:CMPE243_F14_Group5_ultrasonic.png|200px|centre|thumb|Ultra SonicSensor]]&lt;br /&gt;
&lt;br /&gt;
===Motor Controller ===&lt;br /&gt;
&lt;br /&gt;
====Issue 1====&lt;br /&gt;
As we were using Electric Speed Control (ESC) to control the speed of motor we faced issues based on inconsistency of the speed. This could have been solved easily if we used H-bridge chip. When ESC was supplied with particular PWM signal it would work at desirable speed but when turning off the ESC and turning on the ESC the speed would change for the same PWM signal supplied. This inconsistency of the speed can easily damaged the motor as it was hard to predict when the motor will switch from forward to backward motion. So to fix this issue we had to connect the ESC to oscilloscope and turn on the transmitter. As soon as the transmitter is turned on the transmitter send a fix signal to ESC for some time that could have been in milli seconds. By doing this the ESC get initialized and once the ESC has initialized the transmitter can send a signal to go forward or reverse.&lt;br /&gt;
&lt;br /&gt;
So we wrote a code to initialize the ESC. Before we sends the signal to ESC to move forward or reverse we send a fix PWM signal to ESC for one second to initialize ESC and this signal was sent from the main function.&lt;br /&gt;
&lt;br /&gt;
====Issue 2====&lt;br /&gt;
The servo that came with the RC car wasn't fast enough to respond to left and right movement of the car. Car would hit the obstacle and than the wheel would rotate in opposite direction. So we change the servo with faster response time. &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;|Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Test Case&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Test Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Result&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|1||Initial CAN communication of all controllers ||Check if all the controllers are broadcasting the periodic message on CAN bus and receiving the data ||All controllers '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|2||Obstacle avoidance|| Obstacle  by integrating the ultrasonic sensor||Obstacle avoidance '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|3||LCD display || Displying all the values including CPU Utilization, CAN message count, and message from the controllers ||LCD display of all message '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|4||Building Android application ||Check if the Android application sends the destination by Bluetooth||Communication '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|5||Point to Point movement || Test Car runs by setting two way points||Point to point car movement '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|6||Checking if Car runs with multiple way points ||Check if the car works with multiple way points||Multiple way points steering  '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Challenges and Learning ==&lt;br /&gt;
&lt;br /&gt;
== Future Enhancement ==&lt;br /&gt;
=== Sensors ===&lt;br /&gt;
It would be ideal to add another infrared sensor to the front lower portion of the car for cliff detection. It would also be good to have a bigger 3D printed bracket to mount the sensors that match our measurements requirements. This would add to the visual appeal and also reduce tangling mess due to the wires.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Video ==&lt;br /&gt;
&lt;br /&gt;
== Project Source Code ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
# Preetpal Kang, Lecture notes of CMPE 243, Computer Engineering, Charles W. Davidson College of Engineering, San Jose State University, Aug-Dec 2014.&lt;br /&gt;
# en.wikipedia.org/&lt;br /&gt;
# MaxBotix 2012, http://www.maxbotix.com/articles/031.htm&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=File:CmpE243_F14_T5_LCDScreenDesign.png&amp;diff=11469</id>
		<title>File:CmpE243 F14 T5 LCDScreenDesign.png</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=File:CmpE243_F14_T5_LCDScreenDesign.png&amp;diff=11469"/>
				<updated>2014-12-23T01:19:45Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=File:CmpE243_F14_T5_LCDScreenDesign.jpg&amp;diff=11466</id>
		<title>File:CmpE243 F14 T5 LCDScreenDesign.jpg</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=File:CmpE243_F14_T5_LCDScreenDesign.jpg&amp;diff=11466"/>
				<updated>2014-12-23T01:15:27Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F14:_Team5-Self_Driving_Car_-_AUG&amp;diff=11406</id>
		<title>F14: Team5-Self Driving Car - AUG</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F14:_Team5-Self_Driving_Car_-_AUG&amp;diff=11406"/>
				<updated>2014-12-22T19:55:00Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Self Driving Car ==&lt;br /&gt;
&lt;br /&gt;
== Objective and Scope ==&lt;br /&gt;
&lt;br /&gt;
This project is aimed at creating a self-driving car with obstacles avoidance and to steer to the gps location pointed by the android application with  the help of multiple controllers communicating using CAN bus.CAN(Control Area Network) is a communication protocol used widely in automotive application developed by BOSCH in 1986. The self-driving car consists of 6 different controllers for '''GPS''','''Sensor''','''Central''','''Motor''','''IO''' and '''Communication'''. The controllers communicate to other controller by CAN bus.We have implemented broadcast algorithm to broadcast all the data from each controller in different frequencies. The controller parses the data using the 29 bit identifier which has destination and source address.&lt;br /&gt;
&lt;br /&gt;
[[File:CmpE244_F14_SelfDrivingCarT5_basic_can_updated.JPG|700px|thumb|center|Fig 2. Build in Progress]]&lt;br /&gt;
&lt;br /&gt;
== Team Members &amp;amp; Responsibilities ==&lt;br /&gt;
#  Sensor Controller (2 Members) - [Bailey Wu, Rishabh Sareen, Rishab.H]&lt;br /&gt;
#  Motor Controller (2 Members) - [Abraham Ruiz, Sree Harsha, Arpit Amin]&lt;br /&gt;
#  I/O Unit (2 Members) - [Yoni Klein, Tejeswar]&lt;br /&gt;
#  Communication Bridge + Android (3 Members) - [Shaw Ken Chang, Arnold Bajet Jr., Thomas Pantels]&lt;br /&gt;
#  Geographical Controller (3 Members) - [Himanshu Saini, Divya Kamath]&lt;br /&gt;
#  Master Controller (3 Members) - [Akash Ayare, Sree Harsha, Karthik Vadiraja]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Geographical Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 1-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Order Components and Make a schedule&lt;br /&gt;
| Completed&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 8-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Decide commands that Geographical Controller will support&lt;br /&gt;
| Completed&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 7-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Complete CAN RX task and subscription handling. Verify communication with other controllers&lt;br /&gt;
| Completed&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| Interface GPS module and Compass and develop drivers if needed&lt;br /&gt;
| Completed&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| 30-Oct-2014&lt;br /&gt;
| Design and develop algorithm to calculate heading and bearing from GPS coordinates&lt;br /&gt;
| Completed. &lt;br /&gt;
| 30-Oct-2014 &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| 5-Nov-2014&lt;br /&gt;
| Work on calibration of compass and heading calculation&lt;br /&gt;
| Completed&lt;br /&gt;
| 11-Dec-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 1-Nov-2014&lt;br /&gt;
| 10-Nov-2014&lt;br /&gt;
| Test with the central and Bluetooth controller &lt;br /&gt;
| Completed&lt;br /&gt;
| 14-Dec-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 10-Nov-2014&lt;br /&gt;
| 25-Nov-2014&lt;br /&gt;
| Begin testing with fully assembled car &lt;br /&gt;
| Completed&lt;br /&gt;
| 1-Dec-2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| 25-Nov-2014&lt;br /&gt;
| 10-Dec-2014&lt;br /&gt;
| Final Testing and changes as needed &lt;br /&gt;
| Completed&lt;br /&gt;
| 19-Dec-2014&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sensor Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/3/2014&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|Order ultrasonic sensor parts and develop simple test code for the sensors&lt;br /&gt;
|Done&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Wire the ultrasonic sensors, develop and implement the sensors using analog to digital converter&lt;br /&gt;
|Done&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|Collaborate with the other sub teams to finish the CAN bus communication and allow the self driving car to drive autonomously &lt;br /&gt;
|Done&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|-&lt;br /&gt;
|! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|11/1/2014&lt;br /&gt;
|Develop, implement and test the ultrasonic sensors using the pulse width modulation and universal asynchronous receiver/transmitter&lt;br /&gt;
|Done&lt;br /&gt;
|11/1/2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|11/2/2014&lt;br /&gt;
|11/9/2014&lt;br /&gt;
|Develop, implement and test the front and back infrared sensors using analog to digital converter&lt;br /&gt;
|Done&lt;br /&gt;
|11/9/2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|11/10/2014&lt;br /&gt;
|11/17/2014&lt;br /&gt;
|Develop, implement and test the current/voltage sensor for the battery packs of the self driving car using I2C&lt;br /&gt;
|Scheduled&lt;br /&gt;
|Removed&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
|11/18/2014&lt;br /&gt;
|11/25/2014&lt;br /&gt;
|Collaborate with the other sub teams to make sure that the sensors are in working condition&lt;br /&gt;
|Done&lt;br /&gt;
|11/25/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
|11/26/2014&lt;br /&gt;
|12/5/2014&lt;br /&gt;
|Collaborate with the other sub teams to debug any problems that may encountered&lt;br /&gt;
|Done&lt;br /&gt;
|12/5/2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
|12/6/2014&lt;br /&gt;
|12/13/2014&lt;br /&gt;
|Prepare for demo&lt;br /&gt;
|Done&lt;br /&gt;
|12/19/2014&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''IO Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/14/2014&lt;br /&gt;
|Research and order LCD appropriate for this project&lt;br /&gt;
|Done&lt;br /&gt;
|10/11/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Implement CAN RX/Subscription task&lt;br /&gt;
|Done&lt;br /&gt;
|10/13/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Finalize Task Architecture&lt;br /&gt;
|Done&lt;br /&gt;
|11/1/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|10/18/2014&lt;br /&gt;
|10/21/2014&lt;br /&gt;
|Interface and test LCD&lt;br /&gt;
|Done&lt;br /&gt;
|10/20/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|10/21/2014&lt;br /&gt;
|10/28/2014&lt;br /&gt;
|Implement auto scrolling feature&lt;br /&gt;
|Done&lt;br /&gt;
|11/18/2014&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Communication Bridge + Android'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 16-Sep-2014&lt;br /&gt;
| 23-Sep-2014&lt;br /&gt;
| Test bluetooth module using computer serial port and an android app(simple bluetooth terminal app downloaded from google play).  Test the real life range and stability of the bluetooth module (HC-06).  Modify the bluetooth chat example to work with the bluetooth module.    &lt;br /&gt;
| Done&lt;br /&gt;
| 20-Sep-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 28-Sep-2014&lt;br /&gt;
| 12-Oct-2014&lt;br /&gt;
| Draw UI design layouts for a basic android application that can view Google map as well as send GPS data through bluetooth by clicking on the map. Study google maps API and make a simple app that will post a short toast that shows the GPS location after a long press event. &lt;br /&gt;
| Done&lt;br /&gt;
| 12-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 7-Oct-2014&lt;br /&gt;
| 11-Oct-2014&lt;br /&gt;
| Interface bluetooth module with SJSUOne board and able to verify that the connection is stable and that transaction via the bluetooth is accurate.  This is done by adding a test button where if you press the button it send a command to the board.  After receiving the command, the board should react with a response (LED light and/or text response to the android phone)&lt;br /&gt;
| Done&lt;br /&gt;
| 19-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 11-Oct-2014&lt;br /&gt;
| 19-Oct-2014&lt;br /&gt;
|Integrate Google Maps and Bluetooth component together in Android app.  After a long press on the map, the user should be prompted to start the car and set the location as the places the user selected.  Add a textView to display the location selected by pressing on the map.  Add a button for sending location to the car.  &lt;br /&gt;
| Done&lt;br /&gt;
| 27-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 19-Oct-2014&lt;br /&gt;
| 26-Oct-2014&lt;br /&gt;
| CAN infrastructure implmentation:  Use our team's common CAN infrasturcture code and modify it specifically for our controller.  First created the CAN communication table and then modify the infracturacture code to implement the broacasting as well as filtering of neccessary data.  This only focuses on broadcasting a stop/start command and the destination GPS data (set by android) as well as getting car's current location data from the geological controller.&lt;br /&gt;
|Done&lt;br /&gt;
| 07-Nov-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 26-Oct-2014&lt;br /&gt;
| 1-Nov-2014&lt;br /&gt;
| Test and implement car information reading as well as other functions of Android app&lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 2-Nov-2014&lt;br /&gt;
| 4-Nov-2014&lt;br /&gt;
| Iterate UI design&lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 5-Nov-2014&lt;br /&gt;
| 16-Nov-2014&lt;br /&gt;
| Implement 2nd UI design&lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Motor Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/1/2014&lt;br /&gt;
|10/8/2014&lt;br /&gt;
|PWM2 (used to control motors) and PWM3 (used to control servo) interface with the car servo and motor. Write a test code to operate the servo and motor from the terminal command.&lt;br /&gt;
|Completed and Tested&lt;br /&gt;
|10/11/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
|10/9/2014&lt;br /&gt;
|10/18/2014&lt;br /&gt;
|Design and code CAN receive task for subscription. Check for basic CAN message commands for throttle and steer control.&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|10/26/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|10/19/2014&lt;br /&gt;
|10/28/2014&lt;br /&gt;
|Design the CAN message table for motor control and servo control&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|10/26/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|10/29/2014&lt;br /&gt;
|11/07/2014&lt;br /&gt;
|Design acceleration Vs steer control function for smooth run. Check for other factors involved.&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|11/22/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|11/08/2014&lt;br /&gt;
|11/14/2014&lt;br /&gt;
|Research on RPM sensor. Interface the RPM sensor to calculate the Speed. Test the RPM sensor by running the car at different speed&lt;br /&gt;
|Completed and tested with a hall sensor&lt;br /&gt;
|11/22/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|11/15/2014&lt;br /&gt;
|11/21/2014&lt;br /&gt;
|Fine tune motor control code and integrate with all the controllers for proper working.&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|11/22/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
|11/22/2014&lt;br /&gt;
|11/28/2014&lt;br /&gt;
|Test and check if more features can be added to improve performance. Completed and tested&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|11/28/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
|11/29/2014&lt;br /&gt;
|12/05/2014&lt;br /&gt;
|Testing and Debugging.&lt;br /&gt;
|Completed and tested&lt;br /&gt;
|12/05/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
!scope=&amp;quot;row&amp;quot;|9&lt;br /&gt;
|12/06/2014&lt;br /&gt;
|12/18/2014&lt;br /&gt;
|Final Testing and getting the car ready for Demo.&lt;br /&gt;
|On Going&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
'''Central Controller'''&lt;br /&gt;
 &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 16-Sep-2014&lt;br /&gt;
| 23-Sep-2014&lt;br /&gt;
| Develop API for CAN bus communication.&lt;br /&gt;
| Done&lt;br /&gt;
| 23-Sep-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 11-Oct-2014&lt;br /&gt;
| 15-Oct-2014&lt;br /&gt;
| Develop communication table for all controllers.&lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 15-Oct-2014&lt;br /&gt;
| 20-Oct-2014&lt;br /&gt;
| Broadcast message and target message setup.  &lt;br /&gt;
| Done&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
| Co-ordinate all controllers and take major decisions. &lt;br /&gt;
| Done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| Complete Building and fine-tuning of RC car. &lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| Develop coordination mechanism to ensure controllers are initialized and ready &lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
| Develop kill switch &lt;br /&gt;
| Done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
| Build external power distribution circuit&lt;br /&gt;
| Done&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
| 04-Nov-2014&lt;br /&gt;
| Coordination algorithm between steering and throttle for smooth turns &lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| 04-Nov-2014&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| Collision avoidance algorithms &lt;br /&gt;
| Done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| 04-Nov-2014&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| Intermediate unit and functional tests&lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| 25-Nov-2014&lt;br /&gt;
| Functional tests and algorithm adjustments &lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 13&lt;br /&gt;
| 25-Nov-2014&lt;br /&gt;
| 02-Dec-2014&lt;br /&gt;
| Fine tuning and stretch goals (headlights, parallel parking, etc.)&lt;br /&gt;
| Done&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 14&lt;br /&gt;
| 02-Dec-2014&lt;br /&gt;
| 09-Dec-2014&lt;br /&gt;
| Prepare for demo&lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Description&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Qty&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Price&lt;br /&gt;
|-&lt;br /&gt;
| LV-MaxSonar-EZ1 High Performance Ultrasonic Rangefinder&lt;br /&gt;
| 2&lt;br /&gt;
| 49.90&lt;br /&gt;
|-&lt;br /&gt;
| Analog Distance Sensor &lt;br /&gt;
| 1&lt;br /&gt;
| Free&lt;br /&gt;
|-&lt;br /&gt;
|1/10 Scale 4x4 Truck with Brushed Motor	&lt;br /&gt;
|1&lt;br /&gt;
|217.33&lt;br /&gt;
|-&lt;br /&gt;
|2 ft 12-Gauge Power Cables&lt;br /&gt;
|3	&lt;br /&gt;
|22.80	&lt;br /&gt;
|-&lt;br /&gt;
|Pair Power Socket	&lt;br /&gt;
|2&lt;br /&gt;
|2.16&lt;br /&gt;
|-	&lt;br /&gt;
|Standard Size Body Clips	&lt;br /&gt;
|12	&lt;br /&gt;
|2.16&lt;br /&gt;
|-&lt;br /&gt;
|4-pack AA Batteries&lt;br /&gt;
|1	&lt;br /&gt;
|3.45	&lt;br /&gt;
|-&lt;br /&gt;
|50-pack M3x15mm Stand-Off Spacer Female-Male&lt;br /&gt;
|1&lt;br /&gt;
|11.19&lt;br /&gt;
|-	&lt;br /&gt;
|100-pack 18-8 Flat Steel Washer	&lt;br /&gt;
|1	&lt;br /&gt;
|2.54&lt;br /&gt;
|-	&lt;br /&gt;
|100-pack M3x20mm Hex-Drive Screw&lt;br /&gt;
|1&lt;br /&gt;
|6.47	&lt;br /&gt;
|-&lt;br /&gt;
|100-pack M3 Steel Hex Nut&lt;br /&gt;
|1&lt;br /&gt;
|4.66&lt;br /&gt;
|-&lt;br /&gt;
|2-pin JST Connector Right Angle&lt;br /&gt;
|10&lt;br /&gt;
|6.84&lt;br /&gt;
|-&lt;br /&gt;
|4-pin JST Connector Right Angle&lt;br /&gt;
|10&lt;br /&gt;
|6.84&lt;br /&gt;
|-&lt;br /&gt;
|2-pin Female JST Cable (20 cm)&lt;br /&gt;
|10&lt;br /&gt;
|7.39&lt;br /&gt;
|-&lt;br /&gt;
|4-pin Female JST Cable (20 cm)&lt;br /&gt;
|10&lt;br /&gt;
|7.39&lt;br /&gt;
|-&lt;br /&gt;
|5 Volt Relay Breakout Board&lt;br /&gt;
|1&lt;br /&gt;
|4.95&lt;br /&gt;
|-&lt;br /&gt;
|5 Volt Voltage Regulator&lt;br /&gt;
|1&lt;br /&gt;
|1.07&lt;br /&gt;
|-&lt;br /&gt;
|Sharp Analog Distance Sensor 4-30 cm&lt;br /&gt;
|1&lt;br /&gt;
|9.95&lt;br /&gt;
|-&lt;br /&gt;
|3-pin Female JST PH-Style Cable (30 cm)&lt;br /&gt;
|1&lt;br /&gt;
|0.92&lt;br /&gt;
|-&lt;br /&gt;
|Double Sided Mounting Tape - 3 feet	&lt;br /&gt;
|1&lt;br /&gt;
|4.35&lt;br /&gt;
|-&lt;br /&gt;
|AC Adapter (LiPo Charger)&lt;br /&gt;
|1&lt;br /&gt;
|15.16&lt;br /&gt;
|-&lt;br /&gt;
|IEC Power Cable (LiPo Charger)&lt;br /&gt;
|1&lt;br /&gt;
|5.38&lt;br /&gt;
|-&lt;br /&gt;
|4mm Bullet Plugs to Universal Plug&lt;br /&gt;
|1&lt;br /&gt;
|13.38&lt;br /&gt;
|-&lt;br /&gt;
|Acrylic sheet + Sharpe mini&lt;br /&gt;
|1+1&lt;br /&gt;
|11.72&lt;br /&gt;
|-&lt;br /&gt;
|Molex Pin Header, Connector, wires and 100 zip ties&lt;br /&gt;
|10+4+1&lt;br /&gt;
|17.13&lt;br /&gt;
|-&lt;br /&gt;
|2 x 90 degree pin header, 2 x straight pin header&lt;br /&gt;
|2+2&lt;br /&gt;
|3.65&lt;br /&gt;
|-&lt;br /&gt;
|uni-polar hall sensor for tachometer feedback&lt;br /&gt;
|2&lt;br /&gt;
|2.18&lt;br /&gt;
|-&lt;br /&gt;
|Heavy Duty magnets&lt;br /&gt;
|2&lt;br /&gt;
|4.18&lt;br /&gt;
|-&lt;br /&gt;
|INA219 Voltage sensors 26V +/-3.2A&lt;br /&gt;
|2&lt;br /&gt;
|19.9&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|20x4 Serial LCD Module&lt;br /&gt;
|1&lt;br /&gt;
|29.99&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Backup Parts &amp;amp; cost ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Qty&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Description&lt;br /&gt;
! width=&amp;quot;110&amp;quot; align=&amp;quot;center&amp;quot;|Manufacturer&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Part Number&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Total Cost&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| LV-MaxSonar-EZ1 High Performance Ultrasonic Rangefinder&lt;br /&gt;
| MaxBotix Inc&lt;br /&gt;
| MB1010&lt;br /&gt;
| Free&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Analog Distance Sensor &lt;br /&gt;
| Sharp&lt;br /&gt;
|&lt;br /&gt;
| Free&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
[[File:CmpE243_F14_Team5_OverallHWDesign.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Motor Controller ==&lt;br /&gt;
&lt;br /&gt;
==== Summary ====&lt;br /&gt;
This module takes command input from central controller and steers the car to its destination; in addition, It has two main controlling parameters : Throttle and Steering. Throttle input moves the car forward and backward. Steer input turns the wheel left and right. The central controller takes feedback from the sensors and makes decision to move the car. Accordingly, it sends CAN commands accepted by the motor controller for navigation, and real time RPM signal to the controller.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Motor and Steer control : Technical Information&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Sl.No&lt;br /&gt;
! width=&amp;quot;90&amp;quot; align=&amp;quot;center&amp;quot;|Controller&lt;br /&gt;
! width=&amp;quot;90&amp;quot; align=&amp;quot;center&amp;quot;|Signal Type&lt;br /&gt;
! width=&amp;quot;90&amp;quot; align=&amp;quot;center&amp;quot;|Frequency&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Functionality&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1&lt;br /&gt;
| Motor Control&lt;br /&gt;
| PWM signal&lt;br /&gt;
| 50 Hz (20000us)&lt;br /&gt;
| 1000us (Full throttle forward) - 1500us (Stop)   - 2000us (Full throttle backward)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|2    &lt;br /&gt;
| Steer Control&lt;br /&gt;
| PWM signal &lt;br /&gt;
| 50 Hz (20000us)&lt;br /&gt;
|1000us (Turn left max)         - 1500us (Center) - 2000us (Turn right max)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Working =====&lt;br /&gt;
The car initially accepts the start command to begin navigation. Commands can then come to move the car forward or backward, steer left or right depending on intelligent decisions made by the central controller. The motor control has intelligence to avoid jerks and ensure smoother transitions between commands. The central controller gets the data from the sensors for obstacle avoidance. The car has a communication controller which gets the '''GPS''' data from the android application, the android application sets the destination latitude and longitude. The car decides the heading direction by the gps points and the compass and if it finds obstacle it will be controlled by the obstetrical avoidance and steer to the destination according to the algorithm below.&lt;br /&gt;
===== Flow Chart =====&lt;br /&gt;
&lt;br /&gt;
[[File:Cmpe243_F14_T5_motor_controller_flowchart1.png]]&lt;br /&gt;
&lt;br /&gt;
===== Kill switch =====&lt;br /&gt;
The remote control and receiver module pair up to provide a signal coverage of more than 100 meters. We make use of this to design our kill switch. When a constant PWM signal of 1000us is received from the remote, the car is in 'ARMED' state and moves the car according to CAN commands. The user has to hold the trigger gun for this state constantly and the car moves.&lt;br /&gt;
When the user releases the trigger gun, the car stops receiving the PWM signal of 1000us and the car goes to 'DISARMED' state.&lt;br /&gt;
In short, pull the trigger gun - ARMED, release the trigger gun - DISARMED.&lt;br /&gt;
&lt;br /&gt;
===== RPM =====&lt;br /&gt;
The RPM sensor is based on a hall sensor switch which detect the North and South pole of a magnet located in the main shaft in the car. The hall sensor part number is 3177, and it has three pin. This sensor is uni-polar which give an output high signal when the sensor captures the North pole of the magnet; subsequently, the sensor give output low signal when the sensor captures the South pole of the magnet. Therefore, by using a the 3177 and a magnet in the shaft. the SJOne board can capture the output signal from the hall sensor as it toggles per shaft revolution. &lt;br /&gt;
It is important to notice that the output signal of the 3177 is an open collector; therefore, we need a  10 Kohm resistor connected to Vcc.&lt;br /&gt;
&lt;br /&gt;
===== Pinout Table =====&lt;br /&gt;
&lt;br /&gt;
The following table shows the pinout of all component that are connected to SJONE board.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Component Pin&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Output Pin Source&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1 &lt;br /&gt;
|Hall Sensor (3177) Vcc ( 4.5 V to 18 V)&lt;br /&gt;
|Source&lt;br /&gt;
|SJOne P1_22&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|2 &lt;br /&gt;
|Hall Sensor (3177) Ground&lt;br /&gt;
|Ground&lt;br /&gt;
|SJOne&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|3&lt;br /&gt;
|Hall Sensor (3177) Output&lt;br /&gt;
|Output&lt;br /&gt;
|SJOne P1_22 with a 10 KOhm&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|4&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 1 TX&lt;br /&gt;
|SJOne P0_1(Tx)&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|5&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 2 GND&lt;br /&gt;
|SJOne GND&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|6&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 3 VCC&lt;br /&gt;
|SJOne 3.3v&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|7&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 4 RX&lt;br /&gt;
|SJOne P0_0(Rx)&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|8&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 6 CANL&lt;br /&gt;
|CAN Bus&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|10&lt;br /&gt;
|CAN Transceiver&lt;br /&gt;
|Pin # 7 CANH&lt;br /&gt;
|CAN Bus&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|11&lt;br /&gt;
|Servo&lt;br /&gt;
|VCC&lt;br /&gt;
|5V Power Rail&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|12&lt;br /&gt;
|Servo&lt;br /&gt;
|GND&lt;br /&gt;
|GND Power Rail&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|13&lt;br /&gt;
|Servo&lt;br /&gt;
|Signal&lt;br /&gt;
|PWM 2.1&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|14&lt;br /&gt;
|Electric Speed Control (ESC)&lt;br /&gt;
|VCC&lt;br /&gt;
|5V Power rail&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|15&lt;br /&gt;
|Electric Speed Control (ESC)&lt;br /&gt;
|GND&lt;br /&gt;
|GND Power Rail&lt;br /&gt;
|-&lt;br /&gt;
!scope =&amp;quot;row&amp;quot;|16&lt;br /&gt;
|Electric Speed Control (ESC)&lt;br /&gt;
|Signal&lt;br /&gt;
|PWM 2.2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Block Diagram =====&lt;br /&gt;
The following Block diagram shows an overview of the connection between the SJOne board, ESC, and the Hall sensor:&lt;br /&gt;
&lt;br /&gt;
[[File:Motor Block Diagram 1.jpg|600px|thumb|center|Motor Controller Block Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Sensor Controller ==&lt;br /&gt;
===Using Multiple MaxSonar Sensors===&lt;br /&gt;
&lt;br /&gt;
When using multiple MaxSonar sensors, it is required to configure the sensors in ''Sequential Operation'' mode to obtain the best optimal performance in obstacle detection. On the other hand, if the sensors are left in continuous free run operation, which means the RX pin (Pin 4) are unconnected then at start-up the sensors will range at exactly the same time. Thus, the sensors are not synchronized and eventually result in frequency drifts that would likely cause interference between sensors for most applications.&lt;br /&gt;
&lt;br /&gt;
[[File:CmpE243_F14_T5_SingleSensor.jpg|500px|thumb| center |Fig . Single Sensor in free run operation mode - MaxBotix 2012]]&lt;br /&gt;
&lt;br /&gt;
The figure to the above shows a single MaxSonar ultrasonic sensor operating in continuous free run operation detecting an object at 96 inches. The signal of the ultrasonic sensor observe under the oscilloscope shows that the sensor is operating at its finesse performance without any interference.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The figure to the below shows that multiple MaxSonar ultrasonic sensors are operating in continuous free run operation. As you can see, the signal of a ultrasonic sensor observe under the oscilloscope shows that the signal has multiple spikes due to the interference of other sensors. Thus, the sensor becomes unsynchronized and the range reading become unstable. &lt;br /&gt;
&lt;br /&gt;
[[File:CmpE243_F14_T5_MultipleSensorsInterferences.jpg‎|500px|thumb| center |Fig . Multiple Sensors in free run operation mode - MaxBotix 2012]]&lt;br /&gt;
&lt;br /&gt;
To achieve the most optimal performance using multiple MaxSonar ultrasonic sensors, the figure below shows the implementation of all the sensors operating in sequential mode. The sensors can be started by pulling the RX pin (Pin 4) high for at least 20 uS and then for each reading this can be done as often as every 50 ms. This method would toggle each sensor when the user like to obtain an reading at any given moment. Thus, there will be no interference between each sensor. &lt;br /&gt;
&lt;br /&gt;
[[File:CmpE243_F14_T5_MultipleSensorsConfiguration.jpg‎ |500px|thumb| center |Fig . Multiple Sensors Configuration]]&lt;br /&gt;
&lt;br /&gt;
There are many other method to implement multiple MaxSonar ultrasonic sensors in a single system. This information can be obtained in the sensor datasheet.&lt;br /&gt;
&lt;br /&gt;
== Central Controller ==&lt;br /&gt;
&lt;br /&gt;
The central controller is the brain of the car. It receives information from all the other controllers and decides which direction the car must move. The central controller periodically sends commands to the motor regarding the throttle, steering, steering angle and speed.&lt;br /&gt;
&lt;br /&gt;
In order to decide which direction to move, the central controller uses sensor data and geographical data. The current design uses a state machine. The car is initially in idle state. When it received a START command from the communication controller, the central sends the start motor command to the motor controller. After the start state, the central controller can be in one of the two states: avoid obstacle or adjust heading. The central controller uses the sensor data to detect obstacle. If there are no obstacles, then the central controller uses geographical information to adjust car heading. &lt;br /&gt;
&lt;br /&gt;
Once the heading and bearing match, the car moves straight ahead till the destination is reached. When the geographical controller sends a command indicating that the car has reached the destination, the car will stop.&lt;br /&gt;
&lt;br /&gt;
At any point during its course, if the car receives a STOP command from the communication controller, the car will stop&lt;br /&gt;
&lt;br /&gt;
[[File:Cmpe243F14_Team5_Central_StateTransition.JPG|700px|thumb|center|Fig. Central Controller State Diagram]]&lt;br /&gt;
&lt;br /&gt;
== Geographical Controller ==&lt;br /&gt;
&lt;br /&gt;
The geographical controller is one of the six controllers mounted on the car. This controller provides the location and heading information to the central controller of the car. It also stores the destination (way-points). By calculating the distance from the current location to the destination or intermediate waypoint, the geo controller can determine if the car has reached its destination. When the car reaches the destination, the geo controller sends a message to the central controller indicating that destination has been reached. &lt;br /&gt;
&lt;br /&gt;
The devices connected to this controller are:&lt;br /&gt;
1. Magnetometer (digital compass)&lt;br /&gt;
2. GPS Logger&lt;br /&gt;
&lt;br /&gt;
The compass communicates via I2C and the GPS via UART.&lt;br /&gt;
&lt;br /&gt;
==== Parts Used ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Geographical Control - Parts Used&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;center&amp;quot;|Part Number&lt;br /&gt;
! align=&amp;quot;center&amp;quot;|Purpose&lt;br /&gt;
|-&lt;br /&gt;
| SparkFun Triple Axis Magnetometer Breakout - HMC5883L&lt;br /&gt;
| Compass&lt;br /&gt;
|-&lt;br /&gt;
| SparkFun Venus GPS Logger - SMA Connector&lt;br /&gt;
| GPS &lt;br /&gt;
|-&lt;br /&gt;
| Antenna GPS Embedded SMA - GPS-00177&lt;br /&gt;
| Antenna&lt;br /&gt;
|-&lt;br /&gt;
| ET-318 GPS Engine Board&lt;br /&gt;
| GPS&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Design ====&lt;br /&gt;
&lt;br /&gt;
Heading - The compass provides the heading. The heading is the direction in which the car is headed. The value is typically an angle from 0-360 degrees measured clockwise from North.&lt;br /&gt;
&lt;br /&gt;
GPS Module - The GPS module provides the time, latitude, longitude, direction and if the GPS data is valid. This latitude, longitude corresponds to the current location of the car.&lt;br /&gt;
&lt;br /&gt;
Destination - The destination is set by Android application/communication controller. The destination could be a single point or a list of waypoints, each being a latitude, longitude pair.&lt;br /&gt;
&lt;br /&gt;
Bearing - Using the destination lat,lon pair (set by the communication controller) and the current lat, lon pair (received from the GPS module), the geographical controller calculates the bearing. This angle, like the heading, is also typically between 0-360 degrees measured clockwise. Bearing represents the angle between the destination and current location. &lt;br /&gt;
&lt;br /&gt;
Both the heading and the bearing are sent periodically to the central controller. The central controller uses this information combined with the sensor data to steer the motors in the right direction.&lt;br /&gt;
&lt;br /&gt;
Example: If the current heading is 10 degrees ( car is travelling in a direction 10 degrees) from north. The bearing is 50 degrees ( the car is at an angle of 50 degrees away from the desired direction), the central controller must steer the car 40 degrees to the right.&lt;br /&gt;
&lt;br /&gt;
The geographical controller also calculates the distance between the current lat, lon and the destination lat, lon. This is used to determine if the car has reached the intended destination. When the car has reached the destination, geographical controller sends a message to the central controller to stop.&lt;br /&gt;
&lt;br /&gt;
==== Tasks ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Geographical Control - Tasks&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;center&amp;quot;|Task Name&lt;br /&gt;
! align=&amp;quot;center&amp;quot;|Purpose&lt;br /&gt;
|-&lt;br /&gt;
| Compass Task&lt;br /&gt;
| Updates the compass heading. Runs every 100ms and obtains compass data over I2C&lt;br /&gt;
|-&lt;br /&gt;
| GPS Task&lt;br /&gt;
| Updates the current latitude and longitude by reading GPS data sent over UART. GPS has been configured to run at 10Hz and sends data at a baud rate of 38400. &lt;br /&gt;
|-&lt;br /&gt;
| CAN Rx Task&lt;br /&gt;
| Handles data received over CAN. Task gets blocked if can receive queue is empty. &lt;br /&gt;
|-&lt;br /&gt;
| CAN Periodic Msg Task &lt;br /&gt;
[1 Hz]&lt;br /&gt;
| Periodic CAN message to send current lat,lon and destination lat, lon to central and display controller&lt;br /&gt;
|-&lt;br /&gt;
| CAN Periodic Msg Task &lt;br /&gt;
[20 Hz]&lt;br /&gt;
| Periodic CAN message to send compass heading and destination bearing to central controller.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== GEO CAN Controller Communication Table ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Geographical Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Number&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Type&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Purpose&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Data layout&lt;br /&gt;
|- &lt;br /&gt;
| 0x0301  &lt;br /&gt;
| Get Geo Data &lt;br /&gt;
| Request for GPS Data (lat,long)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x0302  &lt;br /&gt;
|    &amp;quot;  &lt;br /&gt;
| Request for current compass heading and destination heading&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x0304  &lt;br /&gt;
| &amp;quot; &lt;br /&gt;
| Request Time&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x0601  &lt;br /&gt;
| Response to 0x3xx request&lt;br /&gt;
| GPS Data (lat,long)&lt;br /&gt;
|&lt;br /&gt;
 dword[0] : [32-bit latitude]&lt;br /&gt;
 dword[1] : [32-bit longitude] &lt;br /&gt;
|-&lt;br /&gt;
| 0x0602  &lt;br /&gt;
| &amp;quot;&lt;br /&gt;
| Compass heading and destination bearing&lt;br /&gt;
|&lt;br /&gt;
 dword[0] : [32-bit compass heading]&lt;br /&gt;
 dword[1] : [32-bit destination bearing] &lt;br /&gt;
|-&lt;br /&gt;
| 0x0504  &lt;br /&gt;
| &amp;quot;&lt;br /&gt;
| Time &lt;br /&gt;
| &lt;br /&gt;
 dword[0] : [32-bit time 0x00hhmmss]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0501  &lt;br /&gt;
| Periodic Message&lt;br /&gt;
| GPS data, broadcast periodically  &lt;br /&gt;
|&lt;br /&gt;
 dword[0] : [32-bit longitude]&lt;br /&gt;
 dword[1] : [32-bit latitude]  &lt;br /&gt;
|-&lt;br /&gt;
| 0x0502  &lt;br /&gt;
| &amp;quot;&lt;br /&gt;
| Current and destination heading broadcast periodically  &lt;br /&gt;
|&lt;br /&gt;
 dword[0] : [32-bit compass heading]&lt;br /&gt;
 dword[1] : [32-bit bearing]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== CAN infrastructure for Geo Controller ====&lt;br /&gt;
&lt;br /&gt;
== IO Controller ==&lt;br /&gt;
&lt;br /&gt;
=== Summary ===&lt;br /&gt;
&lt;br /&gt;
The IO controller's purpose is to display useful information on an LCD screen for debugging and verification purposes.  Essentially, it monitors the CAN bus for other controllers' data as well as bus utilization.  The hardware and software design is described below, as well as the challenges we encountered along the way.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
(block diagram of sj one board and lcd + CAN interface)&lt;br /&gt;
&lt;br /&gt;
The hardware design of the IO controller is relatively simple.  The only requirements are the serial LCD module and the controller itself.  The LCD interfaces to the IO controller via UART protocol, while the IO controller interfaces to tater other controllers via CAN Protocol.&lt;br /&gt;
&lt;br /&gt;
The LCD chosen was a serial enabled 20x4 character display from [https://www.sparkfun.com/products/9568 Sparkfun].  It was chosen for it's larger character display (rather than 16x2) and because the serial &amp;quot;backpack was built into the PCB.  This backpack is used because the display controller communicates with a parallel interface. The serial &amp;quot;backpack&amp;quot; or converter interfaces the parallel connections with a serial one and provides a low level API to control the display.  An additional API was designed on top of this one to make programming simple and clear as well as implement some useful features (such as printing with printf style arguments).  It operates on 5V, so it could not be powered by the controller itself and need to use one of the 5V supplies on the car.&lt;br /&gt;
&lt;br /&gt;
=== Software Design ===&lt;br /&gt;
&lt;br /&gt;
==== RX Task ====&lt;br /&gt;
&lt;br /&gt;
The receiving task uses the interrupt driven CAN driver to process messages sent on the bus.  When a CAN message is received, the data is filtered and stored a global memory locations.  This data is later used by the IO task to format and print the desired information to the LCD.  No hardware filter was used, since the IO controller must monitor bus utilization and therefore listen to all messages.  No heavy calculations or blocking code is allowed in this task; it's purpose is to get the data out as fast as possible and wait for more.&lt;br /&gt;
&lt;br /&gt;
(flow chart for RX task)&lt;br /&gt;
&lt;br /&gt;
==== LCD API ====&lt;br /&gt;
&lt;br /&gt;
The LCD API uses a singleton template so that any task can invoke it and print something to the LCD.  Since the LCD doesn't care who prints what, care must be taken to ensure other tasks' data isn't unintentionally overwritten.  However, only a single task in our implementation is utilizing this API so it wasn't a problem.  The LCD communicates over UART, so the available UART driver was used (also a singleton template).  The data sheet from Sparkfun was used to create this API so that nearly all the LCD capabilities can be supported.  These features include:&lt;br /&gt;
&lt;br /&gt;
* Erase screen or individual line&lt;br /&gt;
* Write to screen, line or specific location&lt;br /&gt;
* Adjust backlight brightness&lt;br /&gt;
* Adjust cursor position and style&lt;br /&gt;
* Scroll text&lt;br /&gt;
* Turn display off or on&lt;br /&gt;
* Change baud rate&lt;br /&gt;
&lt;br /&gt;
==== IO Task ====&lt;br /&gt;
&lt;br /&gt;
(block diagram of &amp;quot;screen&amp;quot; design)&lt;br /&gt;
&lt;br /&gt;
The IO task utilizes the LCD API to display LCD &amp;quot;screens&amp;quot;.  A screen is a custom-defined object containing &amp;quot;line&amp;quot; objects.  Lines consist of a format sting (in the printf format) and optional variables.  All screens are stored in a vector, of which the front object is always displayed on the LCD.  To change the screen, the vector is simply rotated left or right (forward or backward).  For simplicity, the screens are rotated every second.  However the screens can be rotated by button press, timer, external interrupt or even CAN message.&lt;br /&gt;
&lt;br /&gt;
The data objects that are stored in shared memory by the RX task make up the variables in the format strings described above.  To accomplish this, the data types for these variables are char**, or a pointer to a char pointer.  That way, we can just supply the memory location of the char* that is constantly being updated by the RX task.  This simplifies the implementation of the IO Task and ensures the latest data is used when printing the screens.&lt;br /&gt;
&lt;br /&gt;
(flow chart for IO Task)&lt;br /&gt;
&lt;br /&gt;
== Controller Communication Table ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Controller ID Table&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Controller ID&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x01&lt;br /&gt;
| Master Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| Geographical Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x03&lt;br /&gt;
| Motor Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| Sensor Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x05&lt;br /&gt;
| IO Controller&lt;br /&gt;
|-&lt;br /&gt;
| 0x06&lt;br /&gt;
| Communication (Bluetooth Bridge/Android App) Controller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Central Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Number  &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Purpose &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Data layout &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1    &lt;br /&gt;
| 0x501  &lt;br /&gt;
| Send Throttle and steering to motor&lt;br /&gt;
| throttle&lt;br /&gt;
steering&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x502  &lt;br /&gt;
| Start car&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3 &lt;br /&gt;
| 0x503   &lt;br /&gt;
| Stop car&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 0x101   &lt;br /&gt;
| Broadcast request revision&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 0x102  &lt;br /&gt;
| Broadcast Set time&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 0x103  &lt;br /&gt;
| Request TX count (broadcast)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 0x104   &lt;br /&gt;
| Request RX count (broadcast)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 0x105   &lt;br /&gt;
| Send TX count (LCD)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| 0x106  &lt;br /&gt;
| Send RX count (LCD)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| 0x107  &lt;br /&gt;
| All controllers initialize&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Communication (Bluetooth Bridge/Android App) Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Number  &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Purpose &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Data layout &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1    &lt;br /&gt;
| 0x301  &lt;br /&gt;
| Broadcast Start command&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x302  &lt;br /&gt;
| Broadcast Stop command&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3  &lt;br /&gt;
| 0x303  &lt;br /&gt;
| Broadcast GPS destination set by Android &lt;br /&gt;
|byte [0-3] : (float), Longitude &lt;br /&gt;
byte [4-7] : (float), Latitude &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Sensor Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Number  &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Purpose &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Data layout &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1    &lt;br /&gt;
| 0x501  &lt;br /&gt;
| Broadcast front sensors values&lt;br /&gt;
| byte[0]: Right ultrasonic sensor value in inches&lt;br /&gt;
byte[1]: Front ultrasonic sensor value in inches&lt;br /&gt;
   &lt;br /&gt;
byte[2]: Left ultrasonic sensor value in inches&lt;br /&gt;
   &lt;br /&gt;
byte[3]: Front bottom infrared sensor value in inches&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x502  &lt;br /&gt;
| Broadcast back infrared sensor value&lt;br /&gt;
| byte[0]: Back infrared sensor value in inches&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3  &lt;br /&gt;
| 0x503  &lt;br /&gt;
| Broadcast battery sensor value &lt;br /&gt;
|byte[0]: current/voltage sensor value in percentage&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4  &lt;br /&gt;
| 0x504  &lt;br /&gt;
| Broadcast light sensor value	&lt;br /&gt;
|byte[0]: light sensor value as integer&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5  &lt;br /&gt;
| 0x505  &lt;br /&gt;
| Broadcast tilt sensor value &lt;br /&gt;
|byte[0]: X-Axis tilt sensor value as integer&lt;br /&gt;
byte[1]: Y-Axis tilt sensor value as integer&lt;br /&gt;
&lt;br /&gt;
byte[2]: Z-Axis tilt sensor value as integer&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Motor/Servo Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Send Code&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Data &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1    &lt;br /&gt;
| 0x201    &lt;br /&gt;
| Heartbeat data     &lt;br /&gt;
| Controller id 1 byte&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x201    &lt;br /&gt;
| Heartbeat data&lt;br /&gt;
| Controller id 1 byte&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 0x201    &lt;br /&gt;
| Heartbeat data&lt;br /&gt;
| Controller id 1 byte&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 0x202&lt;br /&gt;
| Mem info data&lt;br /&gt;
| Sys-mem remaining 4bytes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 0x501&lt;br /&gt;
| RPM data send&lt;br /&gt;
| RPM (2 bytes)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 0x502&lt;br /&gt;
| Speed data send&lt;br /&gt;
| Speed (2bytes)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Receive Code&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Response&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1 &lt;br /&gt;
| 0x300    &lt;br /&gt;
| Kill               &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x301    &lt;br /&gt;
| Stop               &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 0x302    &lt;br /&gt;
| Straight           &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 0x307    &lt;br /&gt;
| move forward 25%   &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 0x30C    &lt;br /&gt;
| move forward 50%   &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 0x311    &lt;br /&gt;
| move forward 75%   &lt;br /&gt;
| Receive only &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 0x315    &lt;br /&gt;
| move forward 100%  &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 0x31A    &lt;br /&gt;
| move backward 25%  &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 9&lt;br /&gt;
| 0x31F    &lt;br /&gt;
| move backward 50%  &lt;br /&gt;
| Receive only &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 10&lt;br /&gt;
| 0x324    &lt;br /&gt;
| move backward 75%  &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 11&lt;br /&gt;
| 0x329    &lt;br /&gt;
| move backward 100% &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 12&lt;br /&gt;
| 0x334    &lt;br /&gt;
| Steer right 25%    &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 13&lt;br /&gt;
| 0x339    &lt;br /&gt;
| Steer right 50%    &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 14&lt;br /&gt;
| 0x33E    &lt;br /&gt;
| Steer right 75%    &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 15&lt;br /&gt;
| 0x343    &lt;br /&gt;
| Steer right 100%   &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 16&lt;br /&gt;
| 0x348    &lt;br /&gt;
| Steer Left 25%     &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 17&lt;br /&gt;
| 0x34D    &lt;br /&gt;
| Steer left 50%     &lt;br /&gt;
| Receive only  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 18&lt;br /&gt;
| 0x352    &lt;br /&gt;
| Steer left 75%     &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 19&lt;br /&gt;
| 0x357    &lt;br /&gt;
| Steer left 100%    &lt;br /&gt;
| Receive only&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Io Controller Communication Table&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Message Number  &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Purpose &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Destination&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|1    &lt;br /&gt;
| 0x301  &lt;br /&gt;
| Start command for car&lt;br /&gt;
| Central Controller&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 0x302 &lt;br /&gt;
| Stop command for car&lt;br /&gt;
| Central Controller&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3  &lt;br /&gt;
| 0x303  &lt;br /&gt;
| Go to a predefined Destination.  &lt;br /&gt;
| Central Controller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&lt;br /&gt;
=== Sensors ===&lt;br /&gt;
The first challenge was the positioning and spacing between the sensors. The sensors were mounted on a 3D printed bracket for initial testing but the angle between the brackets seemed to cause interference and was not giving optimum values. The sensors were then individually mounted further apart to reduce interference. The detection distance was tweaked by trial and error and finally settled on the value of 36 inches for the front, left and right sensors and  7 inches for the back sensor.&lt;br /&gt;
&lt;br /&gt;
The second challenge was dealing with erroneous values. Using ADC to interface sensors lead to certain erroneous values that didn't have the desired effect and after some testing, the sensor interface was changed to pulse width. This lead to more robust values after filtering.&lt;br /&gt;
&lt;br /&gt;
Another challenge was the initial skewed alignment. It was difficult to detect whether the direction of the running car was changing because of the motor response to sensor values or the alignment of the tires. The group eventually decided to get a new car that rectified the alignment issue.&lt;br /&gt;
&lt;br /&gt;
=== Sensors Configuration and Implementation ===&lt;br /&gt;
We used LV-MaxSonar series MB1010 high performance ultrasonic sensors  for our application. The sensors detects objects from 6 inch to 254 inches and can be interfaced to ADC or pulse width output. We found the ADC values were inconsistent and due to the constraint of number of ADC pins on SJONE board , we used PWM  to configure the sensors.&lt;br /&gt;
We mounted three sensors in front of the car and we found the values were not consistent as it was reflected from the ground, hence we elevated the sensor placement.&lt;br /&gt;
The sensor configuration is explained&lt;br /&gt;
[[File:CMPE243_F14_Group5_ultrasonic.png|200px|centre|thumb|Ultra SonicSensor]]&lt;br /&gt;
&lt;br /&gt;
===Motor Controller ===&lt;br /&gt;
&lt;br /&gt;
====Issue 1====&lt;br /&gt;
As we were using Electric Speed Control (ESC) to control the speed of motor we faced issues based on inconsistency of the speed. This could have been solved easily if we used H-bridge chip. When ESC was supplied with particular PWM signal it would work at desirable speed but when turning off the ESC and turning on the ESC the speed would change for the same PWM signal supplied. This inconsistency of the speed can easily damaged the motor as it was hard to predict when the motor will switch from forward to backward motion. So to fix this issue we had to connect the ESC to oscilloscope and turn on the transmitter. As soon as the transmitter is turned on the transmitter send a fix signal to ESC for some time that could have been in milli seconds. By doing this the ESC get initialized and once the ESC has initialized the transmitter can send a signal to go forward or reverse.&lt;br /&gt;
&lt;br /&gt;
So we wrote a code to initialize the ESC. Before we sends the signal to ESC to move forward or reverse we send a fix PWM signal to ESC for one second to initialize ESC and this signal was sent from the main function.&lt;br /&gt;
&lt;br /&gt;
====Issue 2====&lt;br /&gt;
The servo that came with the RC car wasn't fast enough to respond to left and right movement of the car. Car would hit the obstacle and than the wheel would rotate in opposite direction. So we change the servo with faster response time. &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;|Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Test Case&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Test Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Result&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|1||Initial CAN communication of all controllers ||Check if all the controllers are broadcasting the periodic message on CAN bus and receiving the data ||All controllers '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|2||Obstacle avoidance|| Obstacle  by integrating the ultrasonic sensor||Obstacle avoidance '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|3||LCD display || Displying all the values including CPU Utilization, CAN message count, and message from the controllers ||LCD display of all message '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|4||Building Android application ||Check if the Android application sends the destination by Bluetooth||Communication '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|5||Point to Point movement || Test Car runs by setting two way points||Point to point car movement '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
| scope=&amp;quot;row&amp;quot;|6||Checking if Car runs with multiple way points ||Check if the car works with multiple way points||Multiple way points steering  '''PASSED'''&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Challenges and Learning ==&lt;br /&gt;
&lt;br /&gt;
== Future Enhancement ==&lt;br /&gt;
=== Sensors ===&lt;br /&gt;
It would be ideal to add another infrared sensor to the front lower portion of the car for cliff detection. It would also be good to have a bigger 3D printed bracket to mount the sensors that match our measurements requirements. This would add to the visual appeal and also reduce tangling mess due to the wires.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Video ==&lt;br /&gt;
&lt;br /&gt;
== Project Source Code ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
# Preetpal Kang, Lecture notes of CMPE 243, Computer Engineering, Charles W. Davidson College of Engineering, San Jose State University, Aug-Dec 2014.&lt;br /&gt;
# en.wikipedia.org/&lt;br /&gt;
# MaxBotix 2012, http://www.maxbotix.com/articles/031.htm&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F14:_Team5-Self_Driving_Car_-_AUG&amp;diff=9795</id>
		<title>F14: Team5-Self Driving Car - AUG</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F14:_Team5-Self_Driving_Car_-_AUG&amp;diff=9795"/>
				<updated>2014-10-22T02:11:04Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: /* Schedule */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Self Driving Car ==&lt;br /&gt;
&lt;br /&gt;
[[File:CmpE244_F14_SelfDrivingCarT5_comingsoon.JPG|400px|thumb|center|Fig 2. Build in Progress]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
== Objective and Scope ==&lt;br /&gt;
&lt;br /&gt;
== Team Members &amp;amp; Responsibilities ==&lt;br /&gt;
#  Sensor Controller (2 Members) - [Bailey Wu, Rishabh Sareen]&lt;br /&gt;
#  Motor Controller (2 Members) - [Abraham Ruiz, Sree Harsha, Arpit Amin]&lt;br /&gt;
#  I/O Unit (2 Members) - [Yoni Klein, Tejeswar]&lt;br /&gt;
#  Communication Bridge + Android (3 Members) - [Shaw Ken Chang, Arnold Bajet Jr., Thomas Pantels]&lt;br /&gt;
#  Geographical Controller (3 Members) - [Himanshu Saini, Divya Kamath, Sree Harsha]&lt;br /&gt;
#  Master Controller (3 Members) - [Akash Ayare, Sree Harsha, Karthik Vadiraja]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Geographical Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 1-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Order Components and Make a schedule&lt;br /&gt;
| Completed&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 8-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Decide commands that Geographical Controller will support&lt;br /&gt;
| Completed&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 7-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Complete CAN RX task and subscription handling. Verify communication with other controllers&lt;br /&gt;
| Completed&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| Interface GPS module and Compass and develop drivers if needed&lt;br /&gt;
| GPS - In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| 30-Oct-2014&lt;br /&gt;
| Design and develop algorithm to calculate heading and bearing from GPS coordinates&lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| 5-Nov-2014&lt;br /&gt;
| Work on calibration of compass &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 1-Nov-2014&lt;br /&gt;
| 10-Nov-2014&lt;br /&gt;
| Test with the central and Bluetooth controller &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 10-Nov-2014&lt;br /&gt;
| 25-Nov-2014&lt;br /&gt;
| Begin testing with fully assembled car &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sensor Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/3/2014&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|Order sensor parts and finish the necessary wiring and develop test code for a sensor&lt;br /&gt;
|Done&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|2&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Implementation for multiple ultrasonic sensors&lt;br /&gt;
|Done&lt;br /&gt;
|10/14/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|3&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|Implementation for infrared distance sensor &lt;br /&gt;
|Scheduled&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|4&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|10/31/2014&lt;br /&gt;
|Implementation of Light Sensors and Tilt Sensor&lt;br /&gt;
|Scheduled&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|5&lt;br /&gt;
|10/33/2014&lt;br /&gt;
|11/7/2014&lt;br /&gt;
|Implementation of Battery Sensor Status&lt;br /&gt;
|Scheduled&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|6&lt;br /&gt;
|11/7/2014&lt;br /&gt;
|11/14/2014&lt;br /&gt;
|TBD&lt;br /&gt;
|TBD&lt;br /&gt;
|TBD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''IO Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/14/2014&lt;br /&gt;
|Research and order LCD appropriate for this project&lt;br /&gt;
|Finished&lt;br /&gt;
|10/11/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Implement CAN RX/Subscription task&lt;br /&gt;
|Finished&lt;br /&gt;
|10/13/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Finalize Task Architecture&lt;br /&gt;
|In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|10/18/2014&lt;br /&gt;
|10/21/2014&lt;br /&gt;
|Interface and test LCD&lt;br /&gt;
|Finished&lt;br /&gt;
|10/20/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|10/21/2014&lt;br /&gt;
|10/28/2014&lt;br /&gt;
|Implement special button features&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|10/21/2014&lt;br /&gt;
|10/28/2014&lt;br /&gt;
|Implement auto scrolling feature&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
|10/28/2014&lt;br /&gt;
|11/4/2014&lt;br /&gt;
|Design LCD UI with buttons&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Communication Bridge + Android'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 16-Sep-2014&lt;br /&gt;
| 23-Sep-2014&lt;br /&gt;
| Interface and test bluetooth module&lt;br /&gt;
| Done&lt;br /&gt;
| 20-Sep-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 11-Oct-2014&lt;br /&gt;
| 12-Oct-2014&lt;br /&gt;
| UI Design and User Requirements dococumentation&lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 28-Sep-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Add Google Maps and Bluetooth component in Android app.  &lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 7-Oct-2014&lt;br /&gt;
| 19-Oct-2014&lt;br /&gt;
| Interface bluetooth module with SJSUOne board and implement bluetooth driver&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 11-Oct-2014&lt;br /&gt;
| 19-Oct-2014&lt;br /&gt;
| CAN infrastructure implmentation &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 20-Oct-2014&lt;br /&gt;
| 1-Nov-2014&lt;br /&gt;
| Add car information reading to Android app&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 2-Nov-2014&lt;br /&gt;
| 4-Nov-2014&lt;br /&gt;
| Iterate UI design&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 5-Nov-2014&lt;br /&gt;
| 16-Nov-2014&lt;br /&gt;
| Implement 2nd UI design&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Motor Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|1011/2014&lt;br /&gt;
|PWM1 and PWM2 interface with the car servo and motor. Wrote a test code to operate the servo and motor from the terminal command.&lt;br /&gt;
|Finish&lt;br /&gt;
|10/11/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
|10/11/2014&lt;br /&gt;
|10/18/2014&lt;br /&gt;
|Design and code CAN receive task for subscription. Check for basic CAN message commands for throttle and steer control.&lt;br /&gt;
|In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|10/18/2014&lt;br /&gt;
|11/01/2014&lt;br /&gt;
|Design the CAN message table for motor control. Design acceleration Vs steer control function for smooth run. Check for other factors involved.&lt;br /&gt;
|Planned&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|11/02/2014&lt;br /&gt;
|11/09/2014&lt;br /&gt;
|Fine tune motor control code and integrate with all the controllers for proper working. &lt;br /&gt;
|Planned&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
'''Central Controller'''&lt;br /&gt;
 &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 16-Sep-2014&lt;br /&gt;
| 23-Sep-2014&lt;br /&gt;
| Develop API for CAN bus communication.&lt;br /&gt;
| Done&lt;br /&gt;
| 23-Sep-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 11-Oct-2014&lt;br /&gt;
| 15-Oct-2014&lt;br /&gt;
| Develop communication table for all controllers.&lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 15-Oct-2014&lt;br /&gt;
| 20-Oct-2014&lt;br /&gt;
| Broadcast message and target message setup.  &lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
| Co-ordinate all controllers and take major decisions. &lt;br /&gt;
| Planned&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| Complete Building and fine-tuning of RC car . &lt;br /&gt;
| Planned&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Qty&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Description&lt;br /&gt;
! width=&amp;quot;110&amp;quot; align=&amp;quot;center&amp;quot;|Manufacturer&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Part Number&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Total Cost&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Backup Parts &amp;amp; cost ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Qty&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Description&lt;br /&gt;
! width=&amp;quot;110&amp;quot; align=&amp;quot;center&amp;quot;|Manufacturer&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Part Number&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Total Cost&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&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;|Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Test Case&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Test Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Result&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Challenges and Learning ==&lt;br /&gt;
&lt;br /&gt;
== Future Enhancement ==&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Video ==&lt;br /&gt;
&lt;br /&gt;
== Project Source Code ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
# Preetpal Kang, Lecture notes of CMPE 243, Computer Engineering, Charles W. Davidson College of Engineering, San Jose State University, Aug-Dec 2014.&lt;br /&gt;
# en.wikipedia.org/&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F14:_Team5-Self_Driving_Car_-_AUG&amp;diff=9791</id>
		<title>F14: Team5-Self Driving Car - AUG</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F14:_Team5-Self_Driving_Car_-_AUG&amp;diff=9791"/>
				<updated>2014-10-22T01:00:35Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: /* Schedule */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Self Driving Car ==&lt;br /&gt;
&lt;br /&gt;
[[File:CmpE244_F14_SelfDrivingCarT5_comingsoon.JPG|400px|thumb|center|Fig 2. Build in Progress]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
== Objective and Scope ==&lt;br /&gt;
&lt;br /&gt;
== Team Members &amp;amp; Responsibilities ==&lt;br /&gt;
#  Sensor Controller (2 Members) - [Bailey Wu, Rishabh Sareen]&lt;br /&gt;
#  Motor Controller (2 Members) - [Abraham Ruiz, Sree Harsha, Arpit Amin]&lt;br /&gt;
#  I/O Unit (2 Members) - [Yoni Klein, Tejeswar]&lt;br /&gt;
#  Communication Bridge + Android (3 Members) - [Shaw Ken Chang, Arnold Bajet Jr., Thomas Pantels]&lt;br /&gt;
#  Geographical Controller (3 Members) - [Himanshu Saini, Divya Kamath, Sree Harsha]&lt;br /&gt;
#  Master Controller (3 Members) - [Akash Ayare, Sree Harsha, Karthik Vadiraja]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Geographical Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 1-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Order Components and Make a schedule&lt;br /&gt;
| Completed&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 8-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Decide commands that Geographical Controller will support&lt;br /&gt;
| Completed&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 7-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Complete CAN RX task and subscription handling. Verify communication with other controllers&lt;br /&gt;
| Completed&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| Interface GPS module and Compass and develop drivers if needed&lt;br /&gt;
| GPS - In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| 30-Oct-2014&lt;br /&gt;
| Design and develop algorithm to calculate heading and bearing from GPS coordinates&lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| 5-Nov-2014&lt;br /&gt;
| Work on calibration of compass &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 1-Nov-2014&lt;br /&gt;
| 10-Nov-2014&lt;br /&gt;
| Test with the central and Bluetooth controller &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 10-Nov-2014&lt;br /&gt;
| 25-Nov-2014&lt;br /&gt;
| Begin testing with fully assembled car &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sensor Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/3/2014&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|Order sensor parts and finish the necessary wiring and develop test code for a sensor&lt;br /&gt;
|Done&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|2&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Implementation for multiple ultrasonic sensors&lt;br /&gt;
|Done&lt;br /&gt;
|10/14/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|3&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|Implementation for infrared distance sensor &lt;br /&gt;
|Scheduled&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|4&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|10/31/2014&lt;br /&gt;
|Implementation of Light Sensors and Tilt Sensor&lt;br /&gt;
|Scheduled&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|5&lt;br /&gt;
|10/33/2014&lt;br /&gt;
|11/7/2014&lt;br /&gt;
|Implementation of Battery Sensor Status&lt;br /&gt;
|Scheduled&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|6&lt;br /&gt;
|11/7/2014&lt;br /&gt;
|11/14/2014&lt;br /&gt;
|TBD&lt;br /&gt;
|TBD&lt;br /&gt;
|TBD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''IO Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/14/2014&lt;br /&gt;
|Research and order LCD appropriate for this project&lt;br /&gt;
|Finished&lt;br /&gt;
|10/11/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Implement CAN RX/Subscription task&lt;br /&gt;
|In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Finalize Task Architecture&lt;br /&gt;
|In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|10/18/2014&lt;br /&gt;
|10/21/2014&lt;br /&gt;
|Interface and test LCD&lt;br /&gt;
|Finished&lt;br /&gt;
|10/20/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|10/21/2014&lt;br /&gt;
|10/28/2014&lt;br /&gt;
|Implement special button features&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|10/21/2014&lt;br /&gt;
|10/28/2014&lt;br /&gt;
|Implement auto scrolling feature&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
|10/28/2014&lt;br /&gt;
|11/4/2014&lt;br /&gt;
|Design LCD UI with buttons&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Communication Bridge + Android'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 16-Sep-2014&lt;br /&gt;
| 23-Sep-2014&lt;br /&gt;
| Interface and test bluetooth module&lt;br /&gt;
| Done&lt;br /&gt;
| 20-Sep-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 11-Oct-2014&lt;br /&gt;
| 12-Oct-2014&lt;br /&gt;
| UI Design and User Requirements dococumentation&lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 28-Sep-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Add Google Maps and Bluetooth component in Android app.  &lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 7-Oct-2014&lt;br /&gt;
| 19-Oct-2014&lt;br /&gt;
| Interface bluetooth module with SJSUOne board and implement bluetooth driver&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 11-Oct-2014&lt;br /&gt;
| 19-Oct-2014&lt;br /&gt;
| CAN infrastructure implmentation &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 20-Oct-2014&lt;br /&gt;
| 1-Nov-2014&lt;br /&gt;
| Add car information reading to Android app&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 2-Nov-2014&lt;br /&gt;
| 4-Nov-2014&lt;br /&gt;
| Iterate UI design&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 5-Nov-2014&lt;br /&gt;
| 16-Nov-2014&lt;br /&gt;
| Implement 2nd UI design&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Motor Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|1011/2014&lt;br /&gt;
|PWM1 and PWM2 interface with the car servo and motor. Wrote a test code to operate the servo and motor from the terminal command.&lt;br /&gt;
|Finish&lt;br /&gt;
|10/11/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
|10/11/2014&lt;br /&gt;
|10/18/2014&lt;br /&gt;
|Design and code CAN receive task for subscription. Check for basic CAN message commands for throttle and steer control.&lt;br /&gt;
|In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|10/18/2014&lt;br /&gt;
|11/01/2014&lt;br /&gt;
|Design the CAN message table for motor control. Design acceleration Vs steer control function for smooth run. Check for other factors involved.&lt;br /&gt;
|Planned&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|11/02/2014&lt;br /&gt;
|11/09/2014&lt;br /&gt;
|Fine tune motor control code and integrate with all the controllers for proper working. &lt;br /&gt;
|Planned&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
'''Central Controller'''&lt;br /&gt;
 &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 16-Sep-2014&lt;br /&gt;
| 23-Sep-2014&lt;br /&gt;
| Develop API for CAN bus communication.&lt;br /&gt;
| Done&lt;br /&gt;
| 23-Sep-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 11-Oct-2014&lt;br /&gt;
| 15-Oct-2014&lt;br /&gt;
| Develop communication table for all controllers.&lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 15-Oct-2014&lt;br /&gt;
| 20-Oct-2014&lt;br /&gt;
| Broadcast message and target message setup.  &lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
| Co-ordinate all controllers and take major decisions. &lt;br /&gt;
| Planned&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| Complete Building and fine-tuning of RC car . &lt;br /&gt;
| Planned&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Qty&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Description&lt;br /&gt;
! width=&amp;quot;110&amp;quot; align=&amp;quot;center&amp;quot;|Manufacturer&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Part Number&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Total Cost&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Backup Parts &amp;amp; cost ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Qty&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Description&lt;br /&gt;
! width=&amp;quot;110&amp;quot; align=&amp;quot;center&amp;quot;|Manufacturer&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Part Number&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Total Cost&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&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;|Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Test Case&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Test Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Result&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Challenges and Learning ==&lt;br /&gt;
&lt;br /&gt;
== Future Enhancement ==&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Video ==&lt;br /&gt;
&lt;br /&gt;
== Project Source Code ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
# Preetpal Kang, Lecture notes of CMPE 243, Computer Engineering, Charles W. Davidson College of Engineering, San Jose State University, Aug-Dec 2014.&lt;br /&gt;
# en.wikipedia.org/&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F14:_Team5-Self_Driving_Car_-_AUG&amp;diff=9790</id>
		<title>F14: Team5-Self Driving Car - AUG</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F14:_Team5-Self_Driving_Car_-_AUG&amp;diff=9790"/>
				<updated>2014-10-22T00:59:42Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: /* Schedule */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Self Driving Car ==&lt;br /&gt;
&lt;br /&gt;
[[File:CmpE244_F14_SelfDrivingCarT5_comingsoon.JPG|400px|thumb|center|Fig 2. Build in Progress]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
== Objective and Scope ==&lt;br /&gt;
&lt;br /&gt;
== Team Members &amp;amp; Responsibilities ==&lt;br /&gt;
#  Sensor Controller (2 Members) - [Bailey Wu, Rishabh Sareen]&lt;br /&gt;
#  Motor Controller (2 Members) - [Abraham Ruiz, Sree Harsha, Arpit Amin]&lt;br /&gt;
#  I/O Unit (2 Members) - [Yoni Klein, Tejeswar]&lt;br /&gt;
#  Communication Bridge + Android (3 Members) - [Shaw Ken Chang, Arnold Bajet Jr., Thomas Pantels]&lt;br /&gt;
#  Geographical Controller (3 Members) - [Himanshu Saini, Divya Kamath, Sree Harsha]&lt;br /&gt;
#  Master Controller (3 Members) - [Akash Ayare, Sree Harsha, Karthik Vadiraja]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Geographical Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 1-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Order Components and Make a schedule&lt;br /&gt;
| Completed&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 8-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Decide commands that Geographical Controller will support&lt;br /&gt;
| Completed&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 7-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Complete CAN RX task and subscription handling. Verify communication with other controllers&lt;br /&gt;
| Completed&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| Interface GPS module and Compass and develop drivers if needed&lt;br /&gt;
| GPS - In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| 30-Oct-2014&lt;br /&gt;
| Design and develop algorithm to calculate heading and bearing from GPS coordinates&lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| 5-Nov-2014&lt;br /&gt;
| Work on calibration of compass &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 1-Nov-2014&lt;br /&gt;
| 10-Nov-2014&lt;br /&gt;
| Test with the central and Bluetooth controller &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 10-Nov-2014&lt;br /&gt;
| 25-Nov-2014&lt;br /&gt;
| Begin testing with fully assembled car &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sensor Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/3/2014&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|Order sensor parts and finish the necessary wiring and develop test code for a sensor&lt;br /&gt;
|Done&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|2&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Implementation for multiple ultrasonic sensors&lt;br /&gt;
|Done&lt;br /&gt;
|10/14/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|3&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|Implementation for infrared distance sensor &lt;br /&gt;
|Scheduled&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|4&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|10/31/2014&lt;br /&gt;
|Implementation of Light Sensors and Tilt Sensor&lt;br /&gt;
|Scheduled&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|5&lt;br /&gt;
|10/33/2014&lt;br /&gt;
|11/7/2014&lt;br /&gt;
|Implementation of Battery Sensor Status&lt;br /&gt;
|Scheduled&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|6&lt;br /&gt;
|11/7/2014&lt;br /&gt;
|11/14/2014&lt;br /&gt;
|TBD&lt;br /&gt;
|TBD&lt;br /&gt;
|TBD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''IO Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/14/2014&lt;br /&gt;
|Research and order LCD appropriate for this project&lt;br /&gt;
|Finished&lt;br /&gt;
|10/11/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Implement CAN RX/Subscription task&lt;br /&gt;
|In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Finalize Task Architecture&lt;br /&gt;
|In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|10/18/2014&lt;br /&gt;
|10/21/2014&lt;br /&gt;
|Interface and test LCD&lt;br /&gt;
|Finished&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|10/21/2014&lt;br /&gt;
|10/28/2014&lt;br /&gt;
|Implement special button features&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|10/21/2014&lt;br /&gt;
|10/28/2014&lt;br /&gt;
|Implement auto scrolling feature&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
|10/28/2014&lt;br /&gt;
|11/4/2014&lt;br /&gt;
|Design LCD UI with buttons&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Communication Bridge + Android'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 16-Sep-2014&lt;br /&gt;
| 23-Sep-2014&lt;br /&gt;
| Interface and test bluetooth module&lt;br /&gt;
| Done&lt;br /&gt;
| 20-Sep-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 11-Oct-2014&lt;br /&gt;
| 12-Oct-2014&lt;br /&gt;
| UI Design and User Requirements dococumentation&lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 28-Sep-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Add Google Maps and Bluetooth component in Android app.  &lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 7-Oct-2014&lt;br /&gt;
| 19-Oct-2014&lt;br /&gt;
| Interface bluetooth module with SJSUOne board and implement bluetooth driver&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 11-Oct-2014&lt;br /&gt;
| 19-Oct-2014&lt;br /&gt;
| CAN infrastructure implmentation &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 20-Oct-2014&lt;br /&gt;
| 1-Nov-2014&lt;br /&gt;
| Add car information reading to Android app&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 2-Nov-2014&lt;br /&gt;
| 4-Nov-2014&lt;br /&gt;
| Iterate UI design&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 5-Nov-2014&lt;br /&gt;
| 16-Nov-2014&lt;br /&gt;
| Implement 2nd UI design&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Motor Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|1011/2014&lt;br /&gt;
|PWM1 and PWM2 interface with the car servo and motor. Wrote a test code to operate the servo and motor from the terminal command.&lt;br /&gt;
|Finish&lt;br /&gt;
|10/11/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
|10/11/2014&lt;br /&gt;
|10/18/2014&lt;br /&gt;
|Design and code CAN receive task for subscription. Check for basic CAN message commands for throttle and steer control.&lt;br /&gt;
|In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|10/18/2014&lt;br /&gt;
|11/01/2014&lt;br /&gt;
|Design the CAN message table for motor control. Design acceleration Vs steer control function for smooth run. Check for other factors involved.&lt;br /&gt;
|Planned&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|11/02/2014&lt;br /&gt;
|11/09/2014&lt;br /&gt;
|Fine tune motor control code and integrate with all the controllers for proper working. &lt;br /&gt;
|Planned&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
'''Central Controller'''&lt;br /&gt;
 &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 16-Sep-2014&lt;br /&gt;
| 23-Sep-2014&lt;br /&gt;
| Develop API for CAN bus communication.&lt;br /&gt;
| Done&lt;br /&gt;
| 23-Sep-2014&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 11-Oct-2014&lt;br /&gt;
| 15-Oct-2014&lt;br /&gt;
| Develop communication table for all controllers.&lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 15-Oct-2014&lt;br /&gt;
| 20-Oct-2014&lt;br /&gt;
| Broadcast message and target message setup.  &lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 21-Oct-2014&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
| Co-ordinate all controllers and take major decisions. &lt;br /&gt;
| Planned&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 28-Oct-2014&lt;br /&gt;
| 11-Nov-2014&lt;br /&gt;
| Complete Building and fine-tuning of RC car . &lt;br /&gt;
| Planned&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Qty&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Description&lt;br /&gt;
! width=&amp;quot;110&amp;quot; align=&amp;quot;center&amp;quot;|Manufacturer&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Part Number&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Total Cost&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Backup Parts &amp;amp; cost ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Qty&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Description&lt;br /&gt;
! width=&amp;quot;110&amp;quot; align=&amp;quot;center&amp;quot;|Manufacturer&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Part Number&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Total Cost&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&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;|Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Test Case&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Test Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Result&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Challenges and Learning ==&lt;br /&gt;
&lt;br /&gt;
== Future Enhancement ==&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Video ==&lt;br /&gt;
&lt;br /&gt;
== Project Source Code ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
# Preetpal Kang, Lecture notes of CMPE 243, Computer Engineering, Charles W. Davidson College of Engineering, San Jose State University, Aug-Dec 2014.&lt;br /&gt;
# en.wikipedia.org/&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F14:_Team5-Self_Driving_Car_-_AUG&amp;diff=9689</id>
		<title>F14: Team5-Self Driving Car - AUG</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F14:_Team5-Self_Driving_Car_-_AUG&amp;diff=9689"/>
				<updated>2014-10-14T04:39:10Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: /* Schedule */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Self Driving Car ==&lt;br /&gt;
&lt;br /&gt;
[[File:CmpE244_F14_SelfDrivingCarT5_comingsoon.JPG|400px|thumb|center|Fig 2. Build in Progress]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
== Objective and Scope ==&lt;br /&gt;
&lt;br /&gt;
== Team Members &amp;amp; Responsibilities ==&lt;br /&gt;
#  Sensor Controller (2 Members) - [Bailey Wu, Rishabh Sareen]&lt;br /&gt;
#  Motor Controller (2 Members) - [Abraham Ruiz, Sree Harsha, Arpit Amin]&lt;br /&gt;
#  I/O Unit (2 Members) - [Yoni Klein, member 2]&lt;br /&gt;
#  Communication Bridge + Android (3 Members) - [Shaw Ken Chang, Arnold]&lt;br /&gt;
#  Geographical Controller (3 Members) - [Himanshu Saini, Divya Kamath, Sree Harsha]&lt;br /&gt;
#  Master Controller (3 Members) - [Akash Ayare, Sree Harsha, Karthik Vadiraja]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Geographical Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 1-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Order Components and Make a schedule&lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 8-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Decide commands that Geographical Controller will support&lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 7-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Complete CAN RX task and subscription handling. Verify communication with other controllers&lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| Interface GPS module and Compass and develop drivers if needed&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| 30-Oct-2014&lt;br /&gt;
| Design and develop algorithm to calculate heading and bearing from GPS coordinates&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| 5-Nov-2014&lt;br /&gt;
| Work on calibration of compass &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 1-Nov-2014&lt;br /&gt;
| 10-Nov-2014&lt;br /&gt;
| Test with the central and Bluetooth controller &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 10-Nov-2014&lt;br /&gt;
| 25-Nov-2014&lt;br /&gt;
| Begin testing with fully assembled car &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sensor Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/3/2014&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|Order sensor parts and finish the necessary wiring and develop test code for a sensor&lt;br /&gt;
|Finish&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|2&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Implementation for multiple ultrasonic sensors&lt;br /&gt;
|Ongoing&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|3&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|Implementation for infrared distance sensor &lt;br /&gt;
|Scheduled&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|4&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|10/30/2014&lt;br /&gt;
|Implementation of Light Sensors and Tilt Sensor&lt;br /&gt;
|Scheduled&lt;br /&gt;
|TBD&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''IO Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/14/2014&lt;br /&gt;
|Research and order LCD appropriate for this project&lt;br /&gt;
|Finished&lt;br /&gt;
|10/11/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Implement CAN RX/Subscription task&lt;br /&gt;
|In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Finalize Task Architecture&lt;br /&gt;
|In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
|10/18/2014&lt;br /&gt;
|10/21/2014&lt;br /&gt;
|Interface and test LCD&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
|10/21/2014&lt;br /&gt;
|10/28/2014&lt;br /&gt;
|Implement special button features&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
|10/21/2014&lt;br /&gt;
|10/28/2014&lt;br /&gt;
|Implement auto scrolling feature&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
|10/28/2014&lt;br /&gt;
|11/4/2014&lt;br /&gt;
|Design LCD UI with buttons&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Motor Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|1011/2014&lt;br /&gt;
|PWM1 and PWM2 interface with the car servo and motor. Wrote a test code to operate the servo and motor from the terminal command.&lt;br /&gt;
|Finish&lt;br /&gt;
|10/11/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
|10/11/2014&lt;br /&gt;
|10/18/2014&lt;br /&gt;
|Design and code CAN receive task for subscription. Check for basic CAN message commands for throttle and steer control.&lt;br /&gt;
|In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|10/18/2014&lt;br /&gt;
|11/01/2014&lt;br /&gt;
|Design the CAN message table for motor control. Design acceleration Vs steer control function for smooth run. Check for other factors involved.&lt;br /&gt;
|Planned&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
|11/02/2014&lt;br /&gt;
|11/09/2014&lt;br /&gt;
|Fine tune motor control code and integrate with all the controllers for proper working. &lt;br /&gt;
|Planned&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Qty&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Description&lt;br /&gt;
! width=&amp;quot;110&amp;quot; align=&amp;quot;center&amp;quot;|Manufacturer&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Part Number&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Total Cost&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Backup Parts &amp;amp; cost ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Qty&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Description&lt;br /&gt;
! width=&amp;quot;110&amp;quot; align=&amp;quot;center&amp;quot;|Manufacturer&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Part Number&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Total Cost&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&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;|Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Test Case&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Test Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Result&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Challenges and Learning ==&lt;br /&gt;
&lt;br /&gt;
== Future Enhancement ==&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Video ==&lt;br /&gt;
&lt;br /&gt;
== Project Source Code ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
# Preetpal Kang, Lecture notes of CMPE 243, Computer Engineering, Charles W. Davidson College of Engineering, San Jose State University, Aug-Dec 2014.&lt;br /&gt;
# en.wikipedia.org/&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F14:_Team5-Self_Driving_Car_-_AUG&amp;diff=9663</id>
		<title>F14: Team5-Self Driving Car - AUG</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F14:_Team5-Self_Driving_Car_-_AUG&amp;diff=9663"/>
				<updated>2014-10-11T22:08:45Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: /* Schedule */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Self Driving Car ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
== Objective and Scope ==&lt;br /&gt;
&lt;br /&gt;
== Team Members &amp;amp; Responsibilities ==&lt;br /&gt;
#  Sensor Controller (2 Members) - [Bailey Wu, Rishabh Sareen]&lt;br /&gt;
#  Motor Controller (2 Members) - [Abraham Ruiz, Sree Harsha, Arpit Amin]&lt;br /&gt;
#  I/O Unit (2 Members) - [Yoni Klein, member 2]&lt;br /&gt;
#  Communication Bridge + Android (3 Members) - [Shaw Ken Chang, Arnold]&lt;br /&gt;
#  Geographical Controller (3 Members) - [Himanshu Saini, Divya Kamath, Sree Harsha]&lt;br /&gt;
#  Master Controller (3 Members) - [Akash Ayare, Sree Harsha, Karthik Vadiraja]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Geographical Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 1-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Order Components and Make a schedule&lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 8-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Decide commands that Geographical Controller will support&lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 7-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Complete CAN RX task and subscription handling. Verify communication with other controllers&lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| Interface GPS module and Compass and develop drivers if needed&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| 30-Oct-2014&lt;br /&gt;
| Design and develop algorithm to calculate heading and bearing from GPS coordinates&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| 5-Nov-2014&lt;br /&gt;
| Work on calibration of compass &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 1-Nov-2014&lt;br /&gt;
| 10-Nov-2014&lt;br /&gt;
| Test with the central and Bluetooth controller &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 10-Nov-2014&lt;br /&gt;
| 25-Nov-2014&lt;br /&gt;
| Begin testing with fully assembled car &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sensor Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/3/2014&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|Order sensor parts and finish the necessary wiring and develop test code for a sensor&lt;br /&gt;
|Finish&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|2&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Implementation for multiple ultrasonic sensors&lt;br /&gt;
|Ongoing&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|3&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|Implementation for infrared distance sensor &lt;br /&gt;
|Scheduled&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|4&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|10/30/2014&lt;br /&gt;
|Implementation of Light Sensors and Tilt Sensor&lt;br /&gt;
|Scheduled&lt;br /&gt;
|TBD&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''IO Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/14/2014&lt;br /&gt;
|Research and order LCD appropriate for this project&lt;br /&gt;
|Finish&lt;br /&gt;
|10/11/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&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;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Qty&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Description&lt;br /&gt;
! width=&amp;quot;110&amp;quot; align=&amp;quot;center&amp;quot;|Manufacturer&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Part Number&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Total Cost&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Backup Parts &amp;amp; cost ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Qty&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Description&lt;br /&gt;
! width=&amp;quot;110&amp;quot; align=&amp;quot;center&amp;quot;|Manufacturer&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Part Number&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Total Cost&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&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;|Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Test Case&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Test Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Result&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Challenges and Learning ==&lt;br /&gt;
&lt;br /&gt;
== Future Enhancement ==&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Video ==&lt;br /&gt;
&lt;br /&gt;
== Project Source Code ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
# Preetpal Kang, Lecture notes of CMPE 243, Computer Engineering, Charles W. Davidson College of Engineering, San Jose State University, Aug-Dec 2014.&lt;br /&gt;
# en.wikipedia.org/&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=F14:_Team5-Self_Driving_Car_-_AUG&amp;diff=9662</id>
		<title>F14: Team5-Self Driving Car - AUG</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=F14:_Team5-Self_Driving_Car_-_AUG&amp;diff=9662"/>
				<updated>2014-10-11T21:57:43Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: /* Geographical Controller */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Self Driving Car ==&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
== Objective and Scope ==&lt;br /&gt;
&lt;br /&gt;
== Team Members &amp;amp; Responsibilities ==&lt;br /&gt;
#  Sensor Controller (2 Members) - [Bailey Wu, Rishabh Sareen]&lt;br /&gt;
#  Motor Controller (2 Members) - [Abraham Ruiz, Sree Harsha, Arpit Amin]&lt;br /&gt;
#  I/O Unit (2 Members) - [Yoni Klein, member 2]&lt;br /&gt;
#  Communication Bridge + Android (3 Members) - [Shaw Ken Chang, Arnold]&lt;br /&gt;
#  Geographical Controller (3 Members) - [Himanshu Saini, Divya Kamath, Sree Harsha]&lt;br /&gt;
#  Master Controller (3 Members) - [Akash Ayare, Sree Harsha, Karthik Vadiraja]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
== Schedule ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Geographical Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
| 1-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Order Components and Make a schedule&lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 2&lt;br /&gt;
| 8-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Decide commands that Geographical Controller will support&lt;br /&gt;
| In Progress&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 3&lt;br /&gt;
| 7-Oct-2014&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| Complete CAN RX task and subscription handling. Verify communication with other controllers&lt;br /&gt;
| In Progress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 4&lt;br /&gt;
| 14-Oct-2014&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| Interface GPS module and Compass and develop drivers if needed&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 5&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| 30-Oct-2014&lt;br /&gt;
| Design and develop algorithm to calculate heading and bearing from GPS coordinates&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 6&lt;br /&gt;
| 24-Oct-2014&lt;br /&gt;
| 5-Nov-2014&lt;br /&gt;
| Work on calibration of compass &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 7&lt;br /&gt;
| 1-Nov-2014&lt;br /&gt;
| 10-Nov-2014&lt;br /&gt;
| Test with the central and Bluetooth controller &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 8&lt;br /&gt;
| 10-Nov-2014&lt;br /&gt;
| 25-Nov-2014&lt;br /&gt;
| Begin testing with fully assembled car &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sensor Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/3/2014&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|Order sensor parts and finish the necessary wiring and develop test code for a sensor&lt;br /&gt;
|Finish&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|2&lt;br /&gt;
|10/10/2014&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|Implementation for multiple ultrasonic sensors&lt;br /&gt;
|Ongoing&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|3&lt;br /&gt;
|10/17/2014&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|Implementation for infrared distance sensor &lt;br /&gt;
|Scheduled&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;|4&lt;br /&gt;
|10/24/2014&lt;br /&gt;
|10/30/2014&lt;br /&gt;
|Implementation of Light Sensors and Tilt Sensor&lt;br /&gt;
|Scheduled&lt;br /&gt;
|TBD&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''IO Controller'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Start Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| End Date&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Task&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Status&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Actual Completion Date&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| 1&lt;br /&gt;
|10/7/2014&lt;br /&gt;
|10/14/2014&lt;br /&gt;
|Research and order LCD appropriate for this project&lt;br /&gt;
|In Porgress&lt;br /&gt;
|TBD&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Parts List &amp;amp; Cost ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Qty&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Description&lt;br /&gt;
! width=&amp;quot;110&amp;quot; align=&amp;quot;center&amp;quot;|Manufacturer&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Part Number&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Total Cost&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Backup Parts &amp;amp; cost ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;30&amp;quot; align=&amp;quot;center&amp;quot;|Qty&lt;br /&gt;
! width=&amp;quot;350&amp;quot; align=&amp;quot;center&amp;quot;|Description&lt;br /&gt;
! width=&amp;quot;110&amp;quot; align=&amp;quot;center&amp;quot;|Manufacturer&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Part Number&lt;br /&gt;
! width=&amp;quot;60&amp;quot; align=&amp;quot;center&amp;quot;|Total Cost&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
== Testing &amp;amp; Technical Challenges ==&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;|Sl. No&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Test Case&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Test Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Result&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Challenges and Learning ==&lt;br /&gt;
&lt;br /&gt;
== Future Enhancement ==&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project Video ==&lt;br /&gt;
&lt;br /&gt;
== Project Source Code ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
# Preetpal Kang, Lecture notes of CMPE 243, Computer Engineering, Charles W. Davidson College of Engineering, San Jose State University, Aug-Dec 2014.&lt;br /&gt;
# en.wikipedia.org/&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=S12:_FreeRTOS_based_QuadCopter&amp;diff=1134</id>
		<title>S12: FreeRTOS based QuadCopter</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=S12:_FreeRTOS_based_QuadCopter&amp;diff=1134"/>
				<updated>2012-05-25T19:59:34Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: /* Testing &amp;amp; Technical Challenges */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== FreeRTOS-based Quadrocopter with Real-Time Flight Data==&lt;br /&gt;
[[File:cmpe146_s12_t4_copter.jpg|700px|thumb|center|alt=FreeRTOS based QuadCopter|Our Very Own FreeRTOS based QuadCopter]]&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
Our CmpE 146 project involves the assembly of a FreeRTOS -based quadrocopter. Our quadrocopter will be able to provide real-time flight diagnostic data with the help of a couple of XBees. The quadrotor will house one of the XBees and the other XBee will be connected to an ARM LPC2148 board that is on the ground, next to the person flying. Data received on the local board is communicated to the host PC over UART. Flight is made possible with the help of generic radio control (or RC), and the inputs will be sent from the transmitter to the receiver. A flight controller board will receive those inputs and make the necessary adjustments to implement the desired function.&lt;br /&gt;
&lt;br /&gt;
== Objectives &amp;amp; Introduction ==&lt;br /&gt;
&lt;br /&gt;
Our team wanted to build a custom quadcopter that is governed by a FreeRTOS-based firmware. Our team used the [http://abusemark.com/store/index.php?main_page=product_info&amp;amp;cPath=1&amp;amp;products_id=30 Afroflight Naze32] flight controller, which has a 32-bit ARM Cortex M3 based processor. The firmware for it is based on a very popular codebase called [http://www.multiwii.com MultiWii] originally developed for commanding and controlling a quadcopter with Nintendo's Wii peripherals. The board contains 2 UART outputs - one for the USB-to-Serial converter for easy setting up and debugging with a PC. For the second UART to be available, this USB-to-Serial bridge has to be bypassed and replaced with [http://ftp1.digi.com/support/documentation/90000866_C.pdf XBee] since for some reason the current iteration of the board does not support multiple simultaneous UART channels.&lt;br /&gt;
&lt;br /&gt;
Data sent over this UART is received via Xbee on the LPC2148 board which can then be retransmitted over another UART channel. This re-routed data can be monitored using the popular C#-.NET based GUI front end called [http://code.google.com/p/afrodevices/source/checkout mw-wingui] (MultiWii WinGUI). The program looks for data from the flight controller over the available COM ports and grabs packets of data which are then parsed and displayed on the screen appropriately. The data can also be received over Hercules with the help of a custom parser. &lt;br /&gt;
&lt;br /&gt;
[[File:cmpe146_s12_t4_fc.jpg|thumb|right|alt=Flight Controller|Naze32 FunFly Flight Controller]]&lt;br /&gt;
&lt;br /&gt;
A picture of the flight controller is shown to the right - it is extremely small, measuring 36mm x 36mm and features a rich variety of sensors:&lt;br /&gt;
*MEMS Gyroscope&lt;br /&gt;
*MEMS Accelerometer&lt;br /&gt;
*3-axis Magnetometer&lt;br /&gt;
*Pressure Sensor&lt;br /&gt;
&lt;br /&gt;
Inputs are received from a rather old Futaba Conquest Transmitter [http://manuals.hobbico.com/fut/6nfk-6npk-manual.pdf FP-T6NPK] operating at 72MHz. The transmitter encodes the PWM waves as PCM, generally using a 1024 bit resolution. This signal is decoded by the receiver that usually comes with the transmitter (hence the reason why datasheets for receivers alone are hard to find - they are generally paired with a corresponding transmitter which generally also has a datasheet). The output from the receiver is pure PPM for every channel. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
*Yoni Klein&lt;br /&gt;
*Amol Mundayoor&lt;br /&gt;
*Raymond Buckman&lt;br /&gt;
*Michael Leung&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Roles &amp;amp; Responsibilities ===&lt;br /&gt;
&lt;br /&gt;
Amol Mundayoor - Parts research and acquisition, Parts assembly&lt;br /&gt;
&lt;br /&gt;
Michael Leung -	Software integration, Parts assembly&lt;br /&gt;
&lt;br /&gt;
Raymond Buckman - Flying mechanics research, Parts assembly&lt;br /&gt;
&lt;br /&gt;
Yoni Klein - Software integration, Parts assembly&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;
! PARTS&lt;br /&gt;
! COST&lt;br /&gt;
|-&lt;br /&gt;
| FunFly Naze32&lt;br /&gt;
| $70&lt;br /&gt;
|-&lt;br /&gt;
| ARM LPC2148 board&lt;br /&gt;
| $90&lt;br /&gt;
|-&lt;br /&gt;
| 4x 924kV motors&lt;br /&gt;
| $80 ($20 each)&lt;br /&gt;
|-&lt;br /&gt;
|4x DYS 30A ESC &lt;br /&gt;
|$72 ($18 each)&lt;br /&gt;
|-&lt;br /&gt;
|2x APC 1047 Propellers (Counterweighted Set)&lt;br /&gt;
|$15 ($7.50 each)&lt;br /&gt;
|-&lt;br /&gt;
|ST450 Aluminum Quadcopter Frame&lt;br /&gt;
| $35&lt;br /&gt;
|-&lt;br /&gt;
|2200 mAh LiPo Battery&lt;br /&gt;
|$20&lt;br /&gt;
|-&lt;br /&gt;
|LiPo Battery Charger&lt;br /&gt;
| $40&lt;br /&gt;
|-&lt;br /&gt;
| PCM Receiver/Transmitter&lt;br /&gt;
| Borrowed (nominally $50-$100)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== The Copter Build Instructions ===&lt;br /&gt;
Assuming that all the parts have been gathered, here is the relatively detailed instruction set on how to go about building this quadcopter. When done, the copter will have the wheelbase (diameter of the quadcopter when measured from the axis of any two opposing propellers) of the frame (450mm). &lt;br /&gt;
&lt;br /&gt;
===== Motor Installation =====&lt;br /&gt;
[[File:cmp146_s12_t4_motors.jpg|thumb|right|alt=The motors used in the build.|KA 20-22L 924kV motor]]&lt;br /&gt;
&lt;br /&gt;
The picture on the right show the motor used, along with all the parts that come with it. The three black wires coming out of the motors go to the Electronic Speed Control (ESC). The order of the wires do not matter if you are using brushless motors and brushless ESCs (which is what you should be using on quadcopter builds anyway!). The four-pronged eight-holed plate goes under the motor between the frame - it's the motor mounting plate. The steel &amp;quot;crown&amp;quot; on the bottom right hand side next to the heatshrink is the propeller mount - it goes on top of the shaft, propeller goes on top, and the nut is tightened down so that the props don't come off during flight. There are some extraneous parts in the kit that can be considered as &amp;quot;spares&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===== Motor Mounting =====&lt;br /&gt;
Once the motor is assembled, they can be simply mounted on the frame using the motor mounting plate as described in the previous section. It is pretty straight forward - washers and lock nuts can be used to eliminate vibration since motors are the ones providing the most of the vibration in a copter system. '''DO NOT MOUNT THE PROPELLERS UNTIL THE VERY END - ONLY WHEN THE COPTER IS READY FOR FLIGHT TEST'''&lt;br /&gt;
&lt;br /&gt;
===== ESC Connections =====&lt;br /&gt;
[[File:Cmpe146_s12_t4_esc.jpg|thumb|right|alt=Stupid ESC|DYS/RCTimer 30A ESC]]&lt;br /&gt;
&lt;br /&gt;
The three blue wires coming out from the ESC are to be connected to the 3 wires on the motor. These connections have to be very well made because they'll be handling many many amps of current. Extending the wires were not necessary, and we recommend not extending them until absolutely necessary. The red and black wires are the battery wires - red is positive and black is ground. These connections are done using [http://helifreak.com/attachment.php?attachmentid=243211&amp;amp;stc=1&amp;amp;d=1311993095 bullet connectors] and [http://www.youtube.com/watch?v=B9yY9Kk4bEA here] is an excellent tutorial on how to solder them. Once those connections are done, the only wire left to take care of is the 3-pin wire. We recommend buying ESCs that have a BEC (Battery Eliminator Circuit) in them. When connecting such ESCs, only have the red wire from one ESC connected - all the other red wires from the other three ESCs are to remain disconnected.&lt;br /&gt;
&lt;br /&gt;
[[File:cmpe146_s12_t4_escconections.jpg|200px|thumb|center|alt=Electronic Speed Controller Connections|Interface between Motor and Battery Through ESCs]]&lt;br /&gt;
&lt;br /&gt;
ESCs are '''REQUIRED''' to be calibrated before using. There are different ways of calibrating an ESC depending on the brand and model. ESCs need to be calibrated individually. There are more information about ESCs calibrations online.&lt;br /&gt;
&lt;br /&gt;
===== Flight Controller Connections =====&lt;br /&gt;
[[File:Cmp146_s12_t4_fc_con.jpg|thumb|right|alt=Connections|Naze32 Connection Interface]]&lt;br /&gt;
&lt;br /&gt;
The picture on the right shows the flight controller connection interface. The manual on the abusemark store has more detailed information about what the flight controller is capable of. For our purposes the 3-pin header on top of the flight controller is sending the signal to the ESCs which then control the motors. The signals come from the RC Input headers, with the * being 5V, the 8 pins to the right being RC signal from the RC Receiver and the lone pin on the left is ground. Our Xbee was also powered using this 5V connector.&lt;br /&gt;
&lt;br /&gt;
===== Power Distribution =====&lt;br /&gt;
&lt;br /&gt;
[[File:cmpe146_s12_t4_battery.jpg|200px|thumb|center|alt=Voltz 11.1V 3s 2200mAh Battery|Voltz 11.1V 3s 2200mAh Battery]]&lt;br /&gt;
&lt;br /&gt;
Power distribution can be tricky - we have one main source of power, which is a LiPo battery. This lone source is to be distributed among the ESCs - the best way to do this is with the help of a [http://www.youtube.com/watch?v=Tn2Nt3sjsI0 power spider]. Once the spider is made, the connections are super straightforward and simple - power goes to power and ground goes to ground. &lt;br /&gt;
&lt;br /&gt;
[[File:cmp146_s12_t4_wiringharness.JPG|200px|thumb|center|alt=Wiring Harness|Wiring Harness]]&lt;br /&gt;
&lt;br /&gt;
=== Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The quadrocopter consists of a frame, a flight controller board, battery, RC receiver, four motors, and four propellers. All the components are mounted on the aluminum frame, which is “X”-shaped. There are three major components mounted at the center of the frame. They are: the Naze32 flight controller board, the battery and the RC receiver. A motor is mounted at the end of each arm of the frame. The flight controller board and battery are interfaced with the motors through electronic speed controllers (or ESCs). ESCs are responsible for controlling the speed and direction of each motor. Each motor is equipped with a 10 inch diameter propeller. A propeller’s measurements are designated by their diameters and pitch. The propeller’s diameter size determines the thrust power. A larger propeller generally generates more thrust than a smaller propeller at the same RPM. When a propeller spins at a high RPM, it will generate more noise and vibration. The pitch determines how far the propeller will move per single revolution of the motor. It is important to note that propellers that sit opposite of each other rotate the same direction. Therefore, one pair of propellers will be rotating clockwise while another pair will be rotating counterclockwise. &lt;br /&gt;
&lt;br /&gt;
Quadrocopter movement is controlled by the motor rotation speed. Obvious movements, such as vertical movement, are controlled by increasing or decreasing the rpm of all four motors. To push the quadrocopter in a certain direction horizontally is done by only adjusting the motors along the axis of movement. The rotation speed of the motor that “pushes” the quadrocopter in a certain direction is increased, while the opposite motor’s rotation speed is decreased. As said earlier, the other two motor speeds are not adjusted. Calibrating all four motors in this fashion forces the quadrocopter to lean toward the side of the motor with the lowest rotation speed, and moves it in that direction. To rotate the quadrocopter in a certain direction, the motors of the propeller rotating in that direction need to be increased. Pitch and roll are accomplished by performing the same action as moving the quadrocopter horizontally.&lt;br /&gt;
&lt;br /&gt;
[[File:cmpe146_s12_t4_frame.JPG|thumb|left|alt=The ST450 frame used in the build.|The ST450 frame used in the build.]]&lt;br /&gt;
&lt;br /&gt;
The frame used was a factory made ST450 frame from Hobbycool. The frame is made in China and has some amount of portability - there are hex nuts that can be loosed to change the X format of the copter to an = format by folding the legs. The drawback is that the nuts have to be tightened every time the copter is to be flown. This can be quite inconvenient especially when all the parts are mounted. Hence a folding copter frame does not add any value to the build and can sometimes be conceived as less ideal. The frame comes with 4 10&amp;quot; propellers but they did not fit the motors we had (and better propellers were on hand).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The motors shown in the picture on the left are not the motors used in this build. The motors used in this build are shown on the right, and they produce 924rpm per volt (unit is kV, not to be confused with kiloVolt). This means that when powered with the minimum 7V each motors spin at approximately 6500rpm. When testing the copter it is now clear that the propellers should be removed. It also makes it easier to work around the little corners since there is minimal space.&lt;br /&gt;
&lt;br /&gt;
[[File:cmpe146_s12_t4_props.jpg|thumb|right|alt=Propellers|APC 10x4.7 Propeller Set (Matched)]]&lt;br /&gt;
&lt;br /&gt;
The propellers used were molded plastic propellers since they provided the best cost to performance ratio. The propellers come in matched sets - one rotates clockwise and the other rotates counter clockwise. The matched set has propellers identified as 10x4.7P and 10x4.7 - the propellers marked as P are &amp;quot;pushers&amp;quot; where they rotate counter-clockwise.&lt;br /&gt;
&lt;br /&gt;
=== Hardware Interface ===&lt;br /&gt;
&lt;br /&gt;
The flight controller used is called &amp;quot;Naze32&amp;quot; - it is based on an ARM Cortex M3 32-bit microcontroller. The firmware is available as an open source project hosted at [http://code.google.com/p/afrodevices/source/checkout Google Code] which can be checked out using subversion (or browsed using the &amp;quot;Browse&amp;quot; link). The firmware communicates with [http://www.multiwii.com/faq MultiWii] and its .NET GUI counterpart [http://code.google.com/p/mw-wingui/ MultiWii-WinGUI]. WinGUI communicates over UART to get data from the flight controller, and has a real time graphical representation of data being fed to the speed controllers and motors, along with the strength of RC input. RC input varies from 1000 - 2000, measured in milliseconds due to the nature of a PWM/PPM pulse.&lt;br /&gt;
&lt;br /&gt;
The Naze32 Flight controller board is the intersection of all connections. Everything that is used to operate the quadrocopter is essentially linked to it. To have the quadrocopter perform a function, we need to tell it what to do first. This is done by using the RC transmitter (remote controller). The RC transmitter uses radio signals to communicate with the RC receiver, which is mounted on the quadrocopter frame. When the joysticks of the RC transmitter are moved, it completes a circuit to an IC, which generates a set sequence of electrical pulses. The sequence contains a set of pulses that corresponds the movement, indicated by the joysticks on the RC transmitter. The RC receiver receives these sequences of pulses and decodes them. Depending on the width of each pulse in a set sequence, the function of the quadrocopter will change. This kind of communication-control technique is called PWM, pulse width modulation. An analogy of this technique would be two friends trying to communicate with each other by whistling. Depending on the duration of the whistle, a different message will be delivered. For example, a continuous whistle of 2 seconds could mean “walk forward” and 5 seconds could mean “walk backward”.&lt;br /&gt;
&lt;br /&gt;
The RC receiver sends the decoded PWM to the flight controller and then it powers the ESCs accordingly. The connections of the ESCs play a vital role in powering everything. The ESCs in our inventory are integrated with BECs, Battery Eliminator Circuit. BECs allows the flight controller board and RC receiver to be powered without an extra battery. Here’s how it works: the main battery is connected to the ESCs and the ESCs uses that same battery supply to power the board. This is done by connecting one (one is all that’s needed) of the ESCs’ BEC wire to the flight controller.&lt;br /&gt;
&lt;br /&gt;
On the other end of the ESCs are three of the same wires. These wires are used to power the brushless motor. These three wires can be connected one-to-one to the wires of the brushless motor in any combination. When connected and powered, the brushless motors will spin in one direction. If you are not satisfied with the direction of the motor, then this could be change by switching connection between any 2 of the 3 wires.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:cmpe146_s12_t4_blockdiagram.jpg|700px|thumb|center|alt=Quadrocopter Block Diagram|Quadrocopter Block Diagram shows the connection between the hardware components]]&lt;br /&gt;
&lt;br /&gt;
=== Software Design and Implementation ===&lt;br /&gt;
&lt;br /&gt;
Our flight controller board uses FreeRTOS to control communication between sensors and peripheral devices.  The code for this board is GPL based and we have utilized it for this project.  Our goal was to interface this board with our LPC2148 board for debugging and data logging.  We also interfaced our boards with an already existant GUI software that shows real time flight data and sensor readouts.  Communication from the flight controller board to the LPC2148 board and GUI was made over UART using a drop-in XBee wireless UART bridge.  The ultimate goal was to have the flight controller board send wireless data to our LPC2148 board.  With that data, we would perform data logging functions as well as forward the data to the GUI on our PC.  Unfortunately, we were only able to forward the data to a terminal with this configuration.  However, we were successful in interfacing the flight controller board with the GUI over Xbee directly.  As such, this section will provide design and implementation details for both separate functions.&lt;br /&gt;
&lt;br /&gt;
== Flight Controller Board ==&lt;br /&gt;
&lt;br /&gt;
Our flight controller board is capable of sending data in different formats for different devices (arduino, bluetooth, or raw data for the GUI).  We are using the full stream of raw data that is compatible with the GUI software we want to utilize.  In the flight controller's main loop, it waits for certain 'op codes' to send back appropriately formatted data.  This process is interrupt driven and sends data over UART.  In this case, our op code of interest is 'M'.  This causes the following steps to be performed until completion.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmpe146_S12_T4_FC_FlowChart.jpg|700px|thumb|center|alt=Flight Controller|Naze32 FunFly Flight Controller]]&lt;br /&gt;
&lt;br /&gt;
== LPC2148 Board and GUI Interface ==&lt;br /&gt;
&lt;br /&gt;
Our board used only one task.  We chose to modify the already existant userInterface task given in our lab because it already uses interrupts and is setup to use UART0.  We had to write a driver for UART1 in order to receive data from the flight controller board (using Xbee).  Once received, we had to parse the data into appropriate sized containers and then forward that to a terminal or SD card.  We also interfaced the board directly through UART to the GUI software we were using.  This was as simple as creating a wireless UART bridge between the flight controller board and our PC.  Once done, we used the GUI to open a serial connection and adjusted the polling frequency to take into account delays in wireless data transmission.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmpe146_S12_T4_Task_FlowChart.jpg|700px|thumb|center|alt=Task Flow Chart|Task Flow Chart]]&lt;br /&gt;
&lt;br /&gt;
=== Testing &amp;amp; Technical Challenges ===&lt;br /&gt;
&lt;br /&gt;
After obtaining a quadcopter block diagram, it was time to buy and assemble parts. This step was fairly smooth. Figuring out how to assemble the motors was a bit of a jigsaw puzzle but since there's a huge amount of variation in assembly required for such motors, it's hard to document. &lt;br /&gt;
&lt;br /&gt;
Mounting the flight controller is also a bit tricky, depending on the frame you have the separation of holes on the flight control board. The Naze32 is a tiny board, measuring 1.5x1.5 inches so the holes were too close together. We opted to use double sided tape and stick it directly on the board using Velcro so that the board can be easily removed. This produces vibrations but we will have to wait for a flight test for confirmation. &lt;br /&gt;
&lt;br /&gt;
Soldering the bullet connectors was easy - melt solder directly into the bowl of the container (get helping hands to hold the connector since it will get very hot!) and just dip the stripped wire and wait. Be sure to not strip too much of the wire since you don't want wire sticking out that carry 20 amps of current. It will be a good idea to heat-shrink these connectors for maximum safety (and it looks much more professional). Take care to get the heat shrink over both ends of the male and female. While the heatshrink covers the entire female, the male only needs to be covered about halfway - depending on the type of bullet connectors.&lt;br /&gt;
&lt;br /&gt;
After the entire copter is assembled, it is time to calibrate the transmitter with the motors and ESCs. Connect the ESC 3-pin wire directly to the receiver and turn on the transmitter. Make sure ESC and motor is powered. The exact procedure should be documented on the datasheet of the ESC you have. Our ESCs were flashed using Simon Kirby's [https://github.com/sim-/tgy sim-tgy] firmware. Instructions for calibration is provided in his github.&lt;br /&gt;
&lt;br /&gt;
'''[http://www.youtube.com/watch?v=cwnTA0SRxks Initial Flight Test]'''&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
&lt;br /&gt;
The process of building a quadrocopter was long, irritating, tiring but also fun and rewarding. The quadrocopter included some hardware that we have never seen or used before and getting them to work was a handful. A lot of lessons have been learned during the making of this project. This conclusion will include some guideline for future student to follow and learn from our mistakes.&lt;br /&gt;
&lt;br /&gt;
'''Scheduling'''&lt;br /&gt;
&lt;br /&gt;
The process of building a quadrocopter isn’t difficult but time consuming. Be sure to set up a schedule and follow it. The team should be aware of each member’s capability and distribute the workload accordingly. It is important to keep track of each member’s progress every week to keep the schedule up to date and also provide pressure and motivation to get things done. It is absolutely best to start working on the project in the beginning week of the assignment. Time is limited and you will want as much time as possible. That way when obstacles are encountered and accidents happen, there is enough time to respond accordingly and fix them.&lt;br /&gt;
&lt;br /&gt;
'''Back-Up Parts'''&lt;br /&gt;
&lt;br /&gt;
Without proper planning and handling, this project could be a nightmare. One problem that occurred was not having replacement parts at hand. There were several scenarios where a piece of hardware became defective and the extra parts were needed. For example, a few days prior to demo, it was discovered that one of the electronic speed controllers needed to be replaced. However, all four ESCs need to be exactly the same, and the ESCs were bought online and took 2-3 days to ship. As a result, 4 new lower-quality ESCs had to be bought from a local store, and more money was spent. If we had extra ESCs to begin with, this situation could have been avoided altogether. As said before, with any project accidents should be expected (especially with doing something for the first time) and having extra parts will save you a lot of downtime. When ordering parts, be sure to order one or two extras.&lt;br /&gt;
&lt;br /&gt;
'''Communication'''&lt;br /&gt;
&lt;br /&gt;
Communication is always important in teamwork. Always keep your group mates up to date on your work because that allows a team to progress forward. It is important to ask for help when needed and offer help when possible. For our quadrocopter, asking experts for help was also very useful. An employee of California Hobbies (a store that was frequently visited for parts) was a great reference for information and helped us understand the communication between the RC transmitter, receiver, and Naze32 flight controller board. Since our quadrocopter is also being used for our senior design project, Dr. Donald Hung (our project advisor) was also able to help us establish a feasible goal and provide detail about any problems that might occur. Being backed by knowledgeable faculty and experts gave us confidence throughout the entire building process and  is highly recommended for any Cmpe146 final project.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
=== Acknowledgement ===&lt;br /&gt;
&lt;br /&gt;
[http://www.rcgroups.com/forums/member.php?u=340315 timecop @RCGroups]&amp;lt;br /&amp;gt;&lt;br /&gt;
[http://www.rcgroups.com/forums/member.php?u=339839 simonk  @RCGroups]&lt;br /&gt;
&lt;br /&gt;
=== References Used ===&lt;br /&gt;
&lt;br /&gt;
[http://www.endurance-rc.com/ppmtut.php PWM and PPM explained]&lt;br /&gt;
&lt;br /&gt;
[http://electroniccircuitsforbeginners.blogspot.com/2011/05/quadrocopters-for-beginners.html Flight Mechanics information]&lt;br /&gt;
&lt;br /&gt;
[http://www.multiwii.com/ Information related to MultiWii GUI]&lt;br /&gt;
&lt;br /&gt;
=== Appendix ===&lt;br /&gt;
You can list the references you used.&lt;br /&gt;
Attach your zipped code here that may be used by other people in the future.&lt;br /&gt;
&lt;br /&gt;
[http://www.socialledge.com/sjsu/index.php?title=File:Qcopter.zip Code]&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=File:Cmpe146_s12_t4_copter.jpg&amp;diff=1098</id>
		<title>File:Cmpe146 s12 t4 copter.jpg</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=File:Cmpe146_s12_t4_copter.jpg&amp;diff=1098"/>
				<updated>2012-05-25T19:08:42Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=File:Qcopter.zip&amp;diff=1058</id>
		<title>File:Qcopter.zip</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=File:Qcopter.zip&amp;diff=1058"/>
				<updated>2012-05-25T18:54:05Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: The quadcopter eclipse project - contains information on getting the Xbee working and interfacing with the computer over UART.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The quadcopter eclipse project - contains information on getting the Xbee working and interfacing with the computer over UART.&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=File:Cmp146_s12_t4_wiringharness.JPG&amp;diff=1048</id>
		<title>File:Cmp146 s12 t4 wiringharness.JPG</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=File:Cmp146_s12_t4_wiringharness.JPG&amp;diff=1048"/>
				<updated>2012-05-25T18:48:51Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=File:Cmpe146_s12_t4_escconections.jpg&amp;diff=1037</id>
		<title>File:Cmpe146 s12 t4 escconections.jpg</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=File:Cmpe146_s12_t4_escconections.jpg&amp;diff=1037"/>
				<updated>2012-05-25T18:43:02Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=File:Cmp146_s12_t4_fc_con.jpg&amp;diff=1035</id>
		<title>File:Cmp146 s12 t4 fc con.jpg</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=File:Cmp146_s12_t4_fc_con.jpg&amp;diff=1035"/>
				<updated>2012-05-25T18:42:36Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: Flight Controller Connection Interface&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Flight Controller Connection Interface&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=File:Cmpe146_s12_t4_battery.jpg&amp;diff=1028</id>
		<title>File:Cmpe146 s12 t4 battery.jpg</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=File:Cmpe146_s12_t4_battery.jpg&amp;diff=1028"/>
				<updated>2012-05-25T18:37:14Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=File:Cmpe146_S12_T4_Task_FlowChart.jpg&amp;diff=998</id>
		<title>File:Cmpe146 S12 T4 Task FlowChart.jpg</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=File:Cmpe146_S12_T4_Task_FlowChart.jpg&amp;diff=998"/>
				<updated>2012-05-25T18:23:22Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=File:Cmpe146_S12_T4_FC_FlowChart.jpg&amp;diff=997</id>
		<title>File:Cmpe146 S12 T4 FC FlowChart.jpg</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=File:Cmpe146_S12_T4_FC_FlowChart.jpg&amp;diff=997"/>
				<updated>2012-05-25T18:22:53Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=File:Cmpe146_s12_t4_blockdiagram.jpg&amp;diff=902</id>
		<title>File:Cmpe146 s12 t4 blockdiagram.jpg</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=File:Cmpe146_s12_t4_blockdiagram.jpg&amp;diff=902"/>
				<updated>2012-05-25T17:18:25Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=File:Cmpe146_s12_t4_props.jpg&amp;diff=371</id>
		<title>File:Cmpe146 s12 t4 props.jpg</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=File:Cmpe146_s12_t4_props.jpg&amp;diff=371"/>
				<updated>2012-05-24T05:06:14Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: APC 10 x 4.7 inch propellers. 10 inch diameter with 4.7 pitch - for every rotation it pushes 4.7 inches of air. The propellers are molded and made of a plastic composite, and is very good quality for the price.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;APC 10 x 4.7 inch propellers. 10 inch diameter with 4.7 pitch - for every rotation it pushes 4.7 inches of air. The propellers are molded and made of a plastic composite, and is very good quality for the price.&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=File:Cmpe146_s12_t4_frame.JPG&amp;diff=308</id>
		<title>File:Cmpe146 s12 t4 frame.JPG</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=File:Cmpe146_s12_t4_frame.JPG&amp;diff=308"/>
				<updated>2012-05-23T19:56:00Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: The quadcopter frame used in the build. It's an all aluminum frame that is made by Chinese manufacturer HobbyLord and distributed via online channels such as www.hobbycool.com&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The quadcopter frame used in the build. It's an all aluminum frame that is made by Chinese manufacturer HobbyLord and distributed via online channels such as www.hobbycool.com&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=File:Cmpe146_s12_t4_fc.jpg&amp;diff=307</id>
		<title>File:Cmpe146 s12 t4 fc.jpg</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=File:Cmpe146_s12_t4_fc.jpg&amp;diff=307"/>
				<updated>2012-05-23T19:52:14Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: The Afroflight FunFly Naze32 Flight Controller distributed by timecop via his website at www.abusemark.com&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Afroflight FunFly Naze32 Flight Controller distributed by timecop via his website at www.abusemark.com&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=File:Cmpe146_s12_t4_esc.jpg&amp;diff=306</id>
		<title>File:Cmpe146 s12 t4 esc.jpg</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=File:Cmpe146_s12_t4_esc.jpg&amp;diff=306"/>
				<updated>2012-05-23T19:50:43Z</updated>
		
		<summary type="html">&lt;p&gt;146S12T4: DYS 30A ESC. Flashed with Simon Kirby's custom firmware for better response and handling. Also bought from Ken's Quadroufo store&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;DYS 30A ESC. Flashed with Simon Kirby's custom firmware for better response and handling. Also bought from Ken's Quadroufo store&lt;/div&gt;</summary>
		<author><name>146S12T4</name></author>	</entry>

	</feed>