Difference between revisions of "ME 333 Introduction to Mechatronics (Archive Winter 2022)"

From Mech
Jump to navigationJump to search
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''Winter Quarter 2021'''
'''Winter Quarter 2022'''


'''First day of class is Tuesday January 12.'''
'''First day of class is Tuesday January 4.'''
* Section 20: Prof. Nick Marchuk (nick.marchuk@gmail.com), T Th, 11:00-12:20, remote
* Section 20: Prof. Nick Marchuk (nick.marchuk@u.northwestern.edu), T Th, 11:00-12:20, Tech A110 starting 1/18
* Section 21: Prof. Nick Marchuk (nick.marchuk@gmail.com), T Th, 12:30-1:50, remote
* Section 21: Prof. Nick Marchuk (nick.marchuk@u.northwestern.edu), T Th, 12:30-1:50, Francis Searle 2407 1/18
* TAs:
* TAs:
** Dan Lynch
** Tito Fernandez
** Petras Swissler
** Huan Weng


* '''Final demo''' (in lieu of final exam): TBD <!-- Monday Mar 16 3-5 PM (12:30-1:50 section) and Wednesday Mar 18 9-11 AM (11-12:20 section) -->
* '''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 <!--in Ford B100:
* Office Hours:
** Tito: Monday 1-2:30pm
** Huan: Wednesday 2-4pm in Ford B100

<!--in Ford B100:
** TuWThF 4-5pm with Prof. Marchuk in Ford B100, or by appt -->
** TuWThF 4-5pm with Prof. Marchuk in Ford B100, or by appt -->


Line 54: Line 58:


* 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.
* 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.
* Have a laptop with at least 2 USB A-style 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, and lots of other goodies. <!-- Price $125 if you are starting from scratch; $75 if you already have the nScope.
* Be prepared to buy your class kit, consisting of the portable nScope oscilloscope, the NU32 PIC32 development board, and lots of other goodies. Price $125 if you are starting from scratch; $75 if you already have the nScope.
<!--
* 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. -->
* 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.
-->


== Student Contract ==
== Student Contract ==
Line 78: Line 84:


* 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]].
* 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]].
** '''The textbook is included in the class kit, you do not need to buy it online or at the bookstore!'''
** '''A pdf of 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)]]
Line 87: Line 93:
Useful, but not required:
Useful, but not required:
* [http://www.amazon.com/Programming-32-bit-Microcontrollers-Exploring-Technology/dp/0750687096/ref=sr_1_1?ie=UTF8&s=books&qid=1294091438&sr=8-1-spell Programming 32-bit Microcontrollers in C: Exploring the PIC32] by Lucio Di Jasio. This is an easy to read and informative exploration of the PIC32.
* [http://www.amazon.com/Programming-32-bit-Microcontrollers-Exploring-Technology/dp/0750687096/ref=sr_1_1?ie=UTF8&s=books&qid=1294091438&sr=8-1-spell Programming 32-bit Microcontrollers in C: Exploring the PIC32] by Lucio Di Jasio. This is an easy to read and informative exploration of the PIC32.
* Other C resources, such as [http://publications.gbdirect.co.uk/c_book/ online] as well as this [[Media:CBook.pdf|pdf version]] of "The C Book," and the classic [http://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628/ref=sr_1_1?s=books&ie=UTF8&qid=1294091625&sr=1-1 C Programming Language] reference book by Kernighan and Ritchie
-->
-->
* Other C resources, such as this [[Media:CBook.pdf|pdf version]] of "The C Book," and the classic [http://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628/ref=sr_1_1?s=books&ie=UTF8&qid=1294091625&sr=1-1 C Programming Language] reference book by Kernighan and Ritchie



== Grading ==
== Grading ==
Line 139: Line 146:
: '''Demonstration''': Make a video of your HelloWorld.c program and upload in CANVAS.
: '''Demonstration''': Make a video of your HelloWorld.c program and upload in CANVAS.


'''Class 1''' (T 1/12)
'''Class 1''' (T 1/4)
: '''Assignment due''': L-comp and exercise solutions, and demo video, for the Winter Break assignment by 11am on CANVAS.
: '''Assignment due''': L-comp and exercise solutions, and demo video, for the Winter Break assignment by 11am on CANVAS.
: '''Lecture Videos''' https://youtu.be/6cFSmm6eX6w https://youtu.be/P9v-AxwCvHc https://youtu.be/BgNt20-Ivfw https://youtu.be/EvIfmEzMXqs
: '''Lecture Videos from last year''' https://youtu.be/6cFSmm6eX6w https://youtu.be/P9v-AxwCvHc https://youtu.be/BgNt20-Ivfw https://youtu.be/EvIfmEzMXqs
: '''Lecture on Zoom'''
: '''Begin next assignment:''' Appendix A exercises 18-19, 21-22, 27-28, 30-32, 34-35.
: '''Begin next assignment:''' Appendix A exercises 18-19, 21-22, 27-28, 30-32, 34-35.
: '''Demonstration''': Exercise 34 and 35.
: '''Demonstration''': Exercise 34 and 35.
Line 149: Line 157:
: Reading: Through page 562 of a Crash Course in C, and the rest of the Appendix as reference.
: Reading: Through page 562 of a Crash Course in C, and the rest of the Appendix as reference.


'''Class 2''' (Th 1/14)
'''Class 2''' (Th 1/6)
: '''Before 11 AM:''' Answer L-comps
: '''Before 11 AM:''' Answer L-comps
: '''Lecture Videos" https://youtu.be/PcREfvXxJQE https://youtu.be/fMmT7FyACMI https://youtu.be/6L7qcu_-I_Q https://youtu.be/r2a4Lg2p0to
: '''Lecture Videos from last year''' https://youtu.be/PcREfvXxJQE https://youtu.be/fMmT7FyACMI https://youtu.be/6L7qcu_-I_Q https://youtu.be/r2a4Lg2p0to
: '''Lecture on Zoom'''
: '''Continue assignment'''
: '''Continue assignment'''


