Digital Lab Projects Design

From Mindworks
Jump to navigation Jump to search
[[File:
Board.jpg
|300px|center|alt=]]
Sponsors Dr.James Frenzel
Team Name Curiosity Explores
Duration Spring 2019 - Fall 2019
Faculty Adviser
  • Dr.James Frenzel
  • Dr.Joesph Law
Client
  • Dr.James Frenzel
Team Members
  • Helina Evans
  • Aaron Ludwig
  • Huaqin xu

The number of unknowns that came with this project made it challenging to develop a detailed plan of action, even after establishing an area to focus on. As such, the team decided to establish broad goals so as to remain flexible to any changes or setbacks. This was achieved while minimizing the likelihood of falling significantly behind schedule through the implementation of some of the Agile/Scrum development framework principles which focus more on maximizing team productivity on a weekly basis over strictly adhering to a set project schedule.

The established plan was as follows:

  • Research hardware, software, and other tools as necessary
  • Run a simple project, supplied by Dr. Frenzel’s course, on Amazon FreeRTOS
  • Investigate FreeRTOS+TCP/IP stack
  • Implement UDP and document
  • Implement TCP and document
  • Implement HTTP Server and document

Problem Definition[edit | edit source]

Background[edit | edit source]

The Distributed Processing and Control Networks course offered by the University of Idaho uses a real-time operating system called the FreeRTOS kernel for project-based learning. When originally incorporated into the course, this software was maintained by its developers at Real Time Engineers but has since been acquired by Amazon Web Services (AWS), and has undergone some notable expansions. These changes include the inclusion of the FreeRTOS+TCP library into the main FreeRTOS repository. Upgrading to the newest iteration of the software is desirable to ensure that current concepts and technologies are being taught.

Specifications[edit | edit source]

Software[edit | edit source]

Picture Name Description
Amazon Web Services.png

Amazon Web Services AWS provides a broad set of infrastructure services, such as computing power, storage options, networking and databases delivered as a utility.
FreeRTOS.png

FreeRTOS A real-time operating system kernel distributed under the MIT open source license. It is intended for embedded applications, allowing users to break code into sets of independent tasks and ensuring timely and deterministic responses to events.
MPLAB X IDE.png
MPLAB X IDE A software program that runs on a PC (Windows®, Mac OS®, Linux®) to develop applications for Microchip microcontrollers and digital signal controllers.
MPLAB Harmony.png

MPLAB Harmony A framework that operates with PIC32 solutions and offers libraries of peripherals, drivers and system services to support application development.
MX C32.png

MX C32 C/C++ Compiler A full-featured, optimizing compiler that translates standard ANSI C programs into 32-bit device assembly language source code. The compiler also supports many command-line options and language extensions that allow full access to the 32-bit device hardware capabilities and affords fine control of the compiler code generator..

Hardware[edit | edit source]

Picture Name Description
Cerebot mx7ck board.png

Cerebot MX7CK Board A 32-bit PIC32 microcontroller-based board, it provides a single, general purpose development platform for a wide range of 32-bit MCU applications. This is the board the ECE 443 lab currently uses.
Curiosity board with PIC32MZ.png

Curiosity Board A fully integrated 32-bit development platform featuring the PIC32MZ EF MCU series. This is one of the boards Amazon FreeRTOS sources ensured was supported.

Design Considerations[edit | edit source]

Public Health, Safety, and Welfare

Currently the project would be unsafe for any use outside of an educational setting. With further development however, and extensive testing the project could perhaps be pushed in the direction of medical applications that rely on networking.

Global Factors

The project pulls from a variety of resources available online and is web accessible suggesting a possible global impact. Many systems rely on network communications mechanisms as well, so in theory this project could be pushed in that direction.

Cultural Factors

The project is currently written in English, offering limited opportunity for cultural impact.

Social Factors

The project intends to positively impact public education

Environmental Factors

The project avoids waste by reusing available hardware.

Economic Factors

The project reduces development costs by providing a stepping stone for further research.

Project Learning[edit | edit source]

In order to achieve the desired goals a lot of time was spent becoming familiar with the different parts that made up the project. This entailed developing a sufficient understanding of both the Cerebot MX7cK development board and Amazon FreeRTOS architectures.

Cerebot MX7cK[edit | edit source]

The Cerebot MX7cK development board is based on the Microchip PIC32MX795F512L microcontroller and is designed to be accessible to anyone interested in embedded control and network communications applications. It provides 52 I/O pins which support peripheral functions such as the UART, SPI, and I2C ports along with five pulse width modulated outputs and five external interrupt inputs.

PIC32MX.png


The board provides a standard 10/100 Ethernet interface composed of a 10/100 Ethernet Medium Access Controller (MAC), internal to the board’s microcontroller, and an SMSC LAN8720 Ethernet Physical Layer Transceiver (PHY), external to the board’s microcontroller. This allows for the ability to establish a connection between 10Mbps or 100Mbps Ethernet networks (see Fig 2 for visual reference).

