Hi All, I just want to wish you all the best of luck in tomorrow’s Robotics 3.1 exam!
In case anyone missed the final lecture, I’ve transcribed most of what I had on the board at the end (see photos below). The exam is not intended to be full of surprises, so hopefully you won’t find any nasty shocks.
Ok, this is most of what I had on the board (or said during the lecture). Please note that this is a useful guide, but not a comprehensive revision list (do please read the revision check list and of course the past papers and sample solutions):
- The paper always begins with a few definitions – they’re listed in the notes on this web site – please make sure you’ve revised them!
- Please make sure you’re on top of your basic trigonometry (e.g. sin, cos, tan, etc). These always appear on the exam in some shape or form.
- Please refresh your memory of basic C code, including: int, double, arrays, while, if, for, break, etc. Also, please remember that all trig functions in C (such as sin, cos and tan, which are defined in math.h) use radians as units rather than degrees.
Planning robot movement:
- How to derive and use forward and inverse kinematic equations for SCARA and other simple examples. Basically, this kind of thing appears on the exam every year.
- State model: This is the final question on the paper every year. You are given a specific problem and asked to design a state model for a robot. You need to be able to write the state table and/or write the C code. Make sure you know the basic mechanism for creating a state machine in C (i.e. using an int state variable and a while loop with an if-else-if-else-if structure inside it).
Executing robot movement:
- Firstly, make sure you understand the basic principles of Tcy and __delay32.
- Also, make sure you know how to set a pin as digital input or output (e.g. TRISD or _TRISD0), how to set a digital output high or low (e.g. LATD or _LATD0), and how to read a digital input (e.g. PORTD or _RD0).
- Review how to wire up the stepper, servo and DC motor, either using SN745510NE / L293D or using the transistor circuits we discussed in lectures (e.g. unidirectional speed control, bidirectional control with H-bridge).
- By “wiring up”, I mean not only connecting the actuator to the dsPIC, but also connecting power supply etc.
- Review the C code for controlling stepper, servo and DC motor with the dsPIC. You won’t be asked to write any epic programs in the exam, but please make sure you’re able to read AND WRITE basic C code for each of these actuators!
- Servo control: You should be able to calculate the pulse width for a given servo angle and vice versa. Setting register values to implement a particular servo angle, both using bit-banging (i.e. using RD0 and __delay32) and using Output Compare (i.e. calculating OCxRS value, setting PR2 and prescale value).
- NOTE: I know some of you used the dsPIC’s PWM module (PTPER, PDC1, etc) to control servos in your project work (which is perfectly fine), but remember what I said in class: Where servo control appears on the exam, either bit-banging or the Output Compare module is used to generate PWM signals. Any PWM/servo code you’re asked to read or write will not use PTPER, PDC1, etc. Therefore, please make sure it’s Output Compare and bit-banging you swat up on!
How the robot gathers information from its environment:
- Analog inputs: How to connect sensors to dsPIC (rangefinder, LDR, colour sensor).
- NOTE: I told you in the final class that the microphone pre-amp circuit will NOT appear on the exam, since we didn’t cover it in detail this year.
- ADC resolution – in particular, you need to understand clearly how the numbers you read from an analog input (i.e. integers between 0 and 1023) relate to what the sensor is measuring. e.g. If you were using a particular rangefinder (which would be described in the exam paper), what number would you read for 50cm? That kind of thing.
Finally, here are a couple of snapshots of the whiteboard at the end of the final lecture: