Introduction: SimpleSumo- Educational Fighting Robots!
One ring…two robots enter…only one will be victorious! Mini-sumo robots are an excellent way to show kids that science and engineering can be fun and exciting!
Designed with education in mind, I created the open source 'SimpleSumo' platform to lower the barrier to entry into the robot sport of mini-sumo. (A tame version of Battlebots.)
These robots are easy enough to understand and build that kids can get started quickly, but they also offer great depth through Mr-potato-head-style mechanical customization and Arduino programming.
This instructable will walk you through the assembly and programming process for a SimpleSumo robot kit. It will also introduce you to the essentials of the mini-sumo sport and provide notes to aid scientific discussion in the classroom.(Also note my related instructable detailing options for making a mini-sumo battle ring).
Before getting started I'll note a couple things. These toys are intended for small groups, ages 10+. Assembly takes ~1hr and requires minimal tool use and absolutely no soldering or breadboarding. Adult supervision is suggested for students who are younger than high school level.
Complete robot kits are available here, or you can try to print and gather everything yourself from scratch using the 3d printable files & bill of materials provided step 3. If you do so please respect the file sharing licence. (That is, you can do anything but resell the robots or designs.)
This instructable is a complete stand alone assembly document, but if you would prefer to follow along with a video, please see the video series.
Step 1: Mini-Sumo in a Nutshell
- SimpleSumo robots are designed to comply with official mini-sumo rules.Robots can be up to 500 grams and must fit within a 10 cm by 10 cm tube with no limitation on height. Robots must start the match in exactly the orientation that they pass the tube test in!
A battle consists of two robots operating autonomously attempting to find and push each other out of a ring. First to touch the ground outside the ring loses the round. Rounds last up to 3 minutes each. Best of 3 rounds wins the match.
Pushing, lifting, distractions, and hiding are the robots only weapons as physically destructive elements are banned from the game. Similarly, suction, magnets, and sticky wheels are not allowed.
The official rules call for predefined starting lines but I have found that the game benefits from a minor rule deviation. I prefer to have players place their robots anywhere they want on their half of the ring while there is a large visual barrier hiding the opponents position. This creates an additional element of strategy and fun, sort of like the game battleship.
A game starts when the referee says GO and each player initiates a 5 second countdown for their robot to begin. Players then stand clear of the ring so as not to disturb the battle in progress. The referee gets the final call on all subjective decisions as well as appropriate punitive measures for poor sportsmanship.
Step 2: Gather Tools & Materials (BOM & 3D PRINTING FILES HERE)
- Tiny pliers (or 3D printed tweezers) and a PH1(3mm) phillips screwdriver.
- Optional: Your choice of glue: A good hot glue gun, super glue, or tube of silicone. (The parts are designed to not need glue but it can be nice.)
Below is an Amazon affiliate shopping list for folks that want to DIY/experiment/upgrade without buying a kit from me. Note that there are many items listed as optional that are used for expansions or experiments as explained after the robot assembly steps.
The wiring schematic that the following steps will follow is also attached to this step. Update: Added photos of top & bottom of two different common edge sensors so you can see the pinout even if you've already glue it down. :)
If you choose not to use my store for your supplies you can try to shop for robot parts piecemeal using this guide to get you going. See attached "SimpleSumo Shopping List" Excel file or visit this google sheets page. (They contain the same info)
Step 3: Preparing Parts Before Assembly.
- If you choose to 3D print the parts yourself start here:
I only recommend using ABS or PETG plastic for their durability. While I like PLA plastic, it is too stiff & brittle for this application and makes assembly difficult.
Print settings should be 0.3mm layer thickness maximum, 4 or more perimeters on all sides top & bottom, and a minimum of 20% infill.
Since ABS likes to warp so much I always print with a brim around the edges that has to be removed later. If you are doing this with students you might stop and take note of something interesting here. Notice when you tear the plastic sheet off it leaves a white edge behind, vs when you use a razorblade to cut the edge off it leaves the edge color unchanged.
Indeed, any time you over-stress plastic with a bend you'll notice that it turns white. If you are curious you can find out why this happens here.
- If you buy the kit start here:
The plastic parts in the kit are pre-cleaned and ready to use already.
-The next thing to do is to bend the headers on the edge sensors into 45 degree angles as shown in the pictures. This will help them fit inside the assembly. I found it helped me bend them evenly if I used a connector from a motor to do it.
-Now is a good time to press the wheels onto the servos just to form the plastic holes so that they will assemble easier later.
Step 4: Install Both Buttons & Their Wires
First insert the long wires into the hole from the inside of the chassis, then hold the wire in place with your finger, then drop the button in from the front. This helps ensure that the button headers dont get bent out of shape or miss their target.
After inserting the button immediately route the wire through the closest pinch-point to ensure that you dont accidentally pull it back out of the hole.
You might notice that my 3d model has been update since I took this picture. I made it so you can choose to mount two buttons next to each other OR a single button in the middle. This is your design decision to make. One button is more sensitive and will detect if anything is touching front and center. Two buttons are too stiff to press both at the same time, but a touch on either edge of the blade will activate the closest button. This gives the advantage of providing you with more information.
Step 5: Assemble the Motors Onto the Chassis
Before putting the motors on the chassis take a moment to tap the hole in the end of the servo. The servo comes with 3 screws, (2 long and 1 short). Normally servos use the short screw to hold the horn on, but for this project we want to use a long screw to make sure the wheels stay on strongly. To do this we first have to use one of the long screws to manually thread the hole in the end of the servo, while holding the servo end still with pliers. See pic 1.
When you install the servos onto the chassis, you will end up using the longer screws at the rear side of the chassis and the small screws at the inner remaining locations. This is due to space constraints.
Route the wires as shown through all the pinch points. It can help to use the screwdriver or tweezers to press the wires though the pinch.
Step 6: Put the Sensors & Arduino On
Set the chassis aside. We need to attach the arduino expansion board onto the 'arduino mount'. Make sure the board is seated all the way down in its pocket. There are clips on the updated part files that hold the expansion board in place, but you can also glue the board in too.
Place the 3 edge sensors as shown and glue them down too. Make sure the sensors are fully seated over the locating pin, against the bottom of the pocket, and fully held down with the clips. NOTE That the front two sensors can only be installed by pressing them in the front and they will only fit if the header pins are bend down as shown.
After it dries you can press on the front blade. Do this by first hooking one side then pressing firmly on the other. The blade was a tough connection to design, it has to be loose enough to allow button pressing and repeated removal, but function without locking up or breaking. ABS is a great material for this but the exact same geometry in PLA is too tight to install.
Note that I added a feature to the blades since these pics were taken to make it easier for kids to remove. To take off the blade you squeeze one tire and the long tongue on the blade underneath the chassis toward either side and the blade pops right off.
Now is also the best time to install both of the wheels. When you press them on use your fingers to press from the back side of the servo directly, rather than pressing on the wall. Otherwise you could rip the servo out screws and all.
Step 7: Drop the Top and Route Wires
Install the arduino mount onto the chassis by pressing the two parts together at the hinge point.
Grab 9 long wires and hook up the 3 edge sensors as shown. Make sure to use different wire colors so you dont get confused later. Its also good practice to twist the associated wire pairs together to keep them from flopping around.
Tuck the wires into the pinch points along the sides as shown then route all the wires up through the gap between the chassis & arduino mount.
Step 8: Install Buzzer, Ultrasonic, Battery & Close It Up
Grab 6 short wires and wire up the buzzer and ultrasonic sensor. Now is a good time to install the ultrasonic. It can only be installed one way, just make sure it is fully seated.
Now you can drop the 9v battery in and run its wire out the back either over or under the rear wall (for more strain relief). Now the lower level is done and you can flip over the arduino mount and press it closed onto the chassis.
Refer to the screenshot of the code for a list on which wires go where on the arduino board. There is also a nice wiring image in step 2.
Route the buzzer under the arduino nano slot before you install the nano, this helps keep the buzzer wires constrained/hidden and keeps the buzzer from rattling around inside the robot.
The cover drops on and clicks shut with an interference fit. To remove this cover stick your finger in the arduino usb hole in the back and pull up.
Step 9: Programming
- Arduino IDE (Arduino User Interface) (Required)
- NotePad++ (Recommended for viewing/editing code, but not required)
- All of the code is stored on github here.
See video link (@3min&30sec) at the bottom for connecting the robot to your computer and installing the code. After completing that procedure use the mini-test-mat (that every SimpleSumo kit comes with) for calibration & verifying that everything works.
As of this writing there is only 1 official release for the sumo fighting program. (Variants to follow.) In any case, this code is written to be easy to understand and modify, so it makes a great starting point for future program mods. I can't see any reason to ever change the core state flow chart so that is a great place to introduce students to programming this robot.
When I first sat down to create the code I listed the top priorities that the robot uses to decide what to do. Here they are in descending order of precedence:
- Staying inside the ring
- Attacking the enemy
- Hunting for the enemy
The arduino program is a constant loop always looking for new information and making decisions based on what it knows now. First it checks if it is over a line. If so then that must be dealt with regardless of any other information because falling out of the ring means losing. Then it checks if it has the enemy in its sights. If so its attacks, and if not then its last priority is to keep moving around the ring searching for the enemy.
Robots can get stuck in a stalemate if they sense each other at the same time and if they are equally matched. For the sake of entertaining onlookers and since a draw != a win, I decided to code in a deadlock detection algorithm that breaks up stalled bots.
For the same reason I also included random number generation within the search algorithm so that no 2 battles are ever the same, even when the same code is used on 2 bots.
In any case it should be clear that even for a simple robot there are nearly unlimited possibilities as to how the robot can behave. A particular behavior may work well against one opponent and poorly against another. That there is no single best solution is an important engineering lesson in itself and a reason that this game will remain entertaining to participate in over time.
There are other games you can play besides the 1v1 sumo battle.
- Flee: Run from objects and squeek when picked up.
- Clean Sweep: Time trial of one bot trying to find and push out 3 of the SimpleSumo sizing tubes. See introduction video.
- Sentry Program: Beep if object detected, change beep frequency based on distance to object. Toggle rotational movement with the blade-button. (robot can guard a doorway)
- Line following program: (code coming soon)
- Remote Control: (code coming soon)
Step 10: Mechanical Modifications
One of the coolest things about SimpleSumo is how easy it is to make modifications to change your robot's fighting strategy. So many mechanical parts can make life confusing so I made a master list and will stay consistent with the part names.
Complete list of parts and expansions: (Parts that come in the standard kit are labeled 'STANDARD', but there are 34 total interchangeable plastic robot parts!)
- Cover -Flat (STANDARD)
- Cover- Lego compatible
- Cover- Penny mass holding
- Cover- Servo Expansion
- Cover- Dump Truck (Requires 'cover- Servo Expansion' to mount)
- Cover- Cloak (& foam panels)
- Cover- Easy to Print
- Arm- Long grippers (for 'cover- Servo Expansion')
- Arm- Long flag pole
- Arm- Short grippers (for 'Rear Hatch- Servo mount')
- Arm- Flipper Rear
- Blade- Straight 80 deg (STANDARD)
- Blade- Pyramid out
- Blade- Pyramid in
- Blade- Sharp edged
- Blade- Marker Mount
- Blade- Penny Mass holding
- Blade- Drop Over
- Blade- Long
- Blade- Wide
- Blade- Side Detection
- Rear Hatch- Flat (STANDARD)
- Rear Hatch- Marker Mount
- Rear Hatch- Servo Expansion
- Rear Hatch- Line Follower 1
- Tire- Slick eLastic (STANDARD)
- Tire- V groove eLastic
- Tire- Straight groove eLastic
- Tire - Slick eFlex
- Wheel- 30T (STANDARD)
- Wheel- Doubler Insert
- Wheel- Cone Insert
- Chassis- (STANDARD)
- ArduinoMount- (STANDARD)
- Sizing Tube
- Pedestal Trophy
- Pulley Assembly with Weight Hanger
Now that your robot is build & programmed and you want to start snapping on and off the modifications, this is a good time to take a second and watch the "How to Handle the SimpleSumo Robot" video to make sure you are prying on the parts in the intended way.
Step 11: 3D Modeling & 3D Printing Sumo Parts
The SimpleSumo robot uses many 3D printed parts. If you have students new to 3D printing that want to try I'd recommend you review this opensource intro to 3d printing pamphlet with them .
The previous step had lots of digital screenshots that show the recommended printing orientation for each part. These orientations are decided primarily by the geometry of the design to avoid overhanging/floating features as well as the directional strength of FDM 3d printing.
All of these parts were modeled by a professional using professional software. But that doesn't mean you couldn't do the same yourself, or even make modifications to these parts yourself!
There are three general types of 3D modelling programs:
- Parametric- Ideal for designs with repeating structures, such as a chain or timing belt. Designs are based on numeric parameter variables.
- 'Circles & Squares'- Most frequently used by engineers. All of the designs are really just complex shapes made up of circles and squares. Modelling something like a tree is difficult in this software.
- Molding- The easiest way to make organic shapes, like a tree. This type of program is used by artists.
3D Modelling Resources: These are the top contenders for most useful free 3d modelling software on the internet for each of the 3 general types.
- TinkerCAD. Simple interface not intended for heavy duty work, BUT it is great at a couple things.
- It is easy to use and works in your browser so you don't have to install a program.
- Tinkercad is one of very few programs out there (free OR paid) that allow you to edit STL files. You can upload the SimpleSumo parts to Tinkercad and modify them with your additions and be printing within a single sitting.
- It can also import & export SVG files. (A specific type of 2d profile.)
In my experience, most other 'free' modelling programs are inferior products for robot design or aren't truely free.
Step 12: Experiments & Exercises
There are many possible experiments that can be done with this kit and I have not yet fully documented procedures, relevant equations, and calculations for each one. For now know that all of the following are possible with the currently available parts. Consider this a list of possibilities, if you want to see me do more video experiments then pick your favorites and let me know!
The message behind all the experiments is "How to science to optimize your robot and kick your friends butts."
-Have students keep written notes during experiments. Real scientists write everything down to keep track of things!
-Optimize the code- The standard release code is effective but far from perfect! Ask students to tweak variables to get the most out of the hardware. Search more efficiently. Attack more effectively. Stay in the ring with greater reliability.
-Reprogram the bot to stay in calibration ring. (it will tune differently than if you were working within a large ring. Because it is small you have to move slower because the reaction timing gets messed up.) Tape the 8.5"x11" calibration ring to a desk and use it to
-Measure Tire Frictional Force- Use the "Pulley Assembly and Weight Hanger" filled with pennies for weights. Use a small scale to record the mass of the robot & of the hanging weights to calculate the robots
-Use friction data to calculate the maximum slope the robot could drive up.
-Measure Effect of vehicle mass on pushing force (plot effect of adding mass for increasing pushing power (prove theory of friction equation)
-Measure Effect of weight distribution- Use the "Cover- Penny" & "Blade- Penny" to adjust the weight distribution of the robot and measure the actual distribution on 2 small scales. Is it better to maximize weight over the blade, or the wheels, or is the optimal distribution something in between?
-Measure & calculate center of gravity (CG) XYZ location using 2 scales.
-Use CG X data to calculate how far over an edge the robot can drive before it falls.
-Use CG Z data to calculate how high up to apply force to topple (new weapon idea!)
-Calculate force of friction of tires using pulley & hanging mass
-Use calculated frictional force data to find the steepest slope the robot can climb.
-marker mount conundrum (lesson on 4 leg table over-constraint)
-Tire testing- observe effects of different tread patterns/materials
-Search algorithm optimization.
-Hooking up a bluetooth module & smart phone control or hooking up an IR remote control
-Molding your own tires using a 3d printed mold & 'Oogoo'. (Future video on this for sure!)
As of this writing I have completed one sumo science video, a lesson on friction:
Step 13: Guided Discussions
There are also many topics for which these robots offer a good segway for technical discussions. You don't always have to perform an experiment in order to encourage kids to think about theory of design. Again, consider this a list of possibilities, if you want to see me do more video experiments then pick your favorites and let me know!
a) The best and worst thing about computers is that they do exactly (read 'only') what you tell them. A classic teaching tool for this is the "make me a peanut butter and jelly sandwich" demo, see attached text file.
b) Programming tips:
- Syntax is the most frustrating thing for beginners. How could you be expected to know what right? I've found the easier way to start learning is two fold. 1 to jump into the deep end by editing someone elses working code.
- Why Google is an Arduino programmer's best friend- With Arduino based development the easiest solution to helping you get unstuck is to simply google it. Search for the error message. Operate independently.
- Don’t Repeat yourself- Ideally you should only ever have to write a specific line of code once. If you find the need to write a given line multiple times it is best to create a function.
- Troubleshooting techniques – Adding the buzzer command line where you think you might have problems. When testing code, write the smallest possible about of code to test individual pieces of your design. Isolating variables one at a time (divide & conquer) is a classic & essential problem solving method.
- Thinking in Algorithms - Use functions to help keep you from repeating yourself. Avoid impure functions.
- Using version control and why Github is great for keeping track of your program as it progresses. (Imagine how difficult it would be to keep track of changes if multiple people were trying to work out of the same text file without recordkeeping.)
- Writing good descriptive comments in your code and keeping it neat. Code is organized to help other humans read it. As long as the syntax is correct a computer doesn’t care if code is written clearly and computers ignore the spacing. Layout your code so it is easy for other people to break down and understand your intent.
- Pseudo code technique- When creating new code first write it out in plain english of what you want the robot to do. Then go back and turn that list into programming language.
Engineering & Physics:
-Why was a 9V battery chosen? What are the pro's and cons of alternative choices? -(Hint- Arduino requires 5V+ to operate and the space constraint of the mini-sumo rules is extremely limiting. Also these are designed for kids so the battery needed to be safe, easy, and accessible. Cost is important but secondary to all that.
-How to draw a free body diagram.
-Differential vs Ackermann steering and the effects of track width and wheelbase on the turning radius of each.
-momentum & energy (why its better to ram an opponent at top speed)
-What are the effects of varying length/wire gage/voltage/temperature on low voltage DC wire systems?
-Effect of varying the wheel diameter on wheel RPM, robot velocity, maximum robot torque, maximum pushing force.
-Design trade offs and the positing & negative effects of adding mass. (Lower robot mass is better for mobility, acceleration, energy efficiency, and is less likely to fall over edge. Higher mass is better for beating up other robots ).
-How to maximize your robots traction and minimize your opponents traction.
-Digital vs analog signals (The edge sensors could be wired for either condition, why did I choose to use analog? Answer: because it gives me more data to work with and an easily programmable way to change the setpoint.)
Step 14: Further Reading & Final Notes
SimpleSumo doesn’t have an official textbook and you don’t have to buy any books to learn arduino. There are lots of free resources & videos online. That said, I am frequently asked for book recommendations to accompany these kits. If you learn best with a book in hand then these are the go to’s:
"Robot Sumo: The Official Guide" by Pete Miles -This book is a great read for a budding mechanical engineer. Provides graphs and in depth discussions of physics so it has depth but it never gets boring. Single best book on robo-sumo I know of.
"An Introduction to Robot Programming: Programming Sumo Robots" by Eric Ryan Harrison. Designed for a competitors hardware kit which does not offer the mechanical customizatiaility of SimpleSumo, I had to admit that they did a great job on their documentation. This book is intended to take kids from zero to hero in terms of arduino programming a sumo robot, albeit not my kit. A good resource for a budding computer scientist. It can get heavy but it is intended for kids.
“Getting Started with Arduino” by Massimo Bonzi. Recommended for the absolute beginner. A fun and informal introduction to Arduino.
“Programming Arduino: Getting Started with Sketches” by Simon Monk. Reads like a dictionary so less entertaining but very thorough resource on arduino hardware, program definitions, & capabilities
If you have specific technical questions about the robot please use a public forum such as this instructable, the SimpleSumo Facebook users group, or the relevant product page rather than contacting me directly. This will help others benefit from the conversation as well.
This project was made open source to maximize accessibility and increase the chance that it would find its way into eager young hands. Many of the expansions are offered for sale for a small fee (under $3) to help me recoup some of the R&D cost of this many months long project. If you want to share your contributions to the code, documentation, or models then great! Lets get in touch!
In conclusion it should be clear that robotics is a multidisciplinary activity that offers kids a fun and rewarding way to learn about electronics, engineering, mechanics, and software development. Best of all since Arduino is a modern, standardized, and widely used language, the programming skills acquired through the use of SimpleSumo robots can be applied to many other fields.
I hope you enjoyed this work, if so please take a second to vote for it in the relevant Instructables.com contests. Thanks for sticking with me this far. :)
Grand Prize in the
Teachers Contest 2017
Judges Prize in the
Make It Move Contest 2017
Participated in the