ECE 477: Digital Systems Senior Design Last Modified: 04-29-2017 Software Overview Year: 2017 Semester: Spring Creation Date: January 25, 2017 Author: Shubham Rastogi Team: 13 Project: RA-1 Last Modified: April 29, 2017 Email: [email protected] Assignment Evaluation: Item Assignment-Specific Items Software Overview Description of Algorithms Description of Data Structures Program Flowcharts State Machine Diagrams Writing-Specific Items Spelling and Grammar Formatting and Citations Figures and Graphs Technical Writing Style Total Score 5: Excellent 4: Good Score (0-5) Weight Point s 5 5 x2 x2 10 10 4 5 4 x2 x3 x3 8 15 12 5 3 5 5 x2 x1 x2 x3 10 3 10 15 Notes 93/100 3: Acceptable 2: Poor 1: Very Poor 0: Not attempted General Comments: https://engineering.purdue.edu/ece477 Page 1 of 6 ECE 477: Digital Systems Senior Design Last Modified: 04-29-2017 1.0 Software Overview RA-1 consists of a robotic arm and a remote-control app. The robotic arm should be able to send back data to the microcontroller based on movements created by physically moving the arm. Also, the robotic arm should be able to take data from the microcontroller and move accordingly. The display attached to the robotic arm should allow the user to choose the mode (record or remote) and go through previous recordings by the user to replay. The remote controller will be interfaced with the microcontroller using Bluetooth. It will be used to send strings of text to the microcontroller which the robotic arm will write. The microcontroller will be responsible for taking in data from the servos after the user starts the record function. The servos will send analog feedback to the microcontroller which will be converted to writable data using the ADC of the microcontroller. The data will be stored onto the microcontroller’s flash memory so that the user can replay that movement. The microcontroller will also use the PWM to send saved data to the servos to replay motion. Also, the microcontroller will also be responsible for sending the menu data to the display so that the user can interact with the microcontroller. The SPI module will be used to communicate between the display and the microcontroller. The UART of the microcontroller will be used to send packets from the remote-control app on the Android phone. The packets will contain signal data to send to the servos to move the arm. The microcontroller will need to translate the data to move the arm accordingly. 2.0 Description of Algorithms In this project, there are two main modes. A Remote mode and Learning mode. In the remote mode allows the arm to be controlled wirelessly over either Bluetooth or radio frequency. To achieve this data needs to be sent from the remote to the microcontroller. While transferring data there can be a lot noise being transmitted with it. Some algorithm needs to be used to eliminate the noise and separate it from the meaningful data. This can be done by using encoding and decoding algorithms. One lossless encoding algorithm is Huffman encoding. While this is complicated but it will serve the purpose. It will make sure that the servos are getting accurate movement data. Another way to encode the data would be to pad it with predetermined characters and then check for them while receiving them. The latter is a much simpler option and has been implemented successfully on a microcontroller since it does not require a lot of processing power. https://engineering.purdue.edu/ece477 Page 2 of 6 ECE 477: Digital Systems Senior Design Last Modified: 04-29-2017 The second mode in this project is the Learning mode. In this mode, first the user will record a motion by physically moving the arm and then when the recorded motion can be played back. An algorithm will have to be designed to store multiple recordings and play the right one back. First the data will be read by sampling the servo output at a predetermined rate. Then this data will need to be converted to a comprehensible structure to be stored contiguously. Multiple data sets will have to be stored corresponding to different recordings. The user will select which one to play back and the algorithm will choose the correct data set and play it back by giving it as an input to the servos. 3.0 Description of Data Structures The data structure we will use extensively, to store the analog output from our feedback servo motors will be a structure [3] of four arrays. The structure will have four arrays [2] because each array will store the feedback of one servo and the fourth array will store the analog feedback for the servo that is going to control the gripper apparatus for the robotic arm. There will be an array of such data structures which will be used to store different slots of recordings. The different recording slots will allow a user to store multiple movements at the same time, for different purposes. The analog feedback will be a number obtained by converting it to a digital value which will be about ten to twelve bits of resolution and will require sixteen bits or two bytes to store. We will use the UART to interface with the RN4020 [1] Bluetooth module, it will receive two bytes of data from the Bluetooth module which will be a value to be converted to a PWM duty cycle to move the robotic arm. We will use an array of unsigned sixteen bit integers to store the values from the Bluetooth module, which will be one value for each servo motor, making the array with a length of four. Each servo motor requires a PWM signal to control how much it turns. The values from the array of structures or the Bluetooth module will be converted to a PWM output voltage which will be then used to move the arm to a certain position. The recorded data from the movements made on the arm also might be stored on the flash memory. Flash is page addressable [4], so after all the data is captured in the array of the data structures, we will then divide it up pages and store it into the flash memory. Which can then be accessed later to be replayed. 4.0 Sources Cited: [1] [Online]. Available: http://ww1.microchip.com/downloads/en/DeviceDoc/50002279A.pdf. Accessed: Jan. 27, 2017. [2] "Computer programming arrays," www.tutorialspoint.com, 2017. [Online]. Available: https://www.tutorialspoint.com/computer_programming/computer_programming_arrays. htm. Accessed: Jan. 27, 2017. https://engineering.purdue.edu/ece477 Page 3 of 6 ECE 477: Digital Systems Senior Design Last Modified: 04-29-2017 [3] “Structures in C," www.tutorialspoint.com, 2017. [Online]. Available: https://www.tutorialspoint.com/cprogramming/c_structures.htm. Accessed: Jan. 27, 2017 [4] "Flash memory interface tutorial covering basic fundamentals,". [Online]. Available: http://www.eeherald.com/section/design-guide/esmod16.html. Accessed: Jan. 27, 2017. https://engineering.purdue.edu/ece477 Page 4 of 6 ECE 477: Digital Systems Senior Design Appendix 1: Program Flowcharts https://engineering.purdue.edu/ece477 Last Modified: 04-29-2017 Page 5 of 6 ECE 477: Digital Systems Senior Design Last Modified: 04-29-2017 Appendix 2: State Machine Diagrams https://engineering.purdue.edu/ece477 Page 6 of 6
© Copyright 2026 Paperzz