Difference between revisions of "Simple Embedded System Project"

From Embedded Systems Learning Academy
Jump to: navigation, search
(Sample Code)
(LED Strip)
 
(68 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
== Objective ==
 
== Objective ==
Work together as a class to create a wireless network of interactive devicesAn example would be one controller responsible for lights, another controller responsible for motion sensor, and a central control can interact with these controllers to perform tasks such as turning on lights when motion has been detected.
+
Work together as a group to create an LED lighting systemYou will create hardware that controls power to a 12v LED light (or LED strip), and then write the software to control the LED light.
  
Your board contains wireless mesh network allowing you to freely connect many boards together and they can all communicate with each other.  You will exploit this capability to do something creative, and ultimately learn, and have fun.
+
Think outside the box; you can do much more :
 +
*  You can create an alarm clock and turn on LEDs on/off
 +
*  Orientation or rotation can turn on/off lights or change colors.
 +
* You can combine your group with another group to make your project look better!
  
Think outside the box; you can do much more than the examples given :
+
Note that your board contains wireless mesh network allowing you to freely connect many boards together and they can all communicate with each otherThis can be useful if you wish to earn extra credit by interacting with multiple boardsFor example, a motion sensor on one board can turn on the lights on multiple boardsThe API is documented at your board's wikipedia page.
*  A commander can be programmed as an alarm clockAnother node can be used to make a loud noise.
 
* Orientation or rotation of commander node can turn on/off lights or change colors.
 
* You can create "Christmas Lights" which has a bunch of lights connected over wireless network.
 
*:  Each light sensor node can control an LED strip not just one LED.
 
  
'''The biggest mistake students make is using a single computer to edit and compile code. This is a GROUP project, and separate groups should use separate computers to compile the code. WE DO NOT WANT TO SEE MULTIPLE PEOPLE STARING AT A SINGLE COMPUTER'''.
+
== Tools Needed ==
 +
# Wire wrapping tool - https://www.youtube.com/watch?v=8SSOKppwpAE
 +
# Wire wrapping wire - http://www.adafruit.com/product/1446
 +
# LED strip
 +
# 12 V Power Supply
 +
# SJOne Board(s)
 +
# Resistors
 +
# MOSFET
  
[[File:cmpe_proj_wireless_nodes.png|right|frame|link=Sample Wireless Nodes]]
+
== Connecting the MOSFET ==
 +
Read the datasheet for the MOSFET - http://www.mouser.com/ds/2/308/on%20semiconductor_ntd5865n-d-327059.pdf
  
== Structure ==
+
[[File:Cmpe30_Mosfet_Pin_Connections.JPG]]
There are minimum three nodes to be designed by a team of 6; you can add more nodes and more people in a team if your project is challenging enough. Each team is then split into smaller 2-person sub-team for the design of each of the nodes. Each team of 6 will compete with the other teams in your class and your grade will be assigned relative to each other with the best team earning the best grade.
+
 
 +
Also, [http://www.falstad.com/circuit/#%24+1+5.0E-6+10.20027730826997+50+5.0+50%0Af+288+240+384+240+0+1.5%0Ar+288+240+288+336+0+10000.0%0Aw+384+336+384+256+0%0Ag+384+336+384+384+0%0AR+384+112+384+80+0+0+40.0+12.0+0.0+0.0+0.5%0Ar+240+240+240+304+0+1000.0%0A162+240+304+240+336+1+2.1024259+1.0+0.0+0.0%0Ag+288+336+288+384+0%0Ag+240+336+240+384+0%0Aw+240+240+288+240+0%0AL+240+240+176+240+0+0+false+5.0+0.0%0Ax+112+322+223+325+0+12+This+LED+is+optional%0Ax+119+195+221+201+0+24+GPIO+Pin%0Ax+405+247+550+250+0+12+Note+D%2CG%2CS+pin+of+MOSFET%0Ar+384+112+384+176+0+100.0%0A162+384+176+384+224+1+2.1024259+1.0+0.0+0.0%0Ax+404+132+593+135+0+12+Calculate+R+value+based+on+Power%0Ax+94+223+247+229+0+24+Click+to+toggle%0A Please click on this demonstration link], and wire-up the GATE, SOURCE, and DRAIN as demonstrated.  More details are '''[[GPIO Interface | at this article]]'''
 +
 
 +
== LED Strip ==
 +
Current limiting resistors as shown in circuit may not be needed if using LED strip instead of single LED.
 +
LED strip usually has 2 wires: one for supply (12V) and the other for ground. If you have an RGB LED strip, it will have 4 wires Power supply, Red, Green and Blue. All the Red, Green and Blue are Grounds. Ground the color that you want to use: example: Ground RED to turn on LED strip as RED. Ground all the three colors to get white.
 +
 
 +
Do NOT use strips that are longer than a meter. cut them to required length before using.
 +
 
 +
 
 +
LED strips: http://www.adafruit.com/search?q=LED+strip&b=1
  
Each '''sub-team of 2''' should take ownership of what they will do. You '''shall not''' share the code with each other; but instead just list out "how" you can communicate. Here are a couple of examples that show how you can list your communication protocol:
+
== Power Supply ==
 +
Purchase a 12V/2A adaptor. Cut the power cord at a suitable length to reveal Power and ground lines. Use wire wrapping to connect these lines to the circuit.
  
{| class="wikitable"
+
Alternate way: Purchase this (http://www.adafruit.com/product/368) component and use wires to connect to the + and - terminals .
!colspan="2"| Lights Wireless Protocol
 
|-
 
| Wireless Channel
 
| 2580
 
|-
 
| Wireless bitrate
 
| 2000
 
|-
 
| Wireless Address
 
| 110
 
|-
 
!colspan="2"| Command List
 
|-
 
| Lights ON
 
| Send 1 byte with value 1
 
|-
 
| Lights OFF
 
| Send 2
 
|-
 
| Lights Auto
 
| Send 3
 
|}
 
  
{| class="wikitable"
+
== Connections ==
!colspan="3"| Sensor Node Wireless Protocol
+
The connections for an LED, MOSFET, board and power supply are shown below:
|-
+
[[File:project_schematic.png|500px]]
| Wireless Channel
 
| 2580
 
|-
 
| Wireless bitrate
 
| 2000
 
|-
 
| Wireless Address
 
| 125
 
|-
 
!colspan="3"| Command List
 
|-
 
| Get Light Sensor
 
| Send 1 byte with value 1
 
|  2-byte data returned as uint16_t
 
|-
 
| Get Temperature Sensor
 
| Send 1 byte with value 2
 
|  2-byte data returned as int16_t
 
|}
 
  
A good suggestion to follow is that the commander node always initiates communication and other nodes only "speak when spoken to".  This can generally simplify your project.  In other words, instead of unsolicited messages from nodes, the commander node shall initiate communication or "ask" for data.
+
All connections can be made using the wire wrapping tool. A video describing wire wrapping procedure is given above under the Tools needed section.
  
== Example Nodes ==
+
== Electronic Parts Companies and Useful Engineering Resources ==
The nodes listed below are just examples. You can and should create your own node with its own purpose that goes above and beyond the examples listed in this article. Four unique features are required per node, and some hints are provided in the latter part of this document.  '''Do not worry about the "how"; let the class instructors help you.  Just think about the "what"'''.
+
http://www.socialledge.com/sjsu/index.php?title=Electronic_Parts_Companies_and_Useful_Engineering_Resources
  
=== Lights Node ===
+
== Using the SJOne Board and connecting external components ==
This node shall act like a wireless node that is responsible to turn on and off lights. This will involve some hardware design such that you can connect your board to some high-power LEDs.  Look-up “super bright led” at sparkfun.com for examples.
+
http://www.socialledge.com/sjsu/index.php?title=SJ_One_Board
  
=== Sensor Node ===
+
This page also has a section for using wireless communication between multiple SJOne boards. In order to use the wireless functionality, an SMA connector needs to be soldered on the board. An antenna can be attached to the SMA connector.
This node shall act like a sense point for the commander node. The objective is not just to provide the on-board sense points such as temperature and light, but also implement features such that you can report other creative sense points such as a motion sensor, and distance sensor.
 
  
=== Commander Node ===
+
== Structure ==
This node shall be responsible to put it all together and serve as a single commanding node to get sensor input and control the lights. This node shall provide the interface for the user, so try to provide user options to configure features such as automatic lights, or remote controlled operation.
+
For simplicity, the minimum requirement is that a team of three is able to have control for an LED strip. It has to be interactive, for example: turning on the LEDs upon light sensor or another trigger.
  
 
<BR/>
 
<BR/>
Line 84: Line 60:
 
== Requirements ==
 
== Requirements ==
 
=== Technical ===
 
=== Technical ===
* You must use a '''<code>switch / case </code>''' code section in your code.
+
Your grade will depend on how well you follow the following requirements :
* You must use a state machine in at least one of your nodes.
+
# You must use a '''<code>switch / case </code>''' code section in your code.
*:  This could be as simple as a state machine for "Manual Lights" vs. "Automatic Lights"
+
# You must use a state machine in at least one of your nodes.
* All functions used shall be no larger than 50 lines of code.
+
#:  This could be as simple as a state machine for "Manual Lights" vs. "Automatic Lights"
*:  Split into smaller sub-functions.
+
# All functions used shall be no larger than 50 lines of code.
* You must utilize functions that use pass-by-value and pass-by-reference.
+
#:  Split into smaller sub-functions.
* Project should be self-contained
+
# You must utilize functions that use pass-by-value and pass-by-reference.
**  Project should be enclosed, with no wires visible.
+
# Project should be self-contained
**  Project should operate either by a battery or USB power, but NOT require a computer's USB port.
+
#*  Project should be enclosed, with no wires visible.
**:  Should not require the Hercules Terminal to operate
+
#*  Project should not require the Hercules Terminal to operate.
* All buttons should be labeled.
+
#* Project should preferably operate with its own independent power source (or battery pack).
*:  An operator should be able to operate without reading an instruction manual.
+
# All buttons should be labeled.
 +
#:  An operator should be able to operate without reading an instruction manual.
  
=== Deliverables ===
+
=== Items to Submit ===
 
At the end of the project, the following items need to be submitted :
 
At the end of the project, the following items need to be submitted :
 
*  Full source-code of all the projects
 
*  Full source-code of all the projects
Line 104: Line 81:
  
 
==== Project Report ====
 
==== Project Report ====
You must submit a full, documented report for your project.  The following are minimum sections required in your PDF submitted report:
+
You must submit a full, documented report for your project (one per group of six).  The following are minimum sections required in your PDF submitted report:
* Introduction
+
# Introduction
*: What does your project do?
+
#*  What does your project do?
*: Try to sell your project in this section.
+
#*  Try to sell your project in this section.
*: Add a sub-section called "Features & Communication Table"
+
#*  Add a sub-section called "Features & Communication Table"
*::  List the features of each node and the communication table.
+
#*:  List the features of each node and the communication table.
*  Schematics
+
#*:  At least four unique features per node should be listed.
*: List the hardware you used.
+
# Schematics
*: Use "LibreOffice Draw" to draw the schematics
+
#*  List the hardware you used.
* Implementation
+
#*  Use "LibreOffice Draw" to draw the schematics
*: Show your software workings using a flow-chart
+
# Implementation
*: Use bullets and pictures to show the "how" part.
+
#*  Show your software workings using a flow-chart
*: Show what Software you used to control your Hardware.
+
#*  Use bullets and pictures to show the "how" part.
* Testing
+
#*  Show what Software you used to control your Hardware.
*: What kind of tests did you perform?
+
# Testing
*: What kind of problems did you solve?
+
#*  What kind of tests did you perform?
* Conclusion
+
#*  What kind of problems did you solve?
*: What did you learn?
+
# Conclusion
*: What worked, and what didn't work?
+
#*  What did you learn?
*: How would you improve your project?
+
#*  What worked, and what didn't work?
 +
#*  How would you improve your project?
  
 
<BR/>
 
<BR/>
 
 
== Challenges & Hints ==
 
== Challenges & Hints ==
 
=== Challenges ===
 
=== Challenges ===
Line 132: Line 109:
  
 
*  How will you design your project to be user friendly?
 
*  How will you design your project to be user friendly?
*  How will you collaborate in your large team?
+
*  How will you collaborate in your team?
 
*  How will you balance your budget and keep parts cost to a minimum?
 
*  How will you balance your budget and keep parts cost to a minimum?
*  How will you design your network protocol such that each team understands a command and response system well?
 
 
*  How will you make your project more creative?  How will it stand out?
 
*  How will you make your project more creative?  How will it stand out?
*  What if you command a light output node that is not responding?
 
*:  How will you report this to the user and what would you do?
 
 
=== Wireless Packet ===
 
As of the wireless mesh network's version 1 source code, the wireless packet can be 32-bytes long, out of which 8 bytes are used by the network header and 24 bytes are free to be used.  Please take a look at the '''<code>mesh_packet_t</code>''' structure to understand the data of the wireless packet.  The only relevant fields you need to know about are :
 
* <code>data_len</code> : Size of the valid data bytes
 
* <code>data[0] - data[23]</code> : Actual data bytes.
 
 
{| class="wikitable"
 
!colspan="9"| Wireless Packet Structure
 
|-
 
!colspan="4" | 4 Byte Header
 
!colspan="2" | 2 Byte Network Address
 
!colspan="2" | 2 Byte Physical Address
 
| 24 Byte User Data
 
|-
 
| B0
 
| B1
 
| B2
 
| B3
 
| B4
 
| B5
 
| B6
 
| B7
 
| B8 - B31
 
|-
 
!colspan="4" | data_len
 
!colspan="4" | Do not use
 
| data[0] - data[23]
 
|}
 
 
=== Debugging Techniques ===
 
*  For the commander, implement a "ping" packet that is sent to everyone once a second.
 
*:  If an ACK is received, turn on an LED, otherwise turn it off (one LED per remote node).
 
*:  This will immediately help diagnose connection issues.
 
*  Any security ?
 
**  What if I get on your network and sabotage your project?
 
**  Can you implement a method such that a command is not so easy for anyone to send?
 
*  Beware of Mr. Sabotage :
 
** In your class, there will be an attacker, which will use "replay attack" technique to attack your project.
 
** Mr. Sabotage will hop from one channel to another to look for presence of the wireless data.
 
** If Mr. Sabotage can read a packet, it will replay it back randomly to confuse your project.
 
 
<BR/>
 
 
== Sample Code ==
 
If you change the '''sys_config.h''' file, you should also perform '''Project'''-->'''Clean''' and rebuild your software code.  The following items need to be modified in your project's '''sys_config.h''' file :
 
*  WIRELESS_CHANNEL
 
*: All nodes must use the same channel
 
*: Use a value different than the rest of the class.
 
*  WIRELESS_ADDRESS
 
*: Each node should have a different address
 
 
<BR/>
 
You should try the '''Light Sensor Node''' and '''Commander Node''' code below in your group of 2 to get familiar with how to communicate wirelessly.
 
 
=== Light Sensor Node ===
 
<syntaxhighlight lang="c">
 
#include <stdio.h>
 
#include "wireless.h"
 
 
void process_command(char command);
 
 
int main(void)
 
{
 
    /* Keep an enum of addresses in all your nodes */
 
    enum {
 
        lights_addr = 100,
 
        commander_addr = 200,
 
    };
 
 
    mesh_set_node_address(lights_addr);
 
 
    while (1) {
 
        /* Check if we get a packet within 1 second : */
 
        mesh_packet_t pkt;
 
        if (wireless_get_rx_pkt(&pkt, 1000)) {
 
            /* Assuming first data byte is our command: */
 
            char cmd = pkt.data[0];
 
            process_command(cmd);
 
        }
 
    }
 
    return 0;
 
}
 
 
void process_command(char command)
 
{
 
    enum {
 
        lights_on  = 1,
 
        lights_off = 2,
 
    };
 
 
    switch(command) {
 
        case lights_on:
 
            printf("TODO Turn ON lights\n");
 
        break;
 
 
        case lights_off:
 
            printf("TODO Turn OFF lights\n");
 
        break;
 
 
        default:
 
            printf("ERROR: INVALID COMMAND!\n");
 
        break;
 
    }
 
}
 
</syntaxhighlight>
 
 
<BR/>
 
 
=== Commander Node ===
 
<syntaxhighlight lang="c">
 
#include <stdio.h>
 
#include "wireless.h"
 
#include "utilities.h"
 
 
int main(void)
 
{
 
    /* Same enum as lights controller */
 
    enum {
 
        lights_on  = 1,
 
        lights_off = 2,
 
    };
 
 
    /* Keep an enum of addresses in all your nodes */
 
    enum {
 
        lights_addr = 100,
 
        commander_addr = 200,
 
    };
 
 
    const char max_hops = 1;
 
    mesh_set_node_address(commander_addr);
 
 
    while (1) {
 
        /* Turn lights on/off every 3 seconds */
 
        char cmd = 0;
 
        mesh_packet_t pkt;
 
 
        cmd = lights_on;
 
        wireless_send(lights_addr, mesh_pkt_ack, &cmd, 1, max_hops);
 
        if (wireless_get_ack_pkt(&pkt, 100)) {
 
            printf("Lights should be ON\n");
 
        }
 
        else {
 
            printf("ERROR: No acknowledge from %i (lights)\n", lights_addr);
 
        }
 
        delay_ms(3000);
 
 
        cmd = lights_off;
 
        wireless_send(lights_addr, mesh_pkt_ack, &cmd, 1, max_hops);
 
        printf( "%s\n", wireless_get_ack_pkt(&pkt, 100) ? "Lights OFF" : "Error");
 
        delay_ms(3000);
 
    }
 
    return 0;
 
}
 
</syntaxhighlight>
 
 
<BR/>
 
 
=== Ping! ===
 
<syntaxhighlight lang="c">
 
#include "io.hpp"
 
#include "wireless.h"
 
#include "soft_timer.hpp"
 
 
void ping_and_set_led(uint8_t addr, uint8_t led_num)
 
{
 
    // Send NULL data to the addressed node
 
    const char max_hops = 2;
 
    mesh_packet_t pkt;
 
    wireless_send(addr, mesh_pkt_ack, NULL, 0, max_hops);
 
 
    // Turn LED on or off based on if we get ACK packet within 100ms
 
    if (wireless_get_ack_pkt(&pkt, 100)) {
 
        LE.on(led_num);
 
    }
 
    else {
 
        LE.off(led_num);
 
    }
 
}
 
 
int main(void)
 
{
 
    /* Keep an enum of addresses in all your nodes */
 
    enum {
 
        lights_addr = 100,
 
        sensor_addr = 125,
 
        commander_addr = 200,
 
    };
 
 
    // Use a software timer "object" with 3000ms duration.
 
    SoftTimer ping_timer;
 
    ping_timer.reset(3000);
 
 
    while (1) {
 
        // If timer expires, restart it again and ping everyone.
 
        if (ping_timer.expired()) {
 
            ping_timer.restart();
 
 
            ping_and_set_led(lights_addr, 1);
 
            ping_and_set_led(sensor_addr, 2);
 
        }
 
    }
 
 
    return 0;
 
}
 
</syntaxhighlight>
 
 
<BR/>
 
 
=== Send+Receive Data Variables ===
 
In this example, a commander demands certain data to be sent by a slave node.  Also, we show you how data variables can be exchanged between two boards. '''Note that the wireless can only transport 24-bytes through a single packet.'''
 
 
<syntaxhighlight lang="c">
 
#include <stdio.h>
 
#include <stdint.h>
 
#include "wireless.h"
 
#include "io.hpp"
 
 
    /* Common between commander and sensor node
 
    * This identifies "what" the commander is asking for
 
    */
 
    enum {
 
        req_light = 1, /* Request light sensor reading      */
 
        req_temp = 2,  /* Request temperature sensor reading */
 
    };
 
 
void commander(void)
 
{
 
    /* Send an APPLICATION ACKNOWLEDGE packet.
 
    * We will DEMAND that sender sends an ACK itself rather than auto-ack
 
    */
 
    char hops = 1;
 
    char addr = 100;
 
    char cmd  = req_light; /* Request light sensor data */
 
    wireless_send(addr, mesh_pkt_ack_app, &cmd, 1, hops);
 
 
    mesh_packet_t pkt;
 
    if (wireless_get_ack_pkt(&pkt, 100)) {
 
        /* Light sensor MUST have sent 16-bit variable for this to work */
 
        uint16_t light = 0;
 
        wireless_deform_pkt(&pkt, 1, &light, sizeof(light));
 
    }
 
}
 
 
void sensor(void)
 
{
 
    mesh_packet_t pkt;
 
    uint16_t light = 0;
 
 
    if (wireless_get_rx_pkt(&pkt, 100)) {
 
        /* Check if we were asked for an application ACK */
 
        if (wireless_is_ack_required(&pkt)) {
 
 
            /* Send the packet back based on the commanded byte */
 
            const char cmd = pkt.data[0];
 
            switch (cmd) {
 
                case req_light :
 
                    /* Send packet back to network source: pkt.nwk.src */
 
                    light = LS.getRawValue();
 
                    wireless_form_pkt(&pkt, pkt.nwk.src, mesh_pkt_ack_rsp, 1,
 
                                      1,
 
                                      &light, sizeof(light));
 
                break;
 
 
                case req_temp :
 
                    /* TODO: You figure this out
 
                    * NOTE: YOU CAN SEND MORE THAN 1 VARIABLE using wireless_form_pkt()
 
                    *      Look at the function's documentation for more examples.
 
                    * It is possible to form a packet with 4 data variables too, so you
 
                    * don't have to request/get light/temp separately.
 
                    */
 
                break;
 
 
                default:
 
                    printf("ERROR: Invalid data requested!\n");
 
                break;
 
            }
 
 
            wireless_send_formed_pkt(&pkt);
 
        }
 
    }
 
}
 
</syntaxhighlight>
 
 
<BR/>
 
 
== Troubleshooting ==
 
'''My boards cannot communicate.'''
 
*  Double check '''sys_config.h''' to make sure wireless channels are the same.
 
*  Did you use correct source and destination address?  Double check the wireless address set at '''sys_config.h'''
 
*  Are the wireless boards too far away from each other?
 
*  Try doing '''Project''' --> '''Clean''' and build/compile your code again.
 
<BR/>
 
'''Sometimes wireless doesn't work'''
 
*  This is normal because sometimes wireless packets do not make it through due to interference.
 
*: Try using another wireless channel.
 
*: The wireless mesh software will retry packets a few times, but in case packets still do not make it through your software needs to be able to cope with this behavior.
 

Latest revision as of 22:37, 21 November 2014

Objective

Work together as a group to create an LED lighting system. You will create hardware that controls power to a 12v LED light (or LED strip), and then write the software to control the LED light.

Think outside the box; you can do much more :

  • You can create an alarm clock and turn on LEDs on/off
  • Orientation or rotation can turn on/off lights or change colors.
  • You can combine your group with another group to make your project look better!

Note that your board contains wireless mesh network allowing you to freely connect many boards together and they can all communicate with each other. This can be useful if you wish to earn extra credit by interacting with multiple boards. For example, a motion sensor on one board can turn on the lights on multiple boards. The API is documented at your board's wikipedia page.

Tools Needed

  1. Wire wrapping tool - https://www.youtube.com/watch?v=8SSOKppwpAE
  2. Wire wrapping wire - http://www.adafruit.com/product/1446
  3. LED strip
  4. 12 V Power Supply
  5. SJOne Board(s)
  6. Resistors
  7. MOSFET

Connecting the MOSFET

Read the datasheet for the MOSFET - http://www.mouser.com/ds/2/308/on%20semiconductor_ntd5865n-d-327059.pdf

Cmpe30 Mosfet Pin Connections.JPG

Also, Please click on this demonstration link, and wire-up the GATE, SOURCE, and DRAIN as demonstrated. More details are at this article

LED Strip

Current limiting resistors as shown in circuit may not be needed if using LED strip instead of single LED. LED strip usually has 2 wires: one for supply (12V) and the other for ground. If you have an RGB LED strip, it will have 4 wires Power supply, Red, Green and Blue. All the Red, Green and Blue are Grounds. Ground the color that you want to use: example: Ground RED to turn on LED strip as RED. Ground all the three colors to get white.

Do NOT use strips that are longer than a meter. cut them to required length before using.


LED strips: http://www.adafruit.com/search?q=LED+strip&b=1

Power Supply

Purchase a 12V/2A adaptor. Cut the power cord at a suitable length to reveal Power and ground lines. Use wire wrapping to connect these lines to the circuit.

Alternate way: Purchase this (http://www.adafruit.com/product/368) component and use wires to connect to the + and - terminals .

Connections

The connections for an LED, MOSFET, board and power supply are shown below: Project schematic.png

All connections can be made using the wire wrapping tool. A video describing wire wrapping procedure is given above under the Tools needed section.

Electronic Parts Companies and Useful Engineering Resources

http://www.socialledge.com/sjsu/index.php?title=Electronic_Parts_Companies_and_Useful_Engineering_Resources

Using the SJOne Board and connecting external components

http://www.socialledge.com/sjsu/index.php?title=SJ_One_Board

This page also has a section for using wireless communication between multiple SJOne boards. In order to use the wireless functionality, an SMA connector needs to be soldered on the board. An antenna can be attached to the SMA connector.

Structure

For simplicity, the minimum requirement is that a team of three is able to have control for an LED strip. It has to be interactive, for example: turning on the LEDs upon light sensor or another trigger.


Requirements

Technical

Your grade will depend on how well you follow the following requirements :

  1. You must use a switch / case code section in your code.
  2. You must use a state machine in at least one of your nodes.
    This could be as simple as a state machine for "Manual Lights" vs. "Automatic Lights"
  3. All functions used shall be no larger than 50 lines of code.
    Split into smaller sub-functions.
  4. You must utilize functions that use pass-by-value and pass-by-reference.
  5. Project should be self-contained
    • Project should be enclosed, with no wires visible.
    • Project should not require the Hercules Terminal to operate.
    • Project should preferably operate with its own independent power source (or battery pack).
  6. All buttons should be labeled.
    An operator should be able to operate without reading an instruction manual.

Items to Submit

At the end of the project, the following items need to be submitted :

  • Full source-code of all the projects
  • Individual evaluations about team members and their contribution
    This will be confidential, and you can submit as one per person (at Canvas).

Project Report

You must submit a full, documented report for your project (one per group of six). The following are minimum sections required in your PDF submitted report:

  1. Introduction
    • What does your project do?
    • Try to sell your project in this section.
    • Add a sub-section called "Features & Communication Table"
      List the features of each node and the communication table.
      At least four unique features per node should be listed.
  2. Schematics
    • List the hardware you used.
    • Use "LibreOffice Draw" to draw the schematics
  3. Implementation
    • Show your software workings using a flow-chart
    • Use bullets and pictures to show the "how" part.
    • Show what Software you used to control your Hardware.
  4. Testing
    • What kind of tests did you perform?
    • What kind of problems did you solve?
  5. Conclusion
    • What did you learn?
    • What worked, and what didn't work?
    • How would you improve your project?


Challenges & Hints

Challenges

Over the course of the project, you will encounter some real-world problems such as :

  • How will you design your project to be user friendly?
  • How will you collaborate in your team?
  • How will you balance your budget and keep parts cost to a minimum?
  • How will you make your project more creative? How will it stand out?