Pandemic Design Challenge – Rules & Guidelines

In this design challenge, working with your team you will use the components from your RoboSumo kits to create a new electronic device or system that reduces the spread of a disease during a pandemic. You will design, build and test a working prototype, then present it in a short video. The design challenge will conclude with a competition in which the submitted videos are ranked by popular vote, using a Eurovision-style voting system.

Each team member will document their individual contribution to the project on their own WordPress blog. These blogs will be assessed separately and are not part of the competition.

All government guidelines relating to Covid-19 must be followed strictly throughout the design challenge.

  • Video submission deadline: Before 2pm on Wednesday 28th April 2021
  • Videos will be posted on YouTube and links will be submitted via Brightspace
  • One video per team
  • Each team’s video must feature every team member
  • Minimum allowed video duration: 2 minutes
  • Maximum allowed video duration: 3 minutes

Video content:

  • Video title and opening credits, including all team members’ names.
  • Explain the design concept and how it works, including background research if applicable.
  • A demonstration of the working prototype (whatever you got working).
  • Technical summary of the prototype – briefly explain the circuit, code, mechanical design, etc.
  • Conclusion.

Additional guidelines:

  • Our intention in specifying a short video duration (2-3 mins) is to emphasise quality over quantity. Work with your teammates to plan a video that is clear and concise. Create a list/storyboard of all the elements that will appear in the video. Work carried out on planning, content creation, filming or editing is an important contribution to the project and can be documented on your individual blog.
  • Above all, the style and tone of the video should be professional. It’s good if it’s entertaining, but it should reflect well on you as a professional engineer. Do not include anything in the video that you wouldn’t want a potential employer to see.
  • The video should include accurate technical information.
  • The video must not include any crude, defamatory or offensive content.
  • The video can be “unlisted” on YouTube, but it must be publicly visible so that the lecturers and other teams can view it.

FAQ

  • Do we need to use all the parts in the RoboSumo kit? Short answer, no. You must use some of them, but it’s up to you which ones you use. Every team will probably use the Arduino and breadboard, but which sensors, motors or other components you connect to it will depend on the design concept you have chosen.
  • Do we need to write code for the Arduino? That depends on what the device you’re developing. Most teams will probably use the Arduino, but in some cases the required software will be very simple and it may be possible to adapt some existing code (e.g. from RoboSumo Cookbook) with only small modifications.
  • Can we buy additional parts/materials for our prototype? Yes, but a budget limit of €70 applies. This is the maximum amount of your own money that you can spend on materials that are used in the final prototype. Please note that no money will be reimbursed!
  • Do we need to count materials / components we already have into the budget? If the materials or components are things that any other team could easily obtain for free (e.g. by scavenging / recycling), then they do not need to be counted in the budget. However, if you use more specialised parts that other teams would have to pay to obtain, then these must be counted into the budget (look up an indicative cost for buying a similar component online).
  • Does every team member need to build a copy of the prototype? Not necessarily, but it’s probably advisable for more than one team member to build it, or at least to build parts of it, so that you can collaborate on testing and troubleshooting the design remotely. However, it’s up to you to decide who records each part of the final video, so strictly speaking you could have just one physical prototype.
  • Our prototype doesn’t work – do we still submit a video? Yes, absolutely. For the prototype demonstration section of the video, just do your best to show the prototype doing whatever it does do. The other elements of the video do not necessarily require a working prototype.
  • Our prototype doesn’t work – will we all fail the project? No, not necessarily. Obviously, it’s in your favour if the prototype works, but there are many elements to the formal assessment. The video competition will be decided by popular vote – a working prototype is probably an advantage, but there are many other aspects that are likely to affect people’s voting preferences. Any individual work you contributed to the project should be clearly documented on your individual WordPress blog. This will be assessed separately by your lab instructor. Again, a working (or partially working) prototype will be in your favour here, but credit will be given for other worthwhile contributions.

Posted in Uncategorized | Leave a comment

Example: Turn motor for 2 seconds when an object is detected

