RoboSumo blog deadline is Monday 13th April 2020 – Please read these tips and FAQs

Hi Everyone,

As I explained in my email last week, it will not be possible to complete this semester’s RoboSumo project. Therefore, for those of you in groups A1, A2, B1 and B2, we will calculate your project grade based on the work completed prior to the closure of the college, plus (optionally) what you have added to your blog before the revised deadline of Monday 13th April. Due to the reduced time spent on it, the overall weighting of this semester’s RoboSumo project within the Design Projects module will be adjusted to make it equivalent to each of the projects you completed in semester 1.

If you were diligently updating your RoboSumo blog as you went along and have fully documented your work up to and including the Tip the Can competition then you probably don’t need to do anything more. However, if your blog documentation was lagging behind your practical work, then you will probably want to add additional content to the blog so that your full contribution to the project is recognised.

In the sections below, I provide more detail about the project assessment and some guidance on how to present your work on your blog, including how to deal with the incomplete nature of the project. I may update the list of blog tips and FAQs in the coming days if additional queries arise or further clarification is required. Feel free to comment below or email me if something isn’t clear or if you’re not sure how to proceed.


Assessment of the incomplete RoboSumo project

Although this semester’s RoboSumo project did not reach its normal conclusion, it will still be assessed more or less as normal. Having completed the Tip the Can challenge, we have a sound basis for each component of the grade. As explained on the Project Info page, each student’s RoboSumo grade comprises four equal components (modifications specific to this semester are shown below in blue):

Assessment Component Assessment Criteria Assessment Mechanism
Tournament ranking (25%) The robot’s ranking in the final RoboSumo tournament the Tip the Can competition. A formula is applied to each robot’s tournament ranking. Usually, the same mark is awarded to all members of a team, but marks may be redistributed to reflect substantially different individual contributions.
Individual contribution to group process (25%) Contribution to team organisation, planning and decision making.
Knowledge sharing – explaining concepts to (or learning from) other team members.
Engagement in team discussions.
In-class tutor observation.
Analysis of submitted material.
Individual contribution to technical attainment (25%) Project management / teamwork. Quality of team decisions. Design and implementation of robot (software and hardware). Technical skills. Analysis of documentation. Inspection of robot. Photo/video evidence of robot. Tutor observation of process. Interview / quiz assessment.
Documentation submitted (i.e. posted on blog) throughout project (25%) Individual contribution to the documentation produced by your group. Analysis of material presented on student’s individual blog.

Teams who did not complete Tip the Can will be considered by their tutor on a case-by-case basis and where there is evidence of a meaningful attempt to complete the challenge, a generous approach will be taken (i.e. we will assume you would have got your robot working for the final tournament).

RoboSumo blog tips

As shown above, your individual blog contributes to three of the four assessment components. In addition to the quality of documentation you present, we are interested in the evidence you can show of the work you did. Your individual blog provides you with an opportunity to show us what you contributed to your team’s progress. If you did some valuable work on the project but we didn’t directly observe it in the lab and you didn’t write about it on your blog, don’t expect to get any credit for it.

Practical problems caused by closure of college

We are aware that the closure of the college presents some practical difficulties for many of you when documenting your work. Specific problems we are aware of include the following:

  • You may not have your physical robot.
  • You may not have access to your code.
  • You may not have completed Tip the Can.
  • You may not have photos of physical work you carried out.
  • You may not have videos of your robot working.
  • You may have begun but not completed a task you were responsible for.

We will keep all of the above in mind when assessing your work, so don’t panic if you have one or more of the above problems. Just do your best to gather and present whatever evidence you can of your work to date. Communicate (remotely!) with your teammates to see if they have additional content that may provide evidence of your work (e.g. code you contributed to or photos that show work you carried out). If you took on a particular task within the project, but you really can’t find any evidence whatsoever of it, you can still explain to us clearly on your blog what you did.

Examples of good blog content

Hopefully you’ll have some of these:

  • Clear written descriptions of what work you carried out.
  • Clear descriptions of the group process. What decisions have you made? How are you making decisions as a team? What problems or priorities have you identified?
  • Minutes of team meetings.
  • Design sketches you drew – hand-drawn and neatly photographed is fine.
  • Photos of your robot.
  • Photos of work being carried out – e.g. before/after pictures.
  • Photos of circuits you built.
  • Photos of soldering you carried out.
  • Photos of a chassis you constructed.
  • Video of a working (or partially functioning) robot.
  • Video of a working sub-system – e.g. motor control.
  • Video of your robot completing (or attempting) the Tip the Can challenge.
  • Video of an experiment you carried out – e.g. sensor testing.
  • Arduino code for Tip the Can (working code or nearest attempt).
  • Arduino code for earlier tasks – e.g. LED Flash Challenge, motor control.
  • Description of robot control algorithm / logic, for example using flow charts or state tables. This can either be what you implemented in your Arduino code or what you planned to implement.
  • Research you carried out for the project.
  • Any calculations or analysis you did – photos of work on paper is fine.
  • Photos of notes or rough work you wrote down on paper.
  • Circuit diagrams – hand-drawn and neatly photographed is fine.
  • Schematics drawn on computer – e.g. for laser cutting.
  • 3-D models of your design – e.g. SolidWorks, SketchUp.

Frequently Asked Questions

