Robotics will be very important for the humanity in the next 10 years and this ebook is an effort to help in this way.

Similar documents
Mindstorms NXT. mindstorms.lego.com

A Rubik s Cube Solving Robot Using Basic Lego Mindstorms NXT kit

CE215 - Assignment 1 : Dead Reckoning Reg NO:

Smart-M3-Based Robot Interaction in Cyber-Physical Systems

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. LEGO Bowling Workbook

acknowledgments...xv introduction...xvii 1 LEGO MINDSTORMS NXT 2.0: people, pieces, and potential getting started with the NXT 2.0 set...

For Experimenters and Educators

Nebraska 4-H Robotics and GPS/GIS and SPIRIT Robotics Projects

Robot Programming Manual

Welcome to. NXT Basics. Presenter: Wael Hajj Ali With assistance of: Ammar Shehadeh - Souhaib Alzanki - Samer Abuthaher

Artificial Intelligence Planning and Decision Making

BEYOND TOYS. Wireless sensor extension pack. Tom Frissen s

Medical Robotics Applications & Design Considerations (Part 1) Dr. James Smith

: Robots for Education and Entertainment. Sara Schütz

Pre-Day Questionnaire

Lego Nxt in Physical Etoys

Coding with Arduino to operate the prosthetic arm

Instructional Technology Center

Medical Robotics Applications & Design Considerations (Part 1) Dr. James Smith

VEX Robotics Platform and ROBOTC Software. Introduction

Robotics using Lego Mindstorms EV3 (Intermediate)

Deriving Consistency from LEGOs

After Performance Report Of the Robot

Using Small Affordable Robots for Hybrid Simulation of Wireless Data Access Systems

Learning serious knowledge while "playing"with robots

Rodni What will yours be?

Where C= circumference, π = 3.14, and D = diameter EV3 Distance. Developed by Joanna M. Skluzacek Wisconsin 4-H 2016 Page 1

J. La Favre Using Arduino with Raspberry Pi February 7, 2018

Figure 1. Digilent DC Motor

LEGO 2D Planar Manipulator (with zero offset between Z1 and Z2 axes of rotation)

Hands On Activity: Robotics in the Classroom. Using Lego Mindstorms (Prepared by Connie Gomez and Virgilio Gonzalez)

Closed-Loop Transportation Simulation. Outlines

Mechatronic demonstrator for testing sensors to be used in mobile robotics functioning on the inverted pendulum concept

Designing Toys That Come Alive: Curious Robots for Creative Play

Project 27 Joystick Servo Control

Automata Depository Model with Autonomous Robots

Introduction to the VEX Robotics Platform and ROBOTC Software

General Description. The TETRIX MAX Servo Motor Expansion Controller features the following:

Building Robots With Lego Mindstorms Nxt

Feed-back loop. open-loop. closed-loop

Lab 5: Arduino Uno Microcontroller Innovation Fellows Program Bootcamp Prof. Steven S. Saliterman

An Introduction to Programming using the NXT Robot:

Mechatronics Engineering and Automation Faculty of Engineering, Ain Shams University MCT-151, Spring 2015 Lab-4: Electric Actuators

Parts of a Lego RCX Robot

Chapter 1. Robots and Programs

FABO ACADEMY X ELECTRONIC DESIGN

The Nomenclature and Geometry of LEGO

Guiding Visually Impaired People with NXT Robot through an Android Mobile Application

Lesson 3: Arduino. Goals

HAW-Arduino. Sensors and Arduino F. Schubert HAW - Arduino 1

Built-in soft-start feature. Up-Slope and Down-Slope. Power-Up safe start feature. Motor will only start if pulse of 1.5ms is detected.

Laboratory 7: CONTROL SYSTEMS FUNDAMENTALS

LDOR: Laser Directed Object Retrieving Robot. Final Report

Multi-Agent Robotics with GPS Navigation

Abstract Entry TI2827 Crawler for Design Stellaris 2010 competition

Portable Multi-Channel Recorder Model DAS240-BAT

Studuino Icon Programming Environment Guide

BUILDING A COMPETITION ROBOT SESHAN BROTHERS

Downloading a ROBOTC Sample Program

Two Hour Robot. Lets build a Robot.

EE-110 Introduction to Engineering & Laboratory Experience Saeid Rahimi, Ph.D. Labs Introduction to Arduino