//
// Example: Turn motor for 2 seconds when an object is detected
// written by Ted Burke - 24-Mar-2021
//

// Define pin names
#define MOTOR_FORWARD 7
#define MOTOR_REVERSE 8

void setup()
{
  // Configure motor control pins as digital output
  pinMode(MOTOR_FORWARD, OUTPUT);
  pinMode(MOTOR_REVERSE, OUTPUT);
  
  Serial.begin(9600); // Open serial connection at 9600 bits/s
}

void loop()
{
  int v;

  v = analogRead(0); // read sensor voltage from pin A0
  
  Serial.println(v); // print measurement

  // If an object is detected, run the motor forward for 2 seconds
  // Increase or decrease the threshold (250) to vary sensitivity
  if (v > 250)
  {
    // Motor forward
    digitalWrite(MOTOR_FORWARD, HIGH);
    digitalWrite(MOTOR_REVERSE, LOW);
    
    delay(2000); // 2 second delay (change to set motor run time)

    // Motor stop
    digitalWrite(MOTOR_FORWARD, LOW);
    digitalWrite(MOTOR_REVERSE, LOW);
  }
}
Posted in Uncategorized | Leave a comment

Example: Distance alarm

This example is an audible alarm that sounds when the distance detected by the HC-SR04 rangefinder is between 0.5m and 1.5m. The idea is that objects which are very close (such as the user’s hands or clothes if someone is wearing the alarm) will not trigger the alarm, but objects which are approaching from farther away will sound the alarm once they move closer than 1.5m. The distance measurements are also printed out to aid with testing during system development.

//
// Example: Distance alarm
// This program sounds an audible alarm if the distance
// measured by the HC-SR04 ultrasonic rangefinder is
// between 0.5m and 1.5m.
// written by Ted Burke - 24-Mar-2021
//

// Define pin names
#define TRIG 5
#define ECHO 6
#define LED 2
#define SPKR 3

void setup()
{
  pinMode(LED, OUTPUT);  // Make LED pin an output
  pinMode(SPKR, OUTPUT); // Make speaker pin an output
  
  Serial.begin(9600); // Open serial connection at 9600 bits/s
}

void loop()
{
  float d;

  delay(100);        // ensure minimum 100ms delay since last reading
  d = distance();    // measure distance
  Serial.println(d); // print distance

  // Sound alarm if distance is between 0.5m and 1.5m
  if (d > 0.5 && d < 1.5)
  {
    digitalWrite(LED, HIGH); // LED on
    analogWrite(SPKR, 127);  // sound on  
  }
  else
  {
    digitalWrite(LED, LOW);  // LED off
    analogWrite(SPKR, 0);    // sound off  
  }
}

float distance()
{
  unsigned long Tus; // propagation time in us
  float d;           // distance in metres
 
  // Ensure pin modes are set correctly
  pinMode(TRIG, OUTPUT);
  pinMode(ECHO, INPUT);
 
  // Send 20us trigger pulse
  digitalWrite(TRIG, HIGH);
  delayMicroseconds(20);
  digitalWrite(TRIG, LOW);
 
  // Measure echo pulse duration in microseconds
  Tus = pulseIn(ECHO, HIGH);
 
  // Calculate d, the distance in metres
  // - Tus is propagation time in us
  // - 1e-6 converts time to seconds
  // - 340.0 is speed of sound in m/s
  // - 0.5 divides distance by two
  d = Tus * 1e-6 * 340.0 * 0.5;
 
  // Return the distance in metres
  return d;
}
Posted in Uncategorized | Leave a comment

Example: Using the TCRT5000 as a proximity detector

//
// Example: Using the TCRT5000 as a proximity detector
// Written by Ted Burke - 24-Mar-2021
//

// Define the name of the LED output pin
#define LED 2

void setup()
{
  pinMode(LED, OUTPUT); // make LED pin a digital output

  Serial.begin(9600); // Open serial connection at 9600 bits/s
}

