Embedded/Robotic Prgramming - Introduction to Robotics
This page is a companion page to COMP444, Embedded / Robotic Programming, written and offered through Athabasca University (AU) starting in 2013. The course is an introduction to robotics and robotic programming, including programming of embedded microprocessors. The course is offered as a third year option in the Bachellor's of Computing and Information Systems degree at Athabasca University and is 3 credits. The course is offered as an unpaced delivery (no fixed timetable) with year-round registration. Unpaced delivery is the standard for AU undergraduate courses. Students enroll and enter into a 6 month learning contract with the option to purchase up to two (2) three month extensions. Materials including study guide, conference discussion boards and assignment submission are all available on-line via the internet using Moodle. Tutor contact is usually by email. Learning Outcomes: Upon successful completion of the course, students will be able to
Text: The Robotics Primer, Maja J. Mataric. MIT Press, 2007. (included in course registration) |
Hardware
This course requires hardware to be effective. Students will receive a kit of hardware in addition to the text upon which to conduct experiments, explore the study guide and complete the course assignments. The final decision on which kit to supply was a rather long and arduous one, as outlined below. The fundamental processing device for this course is the Arduino prototyping board. The Arduino is an extremely popular programming platform for robotics as well as many other types of science and hobby projects. It is relatively easy to program, is fully open source, and quite inexpensive. It can be purchased individually or together with a variety of kits. |
Sparkfun Inventor's Kit
The Sparkfun Inventor's Kit is an Arduino starter kit, which contains the Arduino, breadboard, hardware components and on-line tutorials as well as a printed manual. This platform is used in the course to conduct various experiments to allow students to explore the course topics "hands on". While the students would not actually build a robot during the course, the knowledge, skills and experience gained using the Inventor's kit is easily translated to actual robot building at any point in the future. |
![]() ![]() |
Robotic Notebook
The remainder of this page is dedicated to something called the Robotic Notebook, which is a detailed description of the experiments that the course instructor has performed using the Arduino and the Sparkfun Inventor's Kit, in conjunction with the course study guide and the course text's companion workbook. |
First Steps
Greetings! Having enrolled in this course, you have just received your course package from Athabasca University. Inside you found some paperwork, the textbook, plus the Sparkfun Inventor's Kit. If you are anything like me, you tossed the paperwork and the text onto a convenient table and immediately opened the Inventor's kit. Inside the rather nice plastic holding case you found a number of small ziploc baggies containing various electronic components, some hookup wires, a cardboard box about the size of a deck of cards containing the Arduino inside an anti-static bag, a manual and some instructional cards, a plastic base and a small perfboard. Before you can begin, you need to assemble the Arduino and the perfboard onto the plastic base. Please have a quick read through the supplied manual before you begin. You should refer to the next section about obtaining the most recent version of this manual. The manual contains good general instructions as well as important information about preventing static damage to your Arduino. Be careful when handling the Arduino, especially until you have it properly attached to your base. If you damage your Arduino, you will have to order and pay for a replacement yourself. Once you have the Arduino and perfboard mounted to the base, you can begin examining the other components. You can try some of the experiments in the supplied tutorial, but you won't be able to run the programs until you install the Arduino programming environment. Again, the supplied manual has excellent instructions. If you encounter difficulties in any of these first activities, post your questions on the Landing (Comp 444 group) or on the course's moodle forums. |
Sparkfun Inventor's Kit Manual (SIK Guide)
One thing I discovered in using this kit is that the supplied printed manual does not always agree 100% with the kit componenets. That is because this kit is used in hundreds of schools in North America, and feedback from educators causes Sparkfun to adjust the instructions, experiments, and even kit components to provide a better learning experience. As a result, the best source for the kit manual is the on-line version, which you can find here: Sparkfun SIK Guide When I refer to the kit manual in my discussions, I am always referring to the on-line manual which will reflect the latest changes. Should I deviate from the on-line manual, I will note that in my discussion. |
Other Useful Links
In addition to the on-line SIK Guide, there are several other links that contain a wealth of information on the Arduino and the SIK.
When I refer to the kit manual in my discussions, I am always referring to the on-line manual which will reflect the latest changes. Should I deviate from the on-line manual, I will note that in my discussion. |
Programming
As with many things involving the Inventor's kit, the supplied instruction manual has a wealth of information on programming the Arduino. The Arduino is programmed in the C programming language, but you don't have to "know C" to program an Arduino. That is because most of the C houskeeping is already done by the Arduino programing environment. For all simple programs, all you have to do is write program statements (called procedural code) inside one of the two supplied subroutines (called functions in C). Procedural program statements are almost identical in programming languages you learned or may know prior to taking this course; languages such as C, C++, C#, Java, to name a few. Follow along with the examples to familiarize yourself with simple programs using the Arduino programming environment. As with all things in this course, if you encounter difficulties, post on the course Landing group or on the course Moodle forum. |
Study Guide Exercises
In the study guide, each unit has an 'exercises' section, in which you are directed to this guide. The sections below contain the hardware and programming instructions to go with each unit. In the following exercises, I will be referring to several documents, mentioned elsewhere in the course materials and supplied as part of your course materials in the form of websites on Moodle, the Landing or via links in the Study Guide and this document. The first is the course study guide, referred to here as the "Study Guide". this is found on the course page on Moodle. The second is this document, "Robotics Notebook" or "Notebook", also known as "The Instructor's Blog". This is found on the Landing in the COMP 444 group. The third document is the textbook's companion workbook, called here "Workbook". Finally there is the Sparkfun Inventor's Kit "SIK Guide", which is a PDF document you download from the Sparkfun link provided above. This last document is the latest version of the paper SIK Guide that came with your kit. At the time of writing this notebook, the most current version of the SIK guide is "SFE03-0012-SIK.pdf". When new versions of the SIK Guide are released, I will update these pages as appropriate. |
Unit 0
The SIK Guide is the gateway to your Experimetner's Kit. At this time you should review Section 1 of the SIK guide if you have not already done so. In your own notebook that you create on the Landing, describe the Arduino in your own words. Also describe your own experiences with downloading, installing and testing the Arduino programming environment. Include any difficulties you may have encountered, and what steps you took to resolve them. I strongly urge you to resist the temptation to download all the examples and just run them. I have taught programming for many years, and have found both in teaching and in learning myself that the greatest benefit in learning to program a new system/device/language can be obtained if you type all the example code in yourself. Typing in the code, even for simple examples, engages your brain in the process of writing code, compiling code, running code, and diagnosing and resolving problems that may arise. It is the latter skill - problem solving - that can become the most powerful tool in learing to program. Once you have completed the steps above for Section 1 of the SIK, continue on to the first few parts of Section 2 - specifically up to the creation of Circuit #1 - Blinking a LED. Again, describe your journey in your own Landing notebook. Remember, the assignments in this course are comprised of you submitting your completed notebook at certain points in the course. Your mark in this course is comprised of a summative assessment of your diary/notebook at those weypoints. The more you describe what you are observing and understanding as you progress through these exercises, the better you will meet the objectives of the course. |
Unit 1
As mentioned in the Study guide and this notebook, the companion text workbook is somewhat incomplete, and does not completely apply to our chosen hardware platform. The workbook also does not correspond well to the SIK Guide, in that the guide explores some hardware elements in different order than the text's workbook. However, this is not really a significant difficulty, as we want to first explore the various hardware elements in our Inventor's kit, after which we can tackle some of the text's robotic questions. Unit 1 is a general discussion of locomotion. Unit 2 will further explore robotic locomotion, but for now we shall begin by working through the SIK tutorials. Bearing that in mind, you should begin to work through the SIK Guide tutorials in Section 2, making notes of your progress, questions, challenges and solutions as you go. Due to the structure of the SIK Guide, I recommend you tackle the circuits and programs in the order they are presented, starting with Circuit #2 and continuing through Circuit #7. These circuits comprise the tutorial's coverage of sensor inputs, which will be put to further use in Unit 4, and pave the way for the next unit's circuits. Activities using the text Companion Workbook: Read through the text companion workbook section titled Robotic Components. Answer the questions posed in this section of the workbook in your own weblog. TME 1 is due at the end of this unit, so your diary on the Landing should encompass everything you have done to this point, including the tutorials through Circuit 7, inclusive. |
Unit 2
This unit begins the discussion on locomotion and robotic movement. It corresponds nicely to the SIK circuits involving motors. Work through the SIK Guide tutorials for Circuits #8 through #12, inclusive. Keep notes of your progress as before on the Landing. Once you have completed the Circuits #1 through #12, you may wish to create a video of one or more of your favorite circuits in action if you have video recording capability. If you do, be sure to upload your video to your weblog on the Landing to share with everyone in the class. Activities using the text Companion Workbook: Read through the text companion workbook section titled Locomotion. Answer the questions posed in this section of the workbook in your own weblog. You will not be able to do the exercises in the workbook, but compare what they are doing with the iRoomba to robot kits like Lego Mindstorms. How do they compare? How do the motors used in the iRoomba compare to the various motors in your Inventor's kit? Discuss how you might build a robot like the iRoomba using your Inventor's kit, including and additional parts you might have to acquire. |
Unit 3
This unit completes the section on robotic movement. By now you should have completed all SIK Guide tutorials and circuits from Circuit #1 through Circuit #12, inclusive. Design Question: How many motors, and of what type, would you require to make a fully functional robotic arm that had a working elbow, wrist, and end affector (i.e. a simple clamp)? What components would you add if you wanted the clamp to be able to tell how hard it was grabbing an object such as an egg (i.e. to avoid crushing it)? Discuss your design in your weblog in detail, especially describing the choice of motor for each joint, the degrees of freedom and the range of motion. Programming/Circuit Task: Since we don't have all the hardware to build a robotic arm, imagine you have been given the task of creating the elbow joint. Select the appropriate motor for this task, and then create a program and circuit using your Arduino which can demonstrate your motor performing the correct elbow movement. It may help if you tape an object such as a popcicle stick,drinking straw, or long skinny piece of paper to your motor to demonstrate the movement of the lower portion of the arm under control of your program. Your program should take as input a number of degrees to move the elbow from an arbitrary starting position. For example, if you choose 'fully straight' as the starting position, this will be designated 0 degrees (start). The arm could then bend about 170 degrees, indicating 'fully bent' (check the amount of bend on your own elbow from hand straight out to hand near your shoulder for reference). As always, keep detailed notes in your weblog of the entire development, testing and debugging process. If you have video capabilities, upload a video of your completed project. You should also include a listing of your code in your weblog, as well as a description of the final wiring of your project. |
Unit 4
Activities using the text Companion Workbook: Read through the text companion workbook section titled Sensors. Answer the questions posed in this section of the workbook in your own weblog. You will not be able to do the exercises in the workbook, but compare what they are doing with the iRoomba to robot kits like Lego Mindstorms. How do they compare? How do the sensors used in the iRoomba platform comare to the sensors in your Inventor's Kit? |
Unit 5 |
Unit 6 |
Unit 7 |
Unit 8 |
Unit 9 |
Unit 10 |
Unit 11 |
Unit 12 |
Unit 13 |
Unit 14 |
Unit 15 |
Unit 16 |