background image

Fire Bird V ATMEGA2560 Hardware Manual

© NEX Robotics Pvt. Ltd. and ERTS Lab, CSE, IIT Bombay, INDIA                                      1

Summary of Contents for FIREBIRD V ATMEGA 2560

Page 1: ...Fire Bird V ATMEGA2560 Hardware Manual NEX Robotics Pvt Ltd and ERTS Lab CSE IIT Bombay INDIA 1...

Page 2: ...Fire Bird V ATMEGA2560 Hardware Manual FIRE BIRD V HARDWARE MANUAL NEX Robotics Pvt Ltd and ERTS Lab CSE IIT Bombay INDIA 2...

Page 3: ...gesh R CSE M Tech IIT Bombay Inderpreet Arora EE M Tech IIT Bombay Prof Kavi Arya CSE IIT Bombay Prof Krithi Ramamritham CSE IIT Bombay Kunal Joshi NEX Robotics Nandan Salunke RA CSE IIT Bombay Pratim...

Page 4: ...under the Creative Commence cc by nc sa license For legal information refer to http creativecommons org licenses by nc sa 3 0 legalcode Robot s electronics is static sensitive Use robot in static free...

Page 5: ...ery level indicator Auxiliary power connector and battery charging connectors are separated and require a single unified connector from the AC adapter 3mm IR proximity Sensors are replaced with 5mm IR...

Page 6: ...V ATMEGA2560 8 3 Using Fire Bird V Robot 13 4 Pin Functionality 78 5 Upgrading Robot s Hardware 88 6 PC Based Control Using Serial Communication 96 7 Robot Control using GUI for Fire Bird V ATMEGA2560...

Page 7: ...ided on the robot Never allow NiMH battery to deep discharge Mount all the components with correct polarity Keep wheels away from long hair or fur Keep the robot away from the wet areas Contact with w...

Page 8: ...the same main board and other accessories Different family of microcontrollers can be added by simply changing top microcontroller adapter board Fire Bird V supports ATMEGA2560 AVR P89V51RD2 8051 and...

Page 9: ...60 Hardware Manual Figure 2 2 ATMEGA2560 AVR P89V51RD2 8051 and LPC2148 ARM7 microcontroller adapter boards for Fire Bird V Figure 2 3 Fire Bird V ATMEGA2560 robot NEX Robotics Pvt Ltd and ERTS Lab CS...

Page 10: ...ed architecture All Robots use the same main board and microcontroller adapter boards Fire Bird V Fire Bird V Tank Fire Bird V Omnidirectional Robot Fire Bird V Insect Fire Bird V Hexapod Fire Bird V...

Page 11: ...Fire Bird V ATMEGA2560 Hardware Manual 2 2 Fire Bird V Block Diagram Figure 2 5 Fire Bird V ATMEGA2560 robot block diagram NEX Robotics Pvt Ltd and ERTS Lab CSE IIT Bombay INDIA 11...

Page 12: ...eless mode Communication USB Communication Wired RS232 serial communication Wireless ZigBee Communication 2 4GHZ if XBee wireless module is installed Wi Fi communication if Wi Fi module is installed B...

Page 13: ...lained in detail It is very important that user go through chapter before starting to use robot Fire Bird V robot has 6 important modules 1 Power management 2 Sensing 3 Actuation locomotion 4 Other pe...

Page 14: ...d V ATMEGA2560 Hardware Manual 3 1 Connections Figure 3 2 Fire Bird V ATMEGA2560 robot bottom view Figure 3 3 ATMEGA2560 microcontroller adapter board NEX Robotics Pvt Ltd and ERTS Lab CSE IIT Bombay...

Page 15: ...Fire Bird V ATMEGA2560 Hardware Manual Figure 3 4 Top view of the main board NEX Robotics Pvt Ltd and ERTS Lab CSE IIT Bombay INDIA 15...

