Red October
     an ME218C Project

ME218C: Red October

Dept. of Mechanical Eng. | Stanford University



Splashing

Communications

Zigbee Communications

As the project specification stressed interoperability among the different helms and watercraft in the class, a communications standard for the project had to be created. Each helm and each watercraft were outfitted with a Zigbee wireless module, which allows each to both send and receive packets of data.

Each packet, per the Zigbee standard, must contain a certain number of 'overhead' packets in addition to the actual data which is being sent. These overhead bytes of data include a start byte, the length of the data being sent (in bytes), an API structure, and a checksum for the detection of errors in transmission. The API structure in turn is composed of a command, frame data, the address of both the sender and the intended recipient, several options that may be selected by the sender, and finally, the actual data which is being sent.

The overhead bytes alone account for 9 bytes of every Zigbee transmission. In addition to these required bytes, the ME218C classwide communications protocol, designed by a committee of students, requires that each transmission furthermore include 3 bytes of data for communications between the helm, craft, and Admiral.

 

The bytes, in order, are:

The navigation and special bytes only contain navigation and special data for navigation messages. For other types of messages, these bytes have a different significance.

The full specification, with all the details for all of the possible messages, as well as the required responses to each, is included in the communications protocol (.DOC)

Inter-chip Communications

A second requirement of the project was the implementation of inter-chip communication within either the craft or the helm. Due to the limitations of the hardware PWM subsystem on the PIC16F690, as well as this requirement, SPI communications was used between a single ''master' PIC that handled radio messages on the craft, and three 'slave' motor driver PICs, each of which operates a different motor. Because the EUSART lines for the 'master' PIC were already used to send and receive data between the PIC and the Zigbee module, SPI was used to communicate between the master and slave PICs .