14
Construction Manual Enter to Robotics world with easy robot kit !! Construct and Programming with yourself.

˘ ˇˇ˘ ˆ - Home Science Tools · 2017. 9. 16. · i-BOX can interface with your computer in 2 ways. One is the direct serial connection to your computer with the CX-4 cable. The

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ˘ ˇˇ˘ ˆ - Home Science Tools · 2017. 9. 16. · i-BOX can interface with your computer in 2 ways. One is the direct serial connection to your computer with the CX-4 cable. The

����������� ����� ���������������� ����� ������������������

������������������������� ������������

Page 2: ˘ ˇˇ˘ ˆ - Home Science Tools · 2017. 9. 16. · i-BOX can interface with your computer in 2 ways. One is the direct serial connection to your computer with the CX-4 cable. The

��������

Part List_____________________________________________________________________________2

Getting started with the i-BOX ________________________________________________________3

System Requirement_________________________________________________________________4

Cables in Robo-BOX3.0 kit____________________________________________________________4

Software installation and Interfacing with Computer___________________________________5

Command block summary of LogoBlocks_____________________________________________6

How to develop Robot programming_________________________________________________7

Building O2 robot_____________________________________________________________________8

Basic Moving ________________________________________________________________________9

Bumper : Object detection robot___________________________________________________13

Light Bot : Light controlled robot_____________________________________________________15

Line Tracker : Simple Tracking Line robot _____________________________________________17

Building NanaTank robot____________________________________________________________18

NanaTank with simple movement___________________________________________________20

NanoTank moves in area - never fall from table ! ________________________________________22

NanoTank moves along the line______________________________________________________23

NanoTank with Touchless object detection____________________________________________26

NanoTank finds object______________________________________________________________27

NanoTank with Sound detection____________________________________________________29

NanoTank with Tilt detection - Robot will not over ! ____________________________________30

RF remote controlled NanoTank robot_________________________________________________31

��������

Page 3: ˘ ˇˇ˘ ˆ - Home Science Tools · 2017. 9. 16. · i-BOX can interface with your computer in 2 ways. One is the direct serial connection to your computer with the CX-4 cable. The

��������

Controller board and Interface part

Sensor

Machanical parts

��������

�������

��� ����������� ���� �� ����������

���� �����������������

�� ��������������

�� ����� ��!������������� ����� ��!����������

"� ����� ��!����������

�#��#�"#�"��$��!�%�����!%�$#��&�

��'��$��%������%��(�����

