SumoBot

Date:

February-June, 2014

General Description:

SumoBot is a commonly used robot in competition in Indonesia, beside line follower robot. The SumoBot competition imitates real sumo competition, 2 robots fight in a circle arena. The robots have to attack each other until one of them is out of the arena and also they have to protect themselves to remain in the arena as long as possible. It's so exciting! So, I made this SumoBot for my class project.

Tools:

-Soldering iron
-Cutter
-Solder wire
-Altium Designer
-Wires

Materials and Components:

-PCB
-Ultrasonic ranging HC-SR04
-Infrared sensors
-ATMega8535
-L298N Dual H-Bridge Motor Driver
-2x 9V Battery
-Optional: LCD HD44780
-2x Built-in Motor DC and Gearbox + wheel
-Chassis Arcrylic
-1x extra wheel as balancer

PWM signals are generated by time r2 (8 bit) without PI algorithm, because it is not necessary. The codes are developed in AVR Studio.

The Diagram Block

The Flow Chart

The SumoBot is design to attack the enemy and defense itself. Everytime the robot detects the edge of arena it will reverse and turn left. If the ultrasonic sensor sensed the enemy in its range (<= 20 cm), then the robot would be move to the enemy at full speed. The color of the arena could be black with white lines or vice versa. So the infrared sensor reading should be adapted to the color of the arena.

Motor Direction:
void goForward(){
PORTD |= (1<<3)|(0<<2)|(1<<1)|(0<<0);//maju
}
void goBackward(){
PORTD |= (0<<3)|(1<<2)|(0<<1)|(1<<0);//mundur
}
void goRight(){
PORTD |= (0<<3)|(1<<2)|(1<<1)|(0<<0);//kanan
}
void goLeft(){
PORTD |= (1<<3)|(0<<2)|(0<<1)|(1<<0);//kiri
}
void goStop(){
OCR2 = 0x00; //PWM 0%
}
void resetPinD()
{
DDRD = 0xFF;
PORTD = 0x00;
}

Ultrasonic sensor HC-SR04:
uint16_t getRange(){
count=0;
sensorPort=0xFF;//Triggering HC-SR04
_delay_us(10);
sensorPort=0x00;
while(1){
if(!(sensorPin&(1<<echoPin))){//jika pc1 == 0, lanjut loop
continue;
}else{
break; //jika pc == 1 , keluar
}
}
while(1){
count++;
if(!(sensorPin & (1<<echoPin))){//jika pc1 == 0, keluar
break;
}else{
continue; //jika pc == 1 , lanjut loop, ngitung...
}
}
return count/17; //count/17 = akurat di jarak 20 cm.(sebelumnya count/34 akurat dijarak 10 cm)
}

Top View

Front View

Originally published in my previous blog on 13/07/14

Share this post to the world:
Facebooktwittergoogle_pluspinterestlinkedinFacebooktwittergoogle_pluspinterestlinkedin

15 Comments on “SumoBot

  1. Hello! Someone in my Myspace group shared this site with us so
    I came to check it out. I’m definitely loving the information. I’m bookmarking and will be
    tweeting this to my followers! Wonderful blog and fantastic design.

  2. Thanks on your marvelous posting! I genuinely
    enjoyed reading it, you are a great author. I will be sure to bookmark your blog and will come back
    at some point. I want to encourage you continue your great job, have a
    nice weekend!

    1. Hi, thank you for visiting my website. Sure, I’ll keep posting new articles and give some updates in my website. If you’d like to, please subscribe to my newsletter at http://www.luthfifr.com to get updated articles from my website and you will get an email notification whenever I post something new.

  3. Hello! I know this is somewhat off topic but I
    was wondering which blog platform are you using for this website?

    I’m getting fed up of WordPress because I’ve had issues with hackers and I’m looking
    at alternatives for another platform. I would be awesome
    if you could point me in the direction of a good platform.

Leave a Reply

Your email address will not be published. Required fields are marked *