Lawrence Technological University
College of Arts and Science
Department of Mathematics and Computer Sciences

Handouts

Highlights from the Summer of 2005

This is a rather lengthy page. Let me draw your attention to two modules that worked quite well. These "lesson plans" happened to be mine. However, I am sure their success was largely due to their masterful implementation by Brian Meter.

  1. As a gentle introduction to the idea of writing a program on a laptop and transferring the program to run on the yellow LEGO Mindstorms brick, we used the music playing capabilities of the brick. This exercise requires no assembly time. This exercise is easier to do with with NQC and the Bricx Command Center (with its piano player) than with RCX or Robolab code. The musical concept that a note has both pitch and duration is introduced. Since the Mindstorms firmware hands off the actual playing of the note to another process and continues on, the concepts of queues and multitasking can be introduced while arranging pauses between notes.
  2. After introducing the way gears can speed things up, the campers learned to use a worm gear to slow things way down. A small piece of dowel drilled to fit a LEGO axle on one end and a thin bamboo kebob skewer on the other is all that is needed to use the Mindstorms kit as a marshmallow toaster. (Duct tape will also work.)

"Building Blocks" for a short Summer Camp in Robotics

The following is a series of approximately 1 hour units of camp activity. The theme is that of the LEGO Mindstorms kit. That is, to have fun while moving from "playing with LEGOs" to building and programming autonomous robots.

This list is beginning in outline form and can be expanded. I will be happy to add requested topics and comments from campers and camp teachers.

This is intended for a camp of about 15 hours over 1 week. There would be about 10 campers and 5 computers and 5 LEGO Mindstorms kits.

I would like to help you plan your camp by email
jmmiller@ltu.edu
Please let me know

  1. Your name and preferred email address
  2. Your camp's location, dates and times
  3. Your campers' grade, interests and previous LEGO experience
  4. The session units you think would be best for your camp

A few general thoughts as you make your selections

Select from these, or add some of your own, to tailor a 15 hour (3 hours x 5 days) curriculum that is best for your group of students

  1. Introductions. The steady upward trends: not the population of Detroit, not MEAP scores, but the number of computer controlled systems in cars. Radio control toys versus autonomous robots. The ideas of sensors, decision making and multitasking. A car with a human driver encounters a slower car ahead. A car with a computer driver encounters a slower car ahead. The idea of cross platform development. Writing your program on a laptop computer and translating it to instructions your robot can understand. Perhaps a demo with a prebuilt robot and a simple "go forward" program.
  2. A little non Euclidean geometry. A circle is all the points equidistant from the center. What to do if your robot's arm is too short to reach the center? Make a triangle by
    set the number-of-sides to 3  
    repeat number-of-sides times:
      turn left 360 / number-of-sides degrees
      go forward a bit
    Then make a square, etc. A demo with a prebuilt robot would help. You could also use Logo. See Brian Harvey's Home Page, www.cs.berkeley.edu/~bh/.
  3. Beams, blocks and plates. Axles. Pegs. All those other pieces. A hunt for
    1. pegs for mounting gears,
    2. pegs that can help lock a beam to the RCX yellow brick,
    3. pegs that can help lock a pulley to a beam,
    4. pegs that can join 3 beams at once,
    5. 1/2 size axle spacers,
    6. a part where 3 stacked together is the same size as a brick,
    7. a part to make long axles out of shorter ones,
    8. a gear that meshes with the smallest gear so that it turns just once each time the smallest gear turns 3 times,
    A challenge to spell LEGO in axles.
  4. Playing music with the RCX brick. This could be a 1 hour or 1 day session. This is an opportunity to introduce programming without any mechanical or construction distractions. The RCX brick can be combined with other musical voices. Expect absolutely no musical help from me.
    Musical note frequencies in Hz (from an equal tempered scale rounded to integers, assuming A above middle C is 440 Hz)
    NoteOctave 12345678
    C3365131262523104620934186
    C#3569139277554110922174435
    D3773147294587117523494699
    D#3978156311622124524894978
    E418216533065913192637 
    F448717534969813972794 
    F#469218537074014802960 
    G499819639278415683136 
    G#5210420841583116613322 
    A5511022044088017603520 
    A#5811723346693218653729 
    B6212324749498819763951 

    More examples of getting music from the Yellow Brick A second objective of this topic is to introduce the idea of multitasking. The students can hear two processes going on at the same time. Because waiting and playing are being done at the same time by two different processes, to play a note for a second, pause a second, then play a second note, in pseudo code:
    play tone A, 1
    wait 1
    play tone C, 1
    
    Does not pause!
    play tone A, 1
    wait 1+1
    play tone C, 1
    
    Does pause!
  5. The LEGO unit of measure. The 3-4-5 triangle and bracing and locking. Sturdy construction with locked squares and triangles. Getting the holes in the beams to line up so pegs fit. A challenge to make the smallest possible locked square with just beams and plates and pegs.
  6. LEGO gears and pulleys. Changing speed with gears. Changing direction with idler gears. Power and gear ratio. Gears need nearly exact spacing to mesh. A pulley and belt system is more forgiving.
  7. LEGO motors. Programming speed, direction and braking. Motors and generators. An unconnected motor. A motor connected by a wire to another motor. A motor connected to itself by a reversed wire. Mounting motors. Those little 1 x 2 plates with the tabs. Worm gears, bevel gears and rack gears.
  8. A crane with 1 motor that lifts a load. Stop the lifting with braking and then with coasting. Adding push button controls to the crane with touch sensors.
  9. Gears and power lifting and speed lifting with the crane. Using two motors together for more power.
  10. A robot with 2 motors, 1 for each driving wheel.
  11. Driving straight with the wheeled robot. Faster with gears.
  12. Driving up a ramp with the wheeled robot. Faster with gears?
  13. A straight line "drag race".
  14. Turning with the wheeled robot.
  15. LEGO sensors overview.
  16. The passive light sensor. Turn to a flashlight. Easy decision making.
  17. Staying "in the spotlight". Not so easy.
  18. The active light sensor. Follow a line.
  19. A Race around an oval black line.
  20. A simple maze made out of lines. Following one "wall" with the light sensor.
  21. The touch sensor. Stop at a wood block wall.
  22. Building a 2 position (open, closed) hand.
  23. Grabbing an aluminum beverage can.
  24. Robot to Robot communication with IR messages.
  25. A relay race with an IR message baton..
  26. A relay race with an aluminum beverage can baton. Not so easy.
  27. Robot 1, with a touch senor, finds an obstacle and tells Robot 2, without a touch sensor, how to avoid the obstacle.
  28. A secret code. A guessing game strategy for code breaking.
  29. A "parking lot" gate or an automatic garage door opener. Using a touch sensor or IR message.
  30. Sorting Tic-Tacs and Necco Wafers on a LEGO tread conveyor belt. Not so easy.