Question Answer
Should I meet with my team to carry out tests / take photos / do whatever with our robot? Absolutely not. Please follow HSE guidelines at all times. By all means communicate electronically with your teammates but do not meet in person.
I did some design work that wasn’t used in Tip the Can but could have been used in my team’s sumo robot. Will that count towards my assessment if I include it in my blog? Yes, we want to read about any useful work you did, even if it wasn’t used in Tip the Can. That could include things you developed that you decided not to use or things you were working on for the cancelled sumo tournament.
I did some design work at home after the college closed. Will that count towards my assessment if I include it in my blog? Yes, if there’s work you carried out safely at home following the closure of the college, there’s no problem including that in your blog. If your team completed the Tip the Can challenge and you were a significant contributor, then you probably have enough work done already and we just want to see evidence of that on your blog. However, if you’re worried that you don’t have enough work to present on your blog, then you could consider supplementing it with additional design work now and adding that to your blog.
I did work on a task that was assigned to me, but I didn’t finish it. Do I need to finish it now to include it in my blog? No, you don’t need to finish it in order to receive some credit for it. Given the sudden closure of the college, we expect that teams will have useful work done that is incomplete. Please show us whatever evidence you can on your blog, or at least explain what the work was.
My team did not complete the Tip the Can challenge – will we get a competition mark of 0%? No, don’t worry, provided that your tutor sees evidence of meaningful progress towards completing the challenge, he/she will award you a fair competition mark based on the progress you made.
My team’s robot is in a locker in the college, so we can’t take photos of it – what will we do? Many teams are probably in this situation. Hopefully you already have some photos or videos of the robot. Even if the photos you have aren’t as good as you’d like, please share them with us anyway, since they provide useful evidence of what you built. If you don’t have any photos or videos at all, and your teammates don’t have any either, then perhaps you could take a clear photo of a hand-drawn picture of your robot, including labels for some of its design features? Alternatively, if you know how to use any 3-D modeling software (e.g. SolidWorks, SketchUp), you could create a model of your design.
The code for my team’s robot is stored in my teammate’s network drive in the college and cannot be accessed from home – what will we do? This is likely to be a problem for many teams. Check if you or one of your teammates emailed your code at any stage or uploaded it to cloud storage. If there’s really no way for you to access any of the code you wrote, and if you really feel it’s necessary for your blog (for example if programming was your only significant contribution to the project), you could consider sketching out your code again based on your best recollection of it. If so, please explain on your blog that you’re doing that, so that your tutor knows to overlook minor errors. If you want check that the code is free of syntax errors, the Arduino programming interface can be downloaded for free from won’t let me upload videos – how do I add them to my blog? Video hosting is reserved for premium accounts on However, if you have a free account, you can still embed YouTube videos in your blog posts. Hence, the solution is to upload your videos to YouTube and then embed them in your blog posts. To embed a YouTube video in a blog post, just copy and paste the URL (web address) of the video onto a line on its own. I normally leave a blank line before and after it. WordPress will recognise the link and automatically embed the video.
Can I include Arduino code that my teammate wrote in my blog? Yes you can, but please give credit to the author. Whenever you include another person’s creative work in something you’re writing, you must always correctly attribute it to the original creator. This applies to code, text, images, videos, and any other type of creative work.
How do I post Arduino code neatly on my blog? The best way is using WordPress’s “code shortcode”, as I explain in this article. Although it’s not ideal, short programs can be posted as screenshots of the Arduino programming interface. Please do not just cut and paste your code into your blog posts – the formatting will make it almost unreadable.
I have a smartphone but no laptop, so it’s hard to type in a lot of text – what should I do? Clearly explaining your work is an important feature of your blog, but quality is more important than quantity, so you don’t need to write long-winded descriptions. However, writing good quality documentation on a phone is definitely a challenge. You have the option of writing out your content on paper and uploading photos of it to your blog. If your work is written out neatly and photographed clearly, this type of documentation can be quite presentable.
Posted in Uncategorized | Leave a comment

Retail Therapy / Drawing Competition


Spotted this week in Lidl, a nice little toolkit that includes snips and pliers:

Drawing Materials

Escape the tyranny of lined paper and elevate your ideas to the artistic realm with a premium quality unlined notebook from Silvine. Click images below to buy from Amazon.

Need to derive an equation on the train? Or quickly sketch a design idea over coffee with colleagues? Maybe even scribble a humorous caricature of your college lecturer while sharing a craft brew with friends! This handy executive-size notebook is perfect for every occasion.

Need a bigger canvas to capture your epic designs? No problem! The A4 model will accommodate even your grandest visions. The luxurious expanse of each unlined page demands that one of your wildest dreams be set free.

Even the most sophisticated pencil connoisseurs delight in the finely-balanced performance and reliability of the legendary Staedtler Mars Lumograph 2B, arguably the world’s greatest technical sketching pencil.

And of course, every great pencil deserves a German-engineered precision sharpener.

Drawing Competition

To be in with a chance of winning one of three notebook/pencil/sharpener sets, leave a comment below this post with a link to a hand-drawn sketch or diagram published on your own RoboSumo blog.


  1. Lined paper will disqualify.
  2. The deadline for entries is 9pm on Friday 6th March 2020.
  3. Maximum of one prize per entrant.
  4. The drawing must be your own original work.
  5. Offensive or obscene drawings will not be considered.
  6. The judges’ decision is final.
Posted in Uncategorized | 4 Comments

Tip the Can – Live Results spreadsheet – Sem 2 2019-2020

Click here for live results spreadsheet

Posted in Uncategorized | Leave a comment

Rangefinder and Tip the Can info from RoboSumo lecture on Wed 19th Feb 2020

Tip the Can date and robot compliance (max size and weight):

Precendence of criteria for ranking Tip the Can results:

Three things you probably need to get working to successfully complete Tip the Can:

Connecting the HC-SR04 rangefinder sensor to the Arduino Nano:

Example HC-SR04 trigger and echo waveforms:

