[SOLVED] CG1111 Project 1-The A-maze-ing Race

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon mBot-Maze-Race-Project-main-ecujkf.zip (453.6 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (2 votes)

 

Welcome to the grand project of CG1111: The A-maze-ing Race!

In this race, your mBot needs to find its way through a maze in the shortest time. Similar to its namesake TV program, your mBot will be facing a number of challenges at intermediate waypoints while attempting to complete the race. To successfully meet all the requirements, you need to have a good grasp of many of the principles you have learnt in CG1111 and apply them into good practice!

The following are the key requirements:

  1. The mBot must not bump into any wall. Your mBot shall rely on a front ultrasonic sensor, and two side IR proximity sensors to accomplish this. You also need to come up with your own algorithms to meet this requirement. Note that there will be penalty points for bumping into walls, even if your mBot doesn’t get stuck.
  2. All turns in the maze are dictated by the waypoint challenges. Your mBot must not make any automatic turn without decoding a challenge.
  3. At each waypoint challenge, there will be a black strip (about 4 cm by 21 cm) on the maze floor. Your mBot needs to detect the black strip, stop, solve the challenge above it, and act according to the turn instruction decoded from the challenge.
  4. There are two types of challenges that dictate the turns at the waypoints:

(i) Colour-sensing Challenge:
Your mBot already has two RGB LEDs and one LDR built on its mCore. You need to use them to implement colour-sensing. (Note that you need to remove the top cover of your mCore to accomplish this.) Depending on the colour of the paper that your mBot senses above it, it needs to execute one of the following five types of turns:

Table I summarizes how the colours are to be interpreted. Setups with colour samples for each type of turn will be provided in the lab. Note that the colour paper will be suspended at a height of about 14 cm from the maze floor. Hence, your mBot’s maximum height (including all the wires and other components) must not be taller than 14 cm.

1

Table I: Colour interpretation for the Colour-sensing Challenge

Colour

Interpretation

Left-turn

Right turn
White 180° turn within the same grid

Two successive left-turns in two grids Two successive right-turns in two grids

(ii) Sound-based Challenge:
At this challenge waypoint, there will be a speaker suspended above the mBot that plays two frequency tones (fA = 300 Hz, and fB = 3000 Hz) that are superimposed together. Depending on the relative loudness of fA with respect to fB, the mBot needs to execute one of the following three types of turns.

Table II: Interpretation of Relative Loudness for the Sound-based Challenge

Red

Green

Orange

Blue/cyan

Case

Relative Loudness

Interpretation

1 fA louder than fB
2 fB louder than fA
3 fA and fB have about the same loudness

Left-turn
Right turn
180° turn within the same grid

Table II summarizes how the relative loudness of the two frequency tones are to be interpreted. Note that for cases 1 and 2, when one frequency tone is louder than the other, we will ensure in our sound sample that the louder frequency tone is at least 9 dB louder than the softer frequency tone. Setups with the sound samples for each type of turn will also be provided in the lab.

5. End of Maze:

At the end of the maze, there will also be a black line. The colour of the paper above the mBot at this point will be black. Upon decoding that no turn action needs to be taken for both colour-sensing challenge and sound-based challenge, the mBot shall interpret this as the end of the conquest and play a celebratory tune of your choice (Yay!).

2

Final Project Evaluation:
The race will be conducted during your Week 13 Studio 2 timeslot:

Group 1: 14 Nov, 9am-12pm Group 2: 14 Nov, 2pm-5pm Group 3: 15 Nov, 9am-12pm

Rules:

  1. At each challenge, if your mBot turns in the wrong direction, it will be teleported to one grid before the challenge to make a second attempt while the clock continues to run. If it fails in its second attempt, it will be manually turned to the correct direction, and an additional penalty time of 30 seconds will be added.
  2. You are not allowed to add any commercial-off-the-shelf sensors that are not issued by the DSA Lab.
  3. The actual maze layout for the A-maze-ing race will not be revealed until the race. The figure below shows a sample maze layout.
  4. The group that completes the maze in the shortest time wins a delicious prize (through the courtesy of your instructors)!

3

Grading Criteria:

Criterion

Marks

Meeting the required features 15 Algorithms and coding (e.g., elegance of 5 algorithms, well commented codes, etc.)
Short group report 5 Total 25

Deliverables (Report and Source Codes):
Deadline: 19 Nov 2018 (Monday), 2359 hrs

(10% will be deducted for every day it is late)

Zip all files into a single file, and name it according to your Section and Group numbers (You can find your Section and Group numbers from IVLE), e.g., Section A – Group 01.zip, and upload it into IVLE Workbin under the “Project Submission” folder before the deadline. You must include the following:

  1. Program source codes. The codes must be well documented by providing appropriate comments.
  2. A concise written report, in PDF format. You may use your own discretion for the number of pages. Your report must describe your design in detail, especially about how the required features are met.

Peer Evaluation:

You will submit a confidential peer evaluation form about your groupmates’ contribution in the project. More details will be announced at a later date. If there is any groupmate who is not contributing to the project, please inform us as early as possible.

Resources and Tips:

  1. You can download the latest Makeblock libraries from the following link:

    https://github.com/Makeblock-official/Makeblock-Libraries.
    Copy the “makeblock” folder to your Arduino IDE’s default library location. Your Arduino IDE’s library folder should now look like this:

    • (on Windows): [arduino installation directory]\libraries\makeblock\src
    • (on MACOS): [arduino Package Contents]\contents\Java\libraries\makeblock\src

      There are many code examples inside the subfolder “examples”, which will give you a head start on how to work with the different components on your mBot (e.g., RGB LEDs, LDR, line sensor, DC motors, speaker, etc.).

  2. The schematic for your mCore can be downloaded from this link:

    https://github.com/Makeblock-official/mBot_Firmata/blob/master/hardware/mCore.pdf

  3. The datasheet for your electret microphone can be downloaded from this link:

    http://www.farnell.com/datasheets/50039.pdf?_ga=2.170247846.786460716.1540354873- 1082133259.1539236531

  4. When mounting your breadboard with the audio processing circuits on top of your mBot, ensure that it does not cover the RGB LEDs and the LDR on your mCore. Otherwise it may affect your mBot’s performance in the colour-sensing challenge.
  5. You need to ensure that your batteries are properly charged. If their voltage gets too low, your mCore’s 5V line may be less than 5 V. This could affect your calibrations.
  6. To tackle the sound-based challenge, you need to build two active bandpass filters with peak detectors. Since your mBot only has 0 V and 5V, you will power your op-amp using just the positive power rail. Include a variable resistor in each of the two bandpass filter circuits, so that you can tune its gain.

5

  • mBot-Maze-Race-Project-main-ecujkf.zip