If you are new to the LEGO Mindstorms kit you might want to read over What's in the box?

Make a plan. For example, with a camp of predominately beginning Mindstormers,

Day 1
An introduction using the 1st 3 topics. A prebuilt robot to move in a square. An experiment for digital age students -- a small, partial clock mechanism that shows the use of gears and spacers. There is a 24 tooth gear driven by a worm gear. The worm gear has a spacer between it and the back beam. In this minimal design there is no spacer on the axle in front of the worm gear, and there is only 1 side wall of beams. Notice the use of plates and 1/2 width spacers to keep the gears aligned.
  1. If the lower pulley is the minute hand, and the upper pulley is the hour hand, is the time shown 9:30 or 18:30? That is, is this a 12 or 24 hour clock?
  2. Can you set the clock back by turning the minute hand back? What additional pieces would it take to allow this?
  3. Can you turn the minute hand by turning the hour hand forward or backward?
Clock mechanism, top view Clock mechanism, side view Clock mechanism, face
Day 2
An introduction to programming using the music topic.
Day 3
An introduction to construction using topics 5, 6 and 7 followed by making a 2 motor robot. Go forward.
Day 4
Turning the robot from Day 3. Adding a line following sensor. Making decisions and following a line.
Day 5
A race around an oval black line. You can make an oval out of black electrical tape. Or you can take this tiny file oval.ps to any Fedex-Kinko's with a large format, Postscript printer. This file is for 36 inch wide paper rolls (cut sheet paper sizes: c0, isob0, a0 or archE), but is easily changed with a text editor like NotePad. This printed oval line is wider and a little easier for beginning programmers to follow than the electrical tape.
Printer race oval

Things you might want to do ahead of time to get your camp off to a smooth start

  1. Make sure you have enough available electrical outlets and spare AA batteries. Most laptop batteries will not last 3 hours. RCX 2.0 bricks do not have a place to plug in a power adapter and so will likely need at least 1 change of batteries in 15 hours of camp.
  2. Internet access and a projector would be a help.
  3. You will need some administrative access to your laptop computers, so that you can install the needed software.
  4. Install the RCX software from the CD-ROM in the Mindstorms kit.
  5. Install NQC with the version of the Bricx Command Center for your operating system.
  6. Download a copy of the RCX 2.0 firmware so you can restart when everything else fails. Go to SDK 2.0 Beta and then you can extract and save firm0328.lgo
  7. Practice a little construction with the LEGO Mindstorms "Contructopedia".
  8. Try some programming by doing one of the many available tutorials.

Revised August 27, 2005