This was the example code I wrote during the lecture (with some modifications):

  1. I made a factor of ten error in calculating the threshold duration of the echo pulse – it should have been 4.7ms rather than 47ms.
  2. I’ve added a longer delay at the end of the loop function so that it leaves time for any ultrasound echoes in the room to dissipate before going back to the start of the loop function and triggering the next ultrasound pulse.
// HC-SR04 rangefinder example for Arduino Nano
// Written by Ted Burke - last updated 19-Feb-2020
// This example triggers readings from the HC-SR04 rangefinder
// repeatedly and switches an LED on or off depending on whether
// an object is detected withing 80 cm of the sensor.

void setup()
  pinMode(2, OUTPUT); // LED pin
  pinMode(6, OUTPUT); // trigger pin
  pinMode(7, INPUT);  // echo pin

void loop()
  // Send 20 us trigger pulse from Arduino to rangefinder
  digitalWrite(6, HIGH);
  digitalWrite(6, LOW);

  // Wait for the time it take sound to travel 2 x 80cm
  delayMicroseconds(4700); // 4.7 ms

  // Check if echo pulse has ended or not
  if (digitalRead(7) == 1)
    // Pulse is still active -> no objects within the 80cm threshold
    digitalWrite(2, LOW); // LED off
    // Pulse has ended -> an object is within the 80cm threshold
    digitalWrite(2, HIGH); // LED on

  // Leave a delay to allow any ultrasound echoes in the room to
  // dissipate before triggering another pulse
Posted in Uncategorized | Leave a comment

Notes from RoboSumo Lecture on Wed 12th Feb 2020

Whiteboard snapshot of the SN754410NE diagram:

Whiteboard snapshot of the circuit diagram for the examples below:

This was the first code example, which repeatedly drives the left motor forward for 5 seconds and then in reverse for 1 second. It repeats this sequence until the circuit is powered off.

// Motor and switch example for RoboSumo
// Written by Ted Burke - last updated 12-2-2020

void setup()
  // Set motor pins as outputs
  pinMode(4, OUTPUT); // left motor forward
  pinMode(5, OUTPUT); // left motor reverse
  pinMode(6, OUTPUT); // right motor forward
  pinMode(7, OUTPUT); // right motor reverse

  // Set LED pin as output
  pinMode(2, OUTPUT);

void loop()
  // Left motor forward for 5 seconds
  digitalWrite(4, HIGH);
  digitalWrite(5, LOW);
  // Left motor reverse for 1 second
  digitalWrite(4, LOW);
  digitalWrite(5, HIGH);

This was the second code example, in which the switch connected to pin D8 controls the direction of the left motor.

// Motor and switch example for RoboSumo
// Written by Ted Burke - last updated 12-2-2020

void setup()
  // Set motor pins as outputs
  pinMode(4, OUTPUT); // left motor forward
  pinMode(5, OUTPUT); // left motor reverse
  pinMode(6, OUTPUT); // right motor forward
  pinMode(7, OUTPUT); // right motor reverse

  // Set LED pin as output
  pinMode(2, OUTPUT);

void loop()
  int x;

  x = digitalRead(8);

  if (x == 1)
    // Left motor forward
    digitalWrite(4, HIGH);
    digitalWrite(5, LOW);
    // left motor reverse
    digitalWrite(4, LOW);
    digitalWrite(5, HIGH);
Posted in Uncategorized | Leave a comment

Notes from RoboSumo Lecture on Wed 5th Feb 2020

Plan for today’s lecture:

  1. Blog
  2. Provisional Schedule
  3. Tip the Can
  4. Tools / neat wiring / colour coding
  5. Laser cutting


Setting up your Individual RoboSumo Blog:

  1. Set up a free account on Do not sign up to a paid subscription plan.
  2. Create a blog with a title and domain name that is presentable and reasonably professional – nothing obscene. Ideally, it should be something you could use for other projects in the future.
  3. Set the blog theme to either Twenty Sixteen or Twenty Eleven. These themes will present the posts you write in a way that we can assess easily.
  4. Write and publish a blog post about the LED Flash Challenge.
  5. Check that it is publicly visible on the internet (i.e. not just visible to you when you’re logged in).
  6. Give your tutor the address (i.e. domain name / URL) of your blog.

Some useful tips for WordPress:

  • Please save yourself a lot of hassle by writing your blog posts on a laptop rather than on your phone. It is technically possible to write WordPress blog posts on a phone, but you won’t be able to compose the kind of visual content we require. You might still find it useful to log in to on your phone to upload photos to the media library of your site.
  • You can embed YouTube videos in a blog post just by placing the URL of the video on a line on its own (I leave a blank line before and after it too).
  • This post explains how to present code neatly on your blog: Adding C/C++ code to a WordPress post

Provisional Schedule for the semester

  • Week 1: LED Flash Challenge
  • Weeks 2-4: Work on Tip the Can robot
  • Week 5: Tip the Can competition
  • Weeks 6-9: Work on RoboSumo robot
  • Week 10: RoboSumo Tournament
  • Easter break (2 weeks)
  • Weeks 11-12: Work to finalise blogs

Tip the Can

The Tip the Can competition is a time trial that takes place in week 5 (Wed 26th Feb). Your team needs to build an autonomous robot that fits within the specified size and weight restrictions and can find and touch a can on the other side of the sumo arena.