void loop()
{
  int v;
  
  v = analogRead(0); // Read voltage from pin A0

  Serial.println(v); // Print the measurement

  // When the voltage exceeds a threshold value,
  // turn on the LED. Otherwise turn it off.
  if (v > 250)
  {
    digitalWrite(LED, HIGH); // LED on
  }
  else
  {
    digitalWrite(LED, LOW);  // LED off
  }
}

The Serial Plotter screenshot below shows the readings obtained when a hand passed across the sensor at a distance of approximately 10 cm. In this system, the baseline level of the signal will depend greatly on the level ambient infrared light because the phototransistor voltage is extremely sensitive to light due to the large series resistance used (100 kΩ).

Posted in Uncategorized | Leave a comment

Example: Detecting daylight with the TCRT5000 sensor

In this example, the TCRT5000 is used to sense the infrared light that is normally present in daylight. The infrared LED in the TCRT5000 is not used in this circuit – only the phototransistor. Here, the output voltage of the phototransistor is very sensitive to small changes in the intensity of infrared light falling on it, because it is in series with a large resistance (100 kΩ). The example program below lights an LED when the sensor voltage exceeds a specified threshold value, which will occur when the daylight falling on the TCRT5000 is bright enough. Increasing the value of the 100 kΩ resistor will make the circuit even more sensitive to the light falling on it.

//
// Example: Detecting daylight with the TCRT5000 sensor
// Written by Ted Burke - 24-Mar-2021
//

// Define the name of the LED output pin
#define LED 2

void setup()
{
  pinMode(LED, OUTPUT); // make LED pin a digital output

  Serial.begin(9600); // Open serial connection at 9600 bits/s
}

void loop()
{
  int v;
  
  v = analogRead(0); // Read voltage from pin A0

  Serial.println(v); // Print the measurement

  // When the voltage exceeds a threshold value,
  // turn on the LED. Otherwise turn it off.
  if (v > 512)
  {
    digitalWrite(LED, HIGH); // LED on
  }
  else
  {
    digitalWrite(LED, LOW);  // LED off
  }
}

The readings from the sensor can be viewed in the Serial Monitor, as shown below.

Alternatively, the readings can be visualised in the Serial Plotter, as shown below. In this case, a hand was moving up and down over the sensor to vary the amount of daylight that was falling on it.

Posted in Uncategorized | Leave a comment

Example: Generating an audio beep using a loudspeaker

//
// Example: Generating an audio beep using a loudspeaker
// This program generates a 500 ms beep once every 2 seconds 
// Written by Ted Burke - 24-Mar-2021
//

#define SPKR 3

void setup()
{
  pinMode(SPKR, OUTPUT);  // make speaker pin a digital output
}

void loop()
{
  analogWrite(SPKR, 127); // sound on
  delay(500);             // 500 ms delay
  analogWrite(SPKR, 0);   // sound off
  delay(1500);            // 1500 ms delay
}
Posted in Uncategorized | Leave a comment

Example: Measuring distance with the HC-SR04 ultrasonic rangefinder

//
// Example: Measuring distance with the
// HC-SR04 ultrasonic rangefinder
// written by Ted Burke - 24-Mar-2021
//

// Define a name for each pin
#define TRIG 5
#define ECHO 6

void setup()
{
  // Open serial connection to PC at 9600 bits/s
  Serial.begin(9600);
}

void loop()
{
  float d; // distance in metres

  d = distance(); // measure the distance  
  
  Serial.println(d); // print the distance
  
  delay(100); // wait 100ms before next measurement
}

float distance()
{
  unsigned long Tus; // propagation time in us
  float d;           // distance in metres

  // Ensure pin modes are set correctly
  pinMode(TRIG, OUTPUT);
  pinMode(ECHO, INPUT);

  // Send 20us trigger pulse
  digitalWrite(TRIG, HIGH);
  delayMicroseconds(20);
  digitalWrite(TRIG, LOW);

  // Measure echo pulse duration in microseconds
  Tus = pulseIn(ECHO, HIGH);

  // Calculate d, the distance in metres
  // - Tus is propagation time in us
  // - 1e-6 converts time to seconds
  // - 340.0 is speed of sound in m/s
  // - 0.5 divides distance by two
  d = Tus * 1e-6 * 340.0 * 0.5;

  // Return the distance in metres
  return d;
}