Worksheet Answer Key: Tree Measurer Projects > Tree Measurer

TETRIX Servo Motor Expansion Controller Technical Guide

The light sensor, rotation sensor, and motors may all be monitored using the view function on the RCX.

Department of Computer Science, UTSA Technical Report: CS-TR RF Communication for LEGO/Handy Board with Tmote

Electronic Project Interdisciplinary Creation by Amy Barone and Cindy Bronen

INTERACTIVE BUILDING BLOCK SYSTEMS

Robotic teaching for Malaysian gifted enrichment program

Arduino Control of Tetrix Prizm Robotics. Motors and Servos Introduction to Robotics and Engineering Marist School

Intelligent Systems Design in a Non Engineering Curriculum. Embedded Systems Without Major Hardware Engineering

Computational Crafting with Arduino. Christopher Michaud Marist School ECEP Programs, Georgia Tech

DC Motor and Servo motor Control with ARM and Arduino. Created by:

Lab 06: Ohm s Law and Servo Motor Control

Agent-based/Robotics Programming Lab II

Design & Development of a Robotic System Using LEGO Mindstorm

COSC343: Artificial Intelligence

The use of programmable robots in the education of programming

Let There Be Light. Opening Files. Deleting National Technology and Science Press

LEGO Mindstorms Class: Lesson 1

Robotics Workshop. for Parents and Teachers. September 27, 2014 Wichita State University College of Engineering. Karen Reynolds

Getting Started with the micro:bit

EEL4914 Senior Design. Final Design Report

EXPERIMENT 6: Advanced I/O Programming

Robotic Navigation Distance Control Platform

How to Pair AbiBird Sensor with App and Account

Arduino STEAM Academy Arduino STEM Academy Art without Engineering is dreaming. Engineering without Art is calculating. - Steven K.

DragonLink Advanced Transmitter

Supported Servos Any servo motors with "1500 us neutral" specifications. The common brands available for this spec are: Hitec, Futaba.

TUTA/IOE/PCU All rights reserved. Printed in Nepal Fax: My First Humanoid Robot An Experience worth Sharing with Freshmen and Sophomore

Familiarization with the Servo Robot System

TETRIX PULSE Workshop Guide

contents in detail PART I GETTING STARTED acknowledgments...xvii

ARDUINO / GENUINO. start as professional

Jaguar Motor Controller (Stellaris Brushed DC Motor Control Module with CAN)

LEGO BASED CHALLENGE. 1. Material

Topcon Receiver Utility: GNSS Receiver Firmware Update Process. Oscar R. Cantu

The Challenge. What to Do

PRELIMINARY DESIGN REPORT

UTILIZATION OF ROBOTICS AS CONTEMPORARY TECHNOLOGY AND AN EFFECTIVE TOOL IN TEACHING COMPUTER PROGRAMMING

Space Research expeditions and open space work. Education & Research Teaching and laboratory facilities. Medical Assistance for people

Transcription:

1.- Introduction 1.1.- Goals Many developers around the world choose lejos, Java for Lego Mindstorm, as the main platform to develop robots with NXT Lego Mindstorm. I consider that this ebook will help lejos community, Lego Mindstorm community, Robot s developers and Java fans to develop better software. Robotics will be very important for the humanity in the next 10 years and this ebook is an effort to help in this way. Many people spend several hours in their robotics projects with problems with wires & electronics, protocols and problems with programming languages, Lego Mindstorm is easy and Java/leJOS is an excellent platform to demonstrate your software engineering skills to develop better robots. NXT Brick is the easiest way to enter in the robotics world and lejos the best platform in the moment to use software engineering ideas. Enjoy, Learn, Contact with me to improve the ebook and share your ideas. Juan Antonio Breña Moral. www.juanantonio.info 1.2.- LeJOS Project LeJOS is Sourceforge project created to develop a technological infrastructure to develop software into Lego Mindstorm Products using Java technology. Currently lejos has opened the following research lines: 1. NXT Technology a. NXJ b. icommand 2. RCX Technology a. lejos for RCX LeJOS project s audience has increased. Currently more than 500 people visit the website every day. This ebook will focus in NXT technology with NXJ using a Windows Environment to develop software. Juan Antonio Breña Moral Page 1 of 10 www.juanantonio.info