������$��%������%��(�����

���"��$��%������%��(����

������$��%������%��(���� ���$�)� �����

������*��%+���!!�� ,���������

-�.����*��%+��!!�� �,�������'

/�����*��%+���!!�� ,�������'

�������-�����!��%+�

���

*��%+�,�������

0���1�������+�2����1�������+����.����1������+�3

Wheels and Tires

�������$�-� ���4������"

��%���,��������.�����������.� ����(� �����$����1� �!!�����%��(����

��%�����������

4��������!�� �����

�������$���.�!�� �����

���'���$���.�!�� �����

Base

5����1��% ��/5� *�,5* �6����

4% ��*��%����������� /��� �.� �% ����� /����*��%+������.�7����.� �% ������������

�� ��%�������

8�)�����

8�9� ���������!�� %��:�� �����

;���%����

�������!�� �%�������

Nut & Screws

2

Page 4: ˘ ˇˇ˘ ˆ - Home Science Tools · 2017. 9. 16. · i-BOX can interface with your computer in 2 ways. One is the direct serial connection to your computer with the CX-4 cable. The

3

��������

NotebookcomputerUSB Interface

USB cable

USB to Serial port converter

Desktop PCSerial port Interface

CX-4 cable

CX-4 cable

Piezo speaker

Digital outputconnect with LEDs,Lights or Relaydriver circuits

LDR Light sensor

Analog input

Infrared reflector

Infrared ranger

Switch/Touch sensor

Digital input

MicrocontrollerThe brain ofRobot, containsLogo interpreterfirmware

RUN/STOP switch

Stop program Run program

Motor direction indicatorForward Backward

Motor output

DC motor DC gearbox

POWER switch

Turn ON or OFF the supply voltageto all circuit

AA size Batteryi-BOX III supportssimple Alcalinebatteries andRechargeablebatteries.Use 4 “AA”(not included).

Install Batteries

Getting start i-BOX

2. Turn on POWER switch. The Red LED light willblink a few times followed by a Beeping soundfrom its speaker.

������������� ��������

���� ���� ���������������

� �� ����

������

1. Flip the i-BOX around and open the batterycover to place 4 “AA” batteries into the batteryholder. Please ensure that the polarity of theplacement of your batteries are correct in orderfor the i-BOX to function.

3

Page 5: ˘ ˇˇ˘ ˆ - Home Science Tools · 2017. 9. 16. · i-BOX can interface with your computer in 2 ways. One is the direct serial connection to your computer with the CX-4 cable. The

������������ �

��������������������

�������������

�����������

��� �! "�� �� ����

HardwareYou will need either a PC or laptop computer to run the Robo-BOX software.Getting started with Robo-BOX is easiest if your PC or laptop has the followingfeatures:

• Harddisk space 15MB

• 800 x 600 Resolution Color Monitor. 1024 x 768 recommended.

• A serial or USB port

• A CD-ROM drive, World Wide Web access, or both.

�������������� �

#��$%$�� ����������"���& ����� ���'(�������"����� ������ �� ��� �� � &��)� �!��"��� ��� �� ������ �� ����(�� ������ �� �����*���� ����� �+ "�� ��� ����,

(����-�� &��)����.�&����������&� ����/���������0���1�/������#��$%$�� ������������ �� ������ 2��� ����#�&���'3%�4�)�������� ��/�'-�$%$��� ����

Software• Install Windows ME or newer operating system. Windows XP Service-pack2 recommended.

CX-4 cable :The cable that connects between Computer’s COM port orUCON-232S DB-9 connector (if use UCON-232S) with i-BOX.

�������� ����������������

Pin 2 —— RxD Receive data

Pin 3 —— TxD Transmit data

Pin 4 —— DTR Ready signal

Pin 5 —— GND System Ground

�� ������5�6��'(������������ � �� ����� �!/�'-�$%$�

�� ���������'3

#7�88�"�����������

PCB3AA-8 cable :The cable that connects between i-BOX controller with anysensor and application module. Sometime calls “Sensorcable”. The length is 8-Inches.

9�����*9-�,

4

/��������'(�����

Page 6: ˘ ˇˇ˘ ˆ - Home Science Tools · 2017. 9. 16. · i-BOX can interface with your computer in 2 ways. One is the direct serial connection to your computer with the CX-4 cable. The

������������ �������������������������

i-BOX can interface with your computer in 2 ways. One is the direct serialconnection to your computer with the CX-4 cable. The other mode is viayour computer’s USB port using the UCON-232S USB to Serial converterdevice. However, for the 2nd method, using the USB port, you will first needto install the driver provided by the USB to Serial converter device that isbundled in this kit.

How does the i-BOX interface with my computer

Notebook

USB Interface

USB cable

USB converter

Desktop PC

Serial port Interface

When you connect the UCON-232S to your computer’s USB port for the firsttime, windows will detect a new hardware device and will prompt you fora suitable device driver. Choose the ucon-232_driver folder within thebundled ROBOBOX CD-ROM.

After installation, you can check the newCOM port for UCON-232S. Open the Controlpanel > System > Device manager and seeunder Ports. You will see the USB serial port.

������������ ������������������������������� ���������� �����������������

Double click

��������� ��� ��� �!"#$%%&� ����� �� '������ ��� ���(��(�����)(�� ����� �����(��(���������*�����

Installation of Logo Blocks and Cricket Logo software

+����� ������,�(*���� �������,��������������������������������� ����

-��.���/��������������(��(����)����*���(,��������������� !0�#&��������������� ���(��(������'����������������(�,��(��������'��(����1������������ !0�#&��������������

Installing the USB to Serial port converter driver

After connect UCON-232S converter, at right corner of monitor will be showDetect New Hardware. Select the source of the driver for installation. Therewill be 2 drivers installed. One is the Serial device driver and the other isthe Virtual COM port driver

5

Page 7: ˘ ˇˇ˘ ˆ - Home Science Tools · 2017. 9. 16. · i-BOX can interface with your computer in 2 ways. One is the direct serial connection to your computer with the CX-4 cable. The

����������

�������������� ��������������������������������������������������������������������������������

�������������� ������������������������������������������������������������������������������������

Brake motor

Drive motor

Stop motor

�������� �����������������������������������

���� �� ���� ��� ���� � ��������� ��� ����������� ��� ���� ������� ���� ������������

Forward direction

���� �� ���� ��� ���� � ��������� ��� ����������� ��� ����������� ���� ������������

Backward direction

Reverse direction����� ������ ��������� ���� ��������� �������������������������

Set power to motor!� �� ���� �� ��� ������ ��� ���������������������"�����������#����"$%%�#���� ������� ������"$%%�&'(���� ������ �����

Set time of motor control�������������� �������������������������������������������������

Send HIGH logic�������)*+)���������,� ����������

Send LOW logic�������%�-���������,� ����������

Set delay time�������� ��������� ���������������������� ��� ������./����� ����� ��012131���4�4#�������������������������011�31��������

Reset timer value5�������������������������������4�

Read timer value6�������������������������������$��������������4�4#������������� ���� ����� ����� 4� ��� 372808� ��������

nop : No operation�� 9�����:� ������ ��� ����� �����������������������������

Interrupt����� ������ ��� ����� ��� ����� ������������������ ������ �����������9�:2����������������� � ��������������������������������

Stop Interrupt����� ����������� ���� ���������� �� ���� ������� ��� ����������� ����� ���� � ��������� ������ ��������

Stop program operation����� ������ ��� ����� ��� ���� ������� ����2� �������2� ��������������

Digital input block�� *���� �����2� ����� ��� ������� ������� �������������������� ������6����������������������;�*<4����*<3�

Sensor block$�����������������������������������

���������� ���������������� ���4���#2473����������������

6��������������������� ;�6=<6�54���6=<6�53�

=�������������������������������������������� ������������������42�#272�2�'���#1�

Repeat loop%���� ����� � ������� ����� � ��������������������6��������#���012131�

Wait condition����� ������ ���� ��� ����� ���������� ����� ������ ������������ �������������������

Serial data checking����������������������������������������

Serial data buffer����� ��� ��� ����� � ������ ����������������

Declare variable������������������������������������� �� �� ���� ��� ���� ��� ���$��������������������������

Set number���������������������������������������������6�������4����012131�

Random numerical������������������� ����������������������� � ����� ������ ����� ������������� � ���6������� � �� ��� 4���711

Procedure icon>���������*������ ������������������� � ����������� ������ � ��� ���������� ��� �� ���� �� � ���� �����������������

�������������� �������������������������������������

���� �� ������������ ������������������������������������������� ���� ��� � ������ �� ���� ������ ������ ��� ��� ��� � ������������6���������������

Check conditions����� ��� ����� �� � ����������������� ��� ������ ��� ���� ������������������������������������2������������������������������

Delete data block���������<��������?���� �����������

Numerical comparison����������� ������������ ��2������������ ��� ���������������������������

����������� ��������� ��2������������ ��� �@��� ��� � ������ ���������������

������������ �� ����������� ��2���� � ������� ��� ������ ��� ������������������

Check additionalconditions��������������������������� ���� ���� ����� ���� ���� �� ����������� ������2� ���� ���� ������ �����������������������������������������������������������������

Serial data monitor$���� ��� ���� �6�����.��� �� ��������� ����� ����� ���� ������ ��!���������������6����������������A044����2� '�������2� �������������� ���#�����6���

Record value to memory��� ������� �<�������� ?���� ������������������������������/�����,��>������&,>(�������� ������2�,> ���������������/���������

Clear Data Pointer$���� ��� 5����� ����� ,�� >������������ *�� ����� ������� ����������������/������������������ ��

Recall data from memory$�������5����������������������������������������������� �����,�>������ ���� ���/� ���� �/�� �����������������

AND : logical block operation��������������������������������������������������������������������� ����������<,��� ����

������������������� ���� ��� �����������

OR : logical block operation��������������������������������������������������������������������� ����������5��� ����

�������������������� ���� ���� ��� � ��� ������������

Arithmatic Command Blocks(+ , - , x , /, %)������ ����� ������� ��� ����� �������������������������� ���7������������������*���������� &B(2� 6��������� &�(2� .�������� &/(2,�������&C(���.�������&D(

Set of Rules block���������������������2��������������������������������������*��������������������� �����������������������

Beep������� ���������������������������������������������������

�������������� ��������

Beep generation��� �������� � ����� ����� ���� ��� ������E��������������������

Musical generation�����������������������������������������������@�������������

������ ������ �����

���� ���� �� ������

������

��������������@������� ���������������������

��������� ������������������������3�4����������

��� ���2�����F������ ������������������������&�

����������������������������(������������� �����

����������&�������� ��������������������(�����

������������������������� ��������� �������� ��

�������2� ���� ����� � � ��������� ���� ��

�������

������ ����� ������� �������� ����� ���� �����2��������2���� � ��������������������������������������������������������������

Loop operation%���� ����� � ������� ����� � �������������������

6����� �������� ��� �� ��� � �� ��� ������ ����������� ���� ����.!$� ���� �������� � �� ���� ����������������������������

����<������ �������� ��� ���� ��� ������ ������������2�����������2� ����2�������������

���������������������������#0�

���2���,����������3780'����B37808�

)� ������������� ������� �� �����

���*�� ���,������

���� >��������� �������� ��� ����� ��� ������ ���������������� ���������������������������

Start sub procedure$��������������������������������

Download i-BOX code�������������� ���������� ��������������� ������������������������ ���� ���� ����� *����� *��� �����������������2����� ���������������������*����

)� ���������� ������������������2���� ���� ���� ���� ����������� ��������� ���������������

XOR : logical block operation��������������������������������������������������������������������� �����������5��� ����

���� ������ � ����� �� � ��� � ��� �� ������������

NOT : logical block operation������������������������������������������<����� ����

������������������ ����� ������

Set Data Pointer$�������6��������,��>������������*������������������������/�����������������������@�����

6

Page 8: ˘ ˇˇ˘ ˆ - Home Science Tools · 2017. 9. 16. · i-BOX can interface with your computer in 2 ways. One is the direct serial connection to your computer with the CX-4 cable. The

������������������� �� ������

Build robot

Test and testEdit program

����� �

Connect download cable

������������� �����������������

����������������� �������������

����������������� ����������

����������� �������������� ��������

�������������

���������� ��

�������� ���

!��

"��

#�

Robo-BOX development has 3 parts.

Part-1 : Prepare and make the Robotchasis, Motor, Wheel and Mechnicalparts

Part-2 : Learn about i-BOX controllerand Sensors

Part-3 : Controlled program

Development steps show withflowchart that describe as :

1. Construct the robot base andinstall all sensors that relate in anyactivity. Such as install InfraredReflector seansor for detect andtracking the line in Line Trackingrobot activity.

2. Connect the robot with computerand apply the supply voltage to therobot.

3. Make the suitable program forcontrolling the robot with LogoBlocksor Cricket Logo.

4. Download the program into therobot

5. Press RUN switch to activate therobot, Test its operation and orservethe result.

6. If the operation not complete,check the error and find out themissing in program. Edit anddownload to testing again. Do untilthe operation complete and satisfy.

"� ������

7

Page 9: ˘ ˇˇ˘ ˆ - Home Science Tools · 2017. 9. 16. · i-BOX can interface with your computer in 2 ways. One is the direct serial connection to your computer with the CX-4 cable. The

�������� ��������

Construction

��������

��� ���

��������������������������

�������������������������� ���� ������

������ ��!����

"��� ��#�$����

������%��������

�&�����%��������

������'(����

"��� ���������������� )�(�%%��!����������

1. Fix on the 2 wheels with rubber tires and attach them to the DCGearbox with the 2 of 2mm. self-tapping screws provided in the kit.

2. Install both DC Gearboxes on the circle base plate at the specificpositions shown in the picture with 3 x 6mm. machine screws.

*�����%��(���

3. Insert the 3 x 40mm. machine screws through the hole at the corner ofthe Box holder with 25mm. and 2 of 3 mm. spacers

�&�����%����

�������������

*�����%��(��

*�����%��(��

4. Place the Box holder on the top of the Circle base plate and attachthem with 3mm. nuts at the specific positions.

*�����%��(��

*�����%��(��

������'(

5. Place i-BOX into the holder. Connect Motor A cable to the Blackconnector of ch-A and Motor B to the white connector of ch-B.Your Robot is ready to GO!

+(��,

+(���

Part List

������%����

������%����

8

Page 10: ˘ ˇˇ˘ ˆ - Home Science Tools · 2017. 9. 16. · i-BOX can interface with your computer in 2 ways. One is the direct serial connection to your computer with the CX-4 cable. The

������������ ����������������

The O2 robot is moved by 2 of DC motorGearboxes. Must drive both motorsfollowing the table below :

Direction Motor A Motor B

Forward CCW CW

Backward CW CCW

Turn Left Stop CW

Turn Right CCW Stop

Rotate Left CCW CCW

Rotate Right CW CW

Note :CCW = Clock clockwiseCW = Clockwise

Robot movement

Forward-Backward movement programming

4. Click block to connect with block. It will change to

means Motor A and B will spin in forward. Drag block to connect

next. It will change to . The number that follows is time operationvalue of Motor A and B. Double-click at this number block to change to2000. It is equal 2 seconds.

5. Drag block to connect to block. It change to means both motor spin backward. After that drag onfor block to connectnext and chnage the time value to 2000. The testing code-1 is finished.Turn-on i-BOX on the O2 robot. Click button to download code tothe robot.

Button will subside indownloading.

Click button to download

6. Test with press RUN switch on i-BOX.The O2 robot will move forward 2 seconds followingbackward 2 seconds and stop.If the movement direction not correct, may bechange the motor connection and test until correct.After that must remember this motor connection foranother activities in this manual.9

For Cricket Logo1. Connect the O2 robot with computer.

2. Open Cricket Logo software.

3. Type in Listing-1 into Cricket Logo editor.

4. Download program into the O2 robot byclick DOWNLOAD button.

For LogoBlocks1. Connect the O2 robot with computer.

2. Open LogoBlocks.

3. Select block group.

Code-1

Listing-1

Page 11: ˘ ˇˇ˘ ˆ - Home Science Tools · 2017. 9. 16. · i-BOX can interface with your computer in 2 ways. One is the direct serial connection to your computer with the CX-4 cable. The

������������ ����������������

10

Speed behavior i-BOX allows you to selectdifferent speed levels from the

block command. The

different speed means that thedistance the robot moves isdependant on this and relativeto the time taken as well.

Motor driving signal is PWM(Pulse-Width Modulation). If thewidth of signal more, meansmore voltage applied to motor.See the illustrate below.

Testing speed programming

For LogoBlocks1. Connect the O2 robot with computer. Open LogoBlocks software.

2. Select block group. Drag to connect with block.

3. The block will change to . Double-click at number to change

to 1 for slowest speed testing.

4. Drag block drop to connect with block. Double-click at

number block to change value to 200 for setting time to 2 second. TheCode-2 is finished.

5. Download the program to the O2 robot. Unplug downlaod cable.

6. Press RUN switch to activate the O2 robot. Measure the distance thatrobot move to.

7. Back to program, change setpower value as 2 to 8 and test samemethod. See the different result of each speed.

For Cricket Logo1. Connect the O2 robot with computer.and Open Cricket Logo software.

2. Type in Listing-2 into Cricket Logo editor.

3. Turn-On the O2 robot and downloadprogram into the robot.

4. Press RUN switch and see the robotoperation. Remember the speed of robot.

5. Change the speed by edit setpowernumber from 1 to 8 and downlaod programafter changing. Test and see the differentresult.

Code-2

Listing-2

Note : Default value of setpower command is 4 orNormal.

Page 12: ˘ ˇˇ˘ ˆ - Home Science Tools · 2017. 9. 16. · i-BOX can interface with your computer in 2 ways. One is the direct serial connection to your computer with the CX-4 cable. The

������������ �������������������

Circle movement control

By changing the individualpower of each of themotors to different levels,this will cause the speed ofthe individual motors tomove at a different speed.

In this way, the Robot willbe traveling round incircles.

For LogoBlocks

1. Connect the O2 robot withcomputer. Open LogoBlockssoftware.

2. Select Action block group.Drag and drop commandblocks to make the programin Code-3 above.

3. Turn-On the O2 robot anddownload code.

4. Press RUN switch and seethe robot operation.

For Cricket Logo

1. Connect the O2 robot withcomputer. and Open CricketLogo software.

2. Type in Listing-3 into CricketLogo editor and type startword into Run This box.

3. Turn-On the O2 robot anddownload program.

4. Press RUN switch and see therobot operation.

How to change direction ?There are 2 kinds of turning that your robot can maneuver.

A curve like turn : The curve turn usually comprisesof one motor stop and the other move.

Turning speed = Normal speed or lessdepends on friction at the stop wheel.

Turning point is a middle point of the stopwheel.

A pivot like turn : A Pivot turn on the other handturns on its spot but this requires an oppositedirection on both wheels at the same power level.

Turning speed = 2 times of normal speedand friction less.Turning point is center point of the robotbetween both wheels.

�������

�������

For LogoBlocks

For Cricket Logo

For LogoBlocks

For Cricket Logo

�����������

����������

Code-3Listing-3

����� ���

����������

LogoBlocks’sCode-4 andCricket Logo’sListing-4 aresample pro-gram thatdemonstratesthis turningtechnique.

��������������

��������������

����������������

�������������

������������������������������

LogoBlocks’sCode-5 andCricket Logo’sListing-5 aresample pro-gram thatdemonstratesthis turningtechnique.

Code-4

Listing-4

Code-5

Listing-5

11

Page 13: ˘ ˇˇ˘ ˆ - Home Science Tools · 2017. 9. 16. · i-BOX can interface with your computer in 2 ways. One is the direct serial connection to your computer with the CX-4 cable. The

����������������� ��������� ������

Basic operation of SwitchThe Touch / Switch Sensor module consist of 3 main components, theWire input, LED Indication light and the Switch. It will be give 2 status asPress and Release switch.

Switch

Indicator

Output

Switch/Touch sensorconfiguration Switch/Touch sensor diagram

When the Switch is pressed, it sends an ON Signal through the wire, back to the i-BOXand LED is lit. When the Switch is released, an OFF Signal is recognized by the i-BOX.

LED is litLED off

Not press Press

When the switch is not pressed, alogic “1” is being sent to the output.This condition is False.

When the switch is pressed, a logic“0” is being sent to the output. Thiscondition is True.

Activity with i-BOX The Touch / Switch Sensor moduleacts as a digital sensor. Connect thesensors to IN0 to IN3 respectively.

1. Connect Switch module to IN3 ofi-BOX.

2. Make Code-6 in LogoBlocks orListing-6 for Cricket Logo anddownload the code to i-BOX.

3. Press RUN switch. Press the Switchmodule and observe the operationof Motor indicators.

IN0 to IN3

When the switch is pressed, the condition willbe true. i-BOX will drive a signal to the motoroutput. The Motor indicator LED will be lightedall time that switch still pressed. If the switch isreleased, the condition will be false. Motorindicator LED will be turned off.12

Switch’s operation

�������� �����

Code-6

Listing-6

����� ��� �

����������������������

����� ��� �

�����������

�� ��� �����

����� ���

����� ��� �

������������������������

Page 14: ˘ ˇˇ˘ ˆ - Home Science Tools · 2017. 9. 16. · i-BOX can interface with your computer in 2 ways. One is the direct serial connection to your computer with the CX-4 cable. The

Switch module

������������ ��� �� �������

Indicator

3mm. nut

3x10mm.screw

Right angle joiner

Obtuse joiner

IN0 connector

IN1 connector

Straightjoiners

Write the Code-7 to test theswitch operation. Press theswitch on the left or right.

i-BOX will generate sounds withdifferent frequencies.

This is a code of a Bumper robot to allow both of its touch sensors todetect obstacles in front of them if encountered. Download theprogram to your Bumper robot.

Prepare the test area by placing obstacles wherever you want.Then put the robot on the floor and turn on the power switch andpress the RUN switch. Observe its movements.

�������������� ������ ������������ ��

13Code-7

Listing-8

Code-8

Bumper robot will move forward until it encounters with any obstacle. If any obstaclesare encountered on the left, the robot will move backwards , rotate right and moveforward to continue its movement. If any obstacles are encountered on the right, therobot will move backwards , rotate left and move forward to continue its movement.

����� ������� �� ��� ������ � ���

����� ������� �� ��� ������ ������