The readings can be viewed in the Serial Monitor, as shown below.

Alternatively, you can visualise the readings using the Serial Plotter, as shown below.

The diagram below featured in my lecture on the HC-SR04 rangedfinder.

Posted in Uncategorized | Leave a comment

TrackTT programming example

This is the circuit for the examples I went through in class. I only demonstrated the programs in the Johnny805 simulator, rather than with a physical robot, but the pins referenced in the programs were the ones shown in this circuit diagram.

This was the diagram I drew of the SN754410NE integrated circuit, to explain its symmetrical pin layout.

  • The middle two pins on each side are ground pins (i.e. connect these four pins to ground).
  • The pins either side of the two ground pins are the outputs (i.e. connect the motors to these).
  • The pins either side of the two outputs are the inputs. These are the pins one in from each corner of the chip. These are where the signals coming from the Arduino are connected.
  • Pins 8 and 16 (bottom left and top right respectively in the diagram) are the positive voltage supply. These should be connected to 6V in your robot.

The following flow chart describes the logic used in the first example program to guide the robot along one edge of the track using a single TCRT5000 sensor module.

This is a screenshot of the first example program running in the Johnny805 simulator:

This is an extract from the final example program, which used two sensors (front left and front right) to complete the track faster:

void loop()
{
    int fls, frs; // front left sensor, front right sensor

    fls = analogRead(0); // read voltage from front left sensor
    frs = analogRead(1); // read voltage from front right sensor

    if (fls > 800)
    {
        pivot_left(); // left motor stop, right motor forward
    }
    else if (frs > 800)
    {
        pivot_right(); // left motor forward, right motor stop
    }
    else
    {
        drive_forward(); // left motor forward, right motor forward
    }
}
Posted in Uncategorized | Leave a comment

Introducing the TCRT5000 reflective infrared sensor

TCRT5000 datasheet: https://www.vishay.com/docs/83760/tcrt5000.pdf

Instructions to build the TCRT5000 sensor module on a piece of terminal block are in part 3 of this page: https://roboslam.wordpress.com/instructions/

Snapshots from today’s lecture:

//
// TRCT5000 sensor example
// Written by Ted Burke - last updated 24 Feb 2021
//

void setup()
{
  pinMode(4, OUTPUT);

  Serial.begin(9600); // open a serial link to PC at 9600 bits/s
}

void loop()
{
  int Vpt; // phototransistor voltage

  Vpt = analogRead(3); // read voltage from pin A3 as a number between 0 and 1023

  Serial.println(Vpt);

  if (Vpt > 800)
  {
    digitalWrite(4, HIGH); // LED on    
  }
  else
  {
    digitalWrite(4, LOW); // LED off
  }
}
Posted in Uncategorized | Leave a comment

Track TT Competition – video submission deadline is 1pm 10 Mar 2021

This competition is a robot track time trial (TT). You will build an autonomous (self-guiding) robot to drive from one end of a marked track to the other end in the shortest possible time. You will work individually for this task and submit a video of your robot completing the time trial (or as much as you get working) no later than 1pm on Wed 10 Mar 2021. Results will ranked based on time taken by each robot to complete the task, as well as compliance with the rules set out below.

At the beginning of the time trial, the robot is placed over the start end of the stripe.

The robot follows the track from the start to the finish end of the stripe, keeping some part of itself directly above the stripe at all times. You cannot touch or otherwise influence the robot during the time trial – it must be completely autonomous.

The time trial ends when any part of the robot is directly above the finish end of the stripe.

If the robot leaves the track at any point, that attempt at the time trial is null and void.

