LEGO Plus. Session 1420

Similar documents
AC : DESIGN OF DATA ACQUISITION SYSTEM FOR COMPUTER ENGINEERING EDUCATION

Development of a digital instrument as a motivational component in teaching embedded computers

CHAPTER IV Computerized Data-acquisition Systems

Design of a Low Cost Trainer for Flow Control

High School PLTW Digital Electronics Curriculum

GE-INTERNATIONAL JOURNAL OF ENGINEERING RESEARCH VOLUME -3, ISSUE -5 (May 2015) IF ISSN: ( )

Parallel-to-Serial and Serial-to-Parallel Converters

AC : INFRARED COMMUNICATIONS FOR CONTROLLING A ROBOT

Project Planning. Module 4: Practice Exercises. Academic Services Unit PREPARED BY. August 2012

Microcomputer Based Electronics: Using the C Stamp in Pre- Engineering, Technology, and Engineering Programs

AC : A CONTROLLER FOR ROBOTICS AND MICROCONTROLLER APPLICATIONS INSTRUCTION

Technical Specification for Educational Robots

MT2 Introduction Embedded Systems. MT2.1 Mechatronic systems

Environmental Data Acquisition Using (ENC28J60)

Microcontrollers. Principles and Applications. Ajit Pal +5 V 2K 8. 8 bit dip switch. P2 8 Reset switch Microcontroller AT89S52 100E +5 V. 2.

DS1103 PPC Controller Board

Embedded Systems. Software Development & Education Center. (Design & Development with Various µc)

An Embedded Systems Course Using the OOPic Microcontroller

Functional Testing of Electric Vehicle Battery Management Systems (BMS) using a PXI Platform Grant Gothing Project Engineer Bloomy Controls U.S.A.

