introduction to lego mindstorms lmicse workshop june 14 - 17, 2005 alma college
Post on 20-Dec-2015
223 views
TRANSCRIPT
![Page 1: Introduction to Lego Mindstorms LMICSE Workshop June 14 - 17, 2005 Alma College](https://reader036.vdocuments.net/reader036/viewer/2022062714/56649d475503460f94a22d23/html5/thumbnails/1.jpg)
Introduction to Lego Mindstorms
LMICSE Workshop
June 14 - 17, 2005
Alma College
![Page 2: Introduction to Lego Mindstorms LMICSE Workshop June 14 - 17, 2005 Alma College](https://reader036.vdocuments.net/reader036/viewer/2022062714/56649d475503460f94a22d23/html5/thumbnails/2.jpg)
The Lego Mindstorms Kit
• The RCX (the brains)• Two Geared Motors• Two Touch Sensors• One Light Sensor• A USB IR Tower• A CD-ROM• The Constructopedia• Lots of Lego Pieces!
RCX Brick and StandardSensors and Motors
![Page 3: Introduction to Lego Mindstorms LMICSE Workshop June 14 - 17, 2005 Alma College](https://reader036.vdocuments.net/reader036/viewer/2022062714/56649d475503460f94a22d23/html5/thumbnails/3.jpg)
A Basic Robot Design
• The Constructopedia is a building guide.
• Shown at left is the basic Roverbot from the Constructopedia• A robust design• Allows attachment of any of
• double bumper (shown)• wheel sets (shown)• single bumper• light sensor• tank like treads
• A recommended design starting point
Basic Roverbot Configuration
![Page 4: Introduction to Lego Mindstorms LMICSE Workshop June 14 - 17, 2005 Alma College](https://reader036.vdocuments.net/reader036/viewer/2022062714/56649d475503460f94a22d23/html5/thumbnails/4.jpg)
The RCX Itself (1)
• Hitachi H8 series microcontroller• 8 bit CPU at 16 MHz• 32 KByte RAM• 16 KByte ROM for the BIOS• Serial I/O (input/output)• ADC (analog digital converter)• Built-in timers
RCX Brick
![Page 5: Introduction to Lego Mindstorms LMICSE Workshop June 14 - 17, 2005 Alma College](https://reader036.vdocuments.net/reader036/viewer/2022062714/56649d475503460f94a22d23/html5/thumbnails/5.jpg)
The RCX Itself (2)
• Liquid crystal display (LCD)• Four push buttons• One small internal speaker• Three sensor inputs• Three motor outputs• One infrared (IR) interface with a
proprietary protocol• Requires 6 AA batteries
RCX Brick
![Page 6: Introduction to Lego Mindstorms LMICSE Workshop June 14 - 17, 2005 Alma College](https://reader036.vdocuments.net/reader036/viewer/2022062714/56649d475503460f94a22d23/html5/thumbnails/6.jpg)
Actuators
• With Kit• Geared Motors
• Available From Lego• High-speed Motors• Mini-motor• Light Brick
• Available third party• Servo Motor/Servo Controller
Servo Controller w/ 2 Servo Motors
Ungeared andGeared Motors
![Page 7: Introduction to Lego Mindstorms LMICSE Workshop June 14 - 17, 2005 Alma College](https://reader036.vdocuments.net/reader036/viewer/2022062714/56649d475503460f94a22d23/html5/thumbnails/7.jpg)
Sensors Basics
• Mindstorms sensors come in two types
• Active: RCX supplies power• Example: Light sensor (supplied with kit)
• Passive: RCX just detects changes in resistance• Example: Touch sensor (supplied with kit)
![Page 8: Introduction to Lego Mindstorms LMICSE Workshop June 14 - 17, 2005 Alma College](https://reader036.vdocuments.net/reader036/viewer/2022062714/56649d475503460f94a22d23/html5/thumbnails/8.jpg)
Sensors Available from Lego
• Touch• Passive• Supplied with Kit
• Light• Active• Supplied with Kit
• Rotation (Angle)• Active• Add-on
Touch, Light and Rotation Sensors
![Page 9: Introduction to Lego Mindstorms LMICSE Workshop June 14 - 17, 2005 Alma College](https://reader036.vdocuments.net/reader036/viewer/2022062714/56649d475503460f94a22d23/html5/thumbnails/9.jpg)
Third Party Sensors (1)
• The sensor interface is well documented• Many sets of building instructions for sensors exist, for example
see Michael Gasperi’s website • http://www.plazaearth.com/usr/gasperi/lego.htm
• Two commercial suppliers we know of:• http://www.mindsensors.com• http://www.hitechnic.com
![Page 10: Introduction to Lego Mindstorms LMICSE Workshop June 14 - 17, 2005 Alma College](https://reader036.vdocuments.net/reader036/viewer/2022062714/56649d475503460f94a22d23/html5/thumbnails/10.jpg)
Third Party Sensors (2)
• Sonar (Ultrasonic range)• Available both from
Mindsensors and Hitechnic• Magnetic Compass Sensor
• Available from Hitechnic• Active and Passive Multiplexor
• Available from Mindsensors• And many others
Hitechnic Sonar
Mindsensors Active Multiplexor Hitechnic Compass
![Page 11: Introduction to Lego Mindstorms LMICSE Workshop June 14 - 17, 2005 Alma College](https://reader036.vdocuments.net/reader036/viewer/2022062714/56649d475503460f94a22d23/html5/thumbnails/11.jpg)
Software Architecture
Typical Software Architecture Levels
![Page 12: Introduction to Lego Mindstorms LMICSE Workshop June 14 - 17, 2005 Alma College](https://reader036.vdocuments.net/reader036/viewer/2022062714/56649d475503460f94a22d23/html5/thumbnails/12.jpg)
Software Architecture
• System ROM Layer
• Low Level Control Software
• Allows a second piece of software - the firmware
• Can be bypassed for direct control of the hardware
![Page 13: Introduction to Lego Mindstorms LMICSE Workshop June 14 - 17, 2005 Alma College](https://reader036.vdocuments.net/reader036/viewer/2022062714/56649d475503460f94a22d23/html5/thumbnails/13.jpg)
Lego Firmware
• The Lego firmware provides an environment for the execution of programs on the RCX.
• Must be downloaded (just once) before programming the RCX.• Other firmware solutions are available.• Lego Firmware v. 2.0 permits
• 5 separate programs• 10 threads• 32 global variables• 16 local variables per thread• Broadcast IR protocol
![Page 14: Introduction to Lego Mindstorms LMICSE Workshop June 14 - 17, 2005 Alma College](https://reader036.vdocuments.net/reader036/viewer/2022062714/56649d475503460f94a22d23/html5/thumbnails/14.jpg)
Alternative Firmware
• Firmware replacements further push the limits of the RCX• Popular replacements are tied to alternative programming
environments• Examples
• LejOS (Java)• see http://lejos.sourceforge.net/
• BrickOS (C/C++)• see http://brickos.sourceforge.net
• RCXLisp (Lisp)• Part of the LMICSE project• See http://robotics.csc.villanova.edu/
![Page 15: Introduction to Lego Mindstorms LMICSE Workshop June 14 - 17, 2005 Alma College](https://reader036.vdocuments.net/reader036/viewer/2022062714/56649d475503460f94a22d23/html5/thumbnails/15.jpg)
Programming the RCX
• Mindstorms ships with its own iconic programming language, but this is a very limited language.
• So others have developed for the RCX almost all the usual programming languages, including:• C• C++• Java• Ada• Lisp• Forth• Smalltalk
![Page 16: Introduction to Lego Mindstorms LMICSE Workshop June 14 - 17, 2005 Alma College](https://reader036.vdocuments.net/reader036/viewer/2022062714/56649d475503460f94a22d23/html5/thumbnails/16.jpg)
So What Now?
Let’s play
with
some Legos!