Difference between revisions of "ME 333 Introduction to Mechatronics (Archive Winter 2016)"
NickMarchuk (talk | contribs) m (moved ME 333 Introduction to Mechatronics to ME 333 Introduction to Mechatronics (Archive Winter 2016): archive) |
|||
(166 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
'''Winter Quarter |
'''Winter Quarter 2016''' |
||
'''First day of class is Tuesday January 5.''' |
|||
* Section 20: Prof. Nick Marchuk (nick.marchuk@gmail.com), T Th, 11:00-12:20, The Garage (Henry Crown Sports Pavilion, 2311 Campus Drive, Suite 2300) |
|||
* Section 21: Prof. Nick Marchuk (nick.marchuk@gmail.com), T Th, 12:30-1:50, The Garage (Henry Crown Sports Pavilion, 2311 Campus Drive, Suite 2300) |
|||
* TAs: |
|||
** Sandra Fang (SandraFang@u.northwestern.edu) |
|||
** Alireza Zaheri (azaheri@u.northwestern.edu) |
|||
<!-- |
|||
* '''Pizza and Programming Party''', Monday Jan 11, 6:00-8:00, Tech B211 (ME conference room). Get help, or help others, on the programming assignment! Sponsored by [https://asg.northwestern.edu/student-faculty-interaction-grants/ Student-Faculty Interaction Grants] (now accepting applications for your events!) |
|||
--> |
|||
* '''Final demo''' (in lieu of final exam): Monday Mar 14 3-5 PM (12:30-1:50 section) and Wednesday Mar 16 9-11 AM (11-12:20 section) |
|||
* Office Hours: every day 4-5 (Prof. Marchuk, Mechatronics Lab, Ford B100), TAs TBD |
|||
'''First day of class is Tuesday January 7.''' |
|||
* Section 20: Prof. Kevin Lynch, T Th, 11:00-12:20, Tech LR4 |
|||
* Section 21: Prof. Nick Marchuk, T Th, 12:30-1:50, Tech LR4 |
|||
* TAs: Craig Shultz, craigshultz2012@u.northwestern.edu, and Matt Elwin, elwin@u.northwestern.edu |
|||
* C Peer Instruction Sessions: TBA |
|||
* '''Final demo''' (in lieu of final exam): Monday Mar 17 3-5 PM (12:30-1:50 section) and Wednesday Mar 19 9-11 AM (11-12:20 section) in LR4 |
|||
* Office Hours: TBA |
|||
** Monday 2-3 PM, Tech B230 (NxR Lab): Matt |
|||
** Tuesday 2-3 PM, Tech B222: Prof. Lynch |
|||
** Wednesday 3-4 PM, Tech B230 (NxR Lab): Craig |
|||
** Every day, 4-5 PM, Ford basement Mechatronics Lab (B100): Prof. Marchuk |
|||
* Quick links: |
* Quick links: |
||
** [ |
** [http://www.it.northwestern.edu/education/login.html Canvas Course Management System] |
||
** [[ |
** [[NU32 Videos|NU32 Videos]] |
||
** [[NU32 Software|NU32 Software]] |
|||
** [https://docs.google.com/forms/d/1LkHw5Lthzfudmoc3s3vediJe34B4qfFAnEiTqxew5IE/viewform?usp=send_form Report a typo or bug in the book] |
|||
<!-- |
|||
** [https://it.mccormick.northwestern.edu/matlab/student_license/index.php Purchase Your ME 333 Kit] |
|||
** [https://docs.google.com/forms/d/1V5VmjJdQGrsS3PjslubUS3cHMgHWLJCCPHxrewsFAyA/viewform Send a question for possible discussion in the next class] (use the Canvas discussion group for an online discussion) |
|||
** [https://groups.google.com/a/u.northwestern.edu/forum/#!forum/me333-2014.me Google discussion forum] |
** [https://groups.google.com/a/u.northwestern.edu/forum/#!forum/me333-2014.me Google discussion forum] |
||
** [[NU32: What is in the NU32 Kit|NU32 kit]] |
** [[NU32: What is in the NU32 Kit|NU32 kit]] |
||
--> |
|||
== Purpose of this Course == |
== Purpose of this Course == |
||
The purpose of this course is to '''provide tools that help you express your creativity'''. Maybe you want to build a robot, or a piece of kinetic art, or an automatic ball-throwing device to entertain your dog; maybe you've identified a market for a new smart product and you'd like to prototype the device. This course provides fundamentals of mechatronics to give you confidence to take on these projects. You are encouraged to take what you learn in this course and apply it in the project-based ME 433 Advanced Mechatronics course, Design Competition, or independent projects. |
The purpose of this course is to '''provide tools that help you express your creativity'''. Maybe you want to build a robot, or a piece of kinetic art, or an automatic ball-throwing device to entertain your dog; maybe you've identified a market for a new smart product and you'd like to prototype the device. This course provides fundamentals of mechatronics to give you confidence to take on these projects. You are encouraged to take what you learn in this course and apply it in the project-based ME 433 Advanced Mechatronics course, Design Competition, senior design projects, or independent projects. |
||
== Approximate Syllabus == |
== Approximate Syllabus == |
||
Line 29: | Line 38: | ||
'''You will do a lot of programming in this course!''' If you are certain you hate programming, then this is not the course for you. But knowing how to program is very useful for any modern engineer. The language we will use is C, a fairly low-level language that works well for microcontrollers, which is more portable and not nearly as painful and low-level as assembly language. If you don't know C, that's not a problem, most students don't before taking ME 333; but you should plan to learn it, and rather quickly. You will have all the materials you need to start learning C before class starts, and '''the first assignment on C is due on the first day of class'''! The reason: even though we start out with C, that's not the main goal of this course. The main goal is to teach you about microcontrollers and mechatronics. Plus some students already have C background. |
'''You will do a lot of programming in this course!''' If you are certain you hate programming, then this is not the course for you. But knowing how to program is very useful for any modern engineer. The language we will use is C, a fairly low-level language that works well for microcontrollers, which is more portable and not nearly as painful and low-level as assembly language. If you don't know C, that's not a problem, most students don't before taking ME 333; but you should plan to learn it, and rather quickly. You will have all the materials you need to start learning C before class starts, and '''the first assignment on C is due on the first day of class'''! The reason: even though we start out with C, that's not the main goal of this course. The main goal is to teach you about microcontrollers and mechatronics. Plus some students already have C background. |
||
You will bring your laptop to each class. As the quarter progresses, we will be handing out other equipment that you will need to bring to class, such as the NU32 development board that breaks out the [http://www.microchip.com/wwwproducts/Devices.aspx? |
You will bring your laptop to each class. As the quarter progresses, we will be handing out other equipment that you will need to bring to class, such as the NU32 development board that breaks out the [http://www.microchip.com/wwwproducts/Devices.aspx?product=PIC32MX795F512H PIC32MX795F512H] microcontroller. |
||
'''It is essential you do the assigned reading and watch the videos in advance of class.''' You will have an assignment and/or lecture comprehension questions (L-comps) due before every class, turned in electronically on Canvas. (This includes the very first day of class!) Once a week we will have a short quiz. Most classes will have a combination of a brief review, Q&A, and working individually or in small groups on problems while the instructors help answer any questions. |
'''It is essential you do the assigned reading and watch the videos in advance of class.''' You will have an assignment and/or lecture comprehension questions (L-comps) due before every class, turned in electronically on Canvas. (This includes the very first day of class!) Once a week we will have a short quiz. Most classes will have a combination of a brief review, Q&A, and working individually or in small groups on problems while the instructors help answer any questions. |
||
Topics we will cover include: |
Topics we will cover, time depending, include: |
||
* introduction to C programming |
* introduction to C programming |
||
Line 53: | Line 62: | ||
* Complete the reading and assignment 1, which is '''due the first day of class!''' <!-- In fact, the first two weeks of assignments are already posted, so you are welcome to complete them all over the break and coast through the first two weeks of class.--> The first assignments are designed to get you up to speed on the C programming language, which we will use throughout the course. |
* Complete the reading and assignment 1, which is '''due the first day of class!''' <!-- In fact, the first two weeks of assignments are already posted, so you are welcome to complete them all over the break and coast through the first two weeks of class.--> The first assignments are designed to get you up to speed on the C programming language, which we will use throughout the course. |
||
* Have a laptop with at least 2 USB ports. Any operating system is fine. One port will be used to program and communicate with your PIC microcontroller, and the other will be used for your portable oscilloscope. |
* Have a laptop with at least 2 USB ports. Any operating system is fine. One port will be used to program and communicate with your PIC microcontroller, and the other will be used for your portable oscilloscope. |
||
* Be prepared to buy your |
* Be prepared to buy your class kit, consisting of the portable nScope oscilloscope, the NU32 PIC32 development board, textbook, and lots of other goodies. Price $125 if you are starting from scratch; $75 if you already have the nScope. |
||
<!-- * Be able to solve circuit problems similar to those on the practice problem set and last year's quiz at the bottom of [[ME_333_Circuits_Review_Material|this page]]. Be prepared for a quiz on this material in the second week of class. We will only spend one class period reviewing this material.--> |
<!-- * Be able to solve circuit problems similar to those on the practice problem set and last year's quiz at the bottom of [[ME_333_Circuits_Review_Material|this page]]. Be prepared for a quiz on this material in the second week of class. We will only spend one class period reviewing this material.--> |
||
* Buy your class kit [http://it.mccormick.northwestern.edu/matlab/student_license/login.php '''here''']. If you already have the oscilloscope and multimeter from this year's ME 233 offering, you should choose "ME 333 (nScope not needed ($75))" for the price of $75. If you do not have the oscilloscope and multimeter, you should choose "ME 333 (including nScope ($125))" for the price of $125. You will not be able to start the course until you have completed the purchase of your kit. If you decide to drop the course, you will be refunded the purchase price upon return of all the equipment in working shape. |
|||
<!--* '''If you are not already comfortable with the C language, or if you do not already have a C compiler installed on your laptop, this step is recommended before the first day of class. This will give you a headstart on learning C. If you don't complete this before the first day of class, you will need to do it before the second class.''' Download and install the GCC GNU compiler collection and the Netbeans IDE (Integrated Development Environment) following the instructions [[Installing_a_C_Compiler_and_IDE|here]]. Verify that you can compile and run the sample programs at the end of that page. Read the comments in invest.c to find references to the [[Media:CrashCourseinC.pdf|Crash Course in C document]] and answer the questions to learn more about C. '''If you have problems installing a C compiler and running the programs, then you can still get a headstart before the first class by focusing on reading the C programs and the Crash Course in C manual to understand how they work.'''--> <!-- * Download and install software described on [[NU32v2: Software to Install|this page]]. --> |
<!--* '''If you are not already comfortable with the C language, or if you do not already have a C compiler installed on your laptop, this step is recommended before the first day of class. This will give you a headstart on learning C. If you don't complete this before the first day of class, you will need to do it before the second class.''' Download and install the GCC GNU compiler collection and the Netbeans IDE (Integrated Development Environment) following the instructions [[Installing_a_C_Compiler_and_IDE|here]]. Verify that you can compile and run the sample programs at the end of that page. Read the comments in invest.c to find references to the [[Media:CrashCourseinC.pdf|Crash Course in C document]] and answer the questions to learn more about C. '''If you have problems installing a C compiler and running the programs, then you can still get a headstart before the first class by focusing on reading the C programs and the Crash Course in C manual to understand how they work.'''--> <!-- * Download and install software described on [[NU32v2: Software to Install|this page]]. --> |
||
== Student Contract == |
== Student Contract == |
||
By signing up for this course, you agree to complete the checklist above before the course starts. You agree to stay engaged during the class period; even if your computer is open, no facebook or other distractions that will lessen your contribution to the class. You understand that learning from classmates, and helping classmates, is encouraged, up to the stage of conceptualizing solutions. You |
By signing up for this course, you agree to complete the checklist above before the course starts. You agree to stay engaged during the class period; even if your computer is open, no facebook or other distractions that will lessen your contribution to the class. You understand that learning from classmates, and helping classmates, is encouraged, up to the stage of conceptualizing solutions. You are not allowed to fully complete a solution in a team. You understand that plagiarism is not tolerated. You will report instances of plagiarism you are aware of. Plagiarism includes, but is not limited to: |
||
* Allowing another student to copy your |
* Allowing another student to copy your work. |
||
* Copying another student's |
* Copying another student's work, in whole or in part. |
||
* Transforming copied sections of code to try to disguise their origin. |
* Transforming copied sections of code or solutions to try to disguise their origin. |
||
* Borrowing code from others not in the course, e.g., code found on the internet, without attribution. Borrowing code found on the internet is acceptable if the source is clearly indicated in your code comments, and if you understand how the code works. |
* Borrowing code or solutions from others not in the course, e.g., code found on the internet, without attribution. Borrowing code found on the internet is acceptable if the source is clearly indicated in your code comments, and if you understand how the code works. |
||
On our part (faculty and TAs), we commit to do our best to provide you a curriculum and set of experimental materials to get you up to speed on sophisticated mechatronics integration as quickly and efficiently as possible, while giving you a foundation in concepts needed to go further in future projects and courses. |
On our part (faculty and TAs), we commit to do our best to provide you a curriculum and set of experimental materials to get you up to speed on sophisticated mechatronics integration as quickly and efficiently as possible, while giving you a foundation in concepts needed to go further in future projects and courses. |
||
Line 71: | Line 80: | ||
== Prerequisite == |
== Prerequisite == |
||
ME 233 Electronics Design or similar (EECS 221, 225) is required. You will be expected to analyze circuits with resistors, capacitors, inductors, diodes, transistors, and op-amps. You can find refresher material and a sample quiz at [[ME_333_Circuits_Review_Material|this page]]. |
ME 233 Electronics Design or similar (EECS 221, 225) is required. You will be expected to analyze circuits with resistors, capacitors, inductors, diodes, transistors, and op-amps. You can find refresher material and a sample quiz at [[ME_333_Circuits_Review_Material|this page]] and in Appendix B of the book. |
||
== Reading == |
== Reading == |
||
Line 77: | Line 86: | ||
Required: |
Required: |
||
* Textbook: "Embedded Computing and Mechatronics with the PIC32 Microcontroller" ([http://www.amazon.com/gp/product/0124201652/ Amazon], [http://store.elsevier.com/product.jsp?isbn=9780124201651 Elsevier]). Sample chapters, including the appendix "A Crash Course in C" can be found in the [[Media:EmbeddedComputingMechatronicsSampleChapters.pdf|freely downloadable sample chapters]]. |
|||
* [[Media:book-current.pdf|A Crash Course in C]]: A brief introduction to the C programming language. Sample code from this appendix can be found [[ME 333 Readings, Videos, and Sample Code|here]]. |
|||
** '''The textbook is included in the class kit, you do not need to buy it online or at the bookstore!''' |
|||
* Optional: [[Media:EssentialC.pdf|Essential C]] is also a very nice intro to C. Let us know about other online C resources you find particularly useful. |
* Optional: [[Media:EssentialC.pdf|Essential C]] is also a very nice intro to C. Let us know about other online C resources you find particularly useful. |
||
* [[Media:PIC32MXDS-Dec2013.pdf|PIC32MX5xx/6xx/7xx Family Data Sheet (Dec 2013)]] |
* [[Media:PIC32MXDS-Dec2013.pdf|PIC32MX5xx/6xx/7xx Family Data Sheet (Dec 2013)]] |
||
* [[Media:PIC32RefManual-Dec2013.pdf|PIC32 Reference Manual (Dec 2013)]] |
* [[Media:PIC32RefManual-Dec2013.pdf|PIC32 Reference Manual (Dec 2013)]] |
||
Find a typo in the book or a bug in the code? Report it [https://docs.google.com/forms/d/1LkHw5Lthzfudmoc3s3vediJe34B4qfFAnEiTqxew5IE/viewform?usp=send_form here] |
|||
<!-- |
<!-- |
||
* wiki info on [[Microchip PICs]] |
* wiki info on [[Microchip PICs]] |
||
Line 102: | Line 114: | ||
== Homework Submission == |
== Homework Submission == |
||
All homework (except |
All homework (except for the first class, when paper solutions should be turned in at the beginning of class) will be submitted using the [[http://www.it.northwestern.edu/education/login.html Canvas Course Management System]. Homework should be submitted by 11 AM on the day it is due (i.e., before the first section of the day). Late homework will not be accepted. |
||
Here are a few guidelines/tips associated with homework submissions: |
Here are a few guidelines/tips associated with homework submissions: |
||
* Upload files individually. No more zip archives! |
|||
* Upload files individually. No zip archives! |
|||
* Unless otherwise stated, L-Comps should be in a single file. |
|||
* Submit written responses as PDFs. |
|||
* Be neat and make sure your answers are easy to follow. Messy hard-to-follow assignments make TAs cranky, and you don't want cranky TAs grading your assignment! |
|||
* If you upload a PDF of handwritten work, make sure that the text appears clearly and the picture is oriented portrait style. "Cam Scanner" for Android and iOS phones easily scans images and compiles them into a single PDF file. |
|||
* Unless otherwise stated, L-Comps should be in a single file. |
|||
* When asked to submit C code for a given programming assignment, we are only concerned with receiving the relevant source files, i.e., all *.c and *.h files. We do not want entire IDE/MPLAB X projects or executables/object files. |
* When asked to submit C code for a given programming assignment, we are only concerned with receiving the relevant source files, i.e., all *.c and *.h files. We do not want entire IDE/MPLAB X projects or executables/object files. |
||
* When writing your responses, please follow any instructions on how to write your response. For example, if we ask for a snippet of code, please do not submit your entire C program with header files and a main routine. We typically are only expecting a few lines of code that solve the problem. |
|||
* If you upload an image of handwritten work make sure that the text appears clearly and the picture is oriented portrait style. |
|||
* When writing your responses, please follow any instructions on how to write your response. For example, if we ask for a snippet of code, please do not submit your entire C program with header files and a main routine. We typically are only expecting a few lines of code that solves the problem. |
|||
* Be neat and make sure your answers are easy to follow. Messy hard-to-follow assignments make TAs cranky, and you don't want cranky TAs grading your assignment! |
|||
* When submitting written responses, we prefer PDF files, but will accept word documents (.doc, .docx), .txt, and .rtf files. |
|||
* It helps both us and you if you format your code nicely. Clean looking code is easier for us to grade and easier for you to debug. Text editors with IDEs such as Netbeans and MPLAB X have tools for auto-formatting code. For example, highlighting a region and hitting Alt+Shift+f (Linux and Windows) will format that region according to your local formatting preferences. |
* It helps both us and you if you format your code nicely. Clean looking code is easier for us to grade and easier for you to debug. Text editors with IDEs such as Netbeans and MPLAB X have tools for auto-formatting code. For example, highlighting a region and hitting Alt+Shift+f (Linux and Windows) will format that region according to your local formatting preferences. |
||
* When you compile your code, pay attention to any compiler warnings. They are there for a reason! You should be able to eventually get your code to produce no warnings. Often if a piece of code is not working, the warnings will give a clue as to why. |
* When you compile your code, pay attention to any compiler warnings. They are there for a reason! You should be able to eventually get your code to produce no warnings. Often if a piece of code is not working, the warnings will give a clue as to why. |
||
<!--Note that in "project properties" in both IDEs, it is possible to generate "Additional warnings." This tells your compiler to be more strict about the rules of C. The better you adhere to these rules, the more likely it is that your code will compile.--> |
<!--Note that in "project properties" in both IDEs, it is possible to generate "Additional warnings." This tells your compiler to be more strict about the rules of C. The better you adhere to these rules, the more likely it is that your code will compile.--> |
||
== Schedule == |
== Schedule == |
||
This course is (partially) "flipped": you watch video lectures and do readings in advance of class, and during class, you should have plenty of opportunity for questions and interaction with the instructors and TAs as you work on assignments. The purpose of this is to try to maximize the value of the class time. In a typical lecture, 80% of the material is the same every time it is given, and the other 20% is interactive and variable based on student questions. In a flipped class, we hope to flip this percentage, to better tailor the class to student needs. You will have time with the instructors while your brains are actually on and working on the material (not just scribbling notes), the times when you are most likely to have questions. Making the video lectures available should also allow |
This course is (partially) "flipped": you watch video lectures and do readings in advance of class, and during class, you should have plenty of opportunity for questions and interaction with the instructors and TAs as you work on assignments. The purpose of this is to try to maximize the value of the class time. In a typical lecture, 80% of the material is the same every time it is given, and the other 20% is interactive and variable based on student questions. In a flipped class, we hope to flip this percentage, to better tailor the class to student needs. You will have time with the instructors while your brains are actually on and working on the material (not just scribbling notes), the times when you are most likely to have questions. Making the video lectures available should also allow you to spend more or less time on the lecture portion, depending on your prior background. If the material is difficult for you, you can pause or rewind. |
||
'''Please keep track of any questions you have as you watch the videos!''' Bring these questions to class; it will make for a livelier classroom. |
'''Please keep track of any questions you have as you watch the videos!''' Bring these questions to class; it will make for a livelier classroom. |
||
All |
All videos can be found at this page: [[NU32 Videos|'''NU32 Videos''']] and sample code at the bottom of [[NU32 Software|'''NU32 Software''']]. We will cover almost all of the Appendix, a Crash Course in C, in the first 1.5 weeks of class, so you can work ahead and do all the readings, watch all the videos, and do all the problems, if you have time over the break. But at a minimum, you must do the winter break assignment. |
||
After the first two weeks of class, we will have video lecture comprehension questions (L-comps) due before every class, assignments due every Tuesday, and quizzes every Thursday (on the material covered in the assignment turned in on Tuesday). L-comps and assignments are turned in using Canvas before 11 AM the day of the class. |
After the first two weeks of class, we will have video lecture comprehension questions (L-comps) due before every class, assignments due every Tuesday, and quizzes every Thursday (on the material covered in the assignment turned in on Tuesday). L-comps and assignments are turned in using Canvas before 11 AM the day of the class. The weekly rhythm will be: |
||
* before Tuesday: turn in assignment on material from previous week and L-comps on videos for the next class |
|||
* Tuesday in class: discuss assignment, brief recap and Q&A on new videos, start on next assignment |
|||
* before Thursday: turn in L-comps on videos for next class |
|||
* Thursday in class: brief quiz on material in assignment turned in on Tuesday, recap and discuss videos, continue with assignment |
|||
'''Winter Break''' |
'''Winter Break''' |
||
: '''Reading due for first class''': pages |
: '''Reading due for first class''': pages 515-527 in the [[Media:EmbeddedComputingMechatronicsSampleChapters.pdf|freely downloadable sample chapters]] |
||
: '''Videos''': 1-7 of Appendix A [[NU32 Videos]]. Answer the lecture comprehension (L-comp) questions underneath each of the videos (you may need to click to expand). Turn in a paper version of your answers at the beginning of the first class. |
|||
: '''Videos''': 1-7 of [[ME 333 Readings, Videos, and Sample Code|A Crash Course in C]] |
|||
: '''Assignment |
: '''Assignment''': Also do exercises 1-4, 6-8, 10-11, 16-17 of A Crash Course in C. Bring your laptop to class and demonstrate your HelloWorld.c program. |
||
'''Class 1''' (T 1/ |
'''Class 1''' (T 1/5) |
||
: '''Assignment due''': Hand in a paper version of your L-comp and exercise solutions for the Winter Break assignment at the beginning of class. |
|||
'''Class 2''' (Th 1/9) |
|||
: '''Assignment due''': Hand in paper versions of your solutions at the beginning of class. |
|||
: '''In-class demo:''' Exercise 1. |
: '''In-class demo:''' Exercise 1. |
||
: '''Assignment discussion''' |
: '''Assignment discussion''' |
||
: '''Brief review of videos and readings''' |
: '''Brief review of videos and readings''' |
||
: '''Discussion''' |
: '''Discussion''' |
||
: '''Begin next assignment:''' |
: '''Begin next assignment:''' Appendix A exercises 18-19, 21-22, 27-28, 30-32, 34. Prepare to demo 34. Pay for your equipment. |
||
At home: |
At home: |
||
: Videos (and L-comps): 8-16 of a Crash Course in C. L-comps can be found at the bottom of the "description" portion of the video. You need to click it to expand it. |
: Videos (and L-comps): 8-16 of a Crash Course in C. L-comps can be found at the bottom of the "description" portion of the video. You need to click it to expand it. |
||
: Reading: Through page |
: Reading: Through page 562 of a Crash Course in C, and the rest as reference. |
||
'''Class |
'''Class 2''' (Th 1/7) |
||
: '''Before 11 AM:''' Turn in assignment and L-comps |
: '''Before 11 AM:''' Turn in assignment from Class 1 and L-comps. |
||
: '''In-class demo:''' Exercise |
: '''In-class demo:''' Exercise 34. |
||
: '''Assignment discussion''' |
: '''Assignment discussion''' |
||
: '''Brief review of videos, readings, and L-comps''' |
: '''Brief review of videos, readings, and L-comps''' |
||
: '''Discussion''' |
: '''Discussion''' |
||
: '''Begin next assignment:''' Exercise |
: '''Begin next assignment:''' Exercise 35, and prepare to demo it. If you have not yet, pay for your equipment. |
||
At home: |
At home: |
||
: Videos (and L-comps): |
: Videos (and L-comps): 17 of a Crash Course in C. |
||
: Reading: Rest of a Crash Course in C as reference |
: Reading: Rest of a Crash Course in C as reference |
||
: '''Note: Pizza and Programming Party, Monday Jan 11, 6:00-8:00, Tech L211''' |
|||
: '''Programming and Pizza!''' Wed 1/15, 6-8 PM, courtest of ASG's [https://asg.northwestern.edu/student-faculty-interaction-grants Student-Faculty Interaction Grants]. Tech B211, ME conference room. Get help from classmates and instructors on any C questions. |
|||
'''Class |
'''Class 3''' (T 1/12) |
||
: '''Before 11 AM:''' Turn in assignment |
: '''Before 11 AM:''' Turn in assignment from Class 2 and L-comps. |
||
: '''In-class demo:''' Exercise |
: '''In-class demo:''' Exercise 35. |
||
: '''Assignment discussion''' |
: '''Assignment discussion''' |
||
: '''Brief review of videos, readings, and L-comps''' |
|||
: '''Discussion''' |
|||
: '''In-class assignment: Creating your own helper library''' |
|||
At home: |
|||
: Videos (no L-comps): Chapter 1 (for your specific OS) |
|||
: Reading: Chapter 1: Quickstart |
|||
: Assignment: Download, install, and compile all software as indicated through the end of Chapter 1.3. See [[NU32 Software | NU32 Software]] |
|||
'''Class 4''' (Th 1/14) |
|||
: '''Quiz:''' On C. <!--[[Media: Quiz 1 ME333.pdf| Quiz 1 Solutions]]--> |
|||
: '''Distribute hardware and everyone go through the quickstart''' |
|||
At home: |
|||
: Videos (and L-comps): 1-4 from Chapter 2. |
|||
: Reading: Complete Chapter 1 (quickstart) and Chapter 2. |
|||
: Assignment due at the beginning of class on Tues 1/19: Problems 3-16 of Chapter 2. You will need the [[Media:PIC32MXDS-Dec2013.pdf|PIC32MX5xx/6xx/7xx Family Data Sheet (Dec 2013)]] and the [[Media:PIC32RefManual-Dec2013.pdf|PIC32 Reference Manual (Dec 2013)]]. |
|||
'''Class 5''' (T 1/19) |
|||
: '''Before 11 AM''': Turn in assignment from Class 4 and L-comps. |
|||
: '''Assignment and videos discussion''' |
|||
: '''Go over PIC32 software''' |
|||
: '''Begin next assignment, due Tues 1/26''': Chapter 3, problems 1-9, and Chapter 4, problems 1, 2, and 4. In class demo next Tuesday: chapter 3 problem 5. |
|||
At home: |
|||
: Videos (and L-comps) due Thurs: All of Chapter 3. |
|||
: Reading: Complete Chapter 3. |
|||
'''Class 6''' (Th 1/21) |
|||
: '''Brief discussion of chapter 2 exercises and L-comps''' |
|||
: '''Quiz on Chapter 2.''' <!--[[Media: Quiz_2_ME333.pdf| Quiz 2 Solutions.]]--> |
|||
: '''Discussion of videos and L-comps on Chapter 3''' |
|||
: '''Start Chapter 4''' |
|||
At home: |
|||
: Video and L-comp due Tues: Chapter 4. |
|||
: Reading: Complete Chapter 4. |
|||
: Continue assignment exercises, due Tuesday. |
|||
'''Class 7''' (T 1/26) |
|||
: '''Before 11 AM''': Turn in assignment on Chapters 3 and 4. |
|||
: '''In-class demo of problem 5 of Chapter 3''' |
|||
: '''Discussion of homework solutions''' |
|||
: '''Discussion of video and L-comp''' |
|||
: '''Brief intro to Chapter 5''' |
|||
: '''Next assignment''': Chapter 4: Wiring the LCD and using LCDwrite.c. Chapter 5 (use no optimization for all exercises): Exercises 3, 4, 6(b,c), 7, 10. Chapter 6: Exercises 1, 4, 5, 6, 8, 9, 13, 14, 16, 18. Demo in class next Tuesday: Chapter 6 exercise 18. |
|||
At home: |
|||
: Videos and L-comps on Chapter 5 |
|||
: Reading: Complete Chapter 5. |
|||
'''Class 8''' (Th 1/28) |
|||
: '''Quiz on Chapters 3 and 4.''' <!--[[Media: Quiz3solutions.pdf|Quiz 3 Solutions.]]--> |
|||
: '''Discussion of Chapter 5 videos and L-comps''' |
|||
: '''Brief intro to Chapter 6''' |
|||
: '''Continue with assignment.''' |
|||
At home: |
|||
: Videos and L-comps on Chapter 6 |
|||
: Reading: Complete Chapter 6 |
|||
: Finish assignment by 11 AM Tuesday |
|||
'''Class 9''' (T 2/2) |
|||
: '''Before 11 AM''': Turn in assignment from last Tuesday and the L-comps |
|||
: '''Demo of Chapter 6 exercise 18.''' |
|||
: '''Discussion on homework and L-comps''' |
|||
: '''Brief intro to digital i/o, counter/timers, output compare, analog input''' |
|||
: '''Start next assignment due next Tues.''' Chapter 24, feedback control of LED intensity, through 24.3. Demo in class on Tuesday: your code from chapter 24.3 with your nScope showing the sensor voltage at Vout. |
|||
At home: |
|||
: Videos and L-comps on Chapters 7 and 8 |
|||
: Reading: Chapters 7 and 8 |
|||
'''Class 10''' (Th 2/4) |
|||
: '''Quiz on Chapters 5 and 6.''' <!--[[Media: Quiz4solutions.pdf|Quiz 4 Solutions.]]--> |
|||
At home: |
|||
: Videos and L-comps on Chapters 9 and 10 |
|||
: Reading: Chapters 9 and 10 |
|||
'''Class 11''' (T 2/9) |
|||
: '''Demo of Chapter 24.3 code.''' |
|||
: '''Discussion of last week's homework and L-comps due today''' |
|||
: '''Start assignment due next Tues.''' Finish the LED brightness control project. Turn in plots from 24.5, 24.7, and 24.8. Demo in class next Tuesday: the final result from 24.8, showing performance to changing gains in real-time in Matlab. |
|||
At home: |
|||
: Videos and L-comps on Chapter 23 on PID control |
|||
: Reading: Chapter 11, Chapter 23 |
|||
'''Class 12''' (Th 2/11) |
|||
: '''Quiz on Chapters 7-10.''' <!--[[Media: Quiz5solutions.pdf|Quiz 5 Solutions.]]--> |
|||
: '''Discussion of L-comps''' |
|||
: '''PID control and continuing the assignment''' |
|||
At home: |
|||
: Complete assignment from Chapter 24 |
|||
: Videos and L-comps on Chapter 25 on brushed DC motors |
|||
: Reading: Chapter 25 |
|||
'''Class 13''' (T 2/16) |
|||
: '''Demo of LED brightness control''' |
|||
: '''Discussion of turned-in homework''' |
|||
: '''Discussion of L-comps''' |
|||
: '''Start assignment due Tues 2/23:''' Problems 2-7 of Chapter 25 on DC motors |
|||
At home: |
|||
: Videos and L-comps for Chapter 26 |
|||
: Reading: Chapter 26 |
|||
'''Class 14''' (Th 2/18) |
|||
: '''Quiz on Chapters 23 and 24,''' PID control and LED brightness control. <!--[[Media: Quiz 6 ME333.pdf| Quiz 6 Solutions]]--> |
|||
: '''Continue Chapter 25 assignment''' |
|||
At home: |
|||
: Videos and L-comps on Chapter 27 |
|||
: Reading: Chapter 27 |
|||
'''Class 15''' (T 2/23) |
|||
: '''Discussion of turned-in homework''' |
|||
: '''Discussion of L-comps''' |
|||
: '''Start assignment due Tues 3/1'''. Exercise 4 of Chapter 26, Gearing and Motor Sizing, Exercises 1,2,3,6,9,10,11,12,13,14,16 of Chapter 27, DC Motor Control. |
|||
<!-- |
|||
, and complete the "Establishing Communication" portion of the final project (Chapter 16.4.2). Demo on Tuesday 3/3: demonstrating your new menu command from Chapter 16.4.2, showing you can create the requested menu command. Except for Exercise 4 of Chapter 14, you should do all work on your own. Indicate on your assignment writeup the people you worked with for Exercise 4. |
|||
--> |
|||
At home: |
|||
: Videos and L-comps on Chapter 27, DC Motor Control |
|||
: Reading: Chapter 27 |
|||
'''Class 16''' (Th 2/25) |
|||
: '''Quiz on Chapter 25, Brushed Permanent Magnet DC Motors. <!--[[Media: Quiz 7 ME333.pdf| Quiz 7 Solutions]]-->''' |
|||
: '''Discussion of L-comps''' |
|||
: '''Continue assignment''' |
|||
At home: |
|||
: Videos for Chapter 28 |
|||
: Read Chapter 28 |
|||
'''Class 17''' (T 3/1) |
|||
: '''Demo of menu portion of final project''' |
|||
: '''Discussion of assignment just turned in''' |
|||
: '''Next assignment: Final project''': |
|||
<!-- |
|||
Implement the menu items for |
|||
: * encoder reset |
|||
: * encoder ticks |
|||
: * encoder angle |
|||
: * query the current state |
|||
: * get current sensor reading in mA |
|||
: * set the PWM |
|||
Demonstrate in class next Tuesday each of these menu items and show that they work properly. Turn in your well commented .c and .h files as individual files. |
|||
--> |
|||
At home: |
|||
: No videos |
|||
: Continue with Chapter 28 |
|||
'''Class 18''' (Th 3/3) |
|||
: '''Final Quiz, on Chapter 27''' |
|||
: '''Continue with final assignment''' |
|||
'''Class 19''' (T 3/8) |
|||
: '''Before 11 AM:''' |
|||
: '''In-class demo:''' |
|||
: '''Continue final project.''' To be on track, you should be up to 28.4.9 |
|||
At home: |
|||
: Continue final project |
|||
'''Class 20''' (Th 3/10) |
|||
: '''Quiz:''' No quiz! |
|||
: '''Discussion''' |
|||
: '''Continue final project.''' You should be up to 28.4.11. Sign up for a 5 minute time slot to demo your final project: [https://docs.google.com/spreadsheets/d/1hJlYIlzzWYT0cQbHMRRg-16shh-lQKhx7jB5-_cumtI/edit?usp=sharing signup sheet] |
|||
<!-- |
|||
* [[Media:ME333FinalProjectTurnIn2015.pdf | Final Project Writeup ]] |
|||
--> |
|||
<!-- |
|||
: '''Quiz:''' On C |
: '''Quiz:''' On C |
||
: '''Intro to Programming the PIC32''': |
: '''Intro to Programming the PIC32''': |
||
Line 176: | Line 371: | ||
:: * [[Media:PIC32MXDS-Dec2013.pdf|PIC32MX5xx/6xx/7xx Family Data Sheet (Dec 2013)]] |
:: * [[Media:PIC32MXDS-Dec2013.pdf|PIC32MX5xx/6xx/7xx Family Data Sheet (Dec 2013)]] |
||
:: * [[Media:PIC32RefManual-Dec2013.pdf|PIC32 Reference Manual (Dec 2013)]] |
:: * [[Media:PIC32RefManual-Dec2013.pdf|PIC32 Reference Manual (Dec 2013)]] |
||
:: Download and install the following software: |
|||
:: * Both [http://www.microchip.com/pagehandler/en-us/family/mplabx/ MPLAB X IDE and XC32 compiler (further down on same page)] |
|||
:: * [http://www.ftdichip.com/Drivers/VCP.htm FTDI driver for your computer] |
|||
:: * [[Media:PIC32quickstart.zip|PIC32quickstart.zip]] |
|||
:: * Windows only: [http://www.chiark.greenend.org.uk/~sgtatham/putty/ the PuTTY terminal emulator] |
|||
:: When installing the software, you may need to update your Java for the MPLAB X IDE. Answer "yes" if you are asked if you want to update your path when installing anything. Mac OS X may not allow you to install since the software is from an "untrusted" developer. You can override that by control-clicking on the dmg and choosing "Open". |
:: When installing the software, you may need to update your Java for the MPLAB X IDE. Answer "yes" if you are asked if you want to update your path when installing anything. Mac OS X may not allow you to install since the software is from an "untrusted" developer. You can override that by control-clicking on the dmg and choosing "Open". |
||
Line 190: | Line 379: | ||
: Assignment: Finish the downloads and installations, as described above. |
: Assignment: Finish the downloads and installations, as described above. |
||
: Videos (and L-comps): [[ME_333_Readings,_Videos,_and_Sample_Code#Chapter_2:_Looking_Under_the_Hood:_Hardware|Videos 1-4 of Chapter 2]]. L-comps can be found at the bottom of the "description" portion of the video (click on it to expand it). |
: Videos (and L-comps): [[ME_333_Readings,_Videos,_and_Sample_Code#Chapter_2:_Looking_Under_the_Hood:_Hardware|Videos 1-4 of Chapter 2]]. L-comps can be found at the bottom of the "description" portion of the video (click on it to expand it). |
||
: Reading: Chapter 1 (you can ignore 1.4.2, 1.5, and 1.6.2) and Chapter 2. If you get the programs in 1.4.1 and 1.6.1 working, great! If not, ask questions on the forum or we'll do it in |
: Reading: Chapter 1 (you can ignore 1.4.2, 1.5, and 1.6.2) and Chapter 2. If you get the programs in 1.4.1 and 1.6.1 working, great! If not, ask questions on the forum or we'll do it in the next class. Don't destroy your board! |
||
'''Class 5''' (T 1/21) |
|||
'''Class 5''' (T 1/20) |
|||
: '''Before 11 AM:''' Turn in L-comps ([https://northwestern.instructure.com/courses/310 Canvas]). '''No separate assignment to hand in today!''' |
: '''Before 11 AM:''' Turn in L-comps ([https://northwestern.instructure.com/courses/310 Canvas]). '''No separate assignment to hand in today!''' |
||
: '''In-class demo:''' We will make sure that everyone can run simplePIC.c and talkingPIC.c. No demo grades today. |
: '''In-class demo:''' We will make sure that everyone can run simplePIC.c and talkingPIC.c. No demo grades today. |
||
Line 203: | Line 393: | ||
: Reading: [[ME_333_Readings,_Videos,_and_Sample_Code#Chapter_3:_Looking_Under_the_Hood:_Software|Chapter 3]]. |
: Reading: [[ME_333_Readings,_Videos,_and_Sample_Code#Chapter_3:_Looking_Under_the_Hood:_Software|Chapter 3]]. |
||
'''Class 6''' (Th 1/ |
'''Class 6''' (Th 1/22) |
||
: '''Before 11 AM:''' Turn in L-comps ([https://northwestern.instructure.com/courses/310 Canvas]) |
: '''Before 11 AM:''' Turn in L-comps ([https://northwestern.instructure.com/courses/310 Canvas]) |
||
: '''Quiz:''' on Chapter 2 L-comps. |
: '''Quiz:''' on Chapter 2 L-comps. |
||
Line 214: | Line 404: | ||
: Reading: Chapter 4 |
: Reading: Chapter 4 |
||
'''Class 7''' (T 1/ |
'''Class 7''' (T 1/27) |
||
: '''Before 11 AM:''' Turn in assignment and L-comps ([https://northwestern.instructure.com/courses/310 Canvas]) |
: '''Before 11 AM:''' Turn in assignment and L-comps ([https://northwestern.instructure.com/courses/310 Canvas]) |
||
: '''In-class demo:''' Exercise 6 of Chapter 3. |
: '''In-class demo:''' Exercise 6 of Chapter 3. |
||
Line 226: | Line 416: | ||
: Reading: Chapter 5 |
: Reading: Chapter 5 |
||
'''Class 8''' (Th 1/ |
'''Class 8''' (Th 1/29) |
||
: '''Before 11 AM:''' Turn in L-comps ([https://northwestern.instructure.com/courses/310 Canvas]) |
: '''Before 11 AM:''' Turn in L-comps ([https://northwestern.instructure.com/courses/310 Canvas]) |
||
: '''Quiz:''' on material through assignment turned in Tuesday |
: '''Quiz:''' on material through assignment turned in Tuesday |
||
Line 237: | Line 427: | ||
: Reading: Chapter 6 |
: Reading: Chapter 6 |
||
'''Class 9''' (T 2/ |
'''Class 9''' (T 2/3) |
||
: '''Before 11 AM:''' Turn in assignment and L-comps ([https://northwestern.instructure.com/courses/310 Canvas]) |
: '''Before 11 AM:''' Turn in assignment and L-comps ([https://northwestern.instructure.com/courses/310 Canvas]) |
||
: '''In-class demo:''' Chapter 4 exercise 3(b). |
: '''In-class demo:''' Chapter 4 exercise 3(b). |
||
Line 249: | Line 439: | ||
: Reading: Chapter 7 |
: Reading: Chapter 7 |
||
'''Class 10''' (Th 2/ |
'''Class 10''' (Th 2/5) |
||
: '''Before 11 AM:''' Turn in L-comps ([https://northwestern.instructure.com/courses/310 Canvas]) |
: '''Before 11 AM:''' Turn in L-comps ([https://northwestern.instructure.com/courses/310 Canvas]) |
||
: '''Quiz:''' on material through assignment turned in Tuesday |
: '''Quiz:''' on material through assignment turned in Tuesday |
||
Line 261: | Line 451: | ||
: Monday: help session in ME conference room B211, 6-8 PM |
: Monday: help session in ME conference room B211, 6-8 PM |
||
'''Class 11''' (T 2/ |
'''Class 11''' (T 2/10) |
||
: '''Before 11 AM:''' Turn in assignment and L-comps ([https://northwestern.instructure.com/courses/310 Canvas]) |
: '''Before 11 AM:''' Turn in assignment and L-comps ([https://northwestern.instructure.com/courses/310 Canvas]) |
||
: '''In-class demo:''' Chapter 6 exercise 18. |
: '''In-class demo:''' Chapter 6 exercise 18. |
||
Line 273: | Line 463: | ||
: Reading: Chapter 9 |
: Reading: Chapter 9 |
||
'''Class 12''' (Th 2/ |
'''Class 12''' (Th 2/12) |
||
: '''Before 11 AM:''' Turn in L-comps ([https://northwestern.instructure.com/courses/310 Canvas]) |
: '''Before 11 AM:''' Turn in L-comps ([https://northwestern.instructure.com/courses/310 Canvas]) |
||
: '''Quiz:''' on material through assignment turned in Tuesday |
: '''Quiz:''' on material through assignment turned in Tuesday. [[Media: Quiz 5 ME333.pdf| Quiz 6 Solutions]] |
||
: '''Brief review of videos, readings, and L-comps''' |
: '''Brief review of videos, readings, and L-comps''' |
||
: '''Discussion''' |
: '''Discussion''' |
||
Line 287: | Line 477: | ||
: Monday: help session in ME conference room B211, 6-8 PM |
: Monday: help session in ME conference room B211, 6-8 PM |
||
'''Class 13''' (T 2/ |
'''Class 13''' (T 2/17) |
||
: '''Before 11 AM:''' Turn in assignment and L-comps ([https://northwestern.instructure.com/courses/310 Canvas]) |
: '''Before 11 AM:''' Turn in assignment and L-comps ([https://northwestern.instructure.com/courses/310 Canvas]) |
||
: '''In-class demo:''' |
: '''In-class demo:''' |
||
Line 302: | Line 492: | ||
: Reading: Chapter 10 |
: Reading: Chapter 10 |
||
'''Class 14''' (Th 2/ |
'''Class 14''' (Th 2/19) |
||
: '''Before 11 AM:''' Turn in L-comps ([https://northwestern.instructure.com/courses/310 Canvas]) |
: '''Before 11 AM:''' Turn in L-comps ([https://northwestern.instructure.com/courses/310 Canvas]) |
||
: '''Quiz:''' on material through assignment turned in Tuesday |
: '''Quiz:''' on material through assignment turned in Tuesday. [[Media: Quiz 6 ME333.pdf| Quiz 6 Solutions]] |
||
: '''Brief review of videos, readings, and L-comps''' |
: '''Brief review of videos, readings, and L-comps''' |
||
: '''Discussion''' |
: '''Discussion''' |
||
Line 318: | Line 508: | ||
: Monday: help session in ME conference room B211, 6-8 PM |
: Monday: help session in ME conference room B211, 6-8 PM |
||
'''Class 15''' (T 2/ |
'''Class 15''' (T 2/24) |
||
: '''Before 11 AM:''' Turn in assignment and L-comps ([https://northwestern.instructure.com/courses/310 Canvas]) |
: '''Before 11 AM:''' Turn in assignment and L-comps ([https://northwestern.instructure.com/courses/310 Canvas]) |
||
: '''In-class demo:''' Square wave control of LED output. |
: '''In-class demo:''' Square wave control of LED output. |
||
Line 330: | Line 520: | ||
: Reading: Chapter 12 |
: Reading: Chapter 12 |
||
'''Class 16''' (Th 2/ |
'''Class 16''' (Th 2/26) |
||
: '''Before 11 AM:''' Turn in L-comps ([https://northwestern.instructure.com/courses/310 Canvas]) |
: '''Before 11 AM:''' Turn in L-comps ([https://northwestern.instructure.com/courses/310 Canvas]) |
||
: '''Quiz:''' on material through assignment turned in Tuesday |
: '''Quiz:''' on material through assignment turned in Tuesday |
||
Line 338: | Line 528: | ||
At home: |
At home: |
||
: Videos (and L-comps): [[ME_333_Readings,_Videos,_and_Sample_Code#Chapter_13:_Motor_Control | Motor Control]] (4 videos) |
|||
: Videos (and L-comps): |
|||
: Reading: |
: Reading: Chapter 13 |
||
: Monday: help session in ME conference room B211, 6-8 PM |
: Monday: help session in ME conference room B211, 6-8 PM |
||
'''Class 17''' (T 3/ |
'''Class 17''' (T 3/3) |
||
: '''Before 11 AM:''' Turn in assignment and L-comps ([https://northwestern.instructure.com/courses/310 Canvas]) |
: '''Before 11 AM:''' Turn in assignment and L-comps ([https://northwestern.instructure.com/courses/310 Canvas]) |
||
: '''In-class demo:''' None. |
: '''In-class demo:''' None. |
||
Line 348: | Line 538: | ||
: '''Brief review of videos, readings, and L-comps''' |
: '''Brief review of videos, readings, and L-comps''' |
||
: '''Discussion''' |
: '''Discussion''' |
||
: '''Begin |
: '''Begin final project:''' Download: |
||
* [[Media:MAX9918DS.pdf | MAX9918 current sensor data sheet]] |
|||
* [[Media:A3909DS.pdf | A3909 dual h-bridge motor driver data sheet]] |
|||
* [[Media:Final-Assignment-2014-part1.pdf | Final Assignment Part 1]] |
|||
* [[Media:ME333 Demo.zip | Demonstration]] |
|||
At home: |
At home: |
||
: Finish wiring H-bridge, current sensor, and encoder counter chips. |
|||
: Videos (and L-comps): |
|||
: Videos (and L-comps): None |
|||
: Reading: |
|||
: Reading: Complete Chapter 13. |
|||
'''Class 18''' (Th 3/ |
'''Class 18''' (Th 3/5) |
||
: '''Before 11 AM:''' Demonstrate you can successfully use your matlab diagnostics code to interact with the H-bridge, current sensor, and encoder counter chips. |
|||
: '''Before 11 AM:''' Turn in L-comps ([https://northwestern.instructure.com/courses/310 Canvas]) |
|||
: '''Quiz:''' on material through assignment turned in Tuesday |
: '''Quiz:''' on material through assignment turned in Tuesday ('''last quiz!''') |
||
: '''Brief review of videos, readings, and L-comps''' |
|||
: '''Discussion''' |
: '''Discussion''' |
||
: '''Continue final project'''. Due Tuesday: show that your current loop PI tuning works, and show that you successfully read the motor angle, in your own code. |
|||
: '''Continue current assignment''' |
|||
* [[Media:me333final.zip | Final Project ]] |
|||
* [[Media:refplots-2014.pdf | Examples of motion reference trajectories ]] |
|||
At home: |
At home: |
||
: Videos (and L-comps): |
: Videos (and L-comps): None |
||
: Reading: |
: Reading: None |
||
: Monday: help session in ME conference room B211, 6-8 PM |
: Monday: help session in ME conference room B211, 6-8 PM |
||
'''Class 19''' (T 3/ |
'''Class 19''' (T 3/10) |
||
: '''Before 11 AM:''' |
: '''Before 11 AM:''' Nothing to turn in, just the demo... |
||
: '''In-class demo:''' Show that your current loop PI tuning works, and show that you successfully read the motor angle, in your own code. |
|||
: '''In-class demo:''' |
|||
: '''Assignment discussion''' |
|||
: '''Brief review of videos, readings, and L-comps''' |
|||
: '''Discussion''' |
: '''Discussion''' |
||
: ''' |
: '''Continue final project''' |
||
* [[Media:ME333FinalProjectTurnIn.pdf | Final Project Writeup ]] |
|||
* [[Media:ME333FinalProjectExtraCredit.pdf | Final Project Extra Credit ]] |
|||
At home: |
At home: |
||
: Videos (and L-comps): |
: Videos (and L-comps): None |
||
: Reading: |
: Reading: None |
||
'''Class 20''' (Th 3/ |
'''Class 20''' (Th 3/12) |
||
: '''Before 11 AM:''' |
: '''Before 11 AM:''' |
||
: '''Quiz:''' |
: '''Quiz:''' No quiz! |
||
: '''Brief review of videos, readings, and L-comps''' |
|||
: '''Discussion''' |
: '''Discussion''' |
||
: '''Continue |
: '''Continue final project''' |
||
--> |
|||
'''Final Demo''': Monday 3/14, 3-5 PM or Wednesday 3/16, 9-11 AM. Electronic submission by Wednesday 3/16, 11 AM. |
|||
Turn in your responses to 28.4.1 #7, 28.4.9 #8, 28.4.10 #5, 28.4.12 #5. Also turn in all of your PIC code and MATLAB code. |
|||
Extra credit: Add a menu item for Feed Forward Model-based control and another for FF+FB control. Add asymmetric inertial by using a 6-32 screw and nut to attach 2 washers to one side of the motor bar. How well can you compensate for this load? Provide several graphs of trajectories that are possible with FF only, or are improved with FF+FB. Demonstrate during your time slot. Credit for this will upgrade your lowest quiz grade to full credit. |
|||
<!-- |
<!-- |
||
== nScope and Lab Kit == |
|||
There are two versions of the encoder-decoder chip in the encoder counting circuit. Use the following wiring for your chip: |
|||
'''Class 2''' (Th 1/9) |
|||
<table border="0"> |
|||
: '''Assignment 2 due''' |
|||
<tr><td> |
|||
: '''Class Topic''': C programming continued |
|||
[[Image:decoder1.png|thumb|300px]]</td> |
|||
: '''Videos for next class''': 12-16 of a Crash Course in C |
|||
<td>[[Image:decoder2.png|thumb|300px]]</td> |
|||
: '''Reading for next class''': the rest of A Crash Course in C (most of this is reference; the real goal is to fully understand the program invest.c) |
|||
</tr></table> |
|||
: '''Assignment 3 out''': problems 24-26, 28-30, 32 |
|||
Below is the wiring connection for the motor we will use in class. The encoder disc has 334 lines, meaning that there are 334 periods of a square wave on channels A and B for each motor revolution. If each rising and falling edge is counted (4x decoding of the quadrature signal), then the encoder gives 334 x 4 = 1336 counts per revolution, or 360/1336 = 0.269 degrees of resolution. |
|||
'''Class 3''' (T 1/14) |
|||
: '''Assignment 3 due''' |
|||
: '''Class Topic''': C programming continued |
|||
: '''Reading for next class''': make sure you fully understand invest.c |
|||
: '''Assignment 4 out''': problem 33 |
|||
[[Image:motor-and-encoder.png|motor-and-encoder.png]] |
|||
'''Class 4''' (Th 1/16) |
|||
: '''Assignment 4 due''' |
|||
: '''Class Topic''': C programming conclusion. Thanks to Elliot Hevel, C newbie, for this [[Media:GradeSorter.c|C code]] he wrote in class today to solve problem 34 of a Crash Course in C. (The code seems to work fine, but we haven't tested exhaustively! No claims that it is the best or most efficient way to solve the problem, but definitely a nice job in the short time period. We removed an extraneous & seen in class today.) |
|||
: '''Reading for next class''': make sure you fully understand invest.c and are ready for a quiz on related C topics |
|||
: '''Assignment 5 out''': Purchase your ME 333 equipment [https://it.mccormick.northwestern.edu/matlab/student_license/login.php here]. If you have problems contact your instructor. Also, download the following (we will use them in Class 5): |
|||
Download and install: |
|||
* the free [http://www.microchip.com/pagehandler/en-us/family/mplabx/#downloads Microchip XC32 compiler] and [http://www.microchip.com/pagehandler/en-us/family/mplabx/ Microchip MPLAB X IDE] for your operating system |
|||
* the [http://www.ftdichip.com/Drivers/VCP.htm FTDI virtual COM port (VCP) driver] for your operating system |
|||
* the [http://processing.org/download/ Processing language] for your operating system |
|||
* a terminal emulator program like [http://freeware.the-meiers.org/ CoolTerm] |
|||
Also, download the [[Media:PIC32MX5XX6XX7XX_Family_Data_Sheet.pdf|PIC32 Data Sheet]] and the [[Media:61132B_PIC32ReferenceManual.pdf|PIC32 Reference Manual]]. |
|||
The homeworks and projects in this course will require an nScope. To download the nScope software, visit the [http://nscope.org/ nScope website]. |
|||
'''Class 5''' (T 1/21) |
|||
: '''Assignment 5 due''' |
|||
: '''Quiz 1''': [[Media:ME333-2013-q1.pdf|Solutions]] (average score: 16.2/20) On C programming (data types, pointers) and syntax similar to invest.c. '''As with all quizzes, no notes, computers, calculators, etc. are allowed.''' |
|||
: '''Class Topic''': our first programs for the PIC32, following chapter 1 and the [[NU32:_Quickstart|quickstart]] |
|||
: '''Reading for next class''': [[Media:ME333-Ch1-Ch2.pdf|Chapters 1 and 2]] of the class notes |
|||
: '''Assignment 6 out''': problems 1-7 of Chapter 2 |
|||
You should have the following components in your lab kit. If you are missing or are short of anything, there will be a cart in class with extra parts, or see Nick in Ford B100. |
|||
'''Class 6''' (Th 1/23) |
|||
: '''Assignment 6 due''' |
|||
: '''Class Topic''': PIC32 and NU32 hardware |
|||
: '''Reading for next class''': finish Chapter 2 of the notes |
|||
: '''Assignment 7 out''': problems 8-16 of Chapter 2 |
|||
<table border="1"> |
|||
'''Class 7''' (T 1/28) |
|||
<tr> |
|||
: '''Assignment 7 due''' |
|||
<th>Picture</th> |
|||
: '''Class Topic''': PIC32 software |
|||
<th>Description</th> |
|||
: '''Reading for next class''': [[Media:ME333-Ch3.pdf|Chapter 3]] of the notes through Chapter 3.6 |
|||
<th>Link</th> |
|||
: '''Software update''': Change your NU32.h file to include "#include <plib.h>" (without the quotes) as the first line |
|||
</tr> |
|||
: '''Assignment 8 out''': problems 1-6 of Chapter 3. Problem 6: [[Media:Ch3_makefile.txt|makefile]] (save as "makefile") '''Demo next class''': If you succeeded in using the makefile in problem 6, demo the makefile. If not, demo the compiling from problem 5 (no need to load the code). |
|||
<tr> |
|||
'''Class 8''' (Th 1/30) |
|||
<td>[[Image:NU32_5.jpg|thumb|200px|The NU32|center]]</td> |
|||
: '''Assignment 8 due''' |
|||
<td>NU32 in 2 breadboards</td> |
|||
: '''Quiz 2''': [[Media:ME333-2013-q2.txt|Solutions]] PIC32 and NU32 hardware (know things like the clock speed of the PIC32, amount of RAM and flash, what the physical memory map is [no need to memorize address numbers], what the modules/peripherals in Sec 2.1.2 do) |
|||
<td></td> |
|||
: '''Class Topic''': PIC32 software |
|||
</tr> |
|||
: '''Reading for next class''': finish Chapter 3 of the notes |
|||
: '''Assignment 9 out''': problems 7-12 of Chapter 3. '''Demo next class''': Problem 8 |
|||
<tr> |
|||
'''Class 9''' (T 2/4) |
|||
<td>[[Image:USBminicable.jpg|thumb|200px|USB Cable|center]]</td> |
|||
: '''Assignment 9 due''' |
|||
<td>1 m USB cable, A male to mini B male</td> |
|||
: '''Class Topic''': using libraries and header files |
|||
<td>[[Media:NU32_usbcable.pdf|Datasheet]]</td> |
|||
: '''Reading for next class''': [[Media:ME333-Ch4-Ch5.pdf|Chapters 4 and 5]] of the class notes; only Chapter 4 for next class |
|||
</tr> |
|||
: '''Assignment 10 out''': problems 2, 3(a), and 5 of Chapter 4. '''Demo next class''': Problem 3(a). |
|||
<tr> |
|||
'''Class 10''' (Th 2/6) |
|||
<td>[[Image:nu32_6vpower.jpg|thumb|200px|6V Power Supply|center]]</td> |
|||
: '''Assignment 10 due''' |
|||
<td>6V wall power supply, 1A, 2.1mm ID x 5.5mm OD, 6W, center positive.</td> |
|||
: '''Quiz 3''': [[Media:ME333-2013-q3.txt|Solutions]] On Chapter 3 |
|||
<td>[[Media:powersupply6v.pdf|Datasheet]]</td> |
|||
: '''Class Topic''': disassembly and map files |
|||
</tr> |
|||
: '''Reading for next class''': Chapter 5 of the class notes |
|||
: '''Assignment 11 out''': Problem 3(b) of Chapter 4, Problem 4 of Chapter 5. '''Demo next class''': Problem 3(b) of Chapter 4. |
|||
<tr> |
|||
'''Class 11''' (T 2/11) |
|||
<td>[[Image:LCD16x2.jpg|thumb|200px|16x2 Character LCD|center]]</td> |
|||
: '''Assignment 11 due''' |
|||
<td>LCD, 16x2 characters, using parallel communication</td> |
|||
: '''Class Topic''': interrupts |
|||
<td>[[Media:LCD16x2_HJ1602A.pdf|Datasheet]]</td> |
|||
: '''Reading for next class''': [[Media:ME333-Ch6.pdf|Chapter 6]] of the class notes |
|||
</tr> |
|||
: '''Assignment 12 out''': Problems 8, 9, 10 of Chapter 5. '''No demo next class''' |
|||
<tr> |
|||
'''Class 12''' (Th 2/13) |
|||
<td>[[Image:nu32v2_pushbutton.jpg|thumb|200px|Pushbutton|center]]</td> |
|||
: '''Assignment 12 due''' |
|||
<td>Momentary normally open (NO) pushbutton.</td> |
|||
: '''Quiz 4''': [[Media:ME333-2013-q4.txt|Solutions]] On Chapter 4 |
|||
<td>[[Media:pushbutton.pdf|Datasheet]]</td> |
|||
: '''Class Topic''': programming assignment, problems 16 and 17 of Chapter 6 |
|||
</tr> |
|||
: '''Assignment 13 out''': Problems 1, 2, 4, 5, 6, 12, 15, 16, 17 of Chapter 6. Turn in your code for Problem 17. '''Demo next class''': Problem 17. |
|||
<tr> |
|||
'''Class 13''' (T 2/18) |
|||
<td>Resistors</td> |
|||
: '''Assignment 13 due''' |
|||
<td>A few of the following 1/4W resistors: (in ohms) 10, 33, 100, 300, 1k, 3.3k, 10k, 33k, 100k, 330k, 1M</td> |
|||
: '''Reference reading''': [[Media:ME333-Ch7-Ch10v2.pdf|Chapter 7 to Chapter 10 (v2)]] of the class notes |
|||
<td></td> |
|||
: '''Class Topic''': timers, PWM, analog output by RC filtering |
|||
</tr> |
|||
: '''Assignment 14 out''': Problem 2 of Chapter 9. '''Due Tues 2/26. Demo with your NUscope on 2/26.''' |
|||
<tr> |
|||
'''Class 14''' (Th 2/20) |
|||
<td>Capacitors</td> |
|||
: No assignment due |
|||
<td>A few of the following capacitors: (in F) 10p, 100p, 1n, 0.01u, 0.1u, 1u </td> |
|||
: '''Quiz 5''': [[Media:ME333-2013-q5.txt|Solutions]] On Chapters 5 and 6 |
|||
<td></td> |
|||
: '''Class Topic''': analog input, sensors, interfacing, control loops |
|||
</tr> |
|||
: No assignment out |
|||
<tr> |
|||
'''Class 15''' (T 2/25) |
|||
<td>Potentiometers</td> |
|||
: '''Assignment 14 due''' |
|||
<td>2 potentiometers: 10k ohm </td> |
|||
: '''Class Topic''': DC motor theory |
|||
<td></td> |
|||
: '''Reading for next class''': Chapter 11 on Brushed Permanent Magnet DC Motors from [[Media:ME333-mech.pdf|Chapters 11-14 of the class notes]] |
|||
</tr> |
|||
: '''No assignment out''' |
|||
<tr> |
|||
'''Class 16''' (Th 2/27) |
|||
<td>LEDs</td> |
|||
: '''Quiz 6''': PWM and RC filtering for analog output |
|||
<td>Red super bright 5mm LED </td> |
|||
: '''Class Topic''': experiments with a DC motor |
|||
<td>[[Media:SuperBrightRedLED.pdf|Datasheet]]</td> |
|||
: '''Assignment 15 out''': Problems 1, 2, 3(a), and 3(b) of Chapter 11, due by 11 AM Tues 3/5 ('''No demo next class''') |
|||
</tr> |
|||
<tr> |
|||
'''Class 17''' (T 3/4) |
|||
<td>Phototransistors</td> |
|||
: '''Assignment 15 due''' |
|||
<td>SFH 310 visible spectrum phototransistor </td> |
|||
: '''Class Topic''': H-bridge, current control, and motion control for a DC motor; final project overview |
|||
<td>[[Media:Phototransistor_visible_310_2_3.pdf|Datasheet]]</td> |
|||
: '''Reading for next class''': Chapter 13 on DC motor control |
|||
</tr> |
|||
: '''Final project out''': [[Media:ME333_2013_FinalProject1.pdf|ME333 2013 Final Project]] |
|||
<tr> |
|||
'''Class 18''' (Th 3/6) |
|||
<td>[[Image:nu32v2_wirestrippers.jpg|thumb|200px|Wirestrippers|center]]</td> |
|||
: '''Quiz 7''': DC motor basics from Chapter 11 |
|||
<td>Wire strippers, for 30, 28, 26, 24, 22, and 20 AWG wire. Can also be used as pliers and to cut wire. |
|||
: '''Class Topic''': H-bridge, current control, and motion control for a DC motor; final project overview (continued) |
|||
: '''Reference reading for next class''': Chapter 12 on motor gearing |
|||
'''Class 19''' (T 3/11) |
|||
: '''Class Topic''': motor sizing and gearing |
|||
: '''Reference reading for next class''': Chapter 14 on RC servos and steppers, [[Media:ME333-ch15.pdf|Chapter 15, for MAF extra credit]] |
|||
: '''Demo of Final Project Part 5 due next class''' |
|||
'''These will get dull or mashed up if you try to cut anything other than wire''' </td> |
|||
'''Programming Party''' (W 3/13 6-9pm) |
|||
<td>[http://www.sparkfun.com/products/8696 Sparkfun wire strippers]</td> |
|||
: Come to L361 for pizza and extra help from 6-9pm |
|||
</tr> |
|||
<tr> |
|||
'''Class 20''' (Th 3/13) |
|||
<td>[[Image:nu32v2_wire.jpg|thumb|200px|Wire|center]]</td> |
|||
: '''Final Project Part 5 demo''' |
|||
<td>6 colors of ~6' lengths of 22 AWG solid core wire (red, white, yellow, green, black, blue)</td> |
|||
: '''No quiz''' |
|||
<td>no link</td> |
|||
: '''Class Topic''': RC servo motors and stepper motors |
|||
</tr> |
|||
<tr> |
|||
<td>[[Image:nu32v5_multimeter.jpg|thumb|200px|DT9205A Multimeter|center]]</td> |
|||
'''Final Demo''': Monday 3/17, 3-5 PM or Wednesday 3/19, 9-11 AM. Electronic submission by Wednesday 3/20, 11 AM. |
|||
<td>Any small multimeter, it doesn't have to be this brand. </td> |
|||
<td></td> |
|||
</tr> |
|||
<tr> |
|||
== nScope == |
|||
<td>[[Image:nu32v5_uusb.jpg|thumb|200px|Micro USB cable|center]]</td> |
|||
<td>A micro USB cable.''' </td> |
|||
<td></td> |
|||
</tr> |
|||
<tr> |
|||
[http://nscope.org/ nScope website] |
|||
<td>[[Image:nscope_breadboard.jpg|thumb|200px|nScope in a breadboard|center]]</td> |
|||
<td>nScope in a 830 tie points breadboard.</td> |
|||
<td>[http://nscope.org]</td> |
|||
</tr> |
|||
</table> |
|||
--> |
|||
== FAQ == |
== FAQ == |
||
Line 527: | Line 721: | ||
Q: Is there an independent project? |
Q: Is there an independent project? |
||
A: There is no large independent project. There will be a two-week project at the end of the course, but there will be no machining. For a significant project, do a quarter-long project in ME 433 Advanced Mechatronics, offered in the spring quarter. ME 333 is good preparation for ME 433. |
A: There is no large independent project. There will be a two-week project at the end of the course, but there will be no machining. For a more significant project, do a quarter-long project in ME 433 Advanced Mechatronics, offered in the spring quarter. ME 333 is good preparation for ME 433. |
||
Latest revision as of 11:20, 17 November 2016
Winter Quarter 2016
First day of class is Tuesday January 5.
- Section 20: Prof. Nick Marchuk (nick.marchuk@gmail.com), T Th, 11:00-12:20, The Garage (Henry Crown Sports Pavilion, 2311 Campus Drive, Suite 2300)
- Section 21: Prof. Nick Marchuk (nick.marchuk@gmail.com), T Th, 12:30-1:50, The Garage (Henry Crown Sports Pavilion, 2311 Campus Drive, Suite 2300)
- TAs:
- Sandra Fang (SandraFang@u.northwestern.edu)
- Alireza Zaheri (azaheri@u.northwestern.edu)
- Final demo (in lieu of final exam): Monday Mar 14 3-5 PM (12:30-1:50 section) and Wednesday Mar 16 9-11 AM (11-12:20 section)
- Office Hours: every day 4-5 (Prof. Marchuk, Mechatronics Lab, Ford B100), TAs TBD
- Quick links:
Purpose of this Course
The purpose of this course is to provide tools that help you express your creativity. Maybe you want to build a robot, or a piece of kinetic art, or an automatic ball-throwing device to entertain your dog; maybe you've identified a market for a new smart product and you'd like to prototype the device. This course provides fundamentals of mechatronics to give you confidence to take on these projects. You are encouraged to take what you learn in this course and apply it in the project-based ME 433 Advanced Mechatronics course, Design Competition, senior design projects, or independent projects.
Approximate Syllabus
This course is for students that want to build microprocessor-controlled electromechanical devices.
To do this, ME 333 focuses on three topics: (1) general C programming; (2) Microchip PIC microcontroller architecture and C programming specific to the PIC (e.g., using the PIC's peripherals, such as analog inputs, digital I/O, counters/timers, comm ports, etc.); and (3) interfacing the PIC to sensors and actuators, some theory of sensor and actuator operation, and interface circuitry and signal processing.
You will do a lot of programming in this course! If you are certain you hate programming, then this is not the course for you. But knowing how to program is very useful for any modern engineer. The language we will use is C, a fairly low-level language that works well for microcontrollers, which is more portable and not nearly as painful and low-level as assembly language. If you don't know C, that's not a problem, most students don't before taking ME 333; but you should plan to learn it, and rather quickly. You will have all the materials you need to start learning C before class starts, and the first assignment on C is due on the first day of class! The reason: even though we start out with C, that's not the main goal of this course. The main goal is to teach you about microcontrollers and mechatronics. Plus some students already have C background.
You will bring your laptop to each class. As the quarter progresses, we will be handing out other equipment that you will need to bring to class, such as the NU32 development board that breaks out the PIC32MX795F512H microcontroller.
It is essential you do the assigned reading and watch the videos in advance of class. You will have an assignment and/or lecture comprehension questions (L-comps) due before every class, turned in electronically on Canvas. (This includes the very first day of class!) Once a week we will have a short quiz. Most classes will have a combination of a brief review, Q&A, and working individually or in small groups on problems while the instructors help answer any questions.
Topics we will cover, time depending, include:
- introduction to C programming
- introduction to the PIC32 hardware, and programming the PIC32 in C
- digital I/O
- counters/timers and interrupts
- analog input
- sensor smorgasbord
- digital signal processing: filters and FFTs
- analog output and pulse-width modulation
- brushed permanent magnet DC motors: theory and control
- stepper motors and RC servo motors
- communication by SPI, I2C, and RS-232
Checklist to Complete Before the First Day of Class
Attendance at the first day of class is mandatory. By the first day of class, you should:
- Complete the reading and assignment 1, which is due the first day of class! The first assignments are designed to get you up to speed on the C programming language, which we will use throughout the course.
- Have a laptop with at least 2 USB ports. Any operating system is fine. One port will be used to program and communicate with your PIC microcontroller, and the other will be used for your portable oscilloscope.
- Be prepared to buy your class kit, consisting of the portable nScope oscilloscope, the NU32 PIC32 development board, textbook, and lots of other goodies. Price $125 if you are starting from scratch; $75 if you already have the nScope.
- Buy your class kit here. If you already have the oscilloscope and multimeter from this year's ME 233 offering, you should choose "ME 333 (nScope not needed ($75))" for the price of $75. If you do not have the oscilloscope and multimeter, you should choose "ME 333 (including nScope ($125))" for the price of $125. You will not be able to start the course until you have completed the purchase of your kit. If you decide to drop the course, you will be refunded the purchase price upon return of all the equipment in working shape.
Student Contract
By signing up for this course, you agree to complete the checklist above before the course starts. You agree to stay engaged during the class period; even if your computer is open, no facebook or other distractions that will lessen your contribution to the class. You understand that learning from classmates, and helping classmates, is encouraged, up to the stage of conceptualizing solutions. You are not allowed to fully complete a solution in a team. You understand that plagiarism is not tolerated. You will report instances of plagiarism you are aware of. Plagiarism includes, but is not limited to:
- Allowing another student to copy your work.
- Copying another student's work, in whole or in part.
- Transforming copied sections of code or solutions to try to disguise their origin.
- Borrowing code or solutions from others not in the course, e.g., code found on the internet, without attribution. Borrowing code found on the internet is acceptable if the source is clearly indicated in your code comments, and if you understand how the code works.
On our part (faculty and TAs), we commit to do our best to provide you a curriculum and set of experimental materials to get you up to speed on sophisticated mechatronics integration as quickly and efficiently as possible, while giving you a foundation in concepts needed to go further in future projects and courses.
Prerequisite
ME 233 Electronics Design or similar (EECS 221, 225) is required. You will be expected to analyze circuits with resistors, capacitors, inductors, diodes, transistors, and op-amps. You can find refresher material and a sample quiz at this page and in Appendix B of the book.
Reading
Required:
- Textbook: "Embedded Computing and Mechatronics with the PIC32 Microcontroller" (Amazon, Elsevier). Sample chapters, including the appendix "A Crash Course in C" can be found in the freely downloadable sample chapters.
- The textbook is included in the class kit, you do not need to buy it online or at the bookstore!
- Optional: Essential C is also a very nice intro to C. Let us know about other online C resources you find particularly useful.
- PIC32MX5xx/6xx/7xx Family Data Sheet (Dec 2013)
- PIC32 Reference Manual (Dec 2013)
Find a typo in the book or a bug in the code? Report it here
Grading
Grades will be approximately 40% quizzes and 60% assignments and L-comps (including the final project). We will have short quizzes once a week at the beginning of class covering material on the previous assignment. Bring a sheet of paper you can turn in with your quiz answers. (Your lowest quiz score, assignment score, and L-comp score will be dropped.) We will have a final project and demo in lieu of a final exam.
All quizzes, assignments, and L-comps have equal weight, regardless of how many points they are graded out of. If one assignment is graded out of 20 points, and the next out of 40, the formula for calculating your total grade for these two assignments would be 0.5*(score1/20) + 0.5*(score2/40).
Homework Submission
All homework (except for the first class, when paper solutions should be turned in at the beginning of class) will be submitted using the [Canvas Course Management System. Homework should be submitted by 11 AM on the day it is due (i.e., before the first section of the day). Late homework will not be accepted.
Here are a few guidelines/tips associated with homework submissions:
- Upload files individually. No zip archives!
- Submit written responses as PDFs.
- If you upload a PDF of handwritten work, make sure that the text appears clearly and the picture is oriented portrait style. "Cam Scanner" for Android and iOS phones easily scans images and compiles them into a single PDF file.
- Unless otherwise stated, L-Comps should be in a single file.
- When asked to submit C code for a given programming assignment, we are only concerned with receiving the relevant source files, i.e., all *.c and *.h files. We do not want entire IDE/MPLAB X projects or executables/object files.
- When writing your responses, please follow any instructions on how to write your response. For example, if we ask for a snippet of code, please do not submit your entire C program with header files and a main routine. We typically are only expecting a few lines of code that solve the problem.
- Be neat and make sure your answers are easy to follow. Messy hard-to-follow assignments make TAs cranky, and you don't want cranky TAs grading your assignment!
- It helps both us and you if you format your code nicely. Clean looking code is easier for us to grade and easier for you to debug. Text editors with IDEs such as Netbeans and MPLAB X have tools for auto-formatting code. For example, highlighting a region and hitting Alt+Shift+f (Linux and Windows) will format that region according to your local formatting preferences.
- When you compile your code, pay attention to any compiler warnings. They are there for a reason! You should be able to eventually get your code to produce no warnings. Often if a piece of code is not working, the warnings will give a clue as to why.
Schedule
This course is (partially) "flipped": you watch video lectures and do readings in advance of class, and during class, you should have plenty of opportunity for questions and interaction with the instructors and TAs as you work on assignments. The purpose of this is to try to maximize the value of the class time. In a typical lecture, 80% of the material is the same every time it is given, and the other 20% is interactive and variable based on student questions. In a flipped class, we hope to flip this percentage, to better tailor the class to student needs. You will have time with the instructors while your brains are actually on and working on the material (not just scribbling notes), the times when you are most likely to have questions. Making the video lectures available should also allow you to spend more or less time on the lecture portion, depending on your prior background. If the material is difficult for you, you can pause or rewind.
Please keep track of any questions you have as you watch the videos! Bring these questions to class; it will make for a livelier classroom.
All videos can be found at this page: NU32 Videos and sample code at the bottom of NU32 Software. We will cover almost all of the Appendix, a Crash Course in C, in the first 1.5 weeks of class, so you can work ahead and do all the readings, watch all the videos, and do all the problems, if you have time over the break. But at a minimum, you must do the winter break assignment.
After the first two weeks of class, we will have video lecture comprehension questions (L-comps) due before every class, assignments due every Tuesday, and quizzes every Thursday (on the material covered in the assignment turned in on Tuesday). L-comps and assignments are turned in using Canvas before 11 AM the day of the class. The weekly rhythm will be:
- before Tuesday: turn in assignment on material from previous week and L-comps on videos for the next class
- Tuesday in class: discuss assignment, brief recap and Q&A on new videos, start on next assignment
- before Thursday: turn in L-comps on videos for next class
- Thursday in class: brief quiz on material in assignment turned in on Tuesday, recap and discuss videos, continue with assignment
Winter Break
- Reading due for first class: pages 515-527 in the freely downloadable sample chapters
- Videos: 1-7 of Appendix A NU32 Videos. Answer the lecture comprehension (L-comp) questions underneath each of the videos (you may need to click to expand). Turn in a paper version of your answers at the beginning of the first class.
- Assignment: Also do exercises 1-4, 6-8, 10-11, 16-17 of A Crash Course in C. Bring your laptop to class and demonstrate your HelloWorld.c program.
Class 1 (T 1/5)
- Assignment due: Hand in a paper version of your L-comp and exercise solutions for the Winter Break assignment at the beginning of class.
- In-class demo: Exercise 1.
- Assignment discussion
- Brief review of videos and readings
- Discussion
- Begin next assignment: Appendix A exercises 18-19, 21-22, 27-28, 30-32, 34. Prepare to demo 34. Pay for your equipment.
At home:
- Videos (and L-comps): 8-16 of a Crash Course in C. L-comps can be found at the bottom of the "description" portion of the video. You need to click it to expand it.
- Reading: Through page 562 of a Crash Course in C, and the rest as reference.
Class 2 (Th 1/7)
- Before 11 AM: Turn in assignment from Class 1 and L-comps.
- In-class demo: Exercise 34.
- Assignment discussion
- Brief review of videos, readings, and L-comps
- Discussion
- Begin next assignment: Exercise 35, and prepare to demo it. If you have not yet, pay for your equipment.
At home:
- Videos (and L-comps): 17 of a Crash Course in C.
- Reading: Rest of a Crash Course in C as reference
- Note: Pizza and Programming Party, Monday Jan 11, 6:00-8:00, Tech L211
Class 3 (T 1/12)
- Before 11 AM: Turn in assignment from Class 2 and L-comps.
- In-class demo: Exercise 35.
- Assignment discussion
- Brief review of videos, readings, and L-comps
- Discussion
- In-class assignment: Creating your own helper library
At home:
- Videos (no L-comps): Chapter 1 (for your specific OS)
- Reading: Chapter 1: Quickstart
- Assignment: Download, install, and compile all software as indicated through the end of Chapter 1.3. See NU32 Software
Class 4 (Th 1/14)
- Quiz: On C.
- Distribute hardware and everyone go through the quickstart
At home:
- Videos (and L-comps): 1-4 from Chapter 2.
- Reading: Complete Chapter 1 (quickstart) and Chapter 2.
- Assignment due at the beginning of class on Tues 1/19: Problems 3-16 of Chapter 2. You will need the PIC32MX5xx/6xx/7xx Family Data Sheet (Dec 2013) and the PIC32 Reference Manual (Dec 2013).
Class 5 (T 1/19)
- Before 11 AM: Turn in assignment from Class 4 and L-comps.
- Assignment and videos discussion
- Go over PIC32 software
- Begin next assignment, due Tues 1/26: Chapter 3, problems 1-9, and Chapter 4, problems 1, 2, and 4. In class demo next Tuesday: chapter 3 problem 5.
At home:
- Videos (and L-comps) due Thurs: All of Chapter 3.
- Reading: Complete Chapter 3.
Class 6 (Th 1/21)
- Brief discussion of chapter 2 exercises and L-comps
- Quiz on Chapter 2.
- Discussion of videos and L-comps on Chapter 3
- Start Chapter 4
At home:
- Video and L-comp due Tues: Chapter 4.
- Reading: Complete Chapter 4.
- Continue assignment exercises, due Tuesday.
Class 7 (T 1/26)
- Before 11 AM: Turn in assignment on Chapters 3 and 4.
- In-class demo of problem 5 of Chapter 3
- Discussion of homework solutions
- Discussion of video and L-comp
- Brief intro to Chapter 5
- Next assignment: Chapter 4: Wiring the LCD and using LCDwrite.c. Chapter 5 (use no optimization for all exercises): Exercises 3, 4, 6(b,c), 7, 10. Chapter 6: Exercises 1, 4, 5, 6, 8, 9, 13, 14, 16, 18. Demo in class next Tuesday: Chapter 6 exercise 18.
At home:
- Videos and L-comps on Chapter 5
- Reading: Complete Chapter 5.
Class 8 (Th 1/28)
- Quiz on Chapters 3 and 4.
- Discussion of Chapter 5 videos and L-comps
- Brief intro to Chapter 6
- Continue with assignment.
At home:
- Videos and L-comps on Chapter 6
- Reading: Complete Chapter 6
- Finish assignment by 11 AM Tuesday
Class 9 (T 2/2)
- Before 11 AM: Turn in assignment from last Tuesday and the L-comps
- Demo of Chapter 6 exercise 18.
- Discussion on homework and L-comps
- Brief intro to digital i/o, counter/timers, output compare, analog input
- Start next assignment due next Tues. Chapter 24, feedback control of LED intensity, through 24.3. Demo in class on Tuesday: your code from chapter 24.3 with your nScope showing the sensor voltage at Vout.
At home:
- Videos and L-comps on Chapters 7 and 8
- Reading: Chapters 7 and 8
Class 10 (Th 2/4)
- Quiz on Chapters 5 and 6.
At home:
- Videos and L-comps on Chapters 9 and 10
- Reading: Chapters 9 and 10
Class 11 (T 2/9)
- Demo of Chapter 24.3 code.
- Discussion of last week's homework and L-comps due today
- Start assignment due next Tues. Finish the LED brightness control project. Turn in plots from 24.5, 24.7, and 24.8. Demo in class next Tuesday: the final result from 24.8, showing performance to changing gains in real-time in Matlab.
At home:
- Videos and L-comps on Chapter 23 on PID control
- Reading: Chapter 11, Chapter 23
Class 12 (Th 2/11)
- Quiz on Chapters 7-10.
- Discussion of L-comps
- PID control and continuing the assignment
At home:
- Complete assignment from Chapter 24
- Videos and L-comps on Chapter 25 on brushed DC motors
- Reading: Chapter 25
Class 13 (T 2/16)
- Demo of LED brightness control
- Discussion of turned-in homework
- Discussion of L-comps
- Start assignment due Tues 2/23: Problems 2-7 of Chapter 25 on DC motors
At home:
- Videos and L-comps for Chapter 26
- Reading: Chapter 26
Class 14 (Th 2/18)
- Quiz on Chapters 23 and 24, PID control and LED brightness control.
- Continue Chapter 25 assignment
At home:
- Videos and L-comps on Chapter 27
- Reading: Chapter 27
Class 15 (T 2/23)
- Discussion of turned-in homework
- Discussion of L-comps
- Start assignment due Tues 3/1. Exercise 4 of Chapter 26, Gearing and Motor Sizing, Exercises 1,2,3,6,9,10,11,12,13,14,16 of Chapter 27, DC Motor Control.
At home:
- Videos and L-comps on Chapter 27, DC Motor Control
- Reading: Chapter 27
Class 16 (Th 2/25)
- Quiz on Chapter 25, Brushed Permanent Magnet DC Motors.
- Discussion of L-comps
- Continue assignment
At home:
- Videos for Chapter 28
- Read Chapter 28
Class 17 (T 3/1)
- Demo of menu portion of final project
- Discussion of assignment just turned in
- Next assignment: Final project:
At home:
- No videos
- Continue with Chapter 28
Class 18 (Th 3/3)
- Final Quiz, on Chapter 27
- Continue with final assignment
Class 19 (T 3/8)
- Before 11 AM:
- In-class demo:
- Continue final project. To be on track, you should be up to 28.4.9
At home:
- Continue final project
Class 20 (Th 3/10)
- Quiz: No quiz!
- Discussion
- Continue final project. You should be up to 28.4.11. Sign up for a 5 minute time slot to demo your final project: signup sheet
Final Demo: Monday 3/14, 3-5 PM or Wednesday 3/16, 9-11 AM. Electronic submission by Wednesday 3/16, 11 AM.
Turn in your responses to 28.4.1 #7, 28.4.9 #8, 28.4.10 #5, 28.4.12 #5. Also turn in all of your PIC code and MATLAB code.
Extra credit: Add a menu item for Feed Forward Model-based control and another for FF+FB control. Add asymmetric inertial by using a 6-32 screw and nut to attach 2 washers to one side of the motor bar. How well can you compensate for this load? Provide several graphs of trajectories that are possible with FF only, or are improved with FF+FB. Demonstrate during your time slot. Credit for this will upgrade your lowest quiz grade to full credit.
FAQ
Q: Do I need to know the C language to take this course?
A: No. But if you already know C, there is still plenty else in this course for you. If you already know C, know how to use microcontrollers for real-time control, and have a good understanding how common sensors and actuators work and how to interface to them, this course may not be for you. Consider taking ME 433 Advanced Mechatronics in the spring quarter.
Q: Is there an independent project?
A: There is no large independent project. There will be a two-week project at the end of the course, but there will be no machining. For a more significant project, do a quarter-long project in ME 433 Advanced Mechatronics, offered in the spring quarter. ME 333 is good preparation for ME 433.
Q: What kind of laptop do I need?
A: You need a laptop with at least 2 USB ports. Any operating system is fine.