Page 16: ...ATMEGA2560 Hardware Manual Figure 3 5 Bottom view of the main board Figure 3 6 Microcontroller adapter board socket connection numbers on the main board NEX Robotics Pvt Ltd and ERTS Lab CSE IIT Bomb...

Page 17: ...for approximately 2 hours Battery is fixed using Velcro strap so that it can be replaced easily In case the experiments are to be performed for an extended period robot can also be powered by externa...

Page 18: ...bot is turned OFF To do this move the power switch towards the AP Figure 3 8 shows the battery connector Insert battery s 5 pin relimate connector in the socket To turn ON the robot move power switch...

Page 19: ...correct charging profile for the batteries To avoid any accidental damage to the batteries do not use external battery charger Warning Charge the battery as per the instructions given in this manual D...

Page 20: ...H battery pack has 5 pin 2510 relimate connector which will fit into the connector on the main board only in one orientation Do not force the connection in any other way Figure 3 9 Battery Connector o...

Page 21: ...e can fall below 6 3V momentary Voltage regulators will not be able to function properly below 6 3V and their output will fall below 5V In this case the microcontroller can reset To extend the usable...

Page 22: ...er adapter socket 3 3 3 Current sensing Fire Bird V robot can sense its current consumption using optional Hall Effect current sensor ACS712 ACS714 Figure 3 12 Current sensing in Fire Bird V Sensor s...

Page 23: ...cks state of battery before initiating the charging process While charging the battery by looking at battery voltage current and temperature it selects optimal charging algorithm Battery charge status...

Page 24: ...ep followed by 2 short beeps repeated after delay of 1 second continuously 2 Battery entered in the charging mode When AC adapter is connected to the battery charging connector and powered up and if r...

Page 25: ...e capacity To do this you can load any motion program from the Experiments folder which is located in the documentation CD and discharge the batteries after charging Warning Never ever attempt to char...

Page 26: ...ttery and Auxiliary supply To run the robot on the auxiliary power use following steps 1 Disconnect the battery by removing the 5pin relimate connector on the main board which is located at the bottom...

Page 27: ...ow warning Before storage charge the battery again For discharging the battery quickly you can load any program from the Experiments folder of the documentation CD Program involving motion discharges...

Page 28: ...tor s axles to give a position feedback to the microcontroller Figure 3 17 DC geared motors and position encoders Motion control involves velocity and direction control Motors are controlled by L293D...

Page 29: ...gure 3 19 Pulse Width Modulation PWM Figure 3 19 shows the PWM waveforms for motor velocity control In case A ON time is 90 of time period This wave has more average value and hence more power is deli...

Page 30: ...uirement SOFT LEFT Left wheel stop Right wheel forward 0 0 1 0 As per velocity requirement SOFT RIGHT 2 Left wheel stop Right wheel backward 0 0 0 1 As per velocity requirement SOFT LEFT 2 Left wheel...

Page 31: ...ch 6 pin relimate connector provides connections for the DC motor and the associated position encoder Each connector can drive motor with up to 600mA current rating Figure 3 18 shows the locations of...

Page 32: ...n 1 VCC 5V System 2 Position Encoder data 3 NC 4 GND 5 Motor 2 6 Motor 1 Table 3 6 Motor connector port pin connections Figure 3 22 Schematic of the motion control module and the position encoder NEX...

Page 33: ...No 5 OC3A AIN1 PE3 PWM output for C2 motor drive Output 68 38 OC5A PL3 PWM for left motor Output 50 39 OC5B PL4 PWM for right motor Output 54 40 OC5C PL5 PWM for C1 motor Output 48 71 PA7 C2 2 Logic i...

Page 34: ...les or Hercules lite from NEX Robotics which can drive motors up to 36V and 30Amps to the external motor interface ports Location of L293D ICs is shown in figure 3 18 and External Motor Interface port...

