mBot Kit Components

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

What is the primary function of the mCore board in the mBot?

  • Controlling the robot's movement wirelessly.
  • Driving the motors directly.
  • Providing power to the ultrasonic sensor.
  • Serving as the main controller, connecting, programming, and controlling all components. (correct)

If the mBot's left motor is connected to M2 and the right motor to M1, and you set both motor values to 255, what is the robot's likely behavior?

  • Move backwards instead of forwards. (correct)
  • The robot will not move.
  • Move forward at normal speed.
  • Turn left.

In the basic obstacle avoidance pseudocode, what is the condition that triggers the robot to turn?

  • When the ultrasonic sensor detects a distance greater than 20 cm.
  • After the robot has moved forward for a set amount of time.
  • When the ultrasonic sensor detects a distance less than 15 cm. (correct)
  • When the button on the mCore board is pressed twice.

Which of the following pseudocode snippets will cause the mBot to rotate left?

<p><code>Set M1 speed to -255; Set M2 speed to 255</code> (A)</p> Signup and view all the answers

What values does the Line Follower sensor return?

<p>0, 1, 2, or 3, representing black and white detection on its sensors. (A)</p> Signup and view all the answers

What is the purpose of setting one motor faster than the other, while remaining positive?

<p>To curve in the direction of the faster motor. (D)</p> Signup and view all the answers

Why is it recommended to add a small delay after setting motor speeds in mBot programs?

<p>To allow the robot to move in the set direction for a given period of time. (B)</p> Signup and view all the answers

What does the ultrasonic sensor measure?

<p>Distance to obstacles in centimetres. (C)</p> Signup and view all the answers

What is indicated when both of the mBot's LEDs light up green on the mCore board?

<p>The robot is in obstacle avoidance mode. (D)</p> Signup and view all the answers

Which component is used to mount other components together?

<p>M4*25mm Brass Stud. (A)</p> Signup and view all the answers

How can the mBot be programmed to follow a white line instead of a black line using the line-follower sensor?

<p>By inverting the logic in the program to move forward when the value is 3 instead of 0. (C)</p> Signup and view all the answers

In the advanced obstacle avoidance strategy, what is the mBot programmed to do if it detects obstacles in the front, left and right directions?

<p>Turn around and move back in the direction it came from. (C)</p> Signup and view all the answers

What is the maximum value the light sensor can return?

<p>1023 (C)</p> Signup and view all the answers

Typically, what is the minimum distance the ultrasonic sensor can accurately measure?

<p>3 cm (A)</p> Signup and view all the answers

Which of the following components is used to upload programs and charge the mBot?

<p>USB Cable (A)</p> Signup and view all the answers

What is the function of the mini wheel on the mBot?

<p>To stabilize the robot. (B)</p> Signup and view all the answers

What is the purpose of the RJ25 cable?

<p>To connect sensors and modules to the mCore. (B)</p> Signup and view all the answers

What might cause inconsistencies with the angle achieved on a turn?

<p>All of the above. (D)</p> Signup and view all the answers

When mapping light brightness to speed, what formula is used?

<p><code>speed = light / 4</code> (C)</p> Signup and view all the answers

How is the Ultrasonic sensor connected to the mCore board?

<p>RJ25 Cable. (D)</p> Signup and view all the answers

AA Batteries are connected to which electrical component?

<p>AA Battery Holder. (D)</p> Signup and view all the answers

What is the metal frame that holds the mBot components together?

<p>Chassis. (A)</p> Signup and view all the answers

What is the default line following functionality?

<p>Follow a black line on a white surface. (A)</p> Signup and view all the answers

What needs to happen to the speed of both motors for the robot to stop moving?

<p>Must be set to 0. (B)</p> Signup and view all the answers

If both line-follower sensors read black, which direction will the robot move?

<p>Forwards. (B)</p> Signup and view all the answers

What does the infrared remote controller allow?

<p>Wireless control of the mBot. (B)</p> Signup and view all the answers

In the advanced obstacle avoidance code, the variables x and y combine to achieve what?

<p>A certain angle of rotation. (B)</p> Signup and view all the answers

Which of the following is not part of the mBot kit?

<p>GPS Module. (A)</p> Signup and view all the answers

What is the motor speed maximum?

<ol start="255"> <li>(A)</li> </ol> Signup and view all the answers

What is the purpose of the velcro sticker pad?

<p>Attach components without screws. (D)</p> Signup and view all the answers

If the left sensor sees black and the right sensor sees white, which direction will the mBot curve?

<p>Left. (D)</p> Signup and view all the answers

What does 'rotating' a robot mean?

<p>Setting a motor to a given positive speed (x) while the other motor is set to its negative counterpart (-x). (B)</p> Signup and view all the answers

How is the robot's speed controlled in brighter and darker environments?

