Code and circuit from today’s lecture

//
// Stay on Table example for MSP430G2553 / MSP430G2452
// Written by Ted Burke - Last modified 22-3-2017
//
// P1.1 = Colour sensor input - low on black, high on white
// P2.0 = LED
// P2.1 = LM forward
// P2.2 = LM reverse
// P2.3 = RM forward
// P2.4 = RM reverse
//

#include <msp430.h>
  
void main( void )
{
    WDTCTL = WDTPW + WDTHOLD; // Disable watchdog timer
      
    P1DIR = 0b00000000; // P1.1 is colour sensor
    P2DIR = 0b00011111; // P2.0 is LED, P2.1-4 are motors
    
    // Main loop repeats forever
    while(1)
    {
        if (P1IN & BIT1)
        {
            // white detected
            P2OUT = 0b00010010;
        }
        else
        {
            // black detected
            P2OUT = 0b00001011;
        }
    }
}
Posted in Uncategorized | Leave a comment

Final opportunity to record a Week 6 Race to the Wall time: 13:20-14:00 Friday 3-3-2017

By popular demand, we are providing one final opportunity to record a Week 6 Race to the Wall time tomorrow (Friday, 3-3-2017) between 13:20 and 14:00 in room KEG-036. This is for teams who were close to completing the Race to the Wall on Wednesday and have since ironed out any remaining problems. It is not a workshop session; no materials or equipment will be provided and there will be no technical support! Teams that don’t have a fully working robot should just wait until next week to record a time. We’ll have a whole lab session on Wednesday to get those robots working.

According to the timetable, DT066A groups who are doing RoboSumo this semester have classes scheduled in Bolton St up until 13:00, so there should be adequate time to travel across to Kevin St after class if you wish to avail of this opportunity.

Please note that this is just an opportunity to record a time – there will be no technical support! I’ll basically just be typing results into the spreadsheet for teams who now have a fully functioning robot.

Ted

Posted in Uncategorized | Leave a comment

Race to the Wall, March 2017 – Rules and Information

This semester’s Race to the Wall event will commence at 3pm (or shortly thereafter) on Wednesday 1st March 2017. The event will end on the same day at a time chosen by the RoboSumo tutors, not earlier than 6pm.

Teams who do not complete the Race to the Wall task on Wednesday 1st March 2017 (week 6) will have a second opportunity to complete the task on Wednesday 8th March 2017 (week 7). However, any teams that complete the challenge for the first time in week 7 will be ranked below all teams that complete the challenge in week 6.

The final ranking will be determined as follows:

  1. The highest ranked teams will be those that complete the Race to the Wall task in week 6 and are fully compliant with the weight and size restrictions (see below). These teams will be ranked in ascending order of recorded time, each team’s recorded time being their best time achieved in week 6.
  2. The next ranked set of teams will be those that complete the task in week 6 but are not fully compliant with the size and weight restrictions. These teams will be ranked in ascending order of recorded time, each team’s recorded time being their best time achieved in week 6. Please note, however, that permission to attempt the task with a non-compliant robot will be granted at the discretion of the RoboSumo tutors only. Robots which grossly exceed the limits will be disqualified.
  3. The next ranked set of teams will be those that complete the task in week 7 and are fully compliant with the weight and size restrictions. These teams will be ranked in order of speed.
  4. The next ranked set of teams will be those that complete the task in week 7 and are not fully compliant with the weight and size restrictions. These teams will be ranked in order of speed.
  5. The final ranked set of teams will be those that do not complete the task in either week, but are still be deemed by the tutors to merit ranking on the basis of technical attainment.

Before stating the rules formally, here’s a quick introduction:

(Editable SVG versions of gallery images: 0, 1, 2, 3, 4, 5, 6)

Rules

The Competition

The competition requires each robot to compete in a time-trial race. Robots perform the time trial one at a time and are ranked on a leaderboard. The objective is to complete the race as quickly as possible.

The results of the race will be used to determine your robot’s starting position on the RoboSumo Leaderboard for the final RoboSumo competition. The format of this semester’s RoboSumo tournament is still to be finalised, but in previous DIT RoboSumo tournaments starting higher on the leaderboard was a significant advantage.

In the event of a tie between two or more robots in the Race to the Wall, the position on the leaderboard will be determined by an assessment of the quality of the robot construction.

The Race