DIRRS+ Digital Infra-Red Ranging System Ideal for robotics projects. Singles (SKU # Pack (SKU #35100)

CAUTION: TTL Only, Do Not Use ± 12 V RS-232

AlphaBot2 robot building kit for Arduino

LabVIEW FPGA in Hardware-in-the-Loop Simulation Applications

EMBEDDED SYSTEMS: Jonathan W. Valvano INTRODUCTION TO THE MSP432 MICROCONTROLLER. Volume 1 First Edition June 2015

AC : REACTIVATION OF A SIX-DEGREE-OF-FREEDOM RE- PEATED IMPACT MACHINE USING PROGRAMMABLE LOGICAL CON- TROLLER (PLC)

FEATURES DESCRIPTION FEATURES

The ECE Curriculum. Prof. Bruce H. Krogh Associate Dept. Head.

ENGINEERING TECHNOLOGY (A.S.)

1.0. Presents. techathon 3.0

Web Site: Forums: forums.parallax.com Sales: Technical:

Intel Galileo gen 2 Board

BLACK BOX FOR CAR ACCIDENT

Basics of UART Communication

Robotic Systems ECE 401RB Fall 2006

RBT-225 Lab #2 Basic Stamp Relays August 14, 2016

Board Of Education USB (#28850)

BASIC Stamp 1 Project Board (#27112) Development / Education Platform for the BASIC Stamp 1

Prototyping Module Datasheet

Programmable LED Signs for Campus Buses

09/05/2014. Engaging electronics for the new D&T curriculum. Geoff Hampson Managing Director of Kitronik. Presentation overview

Motorized Solutions. Hall-Effect solid-state sensor technology integrated into motorized zoom lenses.

Advance Robotics with Embedded System Design (ARESD)

Web Site: Forums: forums.parallax.com Sales: Technical:

or between microcontrollers)

Number Name Description Notes Image 0101 Resistor, 100 ohm. brown-black-browngold. ¼ watt, 5% tolerance, red-red-brown-gold. brown-black-red-gold.

A Multi-channel Smart Strain Sensor with IEEE 1451 Protocol

Embedded Robotics. Software Development & Education Center

Robotics Training Module ABLab Solutions

Wireless Colour Sensing Arm Robot

INDUSTRIAL TRAINING:6 MONTHS PROGRAM TEVATRON TECHNOLOGIES PVT LTD

Workshop Swarm robotics Reactive control of LEGO robots with MDL2e. Thomas Schamm

ELEN 226 Embedded Systems Electronic Engineering Technology

CM5000 DATASHEET v0.1

Bolt 18F2550 System Hardware Manual

PCD 005 PolaMIX. Operation Manual

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

MicroProcessor. MicroProcessor. MicroProcessor. MicroProcessor

Introducing the first PATENT PENDING solid state selfregulating

Development of a MATLAB Data Acquisition and Control Toolbox for PIC Microcontrollers

SMART / INTELLIGENT TRANSMITTERS AND ACTUATORS

THE MICROCOMPUTER SYSTEM CHAPTER - 2

Project from Real-Time Systems Lego Mindstorms EV3

Various power connectors. 3.3V regulator. 64K Flash (Internal) 2K EEPROM (Internal) 4K SRAM (Internal) JA Mem Adr/ Data. Doc: page 1 of 9

GUIDE TO SP STARTER SHIELD (V3.0)

Module 1. Introduction. Version 2 EE IIT, Kharagpur 1

Some call it a robot. EV3 Programming APP Available March Locally operated globally connected. Freecall:

Arduino Internals. Dale Wheat. Apress

College of Computing, Engineering & Construction Electrical Engineering Course Descriptions

Technical Aspects of Multimodal System Dept. Informatics, Faculty of Mathematics, Informatics and Natural Sciences University of Hamburg

Introduction to Programmable Logic Controllers in a Mechanical Engineering Instrumentation Course

BASIC-Tiger Application Note No. 058 Rev Wireless Communication with IrDA. Gunther Zielosko. 1. Basics of infrared communication

Developement of Multi Interface Board for Educational Trainer Kit

Introduction to the SX Microcontroller

Laboratory of Sensors Engineering Sciences 9 CFU

The Concept of Sample Rate. Digitized amplitude and time

Data Acquisition Laboratory

Microchip Technology Enhances Popular 16- and 32-bit Development Platform with Application-Specific Expansion Hardware

Communication. Chirag Sangani

Unlocking the Potential of Your Microcontroller

Teaching Hardware to Demystify Foundational Software Concepts

ECE Fall 2016

LabVIEW ON SMALL TARGET

Web Site: Forums: forums.parallax.com Sales: Technical:

Computer Hardware Requirements for Real-Time Applications

BE/EE189 Design and Construction of Biodevices Lecture 5. BE/EE189 Design and Construction of Biodevices - Caltech

SDR-IQ Serial Port. Rev Nov 1, 2011

Automation of space management in vehicle parking using PLC and SCADA

Health monitoring of an power amplifier using an ethernet controller

Academic Year Annexure I. 1. Project Title: Color sensor based multiple line follower robot with obstacle detection

A Microprocessor Design Course That Integrates Hardware, Software, and Team Research

Homework 6: Printed Circuit Board Layout Design Narrative

Electronic Technology

EE324: Microcontrollers and Interfacing. Office Hours: Mon, Wed, to 11.30am. Microcontrollers and Interfacing

Electronic Design for Power Control Technology and Knowledge transferred from University to Industry

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

ROBOLAB Reference Guide

Doc: page 1 of 6

Integration of Wireless Sensor Networks into Industrial Control Systems

A Combined ISO/IEC/IEEE and -2 Data Acquisition Module

Propeller Board of Education (#32900)

Transcription:

Session 1420 LEGO Plus Jerry M. Hatfield, Electrical Engineering John T. Tester, Mechanical Engineering College of Engineering and Natural Sciences Northern Arizona University Introduction The LEGO Mindstorms construction systems have found their way into a wide range of applications in engineering education such as robotic devices, electro-mechanical control systems, process control, and data acquisition. The LEGO system provides a low cost opportunity for easy and rapid construction and programming of systems containing various types of sensors and actuators; these systems can be programmed in a number of different languages, including Robolab (based on the industry standard LabView data acquisition and control software) and an adaptation of C, called Not Quite C or NQC [1]. The microprocessor based LEGO RCX provides three multipurpose output ports, three multipurpose input ports, and a two-way infrared communications port [2]. The RCX is also known as the Brick because of its shape and for its ability to be integrated into the physical structure of the system being built. The LEGO system is quite robust and allows students with wide ranging skill levels to build even complex systems and have them operational in a very short time and with a minimal amount of trouble-shooting. The LEGO Mindstorms system has been incorporated into a sophomore level, multi-discipline (electrical, mechanical, civil, and environmental engineering) design course that is part of Northern Arizona University s award winning Design4Practice four-course sequence. We are very pleased with the students response to our redesigned course. But, as we look forward to additional course development and more complex design projects, we would like to go beyond the limitations of the three LEGO RCX inputs and three outputs. We had previously used the PONTECH SV203C servo motor controller board for robotics projects; this board provides multiplexed analog-to-digital inputs, servo control outputs, an infrared communications port, and a programmable microprocessor [3]. Integration of the SV203C with the LEGO RCX controller promised to be an excellent way to provide an expanded, dual processor controller with a much wider range of input/output capabilities. Experience with the LEGO system clearly demonstrated the benefits of its robust packaging and plug-and-play interconnections; this same philosophy would guide the design and packaging of our expanded controller. This paper describes the development of the LegoPlus dual processor controller, its capabilities and design features, and its planned incorporation into our design course. Motivation for Change The structure of our LEGO based design course provides a rich technical environment for active student learning [4,5]. However, the standard LEGO System interface, sensor, and actuator capabilities limit the scope of projects that can be developed for a multidisciplinary course. [6]

The standard LEGO System configuration quite adequately supports computer controlled electro-mechanical design projects that stimulate a high level of interest and relate directly to other courses taken by mechanical engineering and electrical engineering students. However, the interests of civil engineering and environmental engineering students are not well served by projects that have little civil or environmental relevance. Augmentation of the LEGO System with the LegoPlus controller to accommodate a wider range of sensors, actuators, and interfaces such as the following will strongly increase the level of interest and degree of active learning for civil and environmental engineering students and will broaden the design experience of all students in the class: 1. Ph sensors 2. Turbidity sensors 3. Biologic activity sensors 4. Force and pressure sensors 5. Flow rate sensors 6. Strain and displacement sensors 7. Vibration sensors 8. Pumps and agitators 9. Heaters and temperature controls 10. Positioning servomechanisms 11. Survey instrument interfaces 12. GPS interface 13. Wireless sensor networking The Strategy The controller for LEGO Mindstorms system is called the RCX and is shown in Figure 1. Our augmentation approach was to add a second controller with the following characteristics: 1. Interface to the RCX through its existing infrared communications port. 2. Draw power from the RCX batteries. 3. Provide pulse-width-modulated (PWM) outputs for controlling hobby-type positioning servos. 4. Provide analog-to-digital (A/D) conversion for interfacing with additional analog sensors. 5. Provide an RS232 asynchronous serial port for interfacing with a wide range of other Figure 1: LEGO RCX Control Module devices. 6. Provide processing and formatting required for external sensors and actuators to minimize the computational load on the RCX. This strategy limited modification of the RCX to adapting the battery cover to allow access to the RCX battery connections.

RCX IR Communications The RCX IR communication is based on the RS232 asynchronous serial protocol using 1 start bit, 8 data bits, odd parity, and one stop bit. The bits are transmitted at a baud rate of 2400 bits per second. Binary 0 bits are represented by a 417 µs IR pulse that is modulated at 38 KHz. Binary 1 bits are represented by a 417 µs absence of IR radiation. The RCX has two IR power settings resulting in an RCX to RCX communication range of about 4 feet at low power and 30 feet at high power. Normal RCX IR messages are in packets of nine 11-bit groups consisting of a 3-byte header, a message type identifier and its complement, the message data and its complement, and a packet checksum and its complement. This protocol is rather complicated and slow (41.3 ms for one packet), but it provides reliable communications over a fairly long range, even in optically noisy environments. An alternative communications protocol allows individual data bytes to be communicated without the additional error detection capability provided by the packet method; this is the method used for communication between the RCX and the augmentation module, which is mounted directly on the RCX. Single data byte communication is nine times faster than the packet method and requires much less formatting effort by the augmentation processor. The LegoPlus System As shown in Figure 2, the LegoPlus system consists of the elements needed to extend the RCX s control through its infrared port and to additional non-lego sensors, actuators, and interfaces. The additional electronics and processors, now in prototype form, will be packaged together in the final implementation as an augmentation module that attaches to the battery cover on the bottom of the RCX as shown in Figure 3. The RCX battery cover will be modified to allow access to the RCX batteries (6 1.5 volt AA cells) for powering the augmentation RCX LEGO Controller module. The RCX will otherwise be unmodified and may be used with or IR Communications without the augmentation module. Infrared Transceiver Synchronous Serial Communications (SPI) Communications Controller Asynchronous Serial Communications (RS232) Interface Controller Figure 3: LegoPlus Packaging battery cover augmentation module Figure 2: LegoPlus System Block Diagram

Infrared Transceiver The infrared (IR) transceiver subsystem consists of an IR receiver (photo-transistor), an IR transmitter (IR light emitting diode), and a MAX 3100 [7] RS232 universal asynchronous receiver transmitter (UART) with a Synchronous Peripheral Interface (SPI) [8]. The microcontrollers used in the Communications Controller and Interface Controller subsystems have built-in RS232 serial communications ability, but only with no parity. The MAX3100 handles the odd-parity input and provides additional message buffering. The MAX3100 processes the 11 bit RS232 messages to/from the RCX, extracts out the 8 data bits and the parity bit, and then packages them along with additional communications status bits and sends a 16 bit packet on to the Communications Controller subsystem, which controls the operation of the MAX3100 through the SPI protocol. Communications Controller A Parallax BasicStamp2 (BS2) is used for the communication control functions [9]. The BS2 manages the SPI communications with the MAX3100 in the Infrared Transceiver subsystem, calculates the value of the parity bit for messages going back to the RCX, and formats commands and data for communications with the Interface Processor subsystem. Messages sent by the RCX to another RCX or the LEGO IR tower are in packet format, while the messages intended for the LegoPlus augmentation system are not in packet format; the BS2 discards all messages that are in packet format. Interface Controller The PONTECH SV203C servo motor controller board is used as the interface controller. Figure 4 shows this board with its 9-pin serial interface connector removed for more compact packaging in the augmentation module. The SV203C provides multiplexed analog-to-digital inputs, servo control outputs, an infrared communications port, and a programmable microprocessor. The SV203 communicates with the BS2 Communications Controller through a standard 9600 Baud RS232 interface. RS232 Interface Possible Changes from Prototype System Figure 4: SV203 Servo Controller 5 analog inputs 8 servo outputs The prototype LegoPlus system was assembled from off-the-shelf modules, which in some cases provide more than the required capabilities. For example, the SV203 is available in three configurations: (1) the full up version, (2) programmable but without IR port, and (3) basic nonprogrammable. Our prototype system uses the full up version, but since the Communications

Controller subsystem can handle all the anticipated processing, the SV203 does not necessarily need to be programmable. The TV remote compatible IR capabilities of the SV203 provide additional interface and control possibilities; however, some learning-type remotes can be used directly with the RCX. Another possibility for simplification and cost reduction might be to eliminate the BasicStamp2. The SV203 could interface directly with the MAX3100 in the Infrared Communications subsystem, but it would use up one analog input and one servo output and would slow down the communications process. Another method to eliminate excess capability would be to build a custom board that incorporates only the components needed. This would result in more compact packaging and optimum performance. However, using standard, commercially available modules greatly simplifies the troubleshooting and maintenance aspects. This and other configuration decisions will be made after we have additional experience using the LegoPlus system in the classroom. References: 1. NQC; http://bricxcc.sourceforge.net 2. RCX information by Kekoa Proudfoot; http://graphics.stanford,edu/~kekoa/rcx 3. SV203; http://www.pontech.com 4. John T. Tester, Jerry Hatfield; The Design4Practice Sophomore Design Course: Adapting to a Changing Academic Environment, ASEE Annual Conference Proceedings, June 2005. 5. John T. Tester, Carol Haden, Jerry Hatfield; Developing Recruitment and Retention Strategies through Design4Practice Curriculum Enhancements, ASEE Annual Conference Proceedings, June 2005. 6. S. Scott Moor, Polly R. Piergiovanni, Matthew Metzger; Learning Process Control with LEGOs, ASEE Annual Conference Proceedings, June 2004. 7. MAX3100; http://www.maxim-ic.com 8. SPI; http://www.mct.net/faq/spi.html 9. Basic Stamp; http://www.parallax.com JERRY M. HATFIELD Jerry Hatfield is an Associate Professor of Electrical Engineering at Northern Arizona University. He is a graduate of the University of California (BSEE) and of the University of Southern California (MBA) and is a registered professional engineer. His areas of interest include freshman programs, multi-disciplinary design, computer aided instruction and testing, computer aided instrumentation systems, and analog and digital circuit design. JOHN T. TESTER John Tester is an Associate Professor of Mechanical Engineering at Northern Arizona University. He received his doctorate in Industrial & Systems Engineering at Virginia Tech. Prior to his academic career, he was a Mechanical Engineer at the telecommunications firm, Amtech Systems; he also served as an engineering officer in the U.S. Air Force. His interests include design, advanced manufacturing, renewable energy and engineering education.