<p>Mapping brightness to speed, allowing the robot to move faster in brighter environments and slower in darker ones. (D)</p> Signup and view all the answers

What type of values does the ultrasonic sensor return?

<p>Whole numbers. (C)</p> Signup and view all the answers

Why is it recommended to install the program on mCore board via USB?

<p>To eliminate run time inconsistencies. (B)</p> Signup and view all the answers

How does a small free-rolling wheel help the robot?

<p>It helps stabilize the robot. (B)</p> Signup and view all the answers

Flashcards

Mainboard mCore

Main controller board; programmable, connects and controls all components.

Ultrasonic Sensor

Measures distance to obstacles using sound waves.

Line-follower Sensor

Detects line contrast to follow black or white tracks.

Motors (2)

Drives the wheels to allow movement.

Signup and view all the flashcards

RJ25 Cable (2)

Connects sensors and modules to the mCore.

Signup and view all the flashcards

USB Cable

Used for uploading programs and charging.

Signup and view all the flashcards

Infrared Remote Controller

Allows wireless control of the mBot.

Signup and view all the flashcards

AA Battery Holder

Holds and powers the mBot with AA batteries.

Signup and view all the flashcards

Chassis

Metal frame that holds all other components together.

Signup and view all the flashcards

Mini Wheel

A small free-rolling wheel that stabilizes the robot.

Signup and view all the flashcards

Wheel (2)

Main wheels connected to motors for movement.

Signup and view all the flashcards

Screwdriver

Used to assemble or disassemble mBot parts.

Signup and view all the flashcards

M4*25mm Brass Stud (4)

Brass spacers used to mount components.

Signup and view all the flashcards

M3*25mm Screw (6)

Used to fasten parts together.

Signup and view all the flashcards

M2.2*9mm Self-drilling Screw (4)

Self-drilling screws for mounting motors or plastic parts.

Signup and view all the flashcards

M3 Nut (8)

Secures M3 screws in place.

Signup and view all the flashcards

Line-follower Map

Pre-printed track for testing the line-following function.

Signup and view all the flashcards

Velcro sticker pad (2)

Helps attach components without screws.

Signup and view all the flashcards

Mini Screwdriver

Small tool for fine screw adjustments.

Signup and view all the flashcards

Go Forward

Set both motors to 255.

Signup and view all the flashcards

Go Backwards

Set both motors to -255.

Signup and view all the flashcards

Stop Moving

Set both motors to 0.

Signup and view all the flashcards

Turn Left

Set one motor speed to 0 while the other is positive.

Signup and view all the flashcards

Rotate

Set one motor to a given positive speed (x) while the other motor is set to its negative counterpart (-x).

Signup and view all the flashcards

Curve

Set one motor to be faster than the other while making sure that they are both positive.

Signup and view all the flashcards

Light Sensor

Built into the mCore board; measures light brightness from 0 to 1023.

Signup and view all the flashcards

Ultrasonic Sensor

Connected to port 3 on the mCore board using an RJ25 cable; measures distance in centimeters, from 3 cm to 400 cm.

Signup and view all the flashcards

Obstacle avoidance

Triggered by pressing the button on the mCore board once, the mBot will have two green LEDs lit.

Signup and view all the flashcards

Line-Follower Sensor

Mounted under the front of the mBot; connected to port 2 on the mCore board using an RJ25 cable; has two detectors: left and right.

Signup and view all the flashcards

Study Notes

Components

  • Complete parts list is included in the mBot kit.

Electrical Components

  • Mainboard mCore is the primary programmable controller, connecting and managing all components.
  • Ultrasonic Sensor measures distance using sound waves.
  • Line-follower Sensor detects line contrast for black or white tracks.
  • Motor (2) drives the mBot's wheels for movement.
  • RJ25 Cable (2) connects sensors and modules to the mCore.
  • USB Cable is for uploading programs and charging the mBot.
  • Infrared Remote Controller allows wireless control.
  • AA Battery Holder powers the mBot with AA batteries.

Mechanical Components

  • Chassis provides the frame which holds all components.
  • Mini Wheel stabilizes the robot with a small, free-rolling design.
  • Wheel (2) are the main wheels that connects to the motors for movement.
  • Screwdriver assembles and disassembles mBot parts.
  • M4*25mm Brass Stud (4) are used as brass spacers to mount components.
  • M3*25mm Screw (6) fastens parts together.
  • M4*8mm Screw (15) are for general assembly purposes.
  • M2.2*9mm Self-drilling Screw (4) mounts motors or plastic parts.
  • M3 Nut (8) secures M3 screws in place.
  • Line-follower Map is a pre-printed track to test the line-following function.
  • Velcro sticker pad (2) helps attach components.
  • Mini Screwdriver is a small tool to do fine adjustments.

