Home

Kilobot User Manual - K

image

Contents

1. EXPRESSLY DISCLAIMS ALL OTHER WARRANTIES THAN STATED HEREINBEFORE EXPRESSED OR IMPLIED INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE TO THE FULLEST EXTENT PERMITTED BY LAW Limitation of Liability IN NO EVENT SHALL EITHER PARTY BE LIABLE TO THE OTHER FOR ANY INDIRECT SPECIAL INCIDENTAL OR CONSEQUENTIAL DAMAGES RESULTING FROM PERFORMANCE OR FAILURE TO PERFORM UNDER THE CONTRACT OR FROM THE FURNISHING PERFORMANCE OR USE OF ANY GOODS OR SERVICE SOLD OR PROVIDED PURSUANT HERETO WHETHER DUE TO A BREACH OF CONTRACT BREACH OF WARRANTY NEGLIGENCE OR OTHERWISE SAVE THAT NOTHING HEREIN SHALL LIMIT EITHER PARTY S LIABILITY FOR DEATH OR PERSONAL INJURY ARISING FROM ITS NEGLIGENCE NEITHER PARTY SHALL HAVE ANY LIABILITY TO THE OTHER FOR INDIRECT OR PUNITIVE DAMAGES OR FOR ANY CLAIM BY ANY THIRD PARTY EXCEPT AS EXPRESSLY PROVIDED HEREIN Kilobot User Manual I T amp AM s m 2 1 PLans Praz 133 SWITZErlanD
2. KILOBO tU User Manual TEAM version 1 3 AUGUST 2013 Documentation Author Julien Tharin K Team S A Z I des Plans Praz CH 1337 Vallorbe Switzerland Finail iiS dk iam cond Url www k team com Documentation version Version Author Description 09 12 2011 J Tharin First draft 15 03 2012 J Tharin Updated for new Kilobots version 13 07 2012 F Lambercy Colour of OHC led corrected chapter 4 2 3 12 08 2013 J Tharin Usb cable connection only one chapter 4 2 3 added V REP simulation Trademark Acknowledgements IBM PC International Business Machines Corp Macintosh Apple Corp SUN Sparc Station SUN Microsystems Corp LabVIEW National Instruments Corp Matlab MathWorks Corp Webots Cyberbotics Ltd Logitech Logitech Int SA Gumstix Gumstix Inc Khepera K Team SA V REP Coppelia Robotics LEGAL NOTICE e The contents of this manual are subject to change without notice e All efforts have been made to ensure the accuracy of the content of this manual However should any error be detected please inform K Team e The above notwithstanding K Team can assume no responsibility for any error in this manual TABLE CONTENTS 1 INTRODUCTION 1 INTRODUCTION Thank you for buying Kilobot robots collective algorithms on hundreds or thousands of robots accessible to robotics researchers Though the Kilobots are low cost they main
3. AND INSPECTION 2 1 Package Contents They are 3 different packages sold separately They are containing the following items e The robot package CD ROM 10 Kilobot robots e The overhead controller package 1 overhead controller CD ROM 3 cables 1 usb a 6 wire cable and a 2 wire cable e The charger package 1 charger transformer CD ROM f multiple packages are ordered together only one CD ROM will be shipped 4 Kilobot User Manual 2 UNPACKING AND INSPECTION 2 2 Inspection The material should be checked after unpacking For the Kilobots robots check that their legs are not bended The charging tab also must not be bended The jumper and the battery should be present see figure 3 1 The battery should be plugged with the negative on top opposite of the battery holder marks For the Overhead controller check that the LEDS are not bended or broken The jumper for firmware programming should be present see figure 3 2 Kilobot User Manual 5 3 DESCRIPTION 3 DESCRIPTION 3 1 Overview 3 1 1 Kilobot robot key elements are indicated for later references g Figure 3 1 Kilobot overview CD 3 7 Volt Battery up down Direct programming socket 2 Power jumper Charging Tab 8 Vibration motors 9 IR Transmitter 4 LED Red Green Blue IR Receiver 5 Ambient light sensor D Robot leg 6 Serial output header 6 Kilobot User Manual 3 DESCRIPT
4. After the charge is finished you can remove the robots from the charger and use them as normal with the Kilobot Controller push the Pause button to go back to pause mode red indicator indicating lower bar Figure 4 12 Kilobots on charger Kilobot User Manual 21 4 USAGE 4 3 4 Debugging With the kprinti and kprints functions you can get a feedback from the robot You must connect the robot to the OHC with the 2 wire cable respecting the polarity on the robot as shown in the figure below see figures 3 1 and 3 2 for the connectors place J debug cable Figure 4 13 Debug settings Install Realterm a terminal that can use alternate baud rates Launch your program with the Run button of the Kilobot Controller Close the Kilobot Controller if it is open Tam ip g Find the USB serial port number used by the OHC in the Device Manager of your computer 5 Connect Realterm to the number of the USB serial port found above with a baud rate of 256000 22 Kilobot User Manual 4 USAGE 4 3 5 Kilobots API The different functions specially developed for the Kilobots are explained below Numerous other functions and AVR C programming examples can be found on the web set motor cw motor ccw motor Set motor speed PWM values for motors between 0 off and 255 full on for cw motor and ccw motor Examples for moving forward set motor cw in straight ccw in straight for turn
5. The brightness of the ambient light shining on a Kilobot can be detected A Kilobot can sense its own battery voltage e Movement Each Kilobot has 2 vibration motors which are independently controllable allowing for differential drive of the robot Each motor can be set to 255 different power levels 8 Kilobot User Manual Light Software Programming Debug 3 DESCRIPTION Each Kilobot has a red green blue RGB LED pointed upward and each color has 3 levels of brightness control The Kilobot Controller software is available for controlling the controller board sending program files to the robots and controlling them For programming the open source development software WinAVR combined with AvrStudio from Amtel gives a C programming environment An API with basic functions such as motor speed led control distance measurement is available and some examples are provided A serial output header is available on each robot for debugging via computer terminal Kilobot User Manual 9 4 USAGE 4 USAGE 41 Required hardware software The required hardware and software to use the board and develop programs are described below 4 1 1 Required hardware e Computer with Microsoft Windows and an USB port not included e Kilobot robot e Over head controller e Kilobot charger 4 1 2 Required software Required files e Microsoft NET Framework 2 0 Service Pack 2 i ttp www microsoft c
6. the button to browse for a program file as shown and select the program hex file you just built located at c KilobotController dev default KilobotSkeleton hex File Advanced Help Programming Program file C KilobotController Program hex m Gree s Pn ke Cities Boodoadermsg Wakeup Reset Toggle LEDs Figure 4 7 Kilobot Controller software 6 Press the Program Flash button to program the OHC a black window will pop up 7 Place ALL Kilobot robot in PAUSE mode LED flashing yellow underneath the OHC and press the Bootload button in KilobotController exe The Kilobot will first quickly flash red gt green gt blue to indicate it is now in the PROGRAMMING mode Within 5 seconds the LED will begin to flash blue and continue flashing while it is receiving the new program Once the LED has stopped flashing blue and switch to the flashing yellow Kilobot User Manual 17 4 USAGE of pause mode approximately 30 seconds press the Stop button in KilobotController exe 8 To run the program on the robot press the button in KilobotController exe The new program should execute 9 Press the Pause button in KilobotController exe to stop the program Note the robot needs to be in pause mode before programming can begin E You can find in annex 5 1 examples of source code 4 3 2 OHC Use System Setup Kilobots should be operated on a smoot
7. ION 3 1 2 Overhead controller OHC locations of various key elements are indicated for later references Figure 3 2 Overhead controller overview D Overhead controller board 5 Firmware programming jumper 2 Connector for USB cable Diode for OHC connection test 8 Connector for debug cable 7 Power on LED 4 Connector for firmware programming IR LED Kilobot User Manual 7 3 DESCRIPTION 3 2 Kilobot Hardware The hardware of the Kilobot is described thereafter The robot has a microcontroller ATmega 328p 8bit 8MHz as CPU It contains these following types of memory o 32KB Hlash used for both user program and bootloader o 1KB EEPROM for storing calibration values and other non volatile data and 2KB SRAM Its other features are described in detail below e Battery Rechargeable Li Ion 3 7V for a 3 months autonomy in sleep mode Each Kilobot has a built in charger circuit which charges the onboard battery when 6 volts is applied to any of the legs and GND is applied to the charging tab e Charging Kilobot charger optional e Communication Kilobots can communicate with neighbors up to 7 cm away by reflecting infrared IR light off the ground surface e Sensing When receiving a message distance to the transmitting Kilobot can be determined using received signal strength The distance depends on the surface used as the light intensity is used to compute the value
8. and then go to sleep The motors are now calibrated WARNING Don t switch off the robot now otherwise it will go back to calibration mode when rebooting 8 When done be sure to load Controller hex back into the OHC with the Advanced menu Select alternative controller file 9 Push wake up button on the OHC 10 Program the robot with the KilobotFirstFirmware hex or your program 11 You can switch off the robot now or put it in sleep mode Kilobot User Manual 27 4 USAGE 4 3 7 Simulation get ambient light function is implemented only in the following because it takes 1 5 more time of simulation http ftp k team com V REP models Kilobot models Kilobot light intensity ttm e For the _delay_ms x function as it must be non blocking you need to implement it like this for example delay ms 50 use a state variable here substate substate 0 function user_prgm wait 50 ms if substate 0 then delay_start simGetSimulationTime elseif Substate 1 then if _delay_ms 50 1 then waited substate 0 end 28 Kilobot User Manual 4 USAGE You can find some V REP scenes with Kilobot examples there Kilobots messages ttt 5 robots move and display their distances to each others with their led Kilobots_ messages ttt 4 robots send messages to each other to determinate the one that has the biggest id number Kilobots_ around ttt robots move around other static robots keeping dis
9. anufacturers in performing warranty repairs and replacement of the Product Even if K TEAM repairs or replaces the Product its original warranty term is not extended This limited warranty is invalid if the factory applied serial number has been altered or removed from the Product Kilobot User Manual 6 WARRANTY This limited warranty covers only the hardware and software components contained in the Product It does not cover technical assistance for hardware or software usage and it does not cover any software products contained in the Product K TEAM excludes all warranties expressed or implied in respect of any additional software provided with Product and any such software is provided AS IS unless expressly provided for in any enclosed software limited warranty Please refer to the End User License Agreements included with the Product for your rights with regard to the licensor or supplier of the software parts of the Product and the parties respective obligations with respect to the software This limited warranty is non transferable It is likely that the contents of Customer s flash memory will be lost or reformatted in the course of the service and K TEAM will not be responsible for any damage to or loss of any programs data or other information stored on any media or any part of the Product serviced hereunder or damage or loss arising from the Product not being available for use before during or after the period of service provid
10. cable to the side to ensure a good connection Figure 4 5 communication connector Kilobot User Manual 15 4 USAGE 6 Setrobot fuses In Avr studio AVRISP programming window go to the fuses tab Select only the following fuses spien EESAVE BOOTSZ boot flash size 2048 word start address 3800 SUT CKSEL int RC Osc 8 MHz startup time PWRDWN RESET 6 CK 14CK 65 ms This should result in the following fuse values extended 0xFF high 0xD1 low 0xE2 7 In the Autoconnect pop up window in AVRstudio press program It should take a few seconds to program the robot and the robot may vibrate 8 Put the firmware programming jumper of the OHC in the back to the standard position Figure 4 6 firmware jumper normal mode Kilobot User Manual 4 USAGE 4 3 Usage 4 3 1 Programming a kilobot group with a new program 1 In c KilobotController dev double click on Kilobot aps for opening the project 2 In KilobotSkeleton c locate the following section VB MM I fuser program code goes here this code needs to exit in a reasonable amount of time so the special message controller can also run VIDI MM I 3 Immediately after this is where the user code is written Note that the user code should not contain long blocking functions otherwise the robot may not respond to the overhead controller properly 4 Once program is written in AVRstudio select Build gt build 5 Run KilobotController exe click
11. cw rotation mode 1 else if clock lt 120000 if mode 2 move forward set motor 0xa0 0xa0 spin up both motors to overcome friction delay ms 30 set motor cw in straight in straight set both motor to calibrated value for good forward movement mode 2 else if clock 160000 if mode 3 set_motor 0x00 0x00 turn off motors mode 3 else if clock lt 200000 mode 5 clock 0 reset clock to start cycle over agian Kilobot User Manual 31 5 ANNEXES 5 1 3 Random see neighbors stop else static int time 0 if one_time 0 if this is the start of the program only run this if statement once for int 120 1 30 12 4 randseed measure_voltage generate some random sensor data one_time 1 indicate that the first time if statement has now run srand randseed seed random variable with some sensor data static int neighbor 0 1 if i ve seen any neighbors 0 if not static int movement 0 1 if moving 0 if stopped static int start move 0 1 if the movement has changed 0 if not check to see if i have received any new messages if so then i have seen neighbors get message if message_rx 5 1 neighbor 1 Af 1 am currently not moving and want to start moving if start_move 1 if movement 0 set motor 0xa0 0xa0 spin up motors delay ms 30 set motor cw in straight ccw in straight set to move straight j else i
12. ed or any indirect or consequential damages resulting therefore IF DURING THE REPAIR OF THE PRODUCT THE CONTENTS OF THE FLASH MEMORY ARE ALTERED DELETED OR IN ANY WAY MODIFIED K TEAM IS NOT RESPONSIBLE WHATEVER CUSTOMER S PRODUCT WILL BE RETURNED TO CUSTOMER CONFIGURED AS ORIGINALLY PURCHASED SUBJECT TO AV AILABILITY OF SOFTWARE Be sure to remove all third parties hardware software features parts options alterations and attachments not warranted by K TEAM prior to Product service K TEAM is not responsible for any loss or damage to these items This warranty is limited as set out herein and does not cover any consumable items such as batteries supplied with the Product any accessory products which is not contained in the Product cosmetic damages damage or loss to any software programs data or removable storage media or damage due to 1 acts of God accident misuse abuse negligence commercial use or modifications of the Product 2 improper operation or maintenance of the Product 3 connection to improper voltage supply or 4 attempted repair by any party other than a K TEAM authorized module service facility This limited warranty does not apply when the malfunction results from the use of the Product in conjunction with any accessories products or ancillary or peripheral equipment or where it is determined by K Team that there is no fault with the Product itself Kilobot User Manual 35 36 6 WARRANTY
13. f movement 1 set motor 0 0 5 up motor delay ms 30 set motor 0O ccw in place set to move else set motor 0xa0 0 spin up motor delay ms 30 set motor cw in place 0 set to move cw start move 2 mark that i am currently moving else if start_move 0 i do not want to move every 2000 counts of clock check to see if i ve seen any neighbors hf i have there is a 2096 chance i will change my movement such as straight to cew if clock gt 2000 set_motor 0 0 stop motors 32 Kilobot User Manual 5 if rand 26100 20 update robot movement 20 of the time int rand_d rand 100 if rand d 25 Af updating robot movement 25 of the time move ccw if movement 1 movement 1 if start_move 2 start_move 1 else if rand_d lt 50 if updating robot movement 25 of the time move cw if movement 2 movement 2 if start_move 2 start_move 1 else if updating robot movement 50 of the time move straight if movement 0 movement 0 if start_move 2 start_move 1 i ve received a message from a neighbor in the last 2000 counts of clock and i am not moving start moving and turn my rgb led red if neighbor 1 set_color 1 0 0 if start_move 0 start_move 1 else hf 1 have not received a message from a neighbor in the last 2000 counts of clock stop moving and tu
14. h flat surface to ensure proper robot mobility To aid communication the surface should be glossy or reflective A mirror or dry erase whiteboard oriented horizontally is recommended The overhead controller should be hung above the Kilobots at a distance of about one meter The robots beneath the OHC in a about a one meter diameter region will be able to receive communication from the OHC as shown in figure 4 8 1m i m i m m m um m m m m m m m m CeO 1m Figure 4 8 System setup 18 Kilobot User Manual 4 USAGE Overhead Controller OHC Interface Overview File Advanced Help Programming Program C KilobotController Program hex Ig Bootload Sleep Pause Run Battery voltage Figure 4 9 Programming Panel USB port configured 1 Program file browse for the compiled Kilobot user program hex file to be sent to the Kilobots usually in c KilobotController dev default 2 Program Flash send the program and controller files to the OHC File Advanced Help Programming Program C KilobotController Program hex m Program Flash Battery voltage Boctloadermsg Wakeup Reset Chame Toggle LEDs Stop USB port configured Figure 4 10 Connection Status You can see if the OHC is connected to the pc or not fig 4 10 Below in figure 4 11 is the Button Panel with a description of the b
15. ing right set motor cw in place 0 for turning left set motor 0 ccw in place Set motor 100 100 Note that there are 4 calibration values used with the motors cw in place value for cw motor to turn the robot cw in place note motor should be off ccw in place value for ccw motor to turn the robot ccw in place note cw motor should be off cw in straight value for the cw motor to move the robot in the forward direction ccw in straight value for the motor to move the robot in the forward direction delay ms x Busy wait for x milliseconds interrupts can still trigger max value for milliseconds 4000 Example delay ms 250 set color r g b Set LED color values can be from O off 3 brightest Example set color 7 1 kprinti int Print integer over serial port be careful can effect timing Example kprinti 2 kprints string Print string up to 10 characters be careful can effect timing Kilobot User Manual 23 24 4 USAGE Example kprints HelloWorld message out xO tx1 tx2 Set message values to be sent over IR every 2 seconds 3 bytes tx0 tx 1x2 tx2 56 must not be used Example message out 0x01 0xFF OxFE get message Take oldest message off of rx buffer message It is only new if message rx 5 2 1 If so message is in message rx 0 and message rx 1 distance to transmitting robot in mm is in message rx 3 The distance depends on the s
16. m and blink red if they are actively charging if not the RGB led will turn off 10 Toggle LEDs flashes the LEDs on the OHC 11 Stop stops whatever the OHC is doing This can be used to stop functions that are continuous such as wakeup or bootloading Kilobot User Manual 4 USAGE 4 3 3 Charger A charger for up to 10 Kilobots is available as an optional item l cable to 6V charger outside inside connector of the 6V cable outside inside Put the Kilobots charger on a flat surface having the bar with the red indicator below and the black above WARNING if the color position is not respected that will not work and may damage the charger or the robots Plug the Kilobots charger transformer to the charger and to a power socket Pay attention to the polarization 4 outside inside WARNING if the polarization is not respected that will not work and may damage the charger or the robots Switch the Kilobots on put the power jumper as in figure 4 4 Pay attention to respect the bar side and the cable polarization as explained above in 1 and 2 Then hang the Kilobots as specified in the figure below The bar with the red indicator is in contacts of the legs of the robots and is the positive With the Kilobot Controller push the Charge button The robot will stop the current program and enter in charge mode indicated by a blinking red If the charge is done the RGB led will turn off
17. o the PC the power LED of the OHC should turn green 3 Run the KilobotController exe program and click the Toggle LEDs button to test that a connection is made Fig 4 2 This should blink the red LEDs on the controller File Advanced Help Programming Programfile C KilobotController Program hex Bootload Sleep Pause Run Battery voltage mme Tooge LEDs USB port configured Connected Figure 4 2 OHC software buttons Kilobot User Manual 13 4 USAGE 4 2 4 Kilobot bootloader programming The Kilobot is delivered with a bootloader already installed Therefore this step can be SKIPPED But If you would like to reinstall the bootloader or install a newer one follow the instructions below 1 In AVR Studio select Tools 2 ProgramAVR Autoconnect 2 In the window that pops up under the program tab in the flash category select the input hex file to be KilobotFirstFirmware hex 3 Put the firmware programming jumper of the OHC in the firmware mode position and connect the firmware cable figure 4 3 Figure 4 3 firmware cable and jumper in firmware mode 14 Kilobot User Manual 4 USAGE 4 Turnon the robot by adding the power jumper as shown in figure 4 4 Figure 4 4 power jumper 5 Connect the AVRisp programmer to the robot as shown in figure 4 5 Make sure that the programmer pins do not touch the motor on the back side Gently press the program
18. oid any short circuit and damage to the robots avoid contact with metallic lonely wires and other conducting materials 1 3 Recycling Think about the end of life of your product Parts of the board can be recycled and it is important to do so By recycling you can help to create a cleaner and safer environment for generations to come For those reasons please take care to the recycling of your product at the end of its life cycle for instance sending back the product to the manufacturer or to your local dealer Thanks for your contribution to a cleaner environment 2 Kilobot User Manual 1 4 Specifications 1 INTRODUCTION The main specifications of the Kilobot robot are listed below Processor Memory Battery autonomy Charging Communication Sensing Movement Light Software Programming Dimensions A Tmega 328p 8bit 8MHz o 32 Flash o EEPROM Rechargeable Li Ion 3 7V 3 10 hours continuously 3 months in sleep mode Kilobot charger for 10 robots simultaneously optional IR up to 7cm up to 32kb s and Ikbyte s with 25 robots serial 256000 baud IR and 1 light intensity forward rotation 1cm s 45deg s one RGB led Kilobot Controller software for controlling the robot C language with WinAVR compiler combined with AvrStudio diameter 33 mm height 34 mm including the legs without recharge antenna Kilobot User Manual 3 2 UNPACKING AND INSPECTION 2 UNPACKING
19. om en us download details aspx id 1639 These files are included in the delivered from the CD ROM e The compiler WINAVR software compiler WinA VR 20100110 install exe e The editor AVR Studio 4 software editor avrstudio4 1 9s etup exe e Kilobot controller and programming skeleton project files VERSION is the version of the files software source_code KilobotController_VERSION zip This archive contains dev development directory dev default compiled object and program directory dev KilobotSkeleton aps Studio editor project configuration dev KilobotSkeleton aws AVR Studio editor workspace file 10 Kilobot User Manual 4 USAGE e dev KilobotSkeleton c e dev libkilobot c e dev libkilobot h e FTDI32 e FTDI64 e STK500 e Controller hex e KiloBot Controller exe e KilobotFirstFirmware hex e Kilobot motor cal hex motor cal hex e Program hex e Readme txt RealTerm terminal for debugging source code skeleton where you start programming kilobot library source code kilobot library source code header directory for 32 bit driver for USB driver directory for 64 bit driver for USB driver directory for Atmel AVR Flash controller normal firmware Kilobot Controller program robot first firmware robot calibration program controller motor calibration firmware copied current robot program readme software terminal Realterm_2 0 0 70_setup exe Kilobot User Manual 4 USAGE Ins
20. rn my RGB led off set color 0 0 0 start 0 clock 0 reset clock neighbor 0 reset neighbor count Kilobot User Manual 33 6 34 6 WARRANTY WARRANTY K TEAM warrants that the Kilobot is free from defects in materials and workmanship and in conformity with the respective specifications of the product for the minimal legal duration respectively one year from the date of delivery Upon discovery of a defect in materials workmanship or failure to meet the specifications in the Product during the afore mentioned period Customer must request e the type of Kilobot used version e the kernel version of the Kilobot e the programming environment of the robot standard version OS e the standard use of Product before the appearance of the problem e the description of the problem If no answers have been received within two working days Customer can contact K TEAM support by phone or by electronic mail with the full reference of its order and Kilobot serial number K TEAM shall then at K TEAM s sole discretion either repair such Product or replace it with the equivalent product without charging any technical labor fee and repair parts cost to Customer on the condition that Customer brings such Product to K TEAM within the period mentioned before In case of repair or replacement K TEAM may own all the parts removed from the defective Product K TEAM may use new and or reconditioned parts made by various m
21. tain abilities similar to other collective robots These abilities include differential drive locomotion on board computation power neighbor to neighbor communication neighbor to neighbor distance sensing and ambient light sensing Additionally they are designed to operate such that no robot requires any individual attention by a human operator This makes controlling a group of Kilobots easy whether there are 10 or 1000 in the group You can find more information directly on the designer website http www eecs harvard edu ssr projects progS A kilobot html 1 1 How to use this handbook This handbook introduces the Kilobot and its various operating modes For a quick start jump to chapter 4 USAGE e Unpacking and Inspection Kilobot package description and first use e Description Kilobot description e Usage Kilobot usage descriptions Annexes Examples of source code Kilobot User Manual 1 1 INTRODUCTION 1 2 X Safety precautions Here are some recommendations on how to correctly use the Kilobot e Keep the board away from wet area Contact with water could cause malfunction and or breakdown e Store your board in a stable position This will avoid the risks of falling which could break it or cause damage to a person e Do not plug any connectors while the board is powered on To avoid any damage make all connections when the board power is off e Keep the board away of conducting materials To av
22. tallation The following sub chapters explain the software and installations 4 2 1 Install the software Install WINAVR compiler if not already done Install also AVR Studio 4 editor If you did not install WINAVR in the default install directory C WinA VR 201001 10 you will have to tell AVR studio where is the compiler and the maker In AVR Studio Project menu select Configuration Options sub menu and choose the Custom Option Under External tools with the button on the bottom right select for avr gcc the file avr gcc exe in the 20100110 directory and for make the file make exe in the directory WinAVR 201001 10 utils bin Decompress KilobotController VERSION zip in c 4 2 2 Overhead Controller OHC Software Installation Open KilobotController exe from c KilobotController In the Help menu of KilobotController exe select Installation and programming and follow the instructions to install the software and drivers Fig 4 1 Kilobot User Manual 4 USAGE File Advanced Help Programming Installation and programming About Kilobot Controller Program file C KilobotController Program hex Stop No port available Disconneted Figure 4 1 software 4 2 3 Overhead Controller Hardware Installation Check that the firmware jumper is plugged at the correct place figure 4 6 2 Connect the USB cable t
23. tance Kilobot User Manual 29 5 5 ANNEXES 5 1 Examples of source code These examples of source code have different purposes described in there titles 5 1 1 Transmits data to neighbors and blinks led when the message is received message out 255 255 0 set message to be sent over IR enable tx 1 enable transmission of message every 2 seconds check for message get message if message_rx 5 1 new message has been received set color 1 1 1 tarn RGB LED white kprinti message rx 0 send first byte of received message over serial debug cable kprinti message_rx 1 send second byte of received message over serial debug cable kprinti message rx 3 send measured distance from transmitting robot over serial debug cable kprints delay ms 10 wait 10 ms set color 0 0 0 turn RGB LED off 5 1 2 Non blocking timed movement static int mode 0 mode represents state if clock 40000 clockwise rotation if mode 0 30 Kilobot User Manual 5 set motor 0xa0 0 spin up cw motor to overcome friction delay ms 30 set motor cw in place 0 set cw motor to calibrated value for good cw rotation mode 0 else if clock lt 80000 if mode 1 counter clockwise rotation set motor 0 0xa0 spin up ccw motor to overcome friction _delay_ms 30 set_motor 0 ccw_in_place set ccw motor to calibrated value for good
24. tor cal hex to the OHC with the advanced menu Select alternative controller file and push Program flash button to reprogram the Kilobot Controller in motor calibration mode Figure 4 14 3 In the OHC software select the Motor calibration sub menu of the advanced menu Kilobot Controller _ irf d Advanced Select alternative controller file Motor calibration Pugamtle C KilobotController Program hex Program Flash Bootload Sleep Pause Run Battery voltage Bootloader msg Wake Reset Charge Toggle LEDs gt Figure 4 14 Advanced menu 4 Place the Kilobot under the OHC and push the button More cw or Less cw to adjust the calibration of the clock wise rotation for the robot Kilobot Controller palsies Programming Program file C KilobotController Program hex sf More CW More CCW Store values Figure 4 15 Motors calibration 5 When clock wise rotation is good click More CCW once Now you can use the more CCW and the Less CCW buttons to calibrate the robots CCW rotation 26 Kilobot User Manual 4 USAGE 6 When CCW rotation is good click the More cw button once Now you can use the More CCW Less CCW More CW Less CW buttons to adjust the robots straight calibration value 7 When the robots straight movement is good click Store values The robot will store calibration values in EEPROM
25. urface used as the light intensity is used to compute the value Example get message if message_rx 5 1 data message rx 0 distance message_rx 3 enable_tx to turn off the transmitter set enable tx 0 to turn on the transmitter set enable_tx 1 Example if Want_To_Transmit TRUE enable_tx 1 else enable_tx 0 measure_charge_status Measure if battery is charging returns 0 if no 1 if yes Example if measure_charge_status charging TRUE else charging FALSE measure_voltage Measure battery voltage returns voltage in 01 volt units for example if 394 is returned then the voltage is 3 94 volts Example current_voltage measure_voltage Kilobot User Manual 4 USAGE get ambient light Returns the value of ambient light note will return 1 if there is an incoming message which also uses a d note turns off interrupts for a short while to sample a d Example local brightness get ambient light Kilobot User Manual 25 4 USAGE 4 3 6 Motors calibration If you see that the robot is no more moving forward and does not rotate well anymore you can try to recalibrate its motors with the instructions below But as already said before the Kilobot should be operated on a smooth flat surface to ensure proper robot mobility 1 Upload the motors calibration receiver program Kilobot motor cal hex to the robot 2 Choose the calibration transmitter program OHC mo
26. uttons functionality Kilobot User Manual 4 USAGE File Advanced Help Programming Program file C KilobotController Program hex m USB port configured Connected 20 Figure 4 11 Button Panel Bootload transmit the kilobot user program from the OHC to the Kilobots which takes about 30 seconds Ensure all robots are in pause mode before bootloading Sleep put Kilobots in low power SLEEP mode They will wake up briefly every 60 seconds to check if a wakeup message is being sent The robots conserve energy in this mode and can stay in sleep for months without recharging Pause put Kilobots in idle PAUSE mode and is also used to prepares robots to be reprogrammed Run initiates Kilobots user program 5 Battery Voltage instructs Kilobots to indicate their battery voltage through the LED where green indicates a battery voltage over 4V blue indicates a voltage between 3 75 and 4 yellow indicates a voltage between 3 5 and 3 75 and red indicates a voltage under 3 5 volts Bootloader msg sends a message for all robots to exit their program and jump to the bootloader Wakeup take Kilobots out of low power SLEEP mode This message will transmit untill stop is pressed It will take a minute or two for all the robots to wake up 8 Reset restarts the Kilobot program Charge instructs Kilobots to enter CHARGE mode for battery recharging The robots will stop the user progra

Download Pdf Manuals

image

Related Search

Related Contents

維持管理要領書  Wright Products VIL333SN Instructions / Assembly  Samsung PS-50P5H Εγχειρίδιο χρήσης  Manual de Usuario  PDF - 5,05 MB  Installation: Industrial Wireless LAN Client BAT-C  BILLMASTER – Desktop Manual and Tutorials  D EXCAVADORA  www.dewalt.eu  Barnett Engineering CV2 User's Manual  

Copyright © All rights reserved.
Failed to retrieve file