Page 35: ...IR LED and the photo transistor mounted in front of each other separated by a slot and encased in black opaque casing and facing each other through narrow window When IR light falls on the photo tran...

Page 36: ...n Board Pin No 6 OC3B INT4 PE4 External Interrupt for the left motor s position encoder Input 62 7 OC3C INT5 PE5 External Interrupt for the right motor s position encoder Input 63 8 T3 INT6 PE6 Extern...

Page 37: ...the ATMEGA2560 microcontroller and soldering pad for TSOP1738 connection on the microcontroller socket is open After these two precautions are taken solder pad P1 on the main board to connect C1 moto...

Page 38: ...re rotating in opposite direction encoder resolution is in degrees Distance between Wheels 15cm Radius of Circle formed in 3600 rotation of Robot Distance between Wheels 2 7 5 cm Distance Covered by R...

Page 39: ...le formed in 3600 rotation of Robot Distance between Wheels 15 cm Distance Covered by Robot in 3600 Rotation Circumference of Circle traced 2 x 15 x 3 14 94 20 cm or 942 mm Number of wheel rotations o...

Page 40: ...tion and not on the reflected light intensity Figure 3 30 shows the internals of the sensor Figure 3 31 explains how change in the distance from the obstacle can be measured by measuring angle of refl...

Page 41: ...rs from Sharp Microelectronics GP2D120 GP2D12 GP2Y0A02YK Figure 3 32 Sharp IR Range sensors for Fire Bird V Sensor Range Blind Spot GP2D120X 30cm to 20cm 4cm to 0cm GP2Y0A02YK 80cm to 10cm 10cm to 0cm...

Page 42: ...USED FOR UC pin correct I O setting 15 OC4A PH3 Sharp IR ranges sensor 1 to 5 disable Turns off these sensors when output is logic 1 Output 84 PK5 ADC13 PCINT2 1 ADC input for Sharp IR range sensor 5...

Page 43: ...m 1 to 5 in the clockwise direction Figure 3 34 shows the schematics of the MOSFET and jumper which controls switching on off of the sensors Sharp IR range sensor 1 to 5 are controlled by the MOSFET M...

Page 44: ...KL Turn on LCD back light LCD Back light 20mA J1 2 IRP Turns on all 8 IR proximity sensors IRP 51mA all 8 IR proximity sensors J1 3 SHARP Turns on installed Sharp IR range sensors SHARP 25mA per senso...

Page 45: ...the obstacle there is no reflected light hence no leakage current will flow through the photo diode and output voltage of the photo diode will be around 3 3V As obstacle comes closer more light gets r...

Page 46: ...r if this jumper is open If logic 1 is applied to the base of the transistor T3 by the microcontroller then it goes in to saturation and pulls base of the transistor T4 and turns off the T4 and IR pro...

Page 47: ...tput 89 PK0 ADC8 PCINT16 ADC input for IR proximity analog sensor 5 Input Floating 90 PF7 ADC7 TDI ADC input for IR proximity analog sensor 4 Input Floating 91 PF6 ADC6 TD0 ADC input for IR proximity...

Page 48: ...oximity sensors with the ATMEGA8 slave microcontroller In System programming and Multi processor communication between master and salve microcontroller MOSI MISO SCK and SS pins of ATMEGA2560 master m...

Page 49: ...bot s battery life Switching action of the power control circuit is exactly same as power switching circuit of IR proximity sensors as discussed in section 3 11 Line sensors can be permanently turned...

Page 50: ...re 3 41a White line sensor module on main board schematic Figure 3 41b White line sensor PCB schematic Note White line sensor number 4 t o7 uses ADC of the ATMEGA8 slave microcontroller NEX Robotics P...

Page 51: ...ation on main board Pin No Function 1 White line sensor 1 Left sensor Data Out 2 White line sensor 1 LED via potentiometer 3 White line sensor 2 Center Sensor Data Out 4 White line sensor 2 LED via po...