The robot begins in a starting position before the start/finish line (see Figure 1). A team member pressed a start button or otherwise switches on the robot’s power, then withdraws. Team members may not physically propel the robot. Once the robot is activated, team members may not intervene or interfere with it in any way for the full duration of the task.

The robot must do the following:

  • Move forward autonomously from the starting position,
  • Break the start/finish laser beam once and only once (the first of two times during the race),
  • Continue moving forward until it touches a block,
  • Move back towards the start/finish line,
  • Stop on the start/finish line within the 20 second time limit, breaking the start/finish laser beam for the second and final time. The beam must remain continuously broken for a minimum of 2 seconds.

When the robot returns to and stops on the start/finish line, if the beam becomes unbroken within 2 seconds the robot is disqualified and the time is not recorded on the leaderboard. Disqualification for this reason does not prevent a robot from attempting the task again.

If the robot successfully completes the task, the time recorded will be the time between the first and second breaking of the beam. Each team can attempt the task an unlimited number of times during the event. However, if others are waiting to attempt the task, a team must return to the back of the queue following each attempt. At the discretion of the tutors, teams who have not yet recorded a time may be given priority over teams who have already recorded a time but wish to improve upon it.

The Robot

The robot must satisfy the criteria for the mini-sumo class in the Robot Challenge robot sumo rules, with the following additional requirements:

  • At every moment during the race, there must exist a cuboid 10cm in horizontal length, 10cm in horizontal width and of unlimited height which encloses every part of the robot. In other words, the dimensions of a robot cannot expand outside its 10cm x 10cm footprint at any time during a race.
  • The sides of the robot must be covered with an opaque material so that the robot reliably breaks the start/finish laser beam once and only once as it passes through it.

The key features are:

  • The robot must be fully autonomous.
  • The footprint of the robot (its shape / area when viewed from above) must fit within a 10cm by 10cm square.
  • The robot’s mass must not exceed 0.5kg.

race_to_wall

Figure 1: The Race to the Wall track. (Click here to download editable SVG version of image)

The Track

The race will take place on a flat horizontal light-coloured surface (probably one or more tables) in room KEG-036. One end of the track is marked with a dark line of tape (the start/finish line). A block stands at the other end of the track. The track is between 1m and 2m in length (from the start/finish line to the block). The start/finish line is parallel to the vertical face of the block.

The Start/Finish Laser Beam

The laser beam is used to start and stop the timer for the race, and is used to accurately measure each robot’s race time. The laser will be in a fixed position at a height of 5cm and will be aimed horizontally across the track, above (and parallel to) the start/finish line.

The Block

The block is a solid object at least 20cm high and 50cm wide. It will be positioned such that its face is perpendicular to the table surface and parallel to the shorter edge of the table, as shown in Figure 1. The position of the block will be otherwise unspecified but will be the same for each competing robot.

Posted in Uncategorized | Leave a comment

Race to the Wall Ideas – images from lecture on 23-2-2017

This gallery contains 15 photos.

Gallery | Leave a comment

Video from today’s lecture: Humans Need Not Apply

This is the sobering video we watched in today’s RoboSumo lecture:

Posted in Uncategorized | Leave a comment

Getting started with the TCRT5000 IR sensor and a switch input

MSP430 Switch Input

The information below explains how to connect a switch input to your MSP430, which you might use to let your robot detect when it has touched the wall in the Race to the Wall.

screenshot_2017-02-15_14-01-44

Download PDF of the switch input example shown above.

TCRT5000 Infrared Reflective Sensor

The TCRT5000 shown below is an infrared (IR) reflective colour sensor that was included in the kit you received at the beginning of the RoboSumo project (TCRT5000 datasheet). It contains an IR LED and phototransistor in a single package. There are all sorts of useful things you can do with this extremely inexpensive sensor, but right now you’re main priority is probably to use it to detect the black finish line in the Race to the Wall.

20170215_135439

The information below introduces the TCRT5000 IR sensor and explains how to connect it to a digital input pin on the MSP430.

screenshot_2017-02-15_14-01-24

Download PDF of the TCRT5000 example shown above.

Posted in Uncategorized | Leave a comment

Images from today’s lecture

20170208_135700

20170208_135725

20170208_135736

20170208_135751

20170208_135801

20170208_135807

20170208_135813

20170208_135822

20170208_135841

Posted in Uncategorized | Leave a comment