Table of Contents

Advertisement

User Guide
AiStarter User Guide
Issue:V1
Date:2018-12-26
ShenZhen Yuejiang Technology Co., Ltd.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the AiStarter and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Dobot AiStarter

  • Page 1 User Guide AiStarter User Guide Issue:V1 Date:2018-12-26 ShenZhen Yuejiang Technology Co., Ltd.
  • Page 2 Even if follow this document or any other related instructions, Damages or losses will be happen in the using process, Dobot shall not be considered as a guarantee regarding to all security information contained in this document.
  • Page 3 Preface AiStarter User Guide Preface Purpose This manual describes the functions of the AiStart smart car, how to use the car and its API functions to help users quickly understand and use the car. Intended Audience This document is intended for: ...
  • Page 4: Table Of Contents

    Warranty Regulation .................... 1 2. Introduction ......................3 2.1 Features ..........................3 2.2 Parts List ........................... 3 2.3 Technical Parameters ......................4 3. Feature Description ....................6 3.1 Aistarter Controller ......................6 3.1.1 Overview ......................6 3.1.2 AT Mega2560 Processor ..................6 3.1.3 Button ........................
  • Page 5 Contents AiStarter User Guide 6. AI-Starter Demo ..................... 19 6.1 Line Tracking Demo ....................... 19 6.1.1 Description ......................19 6.1.2 Procedure ......................19 6.1.3 Code Description ....................19 6.2 Obstacle Avoiding Demo ....................21 6.2.1 Description ......................21 6.2.2 Procedure ......................21 6.2.3...
  • Page 6: Safety Precautions

    Li-ion rechargeable battery of 18650 type is supported.  Please keep an eye on the AiStarter when AiStarter works, to avoid motor stalling for a long time, which could damage the control board and motor of the AiStarter. 1.2 After-sales Service Terms 1.2.1...
  • Page 7 1Safety Precautions AiStarter User Guide  The product is normal used within the specified warranty period and has any non-artificial performance failure.  The valid purchase certificate, receipt and the number thereof are provided.  If additional package, accessories or translation are needed, our company will charge a certain cost.
  • Page 8: Introduction

    2. Introduction 2.1 Features AiStarter is a smart car aimed to education and competition. It is designed with no-soldering assembly technique, using brass stubs to fix control board, and ribbon cables to connect each board, of which the layer is clear. The control board is designed based on Arduino Mega2560,...
  • Page 9: Technical Parameters

    2Introduction AiStarter User Guide Part Number M4*6 Cross Round Head Screw 4PIN Ultrasonic Sensor Cable 6PIN Color Sensor Cable 8PIN Tracking Module Cable 6PIN Motor Cable USB Cable Acrylic Plate A Acrylic Plate B Cross Screwdriver User Guide 2.3 Technical Parameters Table 2.2 Technical Parameters...
  • Page 10 2Introduction AiStarter User Guide Description Parameters  Geomagnetic sensor*1  Light sensor *1  Motor Parameters Reduction ratio: 48 : 1  Voltage: 7V  No-load current: 150mA  Stall current: 700mA  Maximum rotate speed: 100r/m  Encoder resolution ratio: 585pulse/r IssueV1.0.3(2018-09-01)...
  • Page 11: Feature Description

    LED module and so on, but also integrate infrared tracking interface, ultrasonic sensor interface, USB, Xbee, bluetooth, serial port and so on. The main control board of Aistarter, which is shown in Figure 3.1 presets two servo signal interfaces for user expansion.
  • Page 12: Led

    User-defined User can set function in Mixly or Arduino IDE environment 3.1.4 The end of AiStarter controller integrates four LED indicators, as shown in Figure 3.1, the detail descriptions are shown in Table 3.2. Table 3.2 LED indicators description Color...
  • Page 13: Interface Description

    USB drive again in Arduino-X/drivers path, X is the Arduino version, please replace it according to the actual situation. Figure 3.2 USB drive 3.1.6 Interface Description Figure 3.3 AiStarter main control board interface description IssueV1.0.3(2018-09-01) AiStarter User Guide Copyright © Yuejiang Technology Co., Ltd...
  • Page 14: Infrared Sensor

    3mm to 500mm in front of AiStarter. 3.4 Color Sensor Two color sensors are built into the bottom of AiStarter, which can recognize the color on the ground to execute different task according to different color.
  • Page 15: Installation

    4.1 Mixly Installation Mixly is an open Arduino graphical programming software based on Google Blockly graphical programming frame. AiStarter adds wrapper function on Mixly, user can call wrapper function by building blocks and upload it to AiStarter to control AiStarter.
  • Page 16: User Operation

    Figure 5.1 The page of Mixly NOTICE If you can not get the corresponding serial port of AiStarter when you open Mixly, please ensure the Arduino USB drive has been installed. If you still can not get serial port information after installing, please open Mixly as an administrator.
  • Page 17: Blockly Description

    User can select example on the File > Examples > AiStarter page, click to upload example to AiStarter, which will make AiStarter work according to the example. You can also refer to API Function to upload program to AiStarter by calling API function, which will make AiStarter work according to the program.
  • Page 18: Setting Direction\Speed\Time

    5User Operation AiStarter User Guide Description This module is used to set direction and speed Parameter Direction:  Ahead  Back  Turn left  Turn right Speed: Set running speed. Value range: 0r/m – 100r/m Return None 5.3.2 Setting Direction\Speed\Time Table 5.2 Set direction\speed\time...
  • Page 19: Detecting Barrier

    None 5.3.5 Detecting Barrier Table 5.5 Detect barrier Blockly Description This module is used to detect whether a barrier is exist in front of AiStarter, before calling this module, please start the corresponding sonar Paramater Obstacle position:  Right front ...
  • Page 20: Detecting Aistarter Track

    5User Operation AiStarter User Guide Return Return detection distance 5.3.7 Detecting AiStarter Track Table 5.7 Detect AiStarter track Blockly Description This module is used to detect whether tracking line is black or white Paramater Select infrared tracking sensor ports: ...
  • Page 21: Getting Geomagnetic Angle

    5User Operation AiStarter User Guide 5.3.9 Getting Geomagnetic Angle Table 5.9 Get geomagnetic angle Blockly Description This module is used to get geomagnetic angle Paramater None Return Geomagnetic angle 5.3.10 Setting White Balance Table 5.10 Set white balance Blockly Description...
  • Page 22: Detecting Color

    5User Operation AiStarter User Guide Color:   Green  Blue Return Return RGB value. Value range: 0 - 255 5.3.13 Detecting Color Table 5.13 Detect color Blockly Description This module is used to detect color Paramater Color sensor: Select the left color sensor or the right color sensor Color: ...
  • Page 23: Getting Photosensitive Value

    5User Operation AiStarter User Guide Table 5.15 Detect switch state Blockly Description This module is used to detect switch state Paramater Switch:  Switch1  Switch2  Switch3 Switch state: Select switch state press or release Deturn Return 1: Status detected Retuen 0: No status detected 5.3.16...
  • Page 24: Ai-Starter Demo

    6AI-Starter Demo AiStarter User Guide 6. AI-Starter Demo 6.1 Line Tracking Demo 6.1.1 Description This demo realizes that AI-Starter tracks line automatically on testing map. 6.1.2 Procedure Step 1 Turn on AI-Starter. Step 2 Press down the key start|stop, AI-Starter starts tracking line after buzzer beeps one time.
  • Page 25 6AI-Starter Demo AiStarter User Guide //calculate the car position offset for (int i = 0; i < IR_NUM; i++) { if (irstate & (1 << i)) { total += irPos[i]; irOffCnt++; if (irOffCnt) { readPos = total / irOffCnt; else { readPos = lastPos;...
  • Page 26: Obstacle Avoiding Demo

    6AI-Starter Demo AiStarter User Guide int speedOffset; //pid errorsum += error; if (errorsum > errorsumLimit) { errorsum = errorsumLimit; else if (errorsum < -errorsumLimit){ errorsum = -errorsumLimit; errorChange = error - lastError; speedOffset = kp * error + ki * errorsum + kd * errorChange;...
  • Page 27 6AI-Starter Demo AiStarter User Guide Program 6.4 Initialize AI-Starter AIStarter_SmartBotInit(); Put the ultrasonic sensor values into the array dis. Program 6.5 Save ultrasonic sensor values dis[0] = AIStarter_SmartBotGetSonar(SONAR1); dis[1] = AIStarter_SmartBotGetSonar(SONAR2); dis[2] = AIStarter_SmartBotGetSonar(SONAR3); Set turning mode according to the distance between obstacle and AI-Starter.
  • Page 28: White Balance Calibration Demo

    6AI-Starter Demo AiStarter User Guide AI-Starter turns around according to obstacle position.  BACKRIGHT: turn right  BACKLEFT: turn left  AHEAD: go straight. Program 6.7 Turns around according to obstacle position switch(motorStatus){ case BACKRIGHT: AIStarter_SmartBotSetMotor(MOTORR,BACKSPEED); AIStarter_SmartBotSetMotor(MOTORL,BACKSPEED); delay(BACKTIME); AIStarter_SmartBotSetMotor(MOTORR,DIFSPEED); AIStarter_SmartBotSetMotor(MOTORL,FRONTSPEED);...
  • Page 29: Description

    6AI-Starter Demo AiStarter User Guide 6.3.1 Description This demo realizes white balance calibration. 6.3.2 Procedure Step 1 Put AI-Starter on a piece of A4 paper. Step 2 Put down the key start|stop to calibrate white balance. 6.3.3 Code Description Initialize AI-Starter.
  • Page 30: Cooperation Demo

    6AI-Starter Demo AiStarter User Guide AIStarter_SmartBotInit(); 2) Detect color. Program 6.11 Detect color if(AIStarter_SmartBotGetColorSenor(COLORSENOR1,RCOLOR) AIStarter_SmartBotGetColorSenor(COLORSENOR1,GCOLOR) > 30 && AIStarter_SmartBotGetColorSenor(COLORSENOR1,RCOLOR) AIStarter_SmartBotGetColorSenor(COLORSENOR1,BCOLOR) > 30) { colorState = RLINE; 3) AI-Starter executes different action according to different color status. Program 6.12 Execute action...
  • Page 31: Procedure

    6AI-Starter Demo AiStarter User Guide Magician Detects AI-Starter moves to the carring position by Pixy. Magician starts to grab cubes to AI-Starter. After one minute, AI-Starter finishes carrying, and then starts line tracking function. 6.5.2 Procedure AI-Starter Step 1 Press down the key start|stop, AI-Starter starts tracking line after the buzzer beeps one time.
  • Page 32 6AI-Starter Demo AiStarter User Guide AIStarter_SmartBotGetColorSenor(COLORSENOR1,RCOLOR) AIStarter_SmartBotGetColorSenor(COLORSENOR1,BCOLOR) > 30) { colorState = RLINE; 3) AI-Starter executes different action according to different color status. Program 6.15 Execute action switch(colorState) { case OTHERLINE: //colorRec = false; lineState = LINEPATROL; break; case RLINE: delay(3000);...
  • Page 33 6AI-Starter Demo AiStarter User Guide 2) Set AI-Starter carrying position. Program 6.17 Set carring position float trayPoint[4][3] = { {308.12, 25.92, 28}, {308.12, -15.92, 28}, {258.12, 25.92, 28}, {258.12, -15.92, 28} 3) Magician grabs cubes to AI-Starter. Program 6.18 Grab cude void AreaToAIStarter() for(uint8_t i=0;...
  • Page 34: Api Function

    7API Function AiStarter User Guide 7. API Function 7.1 Initialization Table 7.1 Initialization Function AIStarter_SmartBotInit (); Description Initialization Paramater None Return None 7.2 Setting Direction and Speed Table 7.2 Set direction and speed Function AIStarter_SmartBotSetMovment (int dir, int speed) Description...
  • Page 35: Setting Motor Speed

    7API Function AiStarter User Guide LEFT speed: Set Duty Ratio. Value range: 0 – 255 time: Set running time (unit: s) Return None 7.4 Setting Motor Speed Table 7.4 Set motor speed Function AIStarter_SmartBotSetMotor (int port,int speed) Description Set motor speed...
  • Page 36: Initializing Ultrasonic Sensor

    7API Function AiStarter User Guide Return Return motor value 7.7 Initializing Ultrasonic Sensor Table 7.5 Initialize ultrasonic sensor Function AIStarter_SmartBotSetSonar (int port) Description Initialize ultrasonic sensor Paramater port: Select ultrasonic sensor enum { SONAR1, SONAR2, SONAR3 Return None 7.8 Getting the Detection Distance of Ultrasonic Sensor Table 7.6 Get the detection distance of ultrasonic sensor...
  • Page 37: Getting Infrared Sensor Data

    7API Function AiStarter User Guide Paramater port: Select ultrasonic sensor enum SONAR1, SONAR2, SONAR3 Return 1: Obstacle detected 0: No obstacles detected 7.10 Getting Infrared Sensor Data Table 7.8 Get infrared sensor data Function AIStarter_SmartBotGetIRModuleValue (int port) Description Get infrared sensor data...
  • Page 38: Setting White Balance

    7API Function AiStarter User Guide Table 7.10 Geomagnetic calibration Function void AIStarter_SmartBotSetCompassCalibration() Description Calibration method: Press down the left-most key after starting up, make AI-Starter rotate 360°around space axes X, Y, Z respectively, press down the left-most key once again to...
  • Page 39: Getting Rgb Value

    7API Function AiStarter User Guide Table 7.13 Detect color Function bool AIStarter_SmartBotDetColorSenor (int port, color) Description Detect color Paramater port:Color sensor enum{ COLORSENOR1, COLORSENOR2 color: Detect color enum{ RCOLOR, GCOLOR, BCOLOR, Return Return 1: Color detected Return 0: No color detected 7.16 Getting RGB Value...
  • Page 40: Initializing Switch

    7API Function AiStarter User Guide 7.17 Initializing Switch Function MobilePlatform_SmartBotSetKeyInit () Description Initiallize switch Paramater None Return None 7.18 Getting Switch Status Table 7.15 Get switch status Function AIStarter_SmartBotGetKeyValue (int key) Description Get switch status Paramater key: Select switch enum{...
  • Page 41: Getting Photosensitive Value

    7API Function AiStarter User Guide Return None 7.20 Getting Photosensitive Value Table 7.16 Get photosensitive value Function AIStarter_SmartBotGetLightAnalog () Description Get photosensitive value Paramater None Return Return photosensitive value 7.21 Setting Ultrasonic Threshold Function AIStarter_SmartBotSetSonarThreshold (int dis) Description ultrasonic threshold Paramater dis: Set threshold。( Unit: cm )

Table of Contents

Save PDF