Page 52: ...or 1 2 3 disable Turns off these sensors when output is logic 1 Output 94 PF3 ADC3 Channel 3 for ADC Left input for white line sensor Input Floating 95 PF2 ADC2 Channel 2 for ADC Center input for whit...

Page 53: ...ence they are immune to the illumination from tube light or CFL Note that tube light which uses simple inductive chock actually blinks 50 times a second and this blink is captured by the white line se...

Page 54: ...ultrasonic pulse and measures time taken for echo of the beam It gives output proportional to time taken for the ultrasonic beam to return echo from the obstacle FireBird V robot supports almost all c...

Page 55: ...main board socket RX pin of the 5th ultrasonic range sensor is left open After triggering a Sensor 1 Sensor 1 transmits ultrasonic pulse and gives out distance reading within 49mS Sensor 1 triggers t...

Page 56: ...te Other sensors from MaxBotix having compatible pin mapping can also be used instead of these sensors For more details on compatibility refer to the respective sensor s datasheet EZ0 to EZ4 sensors h...

Page 57: ...board and insert sensor which is already soldered to right angled male berg stripe Once you solder female berg strip on the main board you can not insert Sharp IR range sensor in to it Ultrasonic ran...

Page 58: ...for the minimum amount of time as specified by the LCD datasheet and end by bringing it to low 0 again The RS line is connected to PC0 When RS is low 0 data is treated as a command or special instruc...

Page 59: ...VCC VCC Supply voltage 5V GND GND Ground PC0 RS Control line Register Select 22 PC1 R W Control line READ WRITE 23 PC2 EN Control Line Enable 24 PC4 to PC7 D4 to D7 Data lines Bidirectional data Bus 2...

Page 60: ...ly for its operation For LCD backlight V Battery supply is used Figure 8 45 shows LCD backlight jumper and LCD contrast control potentiometer In order to save power LCD backlight can be turned off by...

Page 61: ...f the microcontroller Also the same buzzer is used in battery monitoring circuit to alert the battery low indication Figure 3 50 Buzzer Figure 3 51 Buzzer Schematic Buzzer is driven by BC548 transisto...

Page 62: ...s SPI connector for adding accessories such as robotic arm color sensor etc Figure 3 52 shows its location on the main board and figure 3 52a shows its connections Figure 3 52 SPI expansion port pins...

Page 63: ...S logic converter Figure 3 53 shows location of the serial on main board Figure 3 54 shows schematic Table 3 19 shows the connections of the serial port Figure 3 53 Serial port pins Figure 3 54 Serial...

Page 64: ...troller accesses USB port via main board socket All its pins are connected to the microcontroller adapter board via main board s socket connector Figure 3 55 USB port on the Fire Bird V main board Fig...

Page 65: ...Bee wireless module schematics Figure 3 57 ZigBee wireless module and LED indicators LED Connection to XBee Wireless module Pin no Description ASSO 15 Associate LED RSSI 6 RX Signal Strength Indicator...

Page 66: ...2560 microcontroller adapter board provides power to the microcontroller other devices and the power to the servo motor ATMEGA2560 microcontroller adapter board has two low drop voltage regulators 1 5...

Page 67: ...2560 ADC can be used in 8 bit or 10 bit resolution To calculate voltage from the ADC s acquired digital value in 8 bit resolution we use following formula V Battery 0 7V ADC value 5V 255 10K 3 3K 3 3K...

Page 68: ...can be used in the preliminary form of robo soccer SJ2 solder pad needs to be connected by soldering for enabling the TSOP sensor Figure 3 62 shows the location of the SJ2 solder pad It connects TSOP1...

Page 69: ...pansion header refer section 4 3 from chapter 4 Figure 3 63 uC Expansion Socket on the ATMEGA2560 Microcontroller Board 3 19 5 Servo Pod Sensor Socket Servo pod sensor socket is used to connect extern...

