Physics
&
Astronomy


Fall '98
Courses

Lego Robotics

Jim Mahoney (mahoney@marlboro.edu)

General Info

Time
M Thurs 1:30-3:00
Place
SciBldg 217
Text
Absolute Beginner's Guide to C and various manuals and hand-outs
Build a robot from a 6811 controller, legos, and various sensors. In the process, learn the "C" programming language, investigate voltage, current, resistance, and various other electronics ideas, learn about force, energy, and other fundamental mechanics notions, document your experimental work online, and generally have a good time while doing it.

This is a brand new course, taught by Mark and Jim who themselves are learning all about Lego Robots. Since the skill levels of those taking the course are likely to vary wildly, we expect to evaluate students progress by how much they learn and not just how much they accomplish. Essentially, though, the goal is to design, implement, and build an autonomous lego machine which will perform a task such as navigating a maze.

The number of students will be limited to around 20, but we hope that this course will be a regular offering.


Some Subjects Covered

(subject to change and adaptation as we go)

I)
	C Language
	
		- Using Interactive C
		- language basics
			- printf
			- beep & sound 
			- variables 
			- loops: for, while
			- functions & packaging	
		- robot algorithms
			- moving around
			- sensing
			- other
		- traditional C : gcc or similar
	
3)
	Physics	
		- current, voltage, resistance
		- simple circuits
		- electrical power & energy
		- mechanical force, friction
		- mechanical power & energy
		- simple machines : gears, mechanical advantage
		- experiments
	
4)
	Handyboard
		- basic concepts, 6811, wiring
		- manual & further study

5)
	Legos
		- available pieces
		- design ideas:
			- rivets
			- gears & other drive trains

6)
	Putting it all together / Design
	
		- possible projects:
			* explorer / maze runner
			* mechanical arm
			* 1-1 competition (?) 


Resources


Summary of Material Covered to Date

Stuff you should know, understand, and/or be able to do. If not, ask.
  • Physics
    • Definitions:
      Concept Units Symbol Notes
      Time Sec t Your stopwatch
      Energy Joule E It's conserved.
      Power Watt P P = E/t = I V = F speed
      Voltage Volt V batteries
      Current Amp I flow of charge
      Resistance Ohm R V = I R
      Force Newton F 1 kg = 9.8 Newtons = 2.2 lb
    • Tasks:
      • Hooking up multi-meters to measure voltage and current.
      • Soldering and playing with simple circuits.
      • Measuring force and mechanical power (coming).
      • Building sensors (coming).
  • Programming
    • functions: void doit(){ statements }
    • variables: int, float, strings
    • comments: /* your comment goes here */
    • #DEFINE: shortcuts for replacing a string or a number
    • if () { }: conditional execution
    • while () { }: loops
    • printf: displaying output on the screen
  • Handyboard
    • where to plug in motors and sensors
    • various built-in Interactive C calls, e.g.
      • motor(int which, int how_fast)
      • ao() /* all off */
      • analog(int which_sensor) /* reading in a sensor */
      • sleep(float how_long)
      • int knob()
      • int start_button()
      • tone(float pitch, float how_long)
      • and others in the manual
  • Legos
    • Building the Dawn Treader. (See the links above.)
    • Connecting the electrical stuff.
    • Using gears and wheels to change motor speeds.
  • Misc. skills and savy
    • Using a web browser to look at online manuals and materials.
    • Creating and editing text files for your programs.
    • Storing your programs in a folder on your akbar home directory.
    • Sending email to Jim (mahoney@marlboro.edu) with questions and programming assignments.
    • Using the digital camera to document your lab work. (coming)
    • Keeping a lab manual of your project. (coming)
    • Organizing and presenting your material on the web. (coming)

Assignments

  1. for Thurs Sept 10
    1. If you don't already know how, make sure you can use a web browser. (Ask someone.)
    2. Read at least the start of the Handyboard and Interactive C manuals. (See the links above, or acquire printed copies at the bookstore.)
    3. Play around with Jim's "Dawn Treader" to get an idea of where you're going.
    4. Read the beginning part of the text, "The Absolute Beginner's Guide to C", through chap 8, and try to write your first C program which will output "Hello World" to the screen." (Wait until we've talked about how to do this in class.)
  2. for Thurs Sept 17
    1. I've put "Conceptual Physics" on reserve in the Library. Start reading the chapters on electricity, especially Voltage, Current, and Resistance.
    2. Finish looking through the IC manual and the Handyboard manuals. You don't need to understand all of them, but you do need to get an idea of what's there so that you can refer back as you need to.
    3. Write some IC programs that use the "motor" and "sleep" built-in functions to walk the DawnTreader around a piece of paper. Continue to practice using IC, and get more familiar with storing files on the various computers.
    4. Start exploring voltage, current, and resistance, through building some "simple circuits" and measuring their various properties with the multi-meters. For example, try soldering some resistors into a pattern, hooking up a voltage source, and measuring the voltage, current, and resistance at various points. Read the first two chapters of the "Zap" pages (in the lab) for soldering and circuit pointers.
  3. for Thurs Sept 24
    Finish up the assignment above, and hand in (or email me) some kind of "finished" product. Continue to figure out how the legos go together, and how to program the little guys.
  4. for Thurs Oct 1 or Mon Oct 5
    1. Read about Force, Energy, and Power in Conceptual Physics (on reserve).
    2. Using gears and/or levers, measure the mechanical power that the lego motors can put out. Do the handyboard or the battery packs put out more juice? Discuss how this compares to the electrical power we've already worked out.
    3. Continue working on programs - particularly using the IR sensors. Can you make it display the value of the sensor? Can you adjust the "threshold" with the knob?
    4. Exercises:
      1. A battery puts out 10 Volts. If the current is 1 mAmp, (a) what is the power output (in Watts), and how much energy is used up in 30 minutes?
      2. The DawnTreader pulls a 100 gram mass upwards at a speed of 2 cm/sec. How much power is it using? (1 Watt = 1 Joule/sec = 1 "kg" * (1/10) m/sec )
      3. Write a program which will count upwards, displaying numbers on the handyboard screen.
      4. Modify the counting program so that it reverses direction when the "start" button is pushed.
      5. Modify it again so that it counts by 2, 4, etc. each time the "stop" button is pushed.
      6. Modify it so that the speed of counting may be set by the knob.
      7. Have the handyboard find prime numbers and display them.


Physics & Astronomy at Marlboro | Jim's Schedule

Home | admissions | about | news | academics | community | resources