Pandemic Design Challenge – Grand Final instructions and schedule

This post explains the process for the Grand Final of the Pandemic Design Challenge, which takes place this Wednesday afternoon (28th April 2021) at 2pm.

The competition will be broadcast live in MS Teams:

Link to live broadcast of Pandemic Design Challenge Grand Finale

The submitted videos will be streamed one by one in MS Teams so that we can all watch them together. We expect there will be approximately 25 videos in total. Voting will not begin until all videos have been streamed. You vote as a team, so you will have an opportunity to confer privately with your teammates after the final video is streamed, but before the voting begins. The voting system is similar to that used in the Eurovision Song Contest, so each team will be randomly assigned a country to represent. You will award points to ten teams. The points you will award to the ten teams are 12, 10, 8, 7, 6, 5, 4, 3, 2 and 1 respectively. You cannot award points to your own team. Hence, you need to select your ten favourite videos and rank them in order of preference.

Video Submission

The most important thing is that your team submits its video correctly:

  • One video per team, strictly 2-3 minutes in duration.
  • One team member uploads the video to YouTube.
  • Ensure the video is set as public on YouTube so that anyone with the link can view it.
  • One team member submits the YouTube link for the video to the “Pandemic Challenge” video assignment in the Design Projects module in Brightspace before 2pm on Wednesday 28th April 2021.
  • Please also upload a STILL FRAME image that displays your product/concept. This will be needed to remind viewers of your product prior to the voting process.

Grand Final Schedule

Before 14:00One person submits the YouTube link for each team’s video.
14:00-14:30Coverage begins in MS Teams with a review of the competition process and rules.
14:30-16:00Videos will be streamed one by one in MS Teams. For fairness, the viewing order will be selected randomly.
16:00-16:30Each team confers privately to agree their votes.
16:30-17:00Return to the main MS Teams meeting for the final voting. We will release a unique web link to each team to submit their votes. All incoming votes will be displayed in real time on a live scoreboard, so once all votes are cast the winner will be decided!

Posted in Uncategorized | Leave a comment

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