In a nutshell:

  1. Max robot dimensions are 100x100x100 mm.
  2. Max robot weight is 500g.
  3. The can is stuck to the surface of the sumo arena close to one side.
  4. The referee places your robot at the other side of the arena (not facing the can).
  5. When the referee says “go”, he/she starts their stopwatch and you start your robot.
  6. Once your robot moves, you may not touch it or otherwise control or influence it until the attempt ends (either in success or failure).
  7. If and when your robot touches the can, the referee stops the stopwatch.
  8. If your robot touches the can briefly and then withdraws, the green light will turn on, indicating success.
  9. If you robot touches the can for too long or touches it repeatedly, the red light will turn on, indicating failure.
  10. You can attempt the challenge multiple times. Only the best result counts.

Three important ingredients for Tip the Can

  1. Bi-directional control of two motors (i.e. robot can drive forward, reverse, and turn)
  2. A sensor to find the can (e.g. HC-SR04 ultrasonic rangefinder)
  3. A sensor to detect when the robot touches the can (e.g. a switch or button)

Tools / neat wiring / colour coding

Laser cutter

One of the easiest ways for you to design and build a high quality robot is to make use of our school’s laser cutter. This machine cuts two dimensional shapes out of flat 3mm sheets of acrylic (aka Perspex). It is capable of cutting very fine detail in two dimensions, so you can easily create interlocking parts, cogs, gears, etc. You draw the parts you want in Inkscape and send them to me and our technical staff will cut them out. Inkscape is available for Windows/Mac/Linux, free to download, quick to install, incredibly powerful, and extremely useful for all sorts of technical illustrations and graphic design work.

I’ll probably talk about laser cutting and Inkscape in some detail during next week’s lecture, but in the meantime, information on the required format for your laser cutting drawings can be found in the following posts on this website:

The help menu in Inkscape includes some excellent tutorials which will explain the basics quickly. There is also a lot of Inkscape tutorial content on YouTube.

From today’s lab…

Posted in Uncategorized | Leave a comment

LED Flash Challenge – Semester 2, 2019-2020

We’re beginning RoboSumo with a short competitive puzzle called the LED Flash Challenge. No formal assessment weight is attached to this challenge, but we’ll keep a close eye on who does well. In this challenge, doing well means two things: getting it working quickly and, more importantly, trying to understand what you’re doing.

In today’s lab you’ll be working with your team to complete two tasks:

  1. Build a simple breadboard circuit for the Arduino Nano and program it to blink alight-emitting diode (LED) on and off.
  2. Add a second LED to the circuit and reprogram the Arduino to transmit a specific binary sequence as a series of flashes from the two LEDs.

The first task is very prescriptive, which means that we’ll basically tell you exactly what to do, but to complete the second task you’ll need to think for yourselves.

You need a team number to complete this challenge. Your tutor will assign your team a unique number within the range shown below:

  • Teams 60-79: DT066A Groups A1 and A2 with Ted Burke and Gavin Duffy in room KEG-036 (located on a side corridor off the main ground floor corridor)
  • Teams 80-89: DT066A Group B1 with Emma Robinson in room KE4-018/KE4-023 (exact room TBC)
  • Teams 90-99: DT066A Group B2 with Mick McKeever in room KE4-018/KE4-023 (exact room TBC)

Part 1: Blinking LED

This task is relatively straightforward and shouldn’t take you too long to get working.

The “breadboard” is the rectangular white plastic board we use to build the circuit. Each short row of five holes is a single electrical connection. Two wires inserted into the same row become connected electrically. Each row is marked with a number and each column is marked with a letter, so that each hole in the main section of the board can be uniquely identified using a letter and number. The instructions below use these letters and numbers to identify the exact position of each component.

The breadboard comes with an adhesive strip on the back of it, which is covered by a protective sheet. Do not remove the protective sheet! Once the breadboard sticks to something it cannot be moved without compromising the internal structure of the breadboard.

Before beginning, make sure your breadboard is the same way around as the picture below.


The first component in the circuit is the Arduino Nano, which is a simple computer in a tiny package. This is the brain of the robot. You control the robot by writing programs that run on the Arduino.

Make sure your Arduino is the right way around, with the mini USB socket at the end of the breadboard (row 1). Place the breadboard flat on a hard surface before pushing the Arduino into the board. The pin marked D12 should be in breadboard hole H1. Some Arduinos can be very difficult to insert into the breadboard, so if you’re having problems just ask for help because you might have just received a particularly tricky one.

On each side of the breadboard there are two long rows of holes which are connected along the full length of the board. These rails are used to distribute the supply voltage to different parts of the circuit. The blue line marks the negative rail (0V); the red line marks the positive rail (6V in this circuit). The Arduino draws its power from these rails.

  • Connect a short black wire between A14 and the negative (blue) rail.
  • Connect a short red wire between A15 and the positive (red) rail.


The first thing we’ll control with the Arduino is a green light-emitting diode (LED). To do this, we’ll turn the Arduino pin marked D2 into a digital output which means that the program running on the Arduino can set it high (5V) or low (0V). When the pin is set high, a small electrical current flows through the green wire, through the green LED, and finally through the resistor to ground (the negative rail).

  • Insert a green wire between I11 and A18.
  • Insert a green LED between E18 and E19. The LED is a one-way valve for electricity, so it must be the right way around. Inside the green plastic bead, if you look carefully you’ll see that each leg is connected to a kind of a flat plate. As shown in the image below, the leg connected to the larger plate should be in E19.
  • Insert a 220 ohm resistor (colour code  RED   RED   BROWN   GOLD ) with the short legs between B19 and the negative (blue) rail.


We’re ready to run a program on the Arduino to flash the green LED on and off.

  • Double-click the Arduino icon on the desktop to launch the Arduino IDE (integrated development environment).
  • Delete the example code that appears by default in the editor.
  • Copy and paste the code below into the editor.
// RoboSlam example 1: Blink LED

