Arduino mini sumo robot

Updata 10/2/2014

Finally the Mcmaster University SUMO Robot competition ended, my robot got the third place. It is fun and an excellent experience.

  

  

Update 23/ 1/ 2014

now i have a new problem, when i plug in the usb to arduino UNO, the program is working as i expect, however, when i plug in the battery to ardunio instead of usb, my robot is not acting as it should. would anyone plz tell me why is this happening?

 

 

I'm a second year mechatronic student and im going to make a mini sumo robot for competition. i started with doing some research and modeling on inventor. At the beginning i decided to use ultrasonic sensor for detecting opponent and its working well, however it can't fit between front and rear wheel. so i come to SHARP IR sensor. now the problem is that i dont know how to progrm my robot to make it follow ant object appear in front of it. The video i linked is exactly what i want to achieve. Would anyone plz help me give me any hit or show me a sample arduino code?

 

 


This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/arduino-mini-sumo-robot

**Your code would consist of **

Read left sensor
Read right sensor
If left reading closer, turn right until readings are equal
If right reading closer, turn left until readings are equal
Go forward
Repeat 

Some advice

What you want for your robot is a PD controller (you can google up how it works and get sourcecode), if one of the sensors finds something, the robot should move towards it, according to the analog input difference from the sensors.

I’d like to give you some advice:

- Sharp analog sensors are slow - their measurement time is around 40ms, as I can see (Judging by the motors chosen) you’ll want to build a fast robot, to fight fast opponents. during 40ms your opponent can go right in front of you, from one side to another, and you won’t even notice him.

- Don’t place sensors on moving platform(like in the front)

- You don’t need to have moving ramps, If you make your ramp very sharp and close to the ground, other robots will just ride on it, and lose contact with the ground - no need to flip them. Adding moving parts makes the robot less solid, and more wobbly

Also 1 question: where did you get the wheels and tires for the motors? Can you provide a link?

Tolerance

You should add some sort of tolerance between the comparison of distances, otherwise if the target object isn’t completely uniform your distances will never match and your bot will keep trying to steer left and right until it gets two exactly matching distances.

If abs (left reading - right reading) < XXX  

then Go forward

Bests regards

thank u for ur advises.wheel

thank u for ur advises.

wheel and tires:

https://solarbotics.com/product/rw2/

motors:

http://www.canadarobotix.com/robot-parts/motors/gearmotors/pololu-998

programming

using two IR Range Sensors sir,…

I’M still a Newbie,…I would like to know how you program to balance both readings of IR left and IR right…

These would be my attemp… :smiley:

leftdist = 0

rightdist= 0

If ( leftdist < rightdist )

turn right

 

about the delay of turning the body of a bot… I also dont know how.cause we cant put a specific delayed time if the bot was depending of the equality of readings in both sensors

.and i would like to attemp again

Delay ( leftdist = rightdist )

then go forward

Would that work on programming it??

Heheheheh…sorry sir… Newbie Here…!!!

 

The purpose of asking this is I would like to know a lot of things  or gather informations first before a could contruct my own bot…

-VerDe

Sir…

About the delay of moving the bot’s body…

how would you do it?? since we cant put a specific delayed time if we’re depending on the robots sensor readings?

 

Sounds like a power issue
It sounds like there is not enough power for the arduino, motors and sensors. This is a common problem. What is your battery power source?

You can find the source code

You can find the source code to my mini sumo Seeker 2 on my website - here’s a direct link:

http://huv.com/miniSumo/seeker2/Seeker2Source.zip

The main page for Seeker 2 is here:

http://huv.com/miniSumo/seeker2/index.html

I use a finite state machine to control the behavior, and you can see the specific behavior you’re looking for in the function handlePushingObstacle, which is in SumoFSM.c inside that zip file.

Basically, if it sees the opponent in both sensors, it goes full speed ahead. If it sees it only with the left sensor, it slows down the left wheel a bit so it will pivot in that direction, and vice versa for the right side.

Let me know if that isn’t clear, or doesn’t help you.

- Jon (a fellow Canadian robot builder)

9v for arduino and 7.4v lipo
9v for arduino and 7.4v lipo for motors

Congratulations! Mini sumo

Congratulations! Mini sumo is pretty cool - I’ve competed in a number of mini sumo competitions in the past.

I live about an hours drive from McMasters U, btw.

Congratulations Wales! 3rd place!!! Awesome!

Most of my colleagues came out of McMaster!    Great school!