Line 158: Line 167:
: Reading: Rest of a Crash Course in C as reference
: Reading: Rest of a Crash Course in C as reference


'''Class 3''' (T 1/19)
'''Class 3''' (T 1/11)
: '''Before 11 AM:''' Turn in assignment, L-comps, and demo videos.
: '''Before 11 AM:''' Turn in assignment, L-comps, and demo videos.
: '''Review for the Quiz'''
: '''Review for the Quiz'''
: '''Lecture Videos''' https://youtu.be/I5wguSQcEiw https://youtu.be/LbuoWj5BM3Q
: '''Lecture Videos from last year''' https://youtu.be/I5wguSQcEiw https://youtu.be/LbuoWj5BM3Q
: '''Lecture on Zoom'''
: Reading: Complete Chapter 1 (quickstart) and Chapter 2.
: Assignment: 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)]].


At home:
At home:
: Assignment: Study.
: Assignment: Study.


'''Class 4''' (Th 1/21)
'''Class 4''' (Th 1/13)
: '''Quiz:''' On C.
: '''Quiz review on Zoom'''
: '''Quiz:''' At home, on C, posted on Canvas at 3pm, due by Fri 6pm


At home:
At home:
Line 174: Line 187:
: Download, install, and compile all software as indicated through the end of Chapter 1.3. See [[NU32 Software | NU32 Software]]
: Download, install, and compile all software as indicated through the end of Chapter 1.3. See [[NU32 Software | NU32 Software]]


'''Class 5''' (T 1/26)
'''Class 5''' (T 1/18)
: '''Before 11 AM''': Watch Chapter 1 videos (no L-comps), install all software from Chapter 1
: '''Before 11 AM''': Turn in Homework for Chapter 2
: '''In class demonstration''': Compile helloWorld and talkingPIC for NU32.
: '''In class demonstration''': Compile helloWorld and talkingPIC for NU32.
: '''Lectures: Go over PIC32 software''' - https://youtu.be/0mG7hlwUduA https://youtu.be/ZGzbVhb_sdU
: '''Lectures: Go over PIC32 software''' - https://youtu.be/0mG7hlwUduA https://youtu.be/ZGzbVhb_sdU
: Homework for next Tuesday: Chapter 3, problems 1,3,7,8,9


At home:
At home:
: Videos (and L-comps): 1-4 from Chapter 2.
: Videos (and L-comps): 1-4 from Chapter 2.
: Reading: Complete Chapter 1 (quickstart) and Chapter 2.
: Assignment: 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)]].
: Pay for your equipment.



'''Class 6''' (Th 1/28)
'''Class 6''' (Th 1/20)
: Turn in Chapter 2 L-comps
: Turn in Chapter 2 L-comps
: Quiz on Chapter 1
: Quiz on Chapter 1
Line 195: Line 207:
: Homework for Chapters 2
: Homework for Chapters 2