Page 70: ...nables the onboard USB communication through UART2 default state J2 When J2 is on IR Proximity sensors 1 to 4 are connected to the ADC pins of the ATMEGA2560 When J2 is open same ADC pins can be used...

Page 71: ...firmware In System Programming ISP sockets Figure 3 67 ISP Schematic ATMEGA2560 microcontroller adapter board has ISP sockets for the ATMEGA2560 and ATMEGA8 microcontrollers Note To do In System Progr...

Page 72: ...ED s locations To enable USB to serial communication jumper J1 should be configured in a particular way Refer to section 3 19 6 for correct jumper settings Figure 3 68 FT232 Schematic Note Using bootl...

Page 73: ...EF5050 external reference voltage generator can be added on the microcontroller board In the default state voltage reference is directly taken from 5V uC supply by connecting pins 2 and 1 of the pads...

Page 74: ...sure that soldering pad P1 on the main board is open For more information refer to figure 3 28 and section 3 9 3 19 11 Servo Connectors The microcontroller board has three Servo connectors as shown in...

Page 75: ...g to C2 is not soldered on the microcontroller adaptor board Figure 3 74 Encoder LEDs Schematic 3 19 13 Bargraph LED display Bargraph LED display is used for quick debugging purpose It is connected to...

Page 76: ...nected with ATMEGA2560 microcontroller over the SPI port Jumper J4 needs to be removed before attempting to do ISP with ATMEGA2560 and ATMEGA8 as there SPI lines are connected with the jumper J4 For m...

Page 77: ...ATMEGA2560 Microcontroller ATMEGA2560 is interfaced directly to most of the onboard peripherals Its schematic is shown in the figure 3 78 Figure 3 78 ATMEGA2560 microcontroller schematic NEX Robotics...

Page 78: ...INT7 PE7 External Interrupt for Interrupt switch on the microcontroller board External Interrupt for the C1 motor s position encoder Connection to TSOP1738 if pad is shorted can also be used as Boot l...

Page 79: ...ve for RS232 serial communication Default 46 TXD1 INT3 PD3 UART1 transmit for RS232 serial communication Default 47 ICP1 PD4 GPIO Available on expansion slot of the microcontroller socket 48 XCK1 PD5...

Page 80: ...ting 88 PK1 ADC9 PCINT17 ADC input for Sharp IR range sensor 1 Input Floating 89 PK0 ADC8 PCINT16 ADC input for IR proximity analog sensor 5 Input Floating 90 PF7 ADC7 TDI ADC input for IR proximity a...

Page 81: ...sensors short the jumper J2 To use JTAG or interface external analog sensors via expansion slot of the microcontroller socket remove these jumpers AREF can be obtained from the 5V microcontroller or 5...

Page 82: ...sor 8 23 PC0 ADC0 ADC input for white line sensor 4 24 PC1 ADC1 ADC input for white line sensor 5 Servo pod 25 PC2 ADC2 ADC input for white line sensor 6 26 PC3 ADC3 ADC input for white line sensor 7...

Page 83: ...uC pin 91 8 TDI JTAG ADC7 IR Proximity sensor 4 uC pin 90 9 TMS JTAG ADC5 IR Proximity sensor 2 uC pin 92 10 TCK JTAG ADC4 IR Proximity sensor 1 uC pin 93 11 ATMEGA2560 Slave Select SS pin PB0 uC pin...

Page 84: ...sor interfacing remove all 4 connectors for the jumper 2 of the microcontroller board When jumpers are removed IR Proximity sensor 1 to 4 will be disconnected from the robot Pins can be used as SPI bu...

Page 85: ...Proximity sensor 8 ATMEGA8 ADC7 IR Proximity sensor 8 analog value 3 Ground Ground Ground 4 USB Data Pin 15 of FT232 USB to serial converter going to UART 2 of ATMEGA2560 via jumper J1 USB connection...

