Description
The A-maze-ing Race Project
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.
Table I: Colour interpretation for the Colour-sensing Challenge
Colour Interpretation
Red Left-turn
Green Right turn
White 180° turn within the same grid
Orange Two successive left-turns in two grids
Blue/cyan 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
Case Relative Loudness Interpretation
1 fA louder than fB Left-turn
2 fB louder than fA Right turn
3 fA and fB have about the same loudness 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!).
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.
Grading Criteria:
Criterion Marks
Meeting the required features 15
Algorithms and coding (e.g., elegance of algorithms, well commented codes, etc.) 5
Short group report 5
Total 25
Deliverables (Report and Source Codes):
(10% will be deducted for every day it is late)
1. Program source codes. The codes must be well documented by providing appropriate comments.
Peer Evaluation:
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]librariesmakeblocksrc
• (on MACOS): [arduino Package Contents]contentsJavalibrariesmakeblocksrc
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.15403548731082133259.1539236531
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.




Reviews
There are no reviews yet.