'''Class 7''' (T 2/2)
'''Class 7''' (T 1/25)
: '''Before 11 AM''': Turn in Homework from Chapter 2, L-comps for Chapter 3 videos, read Chapter 3
: '''Before 11 AM''': Turn in Homework from Chapter 2, L-comps for Chapter 3 videos, read Chapter 3
: '''Lectures: ''' https://youtu.be/CyGwEoNJdS4 https://youtu.be/5LyWPeLY7yU https://youtu.be/UXNOx6Z1Q9w
: '''Lectures: ''' https://youtu.be/CyGwEoNJdS4 https://youtu.be/5LyWPeLY7yU https://youtu.be/UXNOx6Z1Q9w
Line 202: Line 214:
: Videos (and L-comps): All of Chapter 4.
: Videos (and L-comps): All of Chapter 4.
: Reading: Complete Chapter 4.
: Reading: Complete Chapter 4.
: Homework for next Tuesday: Chapter 3, problems 1-9 (skip demo for 5 if you don't have your kit yet). Chapter 4, problems 1, 2, and 4
: Homework for next Tuesday: Chapter 3, problems 4,5. Chapter 4, problems 1, 2, and 4


'''Class 8''' (Th 2/4)
'''Class 8''' (Th 1/27)
: '''Before 11 AM''': Turn in Chapter 4 L-comp.
: '''Before 11 AM''': Turn in Chapter 4 L-comp.
: Quiz on Chapter 2
: Quiz on Chapter 3
: '''Lectures: ''' https://youtu.be/16_lVr_k7R0 https://youtu.be/HoNKp8MNGOw
: '''Lectures: ''' https://youtu.be/16_lVr_k7R0 https://youtu.be/HoNKp8MNGOw


At home:
At home:
: Chapter 3, problems 4,5. Chapter 4, problems 1, 2, and 4
: Make sure your NU32 works, test simplePIC and talking PIC


'''Class 9''' (T 2/9)
'''Class 9''' (T 2/1)
: '''Before 11 AM''': Chapter 3 and 4 homework
: '''Before 11 AM''': Chapter 3 and 4 homework
: Videos and L-comps on Chapter 5
: Videos and L-comps on Chapter 5
Line 218: Line 230:
: Homework: Chapter 5 (use no optimization for all exercises): Exercises 3, 4. Chapter 6: Exercises 1, 4, 5, 8, 9, 16,17. Make a demo video for 6.17
: Homework: Chapter 5 (use no optimization for all exercises): Exercises 3, 4. Chapter 6: Exercises 1, 4, 5, 8, 9, 16,17. Make a demo video for 6.17


'''Class 10''' (Th 2/11)
'''Class 10''' (Th 2/3)
: Quiz on Chapter 3 and 4
: Quiz on Chapter 4
: Videos and L-comps on Chapter 6
: Videos and L-comps on Chapter 6
: ''' Lecture videos: ''' On Chapter 6: https://youtu.be/YhmynLK8dTY https://youtu.be/kJ2rvqyuQzM https://youtu.be/JGBWpj5yNfY and a video by Petras, on Canvas
: ''' Lecture videos: ''' On Chapter 6: https://youtu.be/YhmynLK8dTY https://youtu.be/kJ2rvqyuQzM https://youtu.be/JGBWpj5yNfY 


'''Class 11''' (T 2/16)
'''Class 11''' (T 2/8)
: '''Before 11 AM''': Chapter 5 and 6 homework
: '''Before 11 AM''': Chapter 5 and 6 homework
: Videos and L-comps on Chapters 7 and 8
: Videos and L-comps on Chapters 7 and 8
" '''Lecture videos: '' On Chapter 7 & 8: https://youtu.be/04C3QZ7JTMs https://youtu.be/b3aOIfClECE
: '''Lecture videos: '' On Chapter 7 & 8: https://youtu.be/04C3QZ7JTMs https://youtu.be/b3aOIfClECE


At home:
At home:
Line 232: Line 244:
: The next assignment is related, do Chapter 24.1.2, 24.2.1 and 2, 24.3.1 and 2
: The next assignment is related, do Chapter 24.1.2, 24.2.1 and 2, 24.3.1 and 2


'''Class 12''' (Th 2/18)
'''Class 12''' (Th 2/10)
: Quiz on Chapter 5 and 6
: Quiz on Chapter 5 and 6
: '''Lecture videos:''' On Chapter 9, 10 & 11: 9, 10, https://youtu.be/Eqip-9y3mCc
: '''Lecture videos:''' On Chapter 9, 10 & 11: 9, 10, https://youtu.be/Eqip-9y3mCc


'''Class 13''' (T 2/23)
'''Class 13''' (T 2/15)
: Due: Homework from Chapter 7, 8, 9, 10, and the first half of Chapter 24
: Due: Homework from Chapter 7, 8, 9, 10, and the first half of Chapter 24
: '''Before 11 AM''': Chapter 7 8 9 10 homework
: '''Before 11 AM''': Chapter 7 8 9 10 homework
: Assignment: Chapter 24 project. Create solutions for Chapter 24.1.2, 24.2.1 and 2, 24.3.1 and 2, 24.5, 24.7, and 24.8.
: Assignment: Chapter 24 project. Create solutions for Chapter 24.1.2, 24.2.1 and 2, 24.3.1 and 2, 24.5, 24.7, and 24.8.


'''Class 14''' (Th 2/25)
'''Class 14''' (Th 2/17)
: Quiz on Chapter 7 8 9 10 11
: Quiz on Chapter 7 8 9 10 11


<!--
'''Class 15''' (T 3/2)
: Pay for your equipment.

'''Class 15''' (T 2/22)
: Due: Homework from Chapter 24
: Due: Homework from Chapter 24
: '''Before 11 AM''': Chapter 24 homework
: '''Before 11 AM''': Chapter 24 homework
: Assignment: First half of Chapter 28: Chapter 28 through 28.4.1. Turn in your responses to 28.4.1 #7, 28.4.7 #7, 28.4.9 #8
: Assignment: First half of Chapter 28: Chapter 28 through 28.4.1. Turn in your responses to 28.4.1 #7, 28.4.7 #7, 28.4.9 #8


'''Class 16''' (Th 3/4)
'''Class 16''' (Th 2/24)
: Quiz on Chapter 23
: Quiz on Chapter 23


'''Class 17''' (T 3/9)
'''Class 17''' (T 3/1)
: Due: First half of Chapter 28, up to 28.4.9
: Due: First half of Chapter 28, up to 28.4.9
: Assignment: Complete Chapter 28: 28.4.10 #5, 28.4.12 #5.
: Assignment: Complete Chapter 28: 28.4.10 #5, 28.4.12 #5.


'''Class 16''' (Th 3/11)
'''Class 18''' (Th 3/3)
: '''Lecture Videos:''' https://youtu.be/eoszZpwqNgY https://youtu.be/cz9ckQUsvH8 https://youtu.be/I--miZscPxc https://youtu.be/x5bSqBKPn1U
: '''Lecture Videos:''' https://youtu.be/eoszZpwqNgY https://youtu.be/cz9ckQUsvH8 https://youtu.be/I--miZscPxc https://youtu.be/x5bSqBKPn1U
: Quiz on Chapter 25 26 27 during finals week
: Quiz on Chapter 25


'''Final Assignment''' Due by Thur 3/18 at noon


'''Class 19''' (T 3/8)


'''Class 20''' (T 3/10)
<!--
: Quiz on Chapter 25




'''Class 12''' (Th 2/13)
: Quiz on Chapter 3 and 4 and buttons and LEDs
: '''Discussion of video and L-comp for Chapter 5'''
: '''Brief intro to Chapter 6'''

At home:
: Videos and L-comps on Chapter 6
: Continue homework for Chapter 5 and 6


'''Class 13''' (T 2/18)
: '''Before 11 AM''': Turn in Homework from Chapter 5 and 6, L-comps for Chapter 6 videos
: '''Brief intro to Chapter 24, and digital i/o and counter/timers'''

At home:

: Reading: Chapters 7 and 8


'''Class 14''' (Th 2/20)
: '''Quiz on Chapter 5 and 6'''
: '''Brief intro to output compare'''

At home:
: Videos and L-comps on Chapters 9 and 10
: Reading: Chapters 9 and 10
: Assignment: : Chapter 24.1.2, 24.2.1 and 2, 24.3.1 and 2

'''Class 15''' (T 2/25)
: '''Before 11 AM''': L-comps from Chapter 9, 10 and 23, Assignment from Chapter 7-10
: '''Discussion of turned-in homework'''
: '''Discussion of L-comps'''
: '''Intro to Chapter 23 and 24'''

At home:
: Homework: Chapter 24.5, 24.7, and 24.8.

'''Class 16''' (Th 2/27)
: '''Quiz on Chapter 7-10'''
: Review Chapter 24
:'''Work on assignment'''

At home:
: Complete Chapter 24

'''Class 17''' (T 3/3)
: '''Before 11 AM''': Upload solutions and demo for Ch 24
: '''Discussion of turned-in homework'''
: Discussion of Chapter 25 and 28
: Hand out motors

At home:
: Assignment: : Read Chapter 28 through 28.4.1. Turn in your responses to 28.4.1 #7, 28.4.7 #7, 28.4.9 #8

'''Class 18''' (Th 3/5)
: '''Quiz on Chapter 23, PID Control.'''
: Discussion of Chapter 26 and 27

At home:
: Continue Chapter 28
: L-comps for Chapter 27

'''Class 19''' (T 3/10)
: '''Before 11 AM''': L-comps
: Discussion of Chapter 29

At home:
: Complete Chapter 28: 28.4.10 #5, 28.4.12 #5.
: Sign up for a time slot to demonstrate your final assignment: [https://docs.google.com/spreadsheets/d/1reEmJ7B2UCTsKIef9iCSJKDipg_J4DuTVHDbNA6Ls-0/edit?usp=sharing google_sheet]

'''Class 20''' (Th 3/12)
: '''Final Quiz, on Chapter 25, 26 and 27'''






'''Final Demo''':
'''Final Assignment''' Due by Thur 3/16 at noon
: In person, on Monday 3/16, 3-5 PM, or Wednesday 3/18, 9-11 AM.
: Electronic submission by Wednesday 3/18, 11 AM.
: Turn in your responses to 28.4.1 #7, 28.4.7 #7, 28.4.9 #8, 28.4.10 #5, 28.4.12 #5. Also turn in all of your PIC code and MATLAB code.
: Upload a demonstration video of the results of good current tuning, and following a trajectory with good gains and bad gains.


-->
-->

Revision as of 14:17, 4 February 2022

Winter Quarter 2022

First day of class is Tuesday January 4.

  • Section 20: Prof. Nick Marchuk (nick.marchuk@u.northwestern.edu), T Th, 11:00-12:20, Tech A110 starting 1/18
  • Section 21: Prof. Nick Marchuk (nick.marchuk@u.northwestern.edu), T Th, 12:30-1:50, Francis Searle 2407 1/18
  • TAs:
    • Tito Fernandez
    • Huan Weng
  • 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:
    • Tito: Monday 1-2:30pm
    • Huan: Wednesday 2-4pm in Ford B100



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 ME 433 Advanced Mechatronics, DSGN 360 Design Competition, senior design projects, or independent projects.

Approximate Syllabus

This course is for students who 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

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 A-style 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, and lots of other goodies. Price $125 if you are starting from scratch; $75 if you already have the nScope.

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, BME 305 (pre-2020) or BME 308 (post-2020)) 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:

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. 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 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.
  • 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.
  • 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 Visual Studio Code, 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.

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 Thursday). 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 Thursday, 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 in CANVAS.
Assignment: Exercises 1-4, 6-8, 10-11, 16-17 of Appendix A.
Demonstration: Make a video of your HelloWorld.c program and upload in CANVAS.

Class 1 (T 1/4)

Assignment due: L-comp and exercise solutions, and demo video, for the Winter Break assignment by 11am on CANVAS.
Lecture Videos from last year https://youtu.be/6cFSmm6eX6w https://youtu.be/P9v-AxwCvHc https://youtu.be/BgNt20-Ivfw https://youtu.be/EvIfmEzMXqs
Lecture on Zoom
Begin next assignment: Appendix A exercises 18-19, 21-22, 27-28, 30-32, 34-35.
Demonstration: Exercise 34 and 35.

At home:

Videos and L-comps: 8-16 of a Crash Course in C.
Reading: Through page 562 of a Crash Course in C, and the rest of the Appendix as reference.

Class 2 (Th 1/6)

Before 11 AM: Answer L-comps
Lecture Videos from last year https://youtu.be/PcREfvXxJQE https://youtu.be/fMmT7FyACMI https://youtu.be/6L7qcu_-I_Q https://youtu.be/r2a4Lg2p0to
Lecture on Zoom
Continue assignment

At home:

Videos (and L-comps): 17 of a Crash Course in C.
Reading: Rest of a Crash Course in C as reference

Class 3 (T 1/11)

Before 11 AM: Turn in assignment, L-comps, and demo videos.
Review for the Quiz
Lecture Videos from last year https://youtu.be/I5wguSQcEiw https://youtu.be/LbuoWj5BM3Q
Lecture on Zoom
Reading: Complete Chapter 1 (quickstart) and Chapter 2.
Assignment: 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).

At home:

Assignment: Study.

Class 4 (Th 1/13)

Quiz review on Zoom
Quiz: At home, on C, posted on Canvas at 3pm, due by Fri 6pm

At home:

Videos (no L-comps): Chapter 1 (for your specific OS)
Reading: Chapter 1: Quickstart
Download, install, and compile all software as indicated through the end of Chapter 1.3. See NU32 Software

Class 5 (T 1/18)

Before 11 AM: Turn in Homework for Chapter 2
In class demonstration: Compile helloWorld and talkingPIC for NU32.
Lectures: Go over PIC32 software - https://youtu.be/0mG7hlwUduA https://youtu.be/ZGzbVhb_sdU
Homework for next Tuesday: Chapter 3, problems 1,3,7,8,9

At home:

Videos (and L-comps): 1-4 from Chapter 2.


Class 6 (Th 1/20)

Turn in Chapter 2 L-comps
Quiz on Chapter 1
Lectures: https://youtu.be/0R-aj6XtJLE https://youtu.be/NEICsIIprKU

At home:

Videos (and L-comps): All of Chapter 3.
Reading: Complete Chapter 3.
Homework for Chapters 2

Class 7 (T 1/25)

Before 11 AM: Turn in Homework from Chapter 2, L-comps for Chapter 3 videos, read Chapter 3
Lectures: https://youtu.be/CyGwEoNJdS4 https://youtu.be/5LyWPeLY7yU https://youtu.be/UXNOx6Z1Q9w

At home:

Videos (and L-comps): All of Chapter 4.
Reading: Complete Chapter 4.
Homework for next Tuesday: Chapter 3, problems 4,5. Chapter 4, problems 1, 2, and 4

Class 8 (Th 1/27)

Before 11 AM: Turn in Chapter 4 L-comp.
Quiz on Chapter 3
Lectures: https://youtu.be/16_lVr_k7R0 https://youtu.be/HoNKp8MNGOw

At home:

Chapter 3, problems 4,5. Chapter 4, problems 1, 2, and 4

Class 9 (T 2/1)

Before 11 AM: Chapter 3 and 4 homework
Videos and L-comps on Chapter 5
Lecture videos: On Chapter 5:
Homework: Chapter 5 (use no optimization for all exercises): Exercises 3, 4. Chapter 6: Exercises 1, 4, 5, 8, 9, 16,17. Make a demo video for 6.17

Class 10 (Th 2/3)

Quiz on Chapter 4
Videos and L-comps on Chapter 6
Lecture videos: On Chapter 6: https://youtu.be/YhmynLK8dTY https://youtu.be/kJ2rvqyuQzM https://youtu.be/JGBWpj5yNfY 

Class 11 (T 2/8)

Before 11 AM: Chapter 5 and 6 homework
Videos and L-comps on Chapters 7 and 8
'Lecture videos: On Chapter 7 & 8: https://youtu.be/04C3QZ7JTMs https://youtu.be/b3aOIfClECE

At home:

Assignment: Chapter 7: Exercises 1,2. Chapter 8: Exercise 1. Chapter 9: Exercise 1. Chapter 10: Exercise 1,2.
The next assignment is related, do Chapter 24.1.2, 24.2.1 and 2, 24.3.1 and 2

Class 12 (Th 2/10)

Quiz on Chapter 5 and 6
Lecture videos: On Chapter 9, 10 & 11: 9, 10, https://youtu.be/Eqip-9y3mCc

Class 13 (T 2/15)

Due: Homework from Chapter 7, 8, 9, 10, and the first half of Chapter 24
Before 11 AM: Chapter 7 8 9 10 homework
Assignment: Chapter 24 project. Create solutions for Chapter 24.1.2, 24.2.1 and 2, 24.3.1 and 2, 24.5, 24.7, and 24.8.

Class 14 (Th 2/17)

Quiz on Chapter 7 8 9 10 11


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, take 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.