Page 86: ...SO ATMEGA2560 Pin 22 20 SCK ATMEGA2560 Pin 20 21 SSI ATMEGA2560 Pin 19 22 RS ATMEGA2560 PC0 LCD Register Select pin Command 23 RW ATMEGA2560 PC1 LCD Read Write pin Command 24 EN ATMEGA2560 PC2 LCD Ena...

Page 87: ...57 Not connected Not Used 58 Not connected Not Used 59 Not connected Not Used 60 Not connected Not Used 61 Not connected Not Used 62 Position Encoder Left ATMEGA2560 PE4 INT4 Output of Left position e...

Page 88: ...Hardware Manual 5 Upgrading Robot s Hardware In this chapter mounting of various modules of the robot are covered in pictorial way Figure 5 1 Fire Bird V main board NEX Robotics Pvt Ltd and ERTS Lab C...

Page 89: ...ation You might have to configure ZigBee wireless module to the appropriate settings using XBee USB wireless module and X CTU software For more details refer to Application notes 5 2 Setting correct j...

Page 90: ...ware Manual 5 3 LCD mounting Figure 5 4 LCD mounting Be careful while inserting LCD connector pins into the socket on the main board Screw in the LCD firmly on the studs NEX Robotics Pvt Ltd and ERTS...

Page 91: ...Hardware Manual 5 4 Microcontroller adapter board mounting Figure 5 5 ATMEGA2560 AVR P89V51RD2 8051 and LPC2148 ARM7 microcontroller adapter boards for Fire Bird V NEX Robotics Pvt Ltd and ERTS Lab C...

Page 92: ...ter board mounting Do not apply unnecessary pressure onto the PCB while inserting into the connectors on the main board Check for any bent pins before inserting the PCB Mount 3 screws on the microcont...

Page 93: ...tor of the Sharp IR range sensor Figure 5 8 Sharp IR range sensor mounting kit Step 2 Mount the 20mm studs on the main board where sharp sensor is to be fitted In figure 5 9 area highlighted with the...

Page 94: ...stripe from the adhesive tape from the metal plate which is shown in figure 5 8 Fix the metal plate on top of the Sharp sensor and fit the screws Figure 5 11 Fitting metal plate on top of the Sharp I...

Page 95: ...Fire Bird V ATMEGA2560 Hardware Manual 5 6 Mount top Acrylic plate on the robot Figure 5 12 Install top acrylic plate NEX Robotics Pvt Ltd and ERTS Lab CSE IIT Bombay INDIA 95...

Page 96: ...on or off You can use any serial port control software such as hyper terminal or terminal exe etc For user friendliness keys of the numerical pad of standard 104 keys querty keyboards are used When a...

Page 97: ...er RS232 serial port application example we need to load 13A_Serial_Communication hex on the robot which is located in the Experiments folder in the documentation CD For robot control over serial port...

Page 98: ...USB to serial converter The software is located in the Software and Drivers CDM 2 06 00 WHQL Certified folder For driver installation process refer to section 6 5 For robot control over serial port we...

Page 99: ...g communication software is located in the Software and Drivers CDM 2 06 00 WHQL Certified folder For driver installation process refer to section 6 5 For robot control over serial port we use Termina...

Page 100: ...r FT232 USB to serial converter Step 1 Copy the driver installation folder on your PC from Software and Drivers CDM 2 06 00 WHQL Certified Folder which is located in the documentation CD Step 2 Connec...

Page 101: ...A2560 Hardware Manual Figure 6 5 The following window will appear Figure 6 6 Select the second option manually to install the drivers and click on next button NEX Robotics Pvt Ltd and ERTS Lab CSE IIT...

Page 102: ...Now check the second option and set the location of folder containing drivers E g C CDM 2 06 00 WHQL Certified Figure 6 7 Step 6 On clicking next driver installation will begin Figure 6 8 NEX Robotics...