// The setup routine runs once when the power is switched on.
void setup()
  // Digital output for LED on pin D2
  pinMode(2, OUTPUT);

// The loop routine runs over and over until the power is switch off.
void loop()
  digitalWrite(2, HIGH); // LED on
  delay(1000);           // 1000ms delay
  digitalWrite(2, LOW);  // LED off
  delay(1000);           // 1000ms delay

Before running the program on the Arduino Nano, you need to select the correct version of Arduino.

  • Under the “Tools” menu, enter the “Board” sub-menu and select “Arduino Nano w/ ATmega328” as shown in the image below. If that item is not listed, select “Arduino Nano” instead.
  • Under the “Tools” menu, enter the “Serial Port” sub-menu and select whatever device is listed there.
  • If the “Serial Port” sub-menu is not accessible, please ask a facilitator to check your machine because the Arduino drivers may not be set up correctly.


To download and run the program on the Arduino, click the right-facing arrow button on the toolbar of the Arduino IDE:


At this point you should hopefully see the green LED flashing on and off slowly. If it’s not and you can’t figure out why, please ask a facilitator to check what’s wrong.

Once your LED is blinking, there are four things you need to understand before moving on:

  1. How one of the Arduino pins (D2) was turned into a digital output.
  2. How the LED is turned on.
  3. How the LED is turned off.
  4. How to delay the program for a specified number of milliseconds, so that the rate of the LED blinking can be controlled.

Once you understand these four things, you have finished this part of the task (the easy part) and it’s time to move on to the LED Flash Challenge.

Part 2: LED Flash Challenge

In this part, you’re going to modify your circuit to create a simple optical transmitter, which transmits a digital message (a sequence of 1s and 0s) as a series of LED flashes.

The message that you’ll transmit will be 2 bytes long (a byte is 8 bits, or 8 ones and zeros) and it will contain your team number (byte 1) followed by a second number calculated by subtracting your team number from 255 (byte 2).

For example, if your team number is 79…

  • byte1 = 79
  • byte2 = 255 – 79 = 176
  • byte1 + byte2 = 255

Here, let me explain how binary numbers work…

Try doing some independent research on binary numbers. There’s lots more great stuff on YouTube, Wikipedia, etc.

Specifically, you need to do the following:

  1. Modify the code to create a second digital output pin.
  2. Extend the circuit by adding a second LED (with current limiting resistor) to that digital output pin.
  3. Convert your team number into an 8-bit binary number. This is byte 1 of your message.
  4. Calculate the required value of byte 2 (so that byte1+byte2 = 255) and write it as an 8-bit binary number.
  5. Each byte will be transmitted as a sequence of ones and zeros, preceded by a start bit (1) and followed by a stop bit (0). That means your complete transmission will be 20 bits long. You should calculate this sequence ad write it down on paper first.
  6. To transmit a 1, turn LED1 off and LED2 on for 500ms.
  7. To transmit a 0, turn LED2 off and LED1 on for 500ms.
  8. To ensure the sequence is read correctly, transmit a long sequence of zeros (for about 5 seconds) before you transmit your message.
  9. As is typically the case in digital transmissions, each byte must be transmitted least significant bit first.

Let’s consider that example team number 79 again. As explained above, byte 1 is 79 and byte 2 is 146.

  • Before transmitting the sequence, send a “0” for about 5 seconds.
  • The first bit of the sequence is the start bit for byte 1 which is “1”.
  • Written as a binary number, 79 (seventy-nine) is 0b01001111. The “0b” prefix indicates that a number is being written in binary form – it’s not part of the number value. The byte is transmitted least significant bit first, i.e. in the following order: “1,1,1,1,0,0,1,0”.
  • The next bit is the stop bit for byte 1, which is “0”.
  • The next bit is the start bit for byte 2, which is “1”.
  • Written as a binary number, 216 is 0b10110000, so the next 8 bits are “0,0,0,0,1,1,0,1”.
  • The final bit is the stop bit for byte 2, which is “0”.

To summarise, the complete 20-bit sequence for team 79 would be as follows:


The validator for checking your transmission is a web application which I have posted at the following location:

I will set up a validation station in KEG-036 where you can record your result once your circuit is working. Other tutors will hopefully set up validation stations in the other rooms, but that may depend on the final rooms allocated as well as available cameras and light levels.

You are welcome to try the validator on your own laptop / PC. In principle, it should work on any modern PC with a webcam and up-to-date browser. However, since video capture is relatively new in HTML, I recommend using the current release of Google Chrome which is what I tested it in. Some people have successfully used it in the web browser on their phone.

Your tutor will be able to clarify anything you don’t understand about this.

Posted in Uncategorized | Leave a comment

RoboSumo Tournament semester 1 2019-2020 – 2pm Wed 4/12/2019

This semester’s RoboSumo tournament
takes place at 2pm,
Wednesday 4th December 2019
in room KEG-036, DIT Kevin St

Click here for Live Tournament ranking
(Note: All rankings are provisional and subject to change)

Please review the following information carefully from start to finish.

Tournament time and location

The tournament will commence at 2pm on Wednesday 4th December 2019 in room KEG-036, which is located in one of the smaller side corridors on the ground floor of the main building in DIT Kevin St. Weigh-in and robot validation will take place from 14:00-14:45. The first bouts will commence at 15:00. During the initial “sorting” phase of the tournament, competitors will be divided into two pools, each of which will be assigned to one of the two competition arenas. Within each pool, sorting will proceed based on the bubble sort process previously described in class. The initial ranking will be determined by the results of the Tip the Can competition.

The exact duration of the tournament will depend on how quickly things progress, but we aim to be completely finished by 5pm. To ensure that the tournament proceeds efficiently, teams must comply with the instructions of the referee(s) without dispute at all times.

