Unformatted text preview:

6.081, Spring Semester, 2007—Thursday Laboratory for Week 9 1MASSACHVSETTS INSTITVTE OF TECHNOLOGYDepartment of Electrical Engineering and Computer Science6.081—Introd uction to EECS ISpring Semester, 2007Thursday Laboratory for Week 9This h andout contains• Thur sday April 12th lab on connecting eyes to the robot head.IMPORTANT: There is no nanoquiz today, but we are handing out a take-home, open notes,mid-term due April 19th. Also, if you wish to retake either or both of the last two nanoquizzes(actually modified versions of these quizzes), you can do that today.See’s the DayIn this lab you will add a pair of “eyes” to your robot head, so that when you attach your r obothead to a robot, the robot will be able to see. Next week, you will break up in to groups of fourand design the software needed to make your seeing robot chase another robot with a flashlight“tail”.To add eyes to your robot head, you will be using two photoresistors (resistors whose values changewith light intensity). You will use these ph otoresistors, the robot head you modified last week, anNI box, a laptop, and your knowledge of circuits, control, and python to take two appr oaches todesigning a light-tracking robot head. One approach will just use circuits, and the other approachwill use the NI box, the laptop, and a program in python. The reason for trying both m ethods isthat each method has its own merits, and you may chose one or the other for your task next week,chasing a robot.Finally, we do not expect that everyone (or perhaps anyone) will fi nish today’s lab by 5pm. Wefully expect th at many of you will finish the lab at the beginning of next Thursday April 19th.Also, the LA’s only saw this new lab last night, and may need to appeal to the lab designer (me)when things go wr on g.There are a number of tasks you will need to complete along the way to making a light-trackinghead. T hey include:• Temporarily interfacing the protoboard postive supply voltage to the NI box AI2 input so thatyou can set the sup ply voltage to twelve volts (you will need a voltage divider).• Interfacing the motor position potentiometer to the NI box AI2 input (so you can report therobot head position to a python program).• Designing a circuit-only light-tracking head.• Designing a resistor network to interface the NI box AO0 output to the robot head.• Designing a circuit to interface the photoresistors to the NI box AI0 and AI1 inp uts.• Designing a light-tracking head based on a python controller programUse the protoboard variable suppy to generate a twelve volt supply for yourrobot.Next week you will be attaching the robot heads to th e robot, so it is important that you designyour circuits usin g a twelve volt supply. If you do not see how to adjust the supply, ask your LA.6.081, Spring Semester, 2007—Thursday Laboratory for Week 9 2Use the NI box GND and AI2 input, a resistor divider, and the daqtry.py software in the NILabdirectory to measure that your supply voltage is properly set to twelve volts. WARNING: Anytime you restart daqtry.py, you must unplug and then replug in the NI box. Sorryabout this, we are not very good linux USB driver hackers.Checkpoint: 2:30 PM• Demonstrate that your protoboard supply is set to twelve volts.• Demonstrate that your robot head works on a s ingle twelve volt supply.Sense Robot Position from PythonUse the divider network and connection to the NI box you just designed for measuring the proto-board supply to measure th e voltage generated by the robot head potentiometer. You will noticethat the voltage generated by the robot head potentiometer does not vary from zero volts to twelvevolts as you rotate the head. Think about the range of motion of the rotating head and explain thevoltage range that you measure. You may find it easiest to unplug the electrical connector fromthe motor while you are rotating the head, as then you can turn th e head freely.Checkpoint: 3:00 PM• Determine (and explain to your LA) the range of voltages produced by your robothead position potentiometer.Add Photoresistor Eyes to the Robot Head and Track a LightAs one might expect from the name, photoresistors are resistors whose resistance decreases withincreasing light intensity. Ask a staff member for a pair of photoresistors to use as robot eyes, andthen design a circuit which uses the two photoresistors to replace the position control potentiometerin your robot head circuit (note that the position control potentiometer is the potentiometer youadjusted by hand to change the head position).Add the two photoresistors to the protoboard on the Robot head. Use three wires from head tothe b ase board, but think carefully about how to wire the photoresistors so they generate a signalthat can be used by your robot head to turn towards the light. Also, we have special wires to makeconnections between the r otating protoboard and the fixed protoboard that d o not strain the robothead motor, ask your LA or a staff member. Finally, if you are clever, you will not need any extracomponents beyond the two photoresistors.Checkpoint: 3:30 PM• Demonstrate that your robot head tracks the light.• Demonstrate that your python program can display the head position.6.081, Spring Semester, 2007—Thursday Laboratory for Week 9 3Control the Robot Head Position from PythonDesign resistor networks so that the AO0 output from the NI box can be used to control the robothead position. Show that you can use a python program to make the head rotate through its fullrange of motion, and that your program can read the p osition of the rob ot head. You can use amodification of daqtry.py. WARNING: If you eliminate all the print statements from thedaqtry program, the loop accesses the NI too frequently and crashes the program.Please be sure to print something to slow down that loop. One of your fellow studentsfound a fix to this problem, but we have yet to implement it. Calibrate your programso that the program indicates the robot head is at position zero w hen the head is parallel to thestraight edge at the back of the grey mounting plate.The NI box outp ut generates a signal that varies from zero volts to five volts, but the originalcontrol potentiometer that you adjusted by hand generates a voltage than varies from zero volts totwelve volts. You will have to think carefully (and refer to the extra notes posted about Tuesday’slecture) to figure out how to rescale the five volt output.Checkpoint: 4:15


View Full Document

MIT 6 01 - Laboratory for Week 9

Documents in this Course
Week 1

Week 1

3 pages

Op-Amps

Op-Amps

8 pages

Op-Amps

Op-Amps

6 pages

Syllabus

Syllabus

14 pages

Planning

Planning

14 pages

Load more
Download Laboratory for Week 9
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Laboratory for Week 9 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Laboratory for Week 9 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?