Skip to content

11. Networking

Objectives of the Week

  • Demonstrate workflows used in network design
  • Implement and interpret networking protocols and/or communication protocols

Schedule

Wednesday, April 1st - Networking

Thursday, April 2nd : Wired Connections

Tuesday, April 7th : Non-wired Connections

Assingments

Group assignment:

  1. Send a message between two projects Link to group page
  2. Document your work to the group work page and reflect on your individual page what you learned

Individual assignment:

  1. design, build and connect wired or wireless node(s) with network or bus addresses and a local input and/or output device(s)

Learnings

As part of the group assignment we learned about various communication protocol.

Serial Link to group page

I2C

I2C is typicall used for communicating between sensors and micro processor or between microprocessors.

../../images/week11/I2C.jpg

two wire interface (GND, SCL, SDA) bus configuration. There is a main (typically the microcontroler) that “directs trafic” and secondaries that report (Master, slave). Main always initiates.  There is an arduino library library that can make your life easier #include

here is the same code as shown in the serial example Linked on the group page with I2C protocol instead.

../../images/week11/I2C_code.jpg  Limitation: maiximum of 127 (2^7-1) addresses (each device must have an adress)

SPI

../../images/week11/I2C.jpg

Wires - MOSI: maser out secondary in - MISO: master in secondary out - MCK: - SS1, SS2…: Secondary select - GND  Examples : SD cards

Individual Work

Based on the what we learned with regard to networking this week I made the following decisions for my final project:

Networking Architecture

Mother Board

  • The mother board should:
  • Read the motion sensor
  • Decide when the system activates
  • Send an activation command
  • Distribute power to the 4 subordinate boards

Subordinate Boards

  • Each subordinate board should:
  • Receive the activation signal
  • Run its own local timing routine
  • Drive:

    • 1 × small 6V brushed DC gearmotor
    • 6 × NeoPixels
  • This architecture is simple and functional because:

  • All boards perform the same high-level function
  • Each board can have slightly different timing via firmware

Communication

  • Constraints:
  • Only 4 subordinate boards
  • Cable length < 5 ft
  • Behavior handled locally on each board

  • Approach:

    • Use one shared ACTIVATE line from the mother board to all subordinate boards

    • How it works:

      • Mother board raises ACTIVATE signal
      • All subordinate boards detect the signal
      • Each board executes its own programmed behavior