What Is the Speed of the Maqueen Robot?

by Álvaro Molina in Teachers > Math

2001 Views, 11 Favorites, 0 Comments

What Is the Speed of the Maqueen Robot?

inst1.png
inst2.png

With this experience you will be able to measure the speed of the Maqueen robot controlled by micro:bit. Normally, the robot is coded with a speed value between 0 and 255, but with this experiment you will be able to calculate the equivalence in International System units. I'm from Spain, so I have used meters and seconds.

To do so, we will carry out an experiment to obtain values of distance and time for the uniform rectilinear motion (URM) of the robot, we will plot these pairs of values and we will identify the speed of the robot as the slope of the regression line obtained from the respective points (t, s).

Supplies

Supplies.jpg

In order to carry out the experience described in this Instructable, you will need the following materials:

  • 2 BBC micro:bit.
  • 1 Maqueen robot with 3 AAA batteries.
  • 1 display i2cLCD1602 or similar.
  • Sensor shield for BBC micro:bit
  • Wires to connect the screen to the shield
  • Black tape.
  • Measuring tape
  • Long white paper (optional)
  • Geogebra software

Coding the Maqueen Robot

inst3.png
inst4.png

In this first part, the micro:bit of the Maqueen robot has to be coded to make a URM in order to measure the time it takes to cover several distances from the starting point.


The movement can be started by pressing button A in order to have enough time to place the robot at the starting point.


To start, place 4 lines with the black tape on the floor or on a long white paper (optional). The distance between the lines can depends on the requirements of each situation. It's not necessary that they are all at the same distance, but this option may be useful to check the accuracy of the obtained results in the following steps.


Now it's time to code the robot. To get access to the Maqueen coding blocks on the MakeCode platform, it is necessary to look for the extension "Maqueen" in the blocks menu. For more information you can check this link. The robot will use the tracking sensor included to detect the black lines. To code the Maqueen robot in order to detect the lines you can check this link. Each time a line is detected, the micro:bit records in a variable the time since it started the movement. In addition, all these values will be sent by radio to another micro:bit that will be connected to the LCD display ( will be shown in the next step). Additionally, each time it detects a line and records a time, the micro:bit will switch on an LED to check that the action has been successful.


Finally, the robot must stop when it detects an obstacle at the end of the path.


You can download the hex file included in this step and save it on the micro:bit. If you want to compare the experiment with different speed values, just change it on the corresponding block.

Prepare the Display

inst5.png
inst6.png
inst62.jpeg
inst63.jpeg

In this step the LDC display should be connected to the expansion shield of the micro:bit. You can follow the diagram shown in the picture (you will need the four wires). Be sure to put V2 in 5V position.


In order to code the display on the MakeCode platform, it is also necessary to look for the corresponding extension in the blocks menu. For more information you can check this link.


To code the micro:bit that controlled the display, just show the values sent by the micro:bit of the Maqueen robot in a different position on the panel. Yo can check the picture included in this step or download the hex file.


Note1: if this activity is carried out by several groups of students at the same time, it's necessary to use a different radio channel for each group. If it's necessary, you need to change it in both Maqueen and LCD display micro:bit.

Note2: the display needs 5 V, so it may be useful to leave it connected to the computer.

Collecting Data in a Table

inst72.jpeg
inst7.png

Now it is time to organize the data collected in a table.


First, you have to measure the distance from the starting point of the robot to each of the lines placed on the ground using the measuring tape. It is important to measure the distance from the starting point to each of the lines and not the distance from line to line.


Secondly, when the robot has completed the way, you can check the time values on the display. Remember that micro:bit records the time in milliseconds, so it's necessary to write each value in seconds.


With these pairs of data you can complete a table like the one shown in the picture. Each pair of data will be a point (x, y) on the Cartesian plane.

Plotting Data and Calculating the Speed

inst8.png
inst9.png

To plot the data, you can use the Geogebra software.


Open the main menu, select View and check the Spreadsheet box to show a worksheet to enter the data values. Write the values of time and distance collected in the previous table and click on the "Two variable Regression Analysis" option. It is useful to choose this option because, when plotting, it is normal that the data are not perfectly aligned as there could be a small error in measuring distances or because the car may has moved away from a rectilinear trajectory a little bit. So, to overcome this error and calculate the speed properly, you can calculate the regression line of the four points and identify the speed with the value of the slope of this regression line. It is shown above of the red line (see the picture included in this step). Maybe you need choose "Linear" in the Regression Model options.

Final Outcome of the Experience

With all this work process and with the data shown in the table above to plotting using the Geogebra software, it is concluded that the value of the speed of the Maqueen robot when it has been coded with a value of 255 is equal to 0.23 m/s.