The Track

  • The track will be marked with a clearly visible stripe on a horizontal surface.
  • The maximum permitted width of the stripe is 5cm.
  • The track consists of five straight sections, each at least 50cm in length.
  • At every meeting point between two straight sections, the track turns a right-angled corner (i.e. 90 degrees).
  • As the robot travels along the track from beginning to end, the corners are as follows: left turn, left turn, right turn, right turn.
  • The colour of the stripe and of the horizontal surface are left up to each team, but the stripe must be clearly visible in each recorded video.

Recording your time trial

  • The time trial must be recorded on video, for example using a smartphone.
  • Throughout the video, the camera must be held stationary above the track, looking approximately vertically down on the track.
  • To verify the scale of the track and robot, a 30cm ruler should be placed on the ground within view of the camera.
  • Your full name and the name should be clearly marked on a sheet of paper and placed within view of the camera, as shown in the illustrations above.
  • The footage of the time trial should not be edited or modified in any way prior to submission.
  • At the beginning of the time trial, the robot is placed so that some part of the robot is directly above one end of the marked stripe.
  • At every moment throughout the time trial, some part of the robot must remain directly above some part of the stripe.
  • The time trial ends when any part of the robot is directly above the finishing end of the marked stripe.
  • The recorded result for the time trial will be the time elapsed between the last moment when the robot was above the start end of the stripe and the first moment when the robot is above the finishing end of the stripe.
  • The robot must remain in contact with the horizontal surface throughout the time trial.
  • It is not permitted to touch, influence or otherwise interfere with the robot during the time trial – it must operate completely autonomously.
  • If the robot leaves the track at any point during the time trial, the attempt is null and void.

Robot specification

  • The maximum permitted size of the robot is a cube 150 mm on all sides (i.e. 150 mm × 150 mm × 150 mm).
  • The only permitted power source for the robot is 4 × AA batteries (e.g. the battery pack you received in your kit).
  • You are permitted to source additional components and materials for use in your robot, at your own expense. However, the maximum permitted budget for parts used in a robot during the time trial is €20 (of your own money). This excludes the cost of parts supplied by the college and materials you have obtained for free (provided that similar materials could easily be obtained for free by other competitors). Note that you do not need to spend any money to complete this challenge. Also, please note that any money you choose to spend will not be reimbursed by the college.

Submitting your time trial video

  • First, upload your video to YouTube and make it publicly visible. (You may select to make it “unlisted” which will prevent it from appearing in search results.)
  • We recommend creating a Google/YouTube account using your TU Dublin email address and using this to upload videos of your college work. This will keep it separate from your personal YouTube channel (if you have one) and ensure that everything in your dedicated TU Dublin YouTube channel is related to your work as an engineer.
  • Add the video to your WordPress blog by embedding it in a blog post.
  • You will also submit the video in Brightspace. An assignment will be available in the Design Projects module for submitting this URL. Further details will be provided close to the deadline.
  • Time trial video URLs submitted after the deadline (1pm 10 Mar 2021) has passed may be considered for academic assessment purposes, but will be ranked below all qualifying entries received prior to the deadline in the competition results.

Documenting your Track TT work in a WordPress blog post

  • Every student writes an individual blog post about their work on the Track TT.
  • Embed the YouTube video of your submitted time trial (and optionally other attempts).
  • Include photos of your robot, highlighting any noteworthy design features.
  • Include a circuit diagram using the conventional circuit symbols (i.e. not a drawing of your breadboard layout).
  • Include one or more clear photos of your breadboard and any other wiring you completed (e.g. TCRT5000 colour-sensing modules).
  • Include your complete Arduino code for the working robot. Ensure that the code includes clear accurate comments, is easy to read, and is neatly indented.
  • Include a flow chart / state table / logic diagram or something similar to explain how your code works.
  • Include photos of any design sketches or schematics you have drawn.
  • Include a brief reflection on what you learned while working on the Track TT challenge.

Example TrackTT video

Posted in Uncategorized | Leave a comment