Boe-Bot robot manual

Similar documents
Advanced Mechatronics 1 st Mini Project. Remote Control Car. Jose Antonio De Gracia Gómez, Amartya Barua March, 25 th 2014

Measuring Distance Using Sound

Available online Journal of Scientific and Engineering Research, 2018, 5(4): Research Article

1 Lab + Hwk 4: Introduction to the e-puck Robot

Controlling Your Robot

DC motor control using arduino

Distance Measurement of an Object by using Ultrasonic Sensors with Arduino and GSM Module

EE 314 Spring 2003 Microprocessor Systems

A servo is an electric motor that takes in a pulse width modulated signal that controls direction and speed. A servo has three leads:

Wireless Technology in Robotics

Megamark Arduino Library Documentation

Project Final Report: Directional Remote Control

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

Mars Rover: System Block Diagram. November 19, By: Dan Dunn Colin Shea Eric Spiller. Advisors: Dr. Huggins Dr. Malinowski Mr.

Devastator Tank Mobile Platform with Edison SKU:ROB0125

Part of: Inquiry Science with Dartmouth

Experiment 4.B. Position Control. ECEN 2270 Electronics Design Laboratory 1

CONSTRUCTION GUIDE Capacitor, Transistor & Motorbike. Robobox. Level VII

Cost efficient design Operates in full sunlight Low power consumption Wide field of view Small footprint Simple serial connectivity Long Range

WEEK 5 Remembering Long Lists Using EEPROM

Cost efficient design Operates in full sunlight Low power consumption Wide field of view Small footprint Simple serial connectivity Long Range

Lesson 13. The Big Idea: Lesson 13: Infrared Transmitters

C++ PROGRAM FOR DRIVING OF AN AGRICOL ROBOT

VOICE CONTROLLED ROBOT WITH REAL TIME BARRIER DETECTION AND AVERTING

Today s Menu. Near Infrared Sensors

FABO ACADEMY X ELECTRONIC DESIGN

Mapping device with wireless communication

Portland State University MICROCONTROLLERS

In this activity, you will program the BASIC Stamp to control the rotation of each of the Parallax pre-modified servos on the Boe-Bot.

Lab 8: Introduction to the e-puck Robot

EGG 101L INTRODUCTION TO ENGINEERING EXPERIENCE

Electronics Merit Badge Kit Theory of Operation

Experiment #3: Micro-controlled Movement

ADVANCED SAFETY APPLICATIONS FOR RAILWAY CROSSING

Automobile Prototype Servo Control

UNIT1. Keywords page 13-14

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

Chapter 14. using data wires

Autonomous Obstacle Avoiding and Path Following Rover

International Research Journal of Engineering and Technology (IRJET) e-issn: Volume: 05 Issue: 06 June p-issn:

Rochester Institute of Technology Real Time and Embedded Systems: Project 2a

SonoLab Echo-I User Manual

Setup Download the Arduino library (link) for Processing and the Lab 12 sketches (link).

CONSTRUCTION GUIDE IR Alarm. Robobox. Level I

Performance Analysis of Ultrasonic Mapping Device and Radar

Bohunt School (Wokingham) Internet of Things (IoT) and Node-RED

Emergent Behavior Robot

RC-WIFI CONTROLLER USER MANUAL

Chapter 3: Assemble and Test Your Boe-Bot

B RoboClaw 2 Channel 30A Motor Controller Data Sheet

Object Detection for Collision Avoidance in ITS

UNIT 4 VOCABULARY SKILLS WORK FUNCTIONS QUIZ. A detailed explanation about Arduino. What is Arduino? Listening

Thinking Robotics: Teaching Robots to Make Decisions. Jeffrey R. Peters and Rushabh Patel

Application Note. Servo Overload Protection AN-CM-247

Two Hour Robot. Lets build a Robot.

Chapter 2: Your Boe-Bot's Servo Motors

PIC Functionality. General I/O Dedicated Interrupt Change State Interrupt Input Capture Output Compare PWM ADC RS232