1.3.- NXT Brick The NXT is the brain of a MINDSTORMS robot. It s an intelligent, computercontrolled LEGO brick that lets a MINDSTORMS robot come alive and perform different operations. Motor ports The NXT has three output ports for attaching motors - Ports A, B and C Sensor ports The NXT has four input ports for attaching sensors - Ports 1, 2, 3 and 4. USB port Connect a USB cable to the USB port and download programs from your computer to the NXT (or upload data from the robot to your computer). You can also use the wireless Bluetooth connection for uploading and downloading. Loudspeaker Make a program with real sounds and listen to them when you run the program NXT Buttons Orange button: On/Enter /Run Light grey arrows: Used for moving left and right in the NXT menu Dark grey button: Clear/Go back NXT Display Your NXT comes with many display features - see the MINDSTORMS NXT Users Guide that comes with your NXT kit for specific information on display icons and options Technical specifications 32-bit ARM7 microcontroller 256 Kbytes FLASH, 64 Kbytes RAM 8-bit AVR microcontroller Juan Antonio Breña Moral Page 2 of 10 www.juanantonio.info

4 Kbytes FLASH, 512 Byte RAM Bluetooth wireless communication (Bluetooth Class II V2.0 compliant) USB full speed port 4 input ports, 6-wire cable digital platform (One port includes a IEC 61158 Type 4/EN 50 170 compliant expansion port for future use) 3 output ports, 6-wire cable digital platform 100 x 64 pixel LCD graphical display Loudspeaker - 8 khz sound quality. Sound channel with 8-bit resolution and 2-16 KHz sample rate. Power source: 6 AA batteries 1.3.1.- NXT Sensors used in the ebook NXT Sensors used in the document are the following: NXT Motor Ultrasonic Sensor Compass Sensor NXTCam Tilt Sensor NXTCam RFID Sensor NXT Motor Ultrasonic Sensor Compass Sensor Tilt Sensor Juan Antonio Breña Moral Page 3 of 10 www.juanantonio.info

NXTCam RFID Sensor Lattebox NXTe 1.4.- About the author Further information: www.juanantonio.info www.esmeta.es Juan Antonio Breña Moral collaborates in lejos Research team since 2006. He works in Europe leading Marketing, Engineering and IT projects for middle and large customers in several markets as Defence, Telecommunications, Pharmaceutics, Energy, Automobile, Construction, Insurance and Internet. Juan Antonio Breña Moral Page 4 of 10 www.juanantonio.info

2.- Managing RC Servos with lejos 2.1.- Introduction In 2008, Lattebox a hi-tech company located in Taiwan, launch a new kind of NXT device, NXTe. NXTe allows controlling RC servos easily. NXT brick has 4 sensor port inputs to control NXT sensors as Ultrasonic Sensors, Compass Sensors, NXTCam Sensors, etc If you connect Lattebox NXTe in any free input sensor port, you could manage until 10 RC Servos with your NXT brick with an unique NXTe kit. 2.2.- Lattebox NXTe architecture The NXTe architecture is the following: If you notice, with NXTe technology you can control: 4x NXTe * 4x LSC * 10x RC Servos = 160 Servos Juan Antonio Breña Moral Page 5 of 10 www.juanantonio.info

2.2.1.- NXT Extension, NXTe NXT Extension is new device developed by Lattebox to stablish a bridge between the world of RC Servo and NXT Technology. NXTe uses the energy from NXT Brick. This device is able to manage until 4 Servo Controller. 2.2.2.- Servo Controller Servo Controller Device, is connected with NXTe to manage until 10 RC Servos. Juan Antonio Breña Moral Page 6 of 10 www.juanantonio.info

This device needs an external energy, 6.8V/4000mAh source to runs. If you have 1 Servo Controller, connect this one in SPI 1 in NXTe: When you connect a any servo into LSC, you have to know pin details: Pin 1: Signal Pin 2: Positivie Pin 3: Negative 2.3.- Servos A Servo is a small device that has an output shaft. This shaft can be positioned to specific angular positions by sending the servo a coded signal. As long as the coded signal exists on the input line, the servo will maintain the angular position of the shaft. As the coded signal changes, the angular position of the shaft changes. Most servo motors can rotate about 90 to 180 degrees. Some rotate through a full 360 degrees. Juan Antonio Breña Moral Page 7 of 10 www.juanantonio.info

