ME218C: Smart Product Design Practice
Overview:
ME218C is the third course in Stanford's graduate level Mechatronics series. In this course, you learn about PIC architecture and assembly programming, inter-processor communication, system design with multiple microprocessors, and A/D and D/A techniques, You also get to apply that knowledge through two labs and a team course project.
Labs:
Lab 1 (Individual): Programmed an 8bit PIC in assembly to move a stepper motor using full step drive. The PIC would automatically take steps on manually take steps in a given direction based on the states of three input pins.
Lab 2 (Team): Programmed a four node UART communication network using four 8-bit PICs in a assembly. The node I programmed was responsible for reading the sending information and lighting an LED for 0.5 seconds when a button was pressed. The information was sent to the next node using UART. The 8bit PIC we used did not have a UART hardware so I utilized a hardware timer to send out the information per an agreed baud rate.
Team Project:
Please see the link at the bottom of the page for even more information including electrical schematics, code, and pictures.
The goal of the project was to create a unique hovercraft and remote control that can command every team's hovercraft to play a Hungry-Hungry Hippo like game. This involved setting up a class wide communication protocol that we would follow on top of abiding by the rules specified in the project description. The game starts with all hovercrafts free to pair. A control can request to pair with a hover craft to take control for 30 seconds or until the communication fails, whichever comes first. After which the hovercraft becomes free for pairing and the controller must find a new hover craft to pair with.
The theme of our team's hovercraft and controller paid homage to our professor, Ed Carryer. Our hovercraft took the form of his yellow Porsche and the controller of his fanny pack and headset combination he was known for amongst ME218ers. A user could command the hover craft by audio, motion, and button commands. The fanny pack housed the microcontroller and all electronics for power, signal conditioning, and communication.
In our project, I was responsible all the controller's firmware, electronics, and sensors. TI's Tiva Launchpad, an ARM Cortex M4F evaluation board, was used for the controller's development. Communication was critical for the project’s success. A controller and hover craft would be unpaired If communication was lost for 1 second, a message was encrypted incorrectly, or an incorrect checksum was sent. Wireless communication was performed via UART communication with a Xbee.
A snippet of example code for the UART initialization can be found below.
ME218C is the third course in Stanford's graduate level Mechatronics series. In this course, you learn about PIC architecture and assembly programming, inter-processor communication, system design with multiple microprocessors, and A/D and D/A techniques, You also get to apply that knowledge through two labs and a team course project.
Labs:
Lab 1 (Individual): Programmed an 8bit PIC in assembly to move a stepper motor using full step drive. The PIC would automatically take steps on manually take steps in a given direction based on the states of three input pins.
Lab 2 (Team): Programmed a four node UART communication network using four 8-bit PICs in a assembly. The node I programmed was responsible for reading the sending information and lighting an LED for 0.5 seconds when a button was pressed. The information was sent to the next node using UART. The 8bit PIC we used did not have a UART hardware so I utilized a hardware timer to send out the information per an agreed baud rate.
Team Project:
Please see the link at the bottom of the page for even more information including electrical schematics, code, and pictures.
The goal of the project was to create a unique hovercraft and remote control that can command every team's hovercraft to play a Hungry-Hungry Hippo like game. This involved setting up a class wide communication protocol that we would follow on top of abiding by the rules specified in the project description. The game starts with all hovercrafts free to pair. A control can request to pair with a hover craft to take control for 30 seconds or until the communication fails, whichever comes first. After which the hovercraft becomes free for pairing and the controller must find a new hover craft to pair with.
The theme of our team's hovercraft and controller paid homage to our professor, Ed Carryer. Our hovercraft took the form of his yellow Porsche and the controller of his fanny pack and headset combination he was known for amongst ME218ers. A user could command the hover craft by audio, motion, and button commands. The fanny pack housed the microcontroller and all electronics for power, signal conditioning, and communication.
In our project, I was responsible all the controller's firmware, electronics, and sensors. TI's Tiva Launchpad, an ARM Cortex M4F evaluation board, was used for the controller's development. Communication was critical for the project’s success. A controller and hover craft would be unpaired If communication was lost for 1 second, a message was encrypted incorrectly, or an incorrect checksum was sent. Wireless communication was performed via UART communication with a Xbee.
A snippet of example code for the UART initialization can be found below.