Robot Weigh-in – 2:00pm in KEG-036

Before your robot can compete in any sumo bouts, it must weigh-in and be measured to ensure compliance with the competition rules.

  • The weight limit is 500 grams, as measured using the electronic scales in room KEG-036. This includes every part of the competing robot, including batteries.
  • The size limit is 10 cm x 10 cm x 10 cm (no part of the robot is allowed to be outside this boundary). The size limit will be strictly applied.

Teams should present their robots for the weigh-in at 2:00pm in room KEG-036. One of the tutors will act as compliance officer, managing the weigh-in. He/she will run through a checklist with each team.

Sumo Bouts – 3pm in KEG-036

From 3:00pm onwards, teams should be continuously present in room KEG-036 and ready to compete immediately whenever summoned to one of the arenas. When a referee summons two robots to the arena for a bout, if one robot is ready to compete but the other is not (e.g. the team fails to present themselves at the arena, or the robot is non-compliant, or the robot is non-functioning) the first robot will be granted a walkover victory in that bout. In that case, however, the losing team remains eligible to compete in subsequent bouts (until they are eliminated from the tournament).

Submitting Your Robot for Formal Assessment – KEG-036

Once your team is eliminated from the competition (or has won!), you must submit your robot for assessment. This is critically important for your final grade. The compliance officer (or another tutor) will be managing the submission of robots and will run through the following checklist with each team:

  1. Have you submitted your robot? A clear label showing the robot’s name should be securely attached. Suitable labels will be available in KEG-036.
  2. Optional: Have you attached a 1-page feature guide to your robot? This sheet can be used to highlighting interesting design features that might not be immediately obvious to the assessment panel during the design assessment. There is no special format for this page – if you’re including one, just make it clear, fold it up, and attach it securely to your robot.
  3. Have you provided a completed robot information sheet? This sheet includes: team/robot name, team number, tutor name, programme code, name of every team member, blog address of every team member. Blank paper copies of the robot information sheet will be available in KEG-036.

Please do not leave without submitting your robot. Doing so may have a catastrophic effect on your grade.

TU Dublin tournament rules

The RoboSumo tournament rules are those of the Robot Challenge “Mini” class, mostly as described in the Robot Challenge rules PDF document. However, those rules make provision for tournament organisers to introduce local rule changes as appropriate. The following rule variations apply in the TU Dublin RoboSumo tournament:

The beginning of each bout:

  1. Infrared starting devices are not required (and generally are not used). Instead, each team nominates a single team member as the designated starter for each bout. The designated starter manually starts the robot at beginning of each bout, as instructed by the referee. The specific method of starting the robot is left up to each team – flicking a switch, pressing a button, inserting a wire, inserting a battery, etc. – but whatever method is used, the robot must remain stationary until it is started.
  2. The referee positions both robots before the bout begins (or instructs the competitors where to position them). Ordinarily, the referee will place the robots on opposite quadrants of the arena, each facing along a line parallel to that of the other robot, but not in the direction of the opponent. However, the starting position and orientation of each robot within the arena is entirely at the discretion of the referee.
  3. Once the referee has positioned the robots, each robot must remain stationary until the referee says “Go”.
  4. When the referee says “Go” each team’s designated starter starts his/her robot.
  5. The designated starter is only allowed to start the robot – he/she may not change the position or orientation of the robot in the arena.
  6. Once the robot begins moving, the designated starter may not touch the robot again until the bout has ended. He/she must withdraw from the arena and have no further contact with the robot until the bout ends.
  7. The designated starter may not touch his/her robot after it has begun moving (or has moved from its initial position).
  8. The designated starter may not touch his/her robot after the opponent robot has made physical contact with it.
  9. The designated starter may not touch the opponent robot at any time.

The end of each bout:

  1. The duration of each bout is limited to 30 seconds.
  2. If both robots remain in the arena when the time limit for the bout expires, the referee will decide the winner based on each robot’s distance from the centre of the table (the closer the better), robot activity/behaviour during the bout, attitude/behaviour of each team during the bout, and/or other criteria at his/her own discretion. The referee may explain the criteria upon which the winner of a bout was chosen, but is not required to do so.

Other rules:

  1. When a bout fails to produce a clear winner, the referee may, at his/her own discretion, order the bout to be replayed.
  2. During the sorting phase of the competition, matches will consist of a single bout. However, in the latter (knockout) stages of the competition the number of bouts in each match increases (best of 3 or best of 5).
  3. The dimensions of each arena will be similar to those described in the Robot Challenge rules (77cm diameter with a 2.5cm white border), but may deviate slightly from them. However, the white border will not be less than 2.5cm in width.
  4. A robot which displays no responsiveness to its opponent or its surroundings for a significant period of time may, at the referee’s discretion, be disqualified from a bout. In particular, please note that robots which simply spin on the spot will be viewed very unfavourably by the referees unless they exhibit other behaviour which provides evidence that the spinning forms part of a meaningful control strategy.
  5. Each team’s robot spending limit is €70. This figure must include the cost of all components included in the final robot, as it is presented for the tournament validation process, with the following specific exceptions. The €70 budget does not include the cost of components or materials purchased but not used in the final robot. It does not include any cost incurred for postage and packing. Most recycled materials which are obtained free of charge do not need to be accounted for in the robot budget, but specialised components which would not be available to other teams through normal scavenging (e.g. remote control servos) may need to be represented by an indicative cost. In general, the referees do not systematically verify the cost of every robot, but where a specific dispute arises or it is suspected that a robot may be in breach of this rule, a team may be asked to provide evidence of their total spending (e.g. by providing receipts or showing where each component used can be purchased for the claimed price). Where a team is suspected to be in breach of this rule and cannot prove otherwise, the referees may apply a penalty of some kind or even disqualify a robot from the tournament.