2.3.1.- How does a servo work? The servo motor has some control circuits and a potentiometer (a variable resistor, aka pot) that is connected to the output shaft. If the shaft is at the correct angle, then the motor shuts off. If the circuit finds that the angle is not correct, it will turn the motor the correct direction until the angle is correct. The output shaft of the servo is capable of travelling somewhere around 180 degrees. Usually, its somewhere in the 210 degree range, but it varies by manufacturer. A normal servo is used to control an angular motion of between 0 and 180 degrees. A normal servo is mechanically not capable of turning any farther due to a mechanical stop built on to the main output gear. The amount of power applied to the motor is proportional to the distance it needs to travel. So, if the shaft needs to turn a large distance, the motor will run at full speed. If it needs to turn only a small amount, the motor will run at a slower speed. This is called proportional control. 2.4.- LeJOS and Lattebox 2.4.1.- Lattebox Support in LeJOS Currently lejos support NXTe but it is neccesary to improve: Load a unique servo Unload all servos in a LSC Unload a unique servo Test NXTe with DC Motors Control Servo 2-10 (Currently only manage 1 Servo) Manage speed in Servos Juan Antonio Breña Moral Page 8 of 10 www.juanantonio.info

2.4.2.- Example using lattebox classes with lejos If you use lejos, currently exist in Beta Phase a set of classes to manage NXTe, LSC and Servos easily. import lejos.nxt.*; public class LatteboxTest{ private static NXTe NXTeObj; private static DebugMonitor dm; private static int angle; private static int motion; //Main public static void main(string[] args) throws Exception{ dm = new DebugMonitor(); dm.setlcdlines(6); dm.echo("testing NXTe"); try{ pluged in Port1 NXTeObj = new NXTe(SensorPort.S1);//NXTe Controller NXTeObj.addLSC(0); dm.echo("calibrating LSC"); NXTeObj.LSC(0).addServo(0,"SAVOX, Digital SC-0352"); NXTeObj.LSC(0).addServo(1,"SAVOX, Digital SC-0352"); //NXTeObj.LSC(0).addServo(2,"HITEC, HS-785HB"); NXTeObj.LSC(0).calibrate(); dm.echo("load all servos"); NXTeObj.LSC(0).loadAllServos(); dm.echo(nxteobj.lsc(0).servo(0).getname()); NXTeObj.LSC(0).Servo(0).setMinAngle(200); NXTeObj.LSC(0).Servo(0).setMaxAngle(1700); NXTeObj.LSC(0).Servo(0).setDelay(1, 2); while(!button.escape.ispressed()){ 400); == true){ if (Button.LEFT.isPressed()){ //NXTeObj.LSC(0).Servo(0).setAngle(1, NXTeObj.LSC(0).Servo(0).goToMinAngle(); while(nxteobj.lsc(0).servo(0).ismoving() //dm.echo(nxteobj.lsc(0).servo(0).readmotion()); angle = NXTeObj.LSC(0).Servo(0).getAngle(1); dm.echo("goto Min"); dm.echo(angle); if (Button.ENTER.isPressed()){ NXTeObj.LSC(0).Servo(0).goToMiddleAngle(); Juan Antonio Breña Moral Page 9 of 10 www.juanantonio.info

== true){ while(nxteobj.lsc(0).servo(0).ismoving() //dm.echo(nxteobj.lsc(0).servo(0).readmotion()); angle = NXTeObj.LSC(0).Servo(0).getAngle(1); dm.echo("goto Middle"); dm.echo(angle); 2000); == true){ if (Button.RIGHT.isPressed()){ //NXTeObj.LSC(0).Servo(0).setAngle(1, NXTeObj.LSC(0).Servo(0).goToMaxAngle(); while(nxteobj.lsc(0).servo(0).ismoving() //dm.echo(nxteobj.lsc(0).servo(0).readmotion()); angle = NXTeObj.LSC(0).Servo(0).getAngle(1); dm.echo("goto Middle"); dm.echo(angle); catch(exception e){ dm.echo(e.getmessage()); dm.echo("test finished"); Juan Antonio Breña Moral Page 10 of 10 www.juanantonio.info