Ethernet Controller[edit | edit source]

In order to successfully implement the FreeRTOS+TCP stack a network interface port layer was needed for the Cerebot MX7cK development board. This involved generating code to initialize the Ethernet Controller.

Ethernet Controller.png


LAN8720 Physical Layer Transceiver[edit | edit source]

The LAN8720 PHY chip is a hardware component that transmits and receives on Ethernet cables and telephone wires. It interfaces to the MAC layer via the Reduced Media Independent Interface (RMII), a standard interconnection between the MAC and the PHY for communicating data.

LAN8720.png


Because the PHY is external to the microcontroller it must be accessed through a special set of registers called Media Independent Interface Management (MIIM) registers. These registers allow users to configure, control, and collect status information on the module’s operations.

LAN8720A.png


FreeRTOS Kernel[edit | edit source]

FreeRTOS is a popular real-time operating system kernel distributed under the MIT open source license. It is intended for embedded applications, allowing users to break code into sets of independent tasks and ensuring timely and deterministic responses to events while requiring minimal ROM, RAM, and processing overhead. It comes with an extensive set of libraries that afford users with a wide variety of built-in support for developing their applications.

MQTT.png


Project Design[edit | edit source]

FreeRTOSv.8.2.2 Reference Design Project[edit | edit source]

As it stands, the Distributed Processing and Control Networks course already offers a reference design projects using functionality from FreeRTOSv.8.2.2 on its website as a platform for students to base their projects off of. This reference design project was used as a base for developing the updated reference projects so as to maintain as much of the previous file structure and project settings used in the existing template as possible. This was done with the hope that it would minimize the amount of time Dr. Frenzel would need to familiarize himself with these new projects once they were delivered. It also provided a basic main function and supporting board initialization functionality which saved the time it would require to develop these from scratch.

The FreeRTOS Website[edit | edit source]

The FreeRTOS website offers a FreeRTOS+TCP Tutorial which proved instrumental in the process of integrating the FreeRTOS+TCP library into the base FreeRTOS Reference Design Project and the subsequent development of the new reference design projects which utilized it.

Public GitHub Repositories[edit | edit source]

The GitHub project "FreeRTOS-TCP-for-PIC32" from user jjr-simiatec as well as the GitHub project "storage" from user rjvo were used as sources of code for our new projects. The "FreeRTOS-TCP-for-PIC32" project offered a network driver as well as templates for a required PHY driver which were used for both the TCP echo server as well as the UDP packet spitter projects for controlling the Cerebot’s network communication hardware. The "storage" project had a task that was used for receiving and echoing TCP packets from an established TCP socket.

Vending Machine Code[edit | edit source]

The Vending Machine project currently offered on the Distributed Processing and Control Networks course website was heavily drawn upon in order to create the HTTP server demo. The functionality of this project essentially stayed the same but was rearranged to execute within FreeRTOS tasks.

Project Testing[edit | edit source]

MPLAB Debugger[edit | edit source]

As a microchip board, the Cerebot was programmed using the MPLAB X IDE which includes built-in debugging functionality. This was used to validate code functionality and discover bugs in system execution.

Wireshark[edit | edit source]

Wireshark is widely-used multi-platform network protocol analyzer, allowing users to closely monitor and analyze network traffic(?) and behavior. This tool can read off live data from Ethernet, making it very useful for verifying the performance of the projects that were built. It can also track data from Bluetooth, USB, and others, which would be useful to have in the future should the project be expanded upon.

Putty[edit | edit source]

Open-source terminal emulator used to establish a TCP socket connection with the Cerebot.

Deliverables[edit | edit source]

  • The team successfully determined the hardware and software components most applicable to the needs and scopes of the project.
  • Provided code samples utilizing the FreeRTOS+UDP and FreeRTOS+TCP stacks, as well as an HTTP server example, giving a platform from which projects for the Distributed Processing and Control Networks course can be developed in the future.
Protocol stack.png


Team Information[edit | edit source]

Picture Info Bio
Huaqin.jpeg
Huaqin Xu
  • Major: Electrical Engineering
  • Email: xu4251@vandals.uidaho.edu
Huaqin is a oversea student from China, he is going to be a electrical engineer after graduation
Aaron1.jpg
Aaron Ludwig:
  • Major: Computer Engineering
  • Email: ludw6356@vandals.uidaho.edu
Aaron is a computer engineering student from Pocatello, ID.
Helina.png
Helina Evans
  • Major: Computer Engineering
  • Email:evan3552@vandals.uidaho.edu
Helina is from Athens, Greece and hopes to work in industry after graduation.

Additional Documentation[edit | edit source]

Team Contract

Team Contract

Meeting Minutes

Meeting Minutes Folder

Design Review

Design Review

Final Report

Final Report