Important note: Every effort has been made to compose the rules of each bout and the structure of the tournament as a whole in a way that is fair and consistent, but since it is impossible to anticipate every eventuality, the referee(s) must have ultimate discretion to overrule any regulation or introduce a rule change at any time.

Tournament structure

The tournament is divided into two main phases – a sorting phase and a knockout phase. Each team must also complete a validation process prior to competing in their first match.

Validation process

The validation process ensures that each robot complies with the restrictions on size and mass imposed by the Mini class rules. Teams who do not successfully complete the validation process are not eligible to compete in competitive bouts and can therefore only move down in the tournament ranking. Teams who are unable to field a compliant robot may still be asked to compete in one or more exhibition bouts for assessment purposes, but they cannot progress to the knockout phase of the tournament.

  • The mass of the robot, including batteries and all parts which will be attached to the robot during a bout, must not exceed 500 grams.
  • The size of the robot must not exceed 10 cm by 10 cm by 10 cm. Note that robots are permitted to expand beyond their 10cm by 10cm footprint after the start of a bout, as described in the Robot Challenge rules.
  • All ground contact points that bear the weight of the main body of the robot must fit within the 10 cm x 10 cm footprint throughout the entire bout. It is permissible for parts of the robot to touch the ground outside the 10 cm x 10 cm footprint once the bout is underway, but the weight of the main body of the robot must not rest on them.

Following validation (the “weigh-in”), if a team makes any change to their robot which increases its size or mass, they must repeat the validation process prior to competing in a match.

Sorting phase

The initial ranking will be determined primarily by the results of the Tip the Can challenge. The objective of the sorting phase is to select the top 8 teams. A variation on the so-called bubble sort will be used for the majority of the sorting phase. However, the referee(s) may deviate from this pattern at his/her/their own discretion to resolve any unforeseen ranking issues or anomalies.

In each of the two pools (odd and even), the sorting phase will continue until the referee is satisfied that he/she has identified which 4 teams should progress from that pool to the knockout phase of the tournament.

Knockout phase

The 8 (or 16 depending on the total number of competitors) top-ranked teams will proceed to the knockout phase of the tournament. When a team loses a match in this phase, they are eliminated from the tournament. The referees will decide the number of bouts per match in each stage of the knockout phase (ordinarily best of 3 bouts, apart from the final which is best of 5 bouts).

Laboratory access during the tournament

  • There will be no RoboSumo lecture from 2-3pm on the day of the tournament. Instead, teams will proceed directly to KEG-036 at 2pm for the tournament weigh-in.
  • Access to laboratories other than KEG-036 before 3pm on the day of the tournament will be subject to the limitations of the timetable for each laboratory (other classes may be timetabled in some rooms before 3pm).
  • Room KEG-036 will be open from 2pm onwards. However, space may be limited due to re-organisation of tables for the tournament.
  • The normal lab facilities will be available from 3pm onwards, to facilitate teams who wish to carry out repairs or adjustments to their robots. However, bear in mind that if the referee summons you to a match and you are not present, your opponent will be granted a walkover victory. The live ranking spreadsheet can provide a guide to when each team is likely to be called to compete.

Competitor check list

Inevitably, many teams will face technical issues on the day of the tournament, and it’s impossible to foresee every problem. However, there are certain issues which we see every year:

  1. PLEASE PLEASE PLEASE ensure that your robot is compliant with the size and weight limits. Yes, 101mm is too much! And yes, 501 grams is too much! To avoid unexpected problems, please leave some margin for error. We need to be absolutely strict about these limits and butchering your carefully crafted robot at the last minute to reduce its size or weight can be a heartbreaking experience.
  2. If you haven’t already tested your robot actually driving around, please do so BEFORE the tournament. Bizarrely, every year we see teams who leave it until the very last minute to attach the wheels to their motors for the first time. Unfortunately, many of them discover at that point that their gearing is totally inappropriate and the robot cannot actually move.
  3. Focus on the basics. This means getting your robot moving around and responding to its sensor(s).
  4. Make sure your robot doesn’t simply spin around the spot for the entire bout. This behaviour will be viewed very unfavourably by the referee.
  5. Make sure you bring spare batteries.

Finally, remember to get plenty of photos and videos of your robot (and team) in the run up to and during the tournament. Of all the evidence you will provide on your blog, photos and videos are some of the easiest to create, and they can really help to tell the story of your project.

Finally, best of luck to all of you!

Posted in Uncategorized | Leave a comment

State machine example from today’s lecture

// State machine example from lecture on 20-11-2019
// Written by Ted Burke - 20-11-2019

int state = 1; // state variable

// rangefinder pins
int trig_pin = 7;
int echo_pin = 8;

// motor control pins
int lmf_pin=3, lmr_pin=4, rmf_pin=5, rmr_pin=6;

void setup()
  pinMode(lmf_pin, OUTPUT); // LM forward
  pinMode(lmr_pin, OUTPUT); // LM reverse
  pinMode(rmf_pin, OUTPUT); // RM forward
  pinMode(rmr_pin, OUTPUT); // RM reverse

  pinMode(trig_pin, OUTPUT); // rangefinder trigger pin