Page 103: ...will appear Click Finish to complete the installation Figure 6 9 After installation of FT232 USB UART software PC may ask for USB serial port software To install this software follow steps 1 to 7 of U...

Page 104: ...munication Follow these steps to identify or change the COM port number Don t change the COM port number unless it is absolutely necessary It may result in making some of your software unstable Step 1...

Page 105: ...he parenthesis next to USB Serial Port Figure 6 12 Step 4 You can change the port number by right clicking on USB serial Port and select properties Figure 6 13 In the Port settings tab click on the Ad...

Page 106: ...USB cable between robot and PC or connect XBee wireless module on the robot and connect XBee USB wireless module on the PC and load correct hex file on the robot as mentioned in the sections 6 2 6 3 a...

Page 107: ...Fire Bird V ATMEGA2560 Hardware Manual Figure 6 15 Figure 6 16 NEX Robotics Pvt Ltd and ERTS Lab CSE IIT Bombay INDIA 107...

Page 108: ...al Software Step 1 Connect any device which is to be used to USB serial port Install its driver Go to Start menu and click on the Serial Terminal Figure 6 17 Terminal software will open Figure 6 18 NE...

Page 109: ...3 Make the Num lock on for the keyboard Load proper firmware hex file on the robot as per the mode of communication refer to section 6 2 6 3 and 6 4 Turn on the robot Connect the Serial USB wire or X...

Page 110: ...lue of the character typed select Data Mode as text It you want to send HEX data then select hex button in the Data Mode frame Sent data is displayed in the bottom window Received data is displayed in...

Page 111: ...cated in the GUI and Related Firmware folder For information on how to load hex file refer to software manual Step 2 Connect serial USB to serial converter cable between robot and PC or install ZigBee...

Page 112: ...BIRD V Amega2560 or click on Fire Bird V Amega2560 on your desktop location GUI will open Figure 7 2 Selecting correct com port Step 2 Connect Robot with the PC using serial cable NEX Robotics USB to...

Page 113: ...fies the COM port number To manually identify the COM port refer to section 6 6 Select the correct COM port number and click on connect Now robot can be controlled using GUI Figure 7 3 GUI showing rob...

Page 114: ...wireless camera pod Follow these steps for video acquisition 1 Connect USB TV Tuner card with PC and wait for 5 seconds 2 Start the Fire Bird V robot s GUI 3 In the video window select devices as USB...

Page 115: ...fter turning on the robot and connecting XBee USB wireless module with the PC 7 5 Serial communication protocol used in robot control GUI All the firmware used for Fire Bird V ATMEGA2560 robot control...

Page 116: ...elocity control byte into the robot 4 Load the upper nibble of the right motor velocity control byte into the robot and execute the command Table 7 1 Example Set left motor s speed control byte to 0xA...

Page 117: ...STOP 0 0 0 0 Table 7 2 Example To set left motor velocity to 0x84 right motor velocity to 0x65 and move backward Step1 0x14 Load the lower nibble 4 of the left motor speed into the robot Step2 Delay o...

Page 118: ...an 8 bit analog value of the center white line sensor 66 White line sensor 3 Right The Robot will return an 8 bit analog value of the right white line sensor 67 Sharp IR range sensor 4 data The Robot...

Page 119: ...the buzzer 6A Turn off the buzzer Table 7 4 7 5 5 Robot Version Signature 6B If 6B is sent to the robot will send back its ID Table 7 5 7 5 6 Position encoder data Position encoder pulse count for th...

Page 120: ...d servo angle lower nibble B Data Load servo angle upper nibble and move the servo motor Table 7 7 The servo motor will move between 0 to180 given an 8 bit value between 0x15 and 0x65 in hex The Servo...

Page 121: ...n and PH4 pin for user application such as onboard ultrasonic triggering it is recommended to cut the below shown track at 2 places in figure A and solder the wire as shown in figure B Figure A Figure...

Reviews: