Skip to main content

20-minute primary activity: Seeing the physical world as data with microbit

20-minute primary activity: Seeing the physical world as data with microbit

This is a short classroom or STEM-club activity for primary children using a pre-prepared BBC micro. The aim is not to spend the session building the whole data logger, but to let children quickly see that a small device can measure the physical world and show those measurements changing on a screen.

This activity builds on two earlier posts: DIY Data Science with microbits, especially Method 1, the “Direct Link” approach, and Detecting and logging magnetism with a microbit. These have a lot more detail on what is going on and why.


This activity has been used and refined with 12 groups of up to 15 children at a time. I would suggest getting them into groups of 2-3 around a computer and a microbit.


What you need

  • 1 micro, already programmed in MakeCode blocks
  • USB cable connected to a computer
  • MakeCode open in a Chrome-based browser
  • A small magnet or set of magnets
  • A torch, phone light, or simply a way of covering/uncovering the micro display
  • Optional: thermometer discussion prompt, although no extra sensor is needed for the built-in temperature reading

MakeCode blocks to prepare beforehand

In MakeCode, use a forever loop with serial blocks:

In blocks this uses:

  • Basic > forever
  • Advanced > Serial > serial write value
  • Input > light level
  • Input > magnetic force
microbit makecode to send light levels and magnetic values to computer.


Download the program to the micro before the session. Keep the USB cable plugged in, then use the “Show Data Device” button in MakeCode to display the live graph.

The button to show the data in the graph


20-minute activity breakdown

0–3 minutes: What can a micro sense?
Show the micro and ask: “How could this tiny computer know anything about the room?” Introduce the idea that it has sensors. It can measure things such as light, temperature and changes in magnetic fields through the compass. Quick question: what does a compass detect?

3–7 minutes: Watch light become data
Open “Show Data Device” in MakeCode. Let children see the light value changing. Shine a torch on the micro, cover it with a hand, move it closer to a window, or turn it away from the light. Ask: “What changed on the graph?” and “Was the room brighter or darker?”

7–13 minutes: Explore invisible magnetism
Move a magnet slowly towards and away from the micro. Watch the magnetic force readings change on the graph. Try different distances and directions. The key question is: “Can we see something invisible by measuring it?”


Shows traces of light levels changes in the top graph and magnetic changes in the bottom graph



13–17 minutes: Could this help our school?
Ask children how light and temperature data might be useful in a classroom. Could it help decide when lights are needed? Could it show which parts of a room are warmer or cooler? Could pupils compare classrooms, corridors, or outdoor spaces?

17–20 minutes: What else could we measure?
Finish with a quick idea storm. What else could micro, sensors and simple data logging help us investigate? Plants? Weather? Noise? Movement? Energy use?



Take away

The important outcome is that children see measurement happening live: the physical world changes, the sensor detects it, and the data appears on the screen. That is a great step into data science, computing and STEM. Something to watch out for is that the magnets are a big distraction - too much fun.





All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with. Twitter @scottturneruon

Comments

Popular posts from this blog

Programming Anki's Vector robot

With the sad news that Anki is shutting down ( https://www.vox.com/2019/4/29/18522966/anki-robot-cozmo-staff-layoffs-robotics-toys-boris-sofman ) I thought it was time I start playing with the SDK for the Vector robot. In this short post, I providing a quick overview of getting going with this with a simple program based on the tutorials Anki provide. Installation I am using a Mac (more details are available here  https://developer.anki.com/vector/docs/install-macos.html ) but there are instructions for Windows and Linux. - You need the Vector to have been set-up previous on a tablet, and an account set-up on the Anki Cloud. - Install Homebrew - available here  https://brew.sh/ - Using Homebrew to install Python3  brew install python3 -Now install the SDK  python3 - m pip install -- user anki_vector - Lst but not least configure the set-up  python3 - m anki_vector . configure - that is it. The configuration tool tells you where the serial...

Speech Recognition in Scratch 3 - turning Hello into Bonjour!

The Raspberry Pi Foundation recently released a programming activity Alien Language , with support Dale from Machine Learning for Kids , that is a brilliant use of Scratch 3 - Speech Recognition to control a sprite in an alien language. Do the activity, and it is very much worth doing, and it will make sense! I  would also recommend going to the  machinelearningforkids.co.uk   site anyway it is full of exciting things to do (for example loads of activities  https://machinelearningforkids.co.uk/#!/worksheets  ) . Scratch 3 has lots of extensions that are accessible through the Extension button in the Scratch 3 editor (see below) which add new fun new blocks to play with. The critical thing for this post is  Machine Learning for Kids  have created a Scratch 3 template with their own extensions for Scratch 3 within it  https://machinelearningforkids.co.uk/scratch3/ . One of which is a Speech to Text extension (see below). You must use this one ...

Robot Software

In the previous blog posts for this 'series' "It is a good time...."  Post 1  looked at the hardware unpinning some of this positive rise in robots; Post 2  looked at social robots; Post 3  looked at a collection of small robots; Post 4 looked at further examples of small robots Robots, such as the forthcoming Buddy and JIBO, will be based some established open sourceand other technologies. Jibo will be based around various technologies including Electron and JavaScript (for more details see:  http://blog.jibo.com/2015/07/29/jibo-making-development-readily-accessible-to-all-developers/ ). Buddy is expected to be developed around tools for Unity3d, Arduino and OpenCV, and support Python, C++, C#, Java and JavaScript (for more details see http://www.roboticstrends.com/article/customize_your_buddy_companion_robot_with_this_software_development_kit ).  This post contin ues with some of the software being used with the smaller robots.  A number ...