Introduction: What Is the Height of Your School Building?

About: Scientix ambassador in Spain. Mathematics teacher and PhD student about computational thinking. CoSpaces Edu ambassador and member of the micro:bit Champions group 2021. Code week leading teacher.

Have you ever thought about the height of your school building? Do you think that a very sophisticated measuring instrument would be necessary? With this IUnstructable you will learn how to build a simple micro:bit instrument that will help you to calculate the height of your school building.

Supplies

All you need is:

  • A calculator
  • A BBC micro:bit with a battery holder
  • 3D printer to make a box
  • Tape measure
  • Pencil and paper to write down the calculations

Step 1: Prepare the Micro:bit

The first step is to code the micro:bit in order to measure the angle at which you are looking at the top of the building that you want to measure the height of.

Knowing this angle, using trigonometric ratios, you can calculate the height of the building.

The micro:bit's accelerometer can measure angles of tilt in two directions: up and down (pitch) and side to side (roll).

For this work, you are going to code the roll axis to make it more comfortable to use.

You can check the code in the picture, use this link or download the hex file.

Step 2: How the Micro:bit Works?

You have coded the micro:bit to measure the tilt angle on the roll axis.

To measure an angle properly, first find the zero and then move the micro:bit until you get the angle you are looking for.

To display the angle value on the screen, just click on the A button. Also, this value is stored until you press the A button again, so if you need to see it again, you can press the B button.

Step 3: Print a Box for the Micro:bit

In order to measure the angle at which the top of the building is viewed, it is necessary to use an object with a sight tube. As you are going to use the micro:bit to measure the angle, the best way is to use a small tube. So, the best option is to print a 3D box with a tube incorporated in it.

You can modify the 3D model in this link.

Step 4: Write Down the Measurements

Now it is time to take the necessary measurements to calculate the height of the building. Stand at a suitable distance from the building so that you can measure the angle at which you can see its highest point. It is not advisable to be too close.

You will need three measurements:

  • The distance to the building X.The angle at which you look from the top of the building (obtained with the micro:bit).
  • The height of your eyes to the ground Y.

With these data you can calculate h1. The total height of the building can be calculated as

H= h1 + Y

Step 5: Do the Maths

Now it's time to do the mathematics needed to calculate the height of your school building.

Using the tangent of the angle obtained with the micro:bit, you can calculate the height h1 shown in the picture included in this section.

The total height of the building can be calculated by adding h1 + Y = H.

-o-

In the example carried out when the pictures shown in this tutorial were taken, the following measurements were used:

X = 17.7 meters

Y = 1.62 meters

alpha = 25 degrees.

Using these data, h1 = 8.25 meters and the total height of the school building is:

H = h1 + Y = 8.25 + 1.62 = 9.87 m.