Agent-based/Robotics Programming Lab II

education Guide for the teacher import sys, atexit, msvcrt from time import sleep sys.path.append(../lib/ ) from moway_lib import *

Ch 5 Hardware Components for Automation

Modern Robotics Inc. Sensor Documentation

Infrared Remote AppKit (#29122)

EECS 270: Lab 7. Real-World Interfacing with an Ultrasonic Sensor and a Servo

TOSHIBA MACHINE CO., LTD.

Contents. Part list 2 Preparartion 4 izebot. izebot Collision detection via Switch. izebot Serial Communication. izebot Remote Control

Lab Exercise 9: Stepper and Servo Motors

USER GUIDE. Piezo Motor with Encoder. Installation & Software Control Guide. (For Piezo Motor Model LPM-2M, LPM-5, PM-1124R)

Robotic Navigation Distance Control Platform

Design of Tracked Robot with Remote Control for Surveillance

Multi-Vehicles Formation Control Exploring a Scalar Field

Development of a MATLAB Data Acquisition and Control Toolbox for BASIC Stamp Microcontrollers

A Model Based Approach for Human Recognition and Reception by Robot

Devantech SRF04 Ultra-Sonic Ranger Finder Cornerstone Electronics Technology and Robotics II

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

Lab book. Exploring Robotics (CORC3303)

A Day in the Life CTE Enrichment Grades 3-5 mblock Programs Using the Sensors

1. ASSEMBLING THE PCB 2. FLASH THE ZIP LEDs 3. BUILDING THE WHEELS

DataCAD 18 Softlock. Universal Installer. Installation. Evaluation

ME218C 2018 Communications Protocol. Revision # 1 5/7/18 Initial Draft /10/18 Meet w/ Karl /11/18 Update State Diagrams to Reflect Unpair

Introduction: Components used:

DPC-10. DPC-10 Software Operating Manual. Table of Contents. Section 1. Section 2. Section 3. Section 4. Section 5

Sensors and Sensing Motors, Encoders and Motor Control

Voice Guided Military Robot for Defence Application

CONSTRUCTION GUIDE Robotic Arm. Robobox. Level II

HB-25 Motor Controller (#29144)

Team Autono-Mo. Jacobia. Department of Computer Science and Engineering The University of Texas at Arlington

Robotics using Lego Mindstorms EV3 (Intermediate)

etatronix PMA-3 Transmitter Tester Manual

For this exercise, you will need a partner, an Arduino kit (in the plastic tub), and a laptop with the Arduino programming environment.

Mercury technical manual

POKER BOT. Justin McIntire EEL5666 IMDL. Dr. Schwartz and Dr. Arroyo

DSB810A Digital DC Servo Driver Manual V1.0

2D Floor-Mapping Car

Introduction. Theory of Operation

CALIFORNIA SOFTWARE LABS

Pololu Jrk USB Motor Controller

FlareBot. Analysis of an Autonomous Robot. By: Sanat S. Sahasrabudhe Advisor: Professor John Seng

DragonLink Advanced Transmitter

Pulse-Width-Modulation Motor Speed Control with a PIC (modified from lab text by Alciatore)

InnobotTM User s Manual

Transcription:

Tallinn University of Technology Department of Computer Engineering Chair of Digital Systems Design Boe-Bot robot manual Priit Ruberg Erko Peterson Keijo Lass Tallinn 2016

Contents 1 Robot hardware description...3 2 BotCommanderBT graphical user interface (GUI)...4 2.1 Getting the program...4 2.1.1 For Windows users...4 2.1.2 For Linux users...4 2.2 Starting the GUI...4 2.3 Using the BotCommanderBT GUI...5 3 Robot actuators...6 3.1 Servomotors...6 3.2 Infrared and distance detection...7 3.3 QTI sensor...9 3.4 Remote control... 10 3.5 Ultrasonic transceiver... 10 4 Software resources... 11 4.1 C-functions... 11 4.2 Servo test... 11 4.3 Moving forwards... 12 4.4 Moving backwards... 12 4.5 Turning around... 12 4.6 Turning left... 13 4.7 Turning right... 13 4.8 Stand still... 13 4.9 Left LED... 14 4.10 Right LED... 14 4.11 Left QTI... 14 4.12 Right QTI... 15 4.13 Top infrared... 15 4.14 Ultrasonic... 15 5 Typical errors and connecting issues... 16 References... 17 2

1 Robot hardware description 11 Figure 1. Top view Figure 2. Bottom view 1 3-way switch (0 off, 1 on but servos are not active, 2 on and servos are active) 2 Pushbutton to restart the program 3 Microblaze XuLa-200 FPGA 4 Bluetooth adapter 5 Pushbutton to erase user program 6 Infrared sensor 7 Infrared receiver 8 Servomotors 9 QTI sensors 10 Battery pack 11 Ultrasonic transceiver (not on the picture) 3

2 BotCommanderBT graphical user interface (GUI) 2.1 Getting the program To start the GUI you must first download and unpack the BotCommander_full.zip file which can be found on the internet 1. Either you use Windows or Linux it s recommended to start the program in the console. 2.1.1 For Windows users Run Command Prompt by typing cmd to the Start. On Figure 3 you can see the opened window. Figure 3. Windows Command Prompt window 2.1.2 For Linux users Simple way to open a new terminal is to make a right click on the Desktop and choose terminal. 2.2 Starting the GUI It s mandatory to have Java installed and added to the path. To check whether Java has been correctly installed type java in the command/terminal window and press Enter. If the response is java is not recognized as an internal or external command then you have to configure your Java 2. Otherwise move to the extracted BotCommanderBT folder and start the program by typing java jar BotCommanderBT.jar. The command is also shown on Figure 4. After that the program window opens as can be seen on Figure 5. Figure 4. Starting the BotCommanderBT program 1 http://petski.tainas.ee/sissejuhatus_erialasse/botcommander_full.zip 2 http://www.java.com/en/download/help/path.xml 4

2.3 Using the BotCommanderBT GUI Figure 5. User interface BotCommanderBT is a user interface for programming the robot. 1. Connect Connecting to Boe-bot, robot must be turned on first 2. Compile Compiling the code, choose the code you want to compile 3. Upload Uploading the code to Boe-bot, choose the file to be uploaded 4. Disconnect Disconnecting from Boe-bot, terminate the connection 5. Quit Close the program 5

3 Robot actuators The robot has some sensors and transducers to interact with the environment. The description and how to manipulate with them are described below. Since August 2015 the robot has servomotors, infrared LED and infrared receiver, QTI sensors, LEDs, ultrasonic transceiver, FPGA based soft-core Microblaze microcontroller with OTA programming via Bluetooth. In Table 1 is shown the connection overview of the Boe-Bot controller and actuators. Pin Actuator 0 LED 5 QTI 6 QTI 7 Ultrasonic 8 Ultrasonic 10 Infrared LED 11 Infrared receiver 12 Right servomotor 13 Left servomotor 15 LED Table 1. Robot actuators connection overview 3.1 Servomotors Servomotor is a rotary actuator that allows for precise control of angular position, velocity and acceleration. It consists of a suitable motor and coupled to a sensor for position feedback. It also requires a relatively sophisticated controller. [1] Servo control function is located in section 4.2. Servomotors are controlled with pulses. The duration of the pulse determines the behavior of the motor. For instance a pulse with duration of 1,5ms to our servo means that the servo is at standstill. Though pulses above and under this delay make the servo to rotate. In Table 2 are described the maximum limits of the servo with the rotation direction. On Figure 6 the pulses and servo interactions are shown more figurative. On Figure 7 the reaction of the pulses are shown as a result of practical measurement. Notice that pulses around the 1,5ms increase the servo rotation speed more rapidly than pulses around 1,3ms or 1,7ms. As can be concluded pulses 1,3ms and 1,7ms make the servo rotate at the maximum speed. To exceed those limits doesn t change the servo s behavior. Table 2. Servo pulse Pulse duration Reaction 1,5 ms Servomotor stops 1,3 ms Servomotor starts to move clockwise 1,7 ms Servomotor starts to move counterclockwise 6

Figure 6. Servo pulse 3.2 Infrared and distance detection Figure 7. Servo pulse width, 1 pulse = 10 us The infrared (IR) LED emits infrared light and the reflected IR receiver reacts to light and transmits the signal as seen on Figure 8. The Boe-Bot IR works on the same principle as the TV remote. 7

Figure 8. Infrared signal Boe-bot infrared receiver is designed to receive IR light with a wavelength of about 980nm which converts to 38 khz. The IR LED emits a 980nm wavelength infrared signal and the receiver detects it. Infrared receiver has different sensitivities to different frequencies which is shown on Figure 9. This principle is based on the distance detection. On Figure 10 the sensitivity of the receiver is shown. Infrared control function is located in section 4.13. Figure 9. IR zones 8

Figure 10. IR frequency scale 3.3 QTI sensor QTI sensor detects differences between light and dark objects. Proximity detection to judge relative distance to an object. The QTI sensor uses an infrared light emitting diode and infrared phototransistor to provide simple but effective non-contact detection of patterns and objects. In either case, light emitted by the LED bounces off a surface or object, and is detected by the phototransistor. QTI control function is located in section 4.11 and 4.12. On Figure 11 the QTI sensor is shown. The principle of the QTI is the same as the top IR receiver and sensor described in section 3.2. Figure 11. QTI sensor 9

3.4 Remote control Boe-Bot can be controlled with TV remote this means that Boe-Bot is able to receive IR signals form the remote control and other sources. The remote control signal is encoded. In this case the Boe-Bot must be programmed to decode the signal. Basic principle of the Samsung infrared protocol is on Figure 12. Time between two consecutive commands is 108ms. Each command consists one start bit, two bytes of custom bits and two bytes of data. In our case the important part is the data in the signal. We decode the signal depending on the time length. Logical 0 means that time between rising and falling edge is equal to 0.56ms. For logical 1 the time for rising edge is 0.56ms and the time for falling edge is 1.69ms. 3.5 Ultrasonic transceiver Figure 12. Samsung IR protocol [2] Ultrasonic transducers are transducers that convert ultrasound waves to electrical signals or vice versa. Our ultrasonic ranging module HC - SR04 (Figure 13) provides 2cm - 400cm non-contact measurement function, the ranging accuracy can reach to 3mm. The modules includes ultrasonic transmitters, receiver and control circuit. The main working principle is the same as in infrared, where the signal is sent and the duration between sent signal and reflected signal is measured. As the speed of sound is known (340,29m/s) one can calculate the distance the signal travelled in the elapsed time. Figure 13. Ultrasonic transceiver HR- SR04 10

4 Software resources The following chapter consists of software code needed for programming the robot. It consists of functions for manipulating the robot s actuators as well as reading data from sensors. To modify the codes it is advised to use simple text editor. In Windows use Notepad++, in Linux use Geany. 4.1 C-functions In Table 3 all the functions for user are shown. Using those functions all sensors and actuators can be manipulated with. User can also use those functions to create their own to simplify some actions. Table 3. C functions Function Explanation void set_dir(int pin, int dir) Sets the input-output direction by default all pins are inputs dir can have values INPUT or 1 and OUTPUT or 0 void set_bit(int pin, int bit) Sets output value pin is the integer value of the connected actuator bit value can be 0 or 1 int get_bit(int pin) Gets the input value, the return value can be either 0 or 1 pin is the integer value if the connected actuator void pause(int time) Pauses the program for specified period of time, unit 10uS time need integer value int time(int pin, int state) Waits until the input reaches the value state and then measures how long it takes to change the input, accuracy 10us State value can be either 0 or 1 void freg(int pin, int d, int f) Transmits the signal with predetermined frequency d duration with the accuracy of 10us f frequency with the accuracy of 1Hz Pin - input-output pin value, between 0 and 15 4.2 Servo test Void servo (int, int) is a function that will control the servo movement. //servo motor function void servo(int left, int right) { set_bit(12,1); //left servo value 1 pause(left); //left servo paused set_bit(12,0); //left servo value 0 set_bit(13,1); //right servo value 1 pause(right); //right servo paused set_bit(13,0); //right servo value 0 pause(2000); //2 ms The 12th bit is for the left servo and the 13th bit is for the right servo. Value 1 means that servo pin is at state logic 1 (high), value 0 means that servo pin is at state logic 0 (low). Pause between the set_bit functions determines servo speed and the direction. Meaning that the servo will get the pulse with duration of the pause. 11

4.3 Moving forwards Void go_forward (void) is a movement function. void go_forward(void) { //go_forward function for (i=0;i<50;i++) { //increment variable up to 50 servo(130,170); //moving forward This function will move Boe-bot forwards. Boe-bot will go forwards until the cycle is complete. Currently the cycle counter (i) is declared as global variable of type integer. Cycle counter goes up to 50 at this point which is the number of cycles that servo moves. In the for-cycle we are calling out servo function with specific parameters to move forwards. 4.4 Moving backwards Void go_back (void) is a movement function. void go_back(void) { //go_back function for (i=0;i<50;i++) { //increment variable up to 50 servo(170,130); //moving backwards This function will move Boe-bot backwards. Boe-bot will go backwards until the cycle is complete. Currently the cycle counter (i) is declared as global variable of type integer. Cycle counter goes up to 50 at this point which is the number of cycles that servo moves. In the for-cycle we are calling out servo function with specific parameters to move backwards. 4.5 Turning around Void turn_around (void) is a movement function. void turn_around(void){ //turn_around function for( i=0;i<40;i++) { //increment variable up to 40 servo(130,130); //turning around This function will turn Boe-bot around. Boe-bot will turn around until the cycle is complete. Currently the cycle counter (i) is declared as global variable of type integer. Cycle counter goes up to 50 at this point which is the number of cycles that servo moves. In the for-cycle we are calling out servo function with specific parameters to turn around. 12

4.6 Turning left Void turn_left (void) is a movement function. void turn_left(void) { //turn_left function for (i=0;i<50;i++) { //increment variable up to 50 servo(130,150); //turning left This function will turn Boe-bot left. Boe-bot will turn left until the cycle is complete. Currently the cycle counter (i) is declared as global variable of type integer. Cycle counter goes up to 50 at this point which is the number of cycles that servo moves. In the for-cycle we are calling out servo function with specific parameters to turn left. 4.7 Turning right Void turn_right (void) is a movement function. void turn_right(void) { //turn_right function for (i=0;i<50;i++) { //increment variable up to 50 servo(150,170); //turning right This function will turn Boe-bot right. Boe-bot will turn right until the cycle is complete. Currently the cycle counter (i) is declared as global variable of type integer. Cycle counter goes up to 50 at this point which is the number of cycles that servo moves. In the for-cycle we are calling out servo function with specific parameters to turn right. 4.8 Stand still Void stop (void) is a function to stop moving. void stop(void) { //stop function for (i=0;i<50;i++) { //increment variable up to 50 servo(150,150); //stop This function will make Boe-bot stand still. Boe-bot will standstill until the cycle is complete. Currently the cycle counter (i) is declared as global variable of type integer. Cycle counter goes up to 50 at this point which is the number of cycles that servo moves. In the for-cycle we are calling out servo function with specific parameters to stand still. 13

4.9 Left LED Void left_led (int ) is a function for left LED. void left_led(int status){ set_dir(15,output); set_bit(15,status); //left led on The 15th bit is connected to the leftmost LED. If status equals to 1 then the LED is active but if status equals to 0 then the LED is inactive. The LED is active/inactive until the status is changed. 4.10 Right LED Void right_led (int ) is a function for right LED. void right_led(int status){ set_dir(0,output); set_bit(0,status); //right led on The 0 bit is connected to the rightmost LED. If status equals to 1 then the LED is active but if status equals to 0 then the LED is inactive. The LED is active/inactive until the status is changed. 4.11 Left QTI Int left_qti (void) is a function for the left QTI sensor. int left_qti(void) { 1 set_dir(6,output); set_bit(6,1); pause(100); //100 us set_dir(6,input); int i = time(6,1); return ( i > 15? 1 : 0); //if i > 15 then it returns The 6th bit is connected to the left QTI sensor. If the cycle counter (i) is bigger than 15 then function returns value 1. This means that the QTI sensor has detected nothing (black surface). If the Increment variable i is less than 15 then it returns 0. This means that the QTI sensor has detected white. 14

4.12 Right QTI Int right_qti (void) is a function for the right QTI sensor. int right_qti(void) { 1 set_dir(5,output); set_bit(5,1); pause(100); //100 us set_dir(5,input); int i = time(5,1); return ( i > 15? 1 : 0); //if i > 15 then it returns The 5th bit is connected to the right QTI sensor. If the cycle counter (i) is bigger than 15 then function returns value 1. This means that the QTI sensor has detected nothing (black surface). If the Increment variable i is less than 15 then it returns 0. This means that the QTI sensor has detected white. 4.13 Top infrared Int top_ir (void) is a function for the top infrared sensor and LED. int top_ir(void) { freq(10,100,38500); //function call with values return ( get_bit(11)!=0? 0 : 1); Void freq (int pin, int d, int f) is a function what will transmit the infrared signal. The d is the signal duration with the accuracy of 10us. The f is the frequency with the accuracy of 1Hz. The 10th bit is the infrared LED (IR-LED). IR sensor is connected to the 11th bit. If the 11th bit equals to 0 then it returns 0 which means that nothing is detected. If the 11th bit is not 0 then it will return 1 and that the top_ir has. 4.14 Ultrasonic Function void ultrasonic () is for controlling the ultrasonic transceiver. void ultrasonic(){ set_bit(7,1); //send out trigger signal pause (1); //wait for 1 us set_bit(7,0); //turn trigger signal off int i = time(8,1); //read the echo signal time i = you got it dude! ; //to calculate the result to 1 mm precision The pins of the ultrasonic transceiver are connected to microcontroller pins number 7 and 8. Firstly a pulse is sent out for 1 us then using time function a value from pin 8 is read to variable i. Lastly using the formula from ultrasonic transceiver datasheet [3] the time value is converted to distance in mm. 15

5 Typical errors and connecting issues Table 4. Boe-bot UI error messages. Error text Bluetooth Stack not detected Connection timeout Can t find BoeBot Failed to connect Failed to connect. [13] Permission denied BOOT_MB_006 multiple messages Description Computer can t find BT dongle. Check if the dongle is connected. Check if the Boe-bot is turned on. The robot proximity is also important (less than 1,5m from the dongle). Low batteries also cause this error. Check if the robot is turned on and close to the computer. Also check whether the correct dongle is connected. Check if the BT device need configuration before connecting. Message should appear in the taskbar. Check if the robot is already paired with the computer. In case it has delete the device and connect from scratch. Time to recharge the batteries. In case of correct connection with the Boe-bot the user interface shows BOOT_MB_006 once. If the BT dongle version is Bluetooth v 2.0 or older the computer asks for PIN. The default PIN in this case is 0000. 16

References [1] Servomotors Wikipedia [WWW] http://en.wikipedia.org/wiki/servomotor (07.08.2014) [2] Application note S3F80KB IR REMOTE CONTROLLER. Samsung Electronics, Inc. Page 5, Figure 1. IR Signal. [3] Ultrasonic Ranging Module HC-SR04 [WWW] http://www.micropik.com/pdf/hcsr04.pdf (01.09.2015) 17