Movement

  • mBot utilizes two motors connected to M1 and M2 ports on the mCore board.
  • The left motor connects to M1, while the right motor connects to M2.
  • Incorrect motor connections invert movements if motor values are set to 255.
  • Setting both motors to 255 is the fastest forward speed.
  • Setting them both to -255 is the fastest backward speed.
  • Setting them both to 0 makes the robot stop.

Movement Pseudocode

  • Go Forward: set M1 speed to 255, set M2 speed to 255.
  • Go Backward: set M1 speed to -255, set M2 speed to -255.
  • Stop: set M1 speed to 0, set M2 speed to 0.
  • Turn Left: set M1 speed to 0, set M2 speed to 255, invert logic to turn right.
  • Rotate Left: set M1 speed to -255, set M2 speed to 255.
  • Rotate Right: set M1 speed to 255, set M2 speed to -255.
  • Curve Left: set M1 speed to 100, set M2 speed to 200.
  • Curve Right: set M1 speed to 200, set M2 speed to 100.
  • Add a delay after setting motor speeds and then set motors to 0 with a short delay (0.1 seconds) for consistent results.

Light Sensor Applications

  • The light sensor is integrated into the mCore board and is not connected through motor or sensor ports.
  • Measures light brightness from 0 (minimum) to 1023 (maximum).
  • Maximum motor speed is 255.
  • Brightness to speed mapping: speed = light / 4
  • Allows the robot to move faster in brighter environments and slower in darker ones.

Ultrasonic Sensor

  • The ultrasonic sensor connects to port 3 on the mCore board using an RJ25 cable.
  • The sensor measures distances from 3 cm to 400 cm, in whole number values.
  • Values below 3 cm distances are unreliable due to the sensor's physical placement on the chassis.

Obstacle Avoidance

  • Ultrasonic sensor's primary function is obstacle avoidance.
  • Pressing the button on the mCore board activates a pre-developed obstacle avoidance mode.
  • Two green LEDs light up on the mCore board when active.

Basic Obstacle Avoidance Version

  • The robot moves forward if the ultrasonic sensor detects a distance greater than a defined threshold (10 cm to 20 cm).
  • It turns left or right briefly if the distance drops below the threshold.

Basic Obstacle Avoidance Pseudocode

  • Repeat forever: move forward; wait until distance is less than 15; turn left or right 90 degrees; delay.

Advanced Obstacle Avoidance Version

  • Checks left and right of robot for a clear path.
  • If its a dead end the robot turns all the way back.
  • Every time the robot faces an obstacle it checks in three directions: front, left, and right, or front, right, left.
  • The robot picks one of the two approaches randomly, or if all three directions are blocked, it then turns around and goes back.

Advanced Obstacle Avoidance Pseudocode

  • The code placed in the "else" statement is symmetrical to the first half.
  • If rotation to the left 90 degrees, then right 180 degrees, then right 90 degrees, the robot instead will rotate right 90 degrees, then left 180 degrees, then left 90 degrees every time the robot is facing a wall or obstacle.

Factors Affecting Rotation

  • Combined values of x and y result in rotation.
  • Battery type, battery charge level, ground surface, dirt on wheels, and improperly fixed motors/wheels can influence the achieved angle.
  • Developing the program in a computer system, installing it on the mCore board via USB, and adjusting parameters like x and y can remove runtime inconsistencies.

Line-Follower Sensor

  • The line-follower sensor mounts under the front of the mBot.
  • Connects to port 2 on the mCore board with an RJ25 cable.
  • It has two detectors: left and right, and is designed to follow a black line on a white surface.
  • Pressing the mCore button twice activates the pre-developed black line following mode.
  • Two blue LEDs light up when active and obstacle avoidance is active.
  • The logic can be inverted to follow a white line on a black surface.
  • Returns four values:
    • 0: Both sensors see black
    • 1: Left sensor sees black, right sees white
    • 2: Left sensor sees white, right sees black
    • 3: Both sensors see white

Black Line Following Pseudocode

  • Initiate lastCurve = 0
  • Loop (forever)
  • Read sensor value from line
  • If the sensor detects 0 (black) then move forward
  • Else if the sensor detects one (left)
    • Curve left
    • Then set the last curve to the left, else if the sensor detects two (right)
      • Curve right
      • Then set the last curve right - Else if the censor detects three go backwards.

Line Following Logic

  • In sharper turns the robot may exit the line.
  • It is essential to come up with a technique for the robot to follow the black line again.
  • Make the mBot turn instead of curving in the same direction it was curving last until it can find the line.
  • To follow a white line, invert the logic: move forward when the value is 3, and adjust accordingly.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Introduction to mBot Robotics
24 questions
Use Quizgecko on...
Browser
Browser