void loop()
  float d;      // distance in metres
  int fls, frs; // colour sensors
  // Read sensors
  d = distance();
  fls = analogRead(0);
  frs = analogRead(1);

  // Implement current state
  if (state == 1) // FORWARD TO LINE
    motors(1, 1); // both motors forward

    if (fls > 500) state = 2;
    if (frs > 500) state = 3;
    if (d < 1.0) state = 6;
  else if (state == 2) // STRAIGHTEN UP RIGHT SIDE
    motors(0, 1); // LM stop, RM forward

    if (frs > 500) state = 4;
  else if (state == 3) // STRAIGHTEN UP LEFT SIDE
    motors(1, 0); // LM forward, RM stop

    if (fls > 500) state = 4;
  else if (state == 4) // REVERSE TO CENTRE
    motors(-1, -1); // both motors reverse

    delay(1200); // 1.2 second delay
    state = 5;
  else if (state == 5) // SPIN CLOCKWISE
     motors(1, -1); // LM forward, RM reverse

     if (d < 0.5) state = 6;
  else if (state == 6) // CHARGE
    motors(1, 1); // both motors forward

    if (d > 0.5) state = 1;

// This function sets the direction of left and right motors.
// For each motor: 1 for forward, -1 for reverse, 0 for stop.
void motors(int left, int right)
  if (left > 0)
    digitalWrite(lmf_pin, HIGH); // LM forward
    digitalWrite(lmr_pin, LOW);
  else if (left < 0)
    digitalWrite(lmf_pin, LOW);
    digitalWrite(lmr_pin, HIGH); // LM reverse
    digitalWrite(lmf_pin, LOW); // LM stop
    digitalWrite(lmr_pin, LOW);

  if (right > 0)
    digitalWrite(rmf_pin, HIGH); // RM forward
    digitalWrite(rmr_pin, LOW);
  else if (right < 0)
    digitalWrite(rmf_pin, LOW);
    digitalWrite(rmr_pin, HIGH); // RM reverse
    digitalWrite(rmf_pin, LOW); // RM stop
    digitalWrite(rmr_pin, LOW);

float distance()
  // Read the distance from the rangefinder
  int duration;                              // stores echo pulse duration in microseconds
  float d;                                   // stores the distance in metres
  digitalWrite(trig_pin, HIGH);              // begin trigger pulse
  delayMicroseconds(20);                     //
  digitalWrite(trig_pin, LOW);               // end trigger pulse
  duration = pulseIn(echo_pin, HIGH, 10000); // measure echo pulse duration
  d = 340e-6 * (duration/2);                 // convert to distance in metres
  delay(50);                                 // 50 ms delay to allow echoes to fade away

  return d; // pass the distance in metres back to the calling function
Posted in Uncategorized | Leave a comment

Guidelines for RoboSumo laser cutting

Useful information about using Inkscape to prepare drawings for laser cutting can be found in this earlier blog post:

Submitted designs must comply with the following guidelines:

  1. The material used will be 3mm acrylic.
  2. One submission at a time from each team. If you realise an error in your submitted drawing, please submit a replacement drawing as a reply to your original email. Only the last compliant submission from each team will be cut. If your design has already been cut before a replacement drawing is submitted, you will receive the one that was cut.
  3. The page size of your drawing must be 600mm (width) by 300mm (height).
  4. You should submit two copies of your drawing. The first should be PDF format (with 600x300mm page size). The second should be either SVG (if you’re using Inkscape) or DXF (if you’re using AutoCAD or some other drawing tool).
  5. Whatever drawing software you use, please set all dimensions to millimetres (mm) to avoid the pieces coming out the wrong size.
  6. To avoid wasting material during the cutting process, please pack your pieces along the left edge of the drawing, leaving a 5mm margin empty at the edge of the page.
  7. The drawing should contain only lines and curves to be cut by the laser. All lines and curves should be black (RGB value 0,0,0), fully opaque, and with a line width of 0.01mm. There should be no filled shapes or shaded areas. No other colours should be used. No labels or dimensions should be shown in the drawing.

I recommend using Inkscape for preparing your laser cutting designs. It’s a very flexible tool for 2D graphic design and illustration work which goes far beyond what you do for laser cutting patterns. The time you spend getting familiar with it will pay huge dividends in the future if you learn to use it well. Some useful tips for laser cutting drawings in Inkscape:

  1. Press Shift+Ctrl+D to open “Document Properties”. Set “Display units” to “mm”. Under “Page size”, in the “custom size” panel, set width to 600mm and height to 300mm. Personally, I also disable the page border shadow and set the page border colour to green so that I don’t mix it up with the lines of the drawing. Then close Document Properties.
  2. Press Ctrl+Shift+P to open Inkscape’s “Preferences” dialog. In the “Tools” section (which should be visible when the dialog opens) select “Geometric bounding box”. Then close Preferences.
  3. When your drawing is complete, ensure the width of all lines is 0.01mm. To do so, press Ctrl+A to select the whole drawing. Then press Ctrl+Shift+F to open the “Fill and Stroke” dialog. Under stroke style, select a line width of 0.01mm. It should be applied to all selected objects. You should also ensure the line colour is black, the opacity is 100%, and the fill is set to transparent.

Other suggestions:

  1. To verify that your drawings are correct before submitting them, a very effective method is to cut them out of 3mm foamboard by hand and check they fit together. To do so, print your design it’s full size on A4 paper (you may need to adjust the page size of your drawing). Stick the paper printout onto a sheet of foam board using double sided tape or glue. Use a craft knife to cut along each line very carefully. With care, you can produce an excellent approximation to the final laser cut parts which will help to identify any oversights in the design. Foamboard can be purchased in Eason’s for about 1-2 euro per A4 sheet.

If you have queries about creating or submitting your drawing, you can ask me or one of the other tutors in the lab or send me an email.

Posted in Uncategorized | Leave a comment