Project 1 of 0
In Progress

AI micro:bit Badge

About 3 hours

Ages 8+

What Will You Make?

We will create a micro:bit badge which we can wear everywhere, and have fun with the code.

We will continue to create an artificial intelligence model that identifies the voice and controls the LED matrix of our micro:bit.

What Will You Learn?

We will use scratch and techable machine, learning how to program simple programming commands, as well as create a machine learning model to recognize the voice and use this model to interact with our badge.

Code Your micro:bit

Step 1

For programming we are going to use Teachable Machine and Scratch, for communication with micro:bit we go to “https://scratch.mit.edu/microbit” to download its plugin. Follow the instructions for your operating system, we connect our micro:bit to our computer to drag the HEX code we just downloaded into it.

Step 2

Let’s go to scratch 3: https://stretch3.github.io/, we use this version since it has more plugins. We are going to add the “Micro:bit” plugin, the menu to connect our board will appear, we connect our Micro:bit and connect it.

We are also going to add the plugin “TM2Scratch” this will allow us to use our teachable machine model.

Step 3

Now we are going to create our machine learning model we are going to teachable machine: https://teachablemachine.withgoogle.com/train. We select the “audio project” Our workspace is divided into three sections:

  • Left: are the audio labels.

  • In the middle: training is done.

  • Right: where we will test the model and share it.

Step 4

We are going to change “Class 2” to “Make” and we are going to add two new classes, one for the word “off” and another for “i don’t know”, here we will place different words for the model to know more, and can more easily distinguish the words we chose.

Step 5

We go to the “Background Noise” section, click on the microphone and record 20 seconds of background noise. When finished, the “Extract sample” button will appear. Ready we already have 20 samples.

Step 6

Now we will do the “Make” section, click on the microphone and record ourselves for 5 seconds saying the word Make. When finished, we select the word within the audio, we can click on the play button to listen to what we selected and extract the audio sample. We repeat the step until we complete our minimum of 8 samples.

Step 7

We repeat the previous step but now with “off”. Now we are going to do “i don´t know”, we click on the gear next to it (settings), so we can change the duration to 10 seconds, save the settings and record 10 seconds while saying different words. And we extract the samples.

Step 8

Great, now we go to “Prepare model”, remember not to change the page or the process will be interrupted, this can take a few minutes.

Step 9

Once finished, we can test our model by saying “Make” or “Off”, at the bottom you will see the similarity percentage with the classes we created. If you want it to be more precise, you should increase the samples of each word.

Step 10

Now we click “Export model”, check that “Submit (link to share)” is activated, we click on “Upload my model” this process can take a few minutes. We copy the URL and return to scratch 3.

Step 11

Let’s go to the “Events” section and drag the “when pressed (green flag)” block, go to the “TM2Scratch” section, take the “sound classification model URL” block, here we will paste the url. We take the “set confidence threshold 0.5” and change the value from “0.5” to “0.7”. In the menu we go to “micro:bit” and put the “display ” block in the main code block.

Step 12

Go back to “TM2Scratch” and take the “When received sound label (any)” block, then go to the “Control” section and take the “if <> then, else” block and put it after the block above and take another condition and put it inside “yes no”. We go to “TM2Scratch” drag the “sound (any) detected” and put it in the conditions.

Step 13

We click on our green flag, so we can use our labels from our scratch model, it will take a few seconds. We click on the “sound (any)” of the first condition, to select “make” and in the next one we select “off”.

Step 14

We go to “micro:bit”, take the “display” block and put it inside the two conditions. In the “make” condition we are going to click on the “()” to put an M and in the “off” condition we clear the screen.

Step 15

Done! Now test your code with the green flag, don’t forget to combine it with your badge.

Resources

Media

What Is Happening Here?

Teachable Machine

We use teachable machine, a Google tool, we manage to create our voice detection machine learning model, including the samples of the words that we want to identify as “make”, “off”, “background noise” and “I don’t know”. Then we join it with Scratch, so that when it identifies each of these it does different actions in our micro:bit.

What Is Next?

Additional Resources

You can experiment with adding more words to customize your badge, or improve your model by adding more samples for better performance.

You can also check out the other projects in the Maker Camp library to create a crochet badge to include your micro:bit.

About MoonMakers

MoonMakers — led by Camila and Diego Luna —  are a community of creators passionate about knowledge. A Makerspace, an open space with different digital manufacturing machines. And a YouTube channel where we promote science, technology and the maker movement.

MoonMakers have collaborated with companies such as: Sesame Street, Make Community and in Mexico with Educational Television and Fundación Televisa, creating educational content.

We have given workshops throughout the Mexican Republic with: Talent Land, Secretary of Education in Jalisco, Conacyt, Centro Cultural España.

MoonMakers
  • Materials/Equipment: 
    • micro:bit.
    • Battery base.
    • Batteries.
    • micro USB to USB cable

See More Projects in these topics:

Arts & Crafts Fiber Arts Microcontrollers Wearables

See More Projects from these themes:

Art/Craft Studio Carnival/Theme Park The Shop (Makerspace)
MoonMakers
Somos una comunidad de creadores apasionados por el conocimiento. Un Makerspace, un espacio abierto con diferentes máquinas de fabricación digital. Y un canal de YouTube donde promovemos la ciencia, la tecnología y el movimiento maker.
Print Project

Maker Camp Project Standards

Based on NGSS (Next Generation Science Standards)

National Core Arts Standards

The National Core Arts Standards are a process that guides educators in providing a unified quality arts education for students in Pre-K through high school. These standards provide goals for Dance, Media Arts, Music, Theatre, and Visual Arts with cross-cutting anchors in Creating, Performing, Responding, and Connecting through art. The Anchor Standards include:
  1. Generate and conceptualize artistic ideas and work.
  2. Organize and develop artistic ideas and work.
  3. Refine and complete artistic work.
  4. Select, analyze, and interpret artistic work for presentation.
  5. Develop and refine artistic techniques and work for presentation.
  6. Convey meaning through the presentation of artistic work.
  7. Perceive and analyze artistic work.
  8. Interpret intent and meaning in artistic work.
  9. Apply criteria to evaluate artistic work.
  10. Synthesize and relate knowledge and personal experiences to make art.
  11. Relate artistic ideas and works with societal, cultural, and historical context to deepen understanding.
Please visit the website for specific details on how each anchor applies to each discipline.

National Core Arts Standards

The National Core Arts Standards are a process that guides educators in providing a unified quality arts education for students in Pre-K through high school. Also see Standards with cross-cutting anchors in Creating, Performing, Responding, and Connecting through art for Visual Arts.

K–12 Computer Science Framework

The K–12 Computer Science Framework is designed to guide computer science from a subject for the fortunate few to an opportunity for all. The guiding practices include:
  1. Fostering an Inclusive Computing Culture
  2. Collaborating Around Computing
  3. Recognizing and Defining Computational Problems
  4. Developing and Using Abstractions
  5. Creating Computational Artifacts
  6. Testing and Refining Computational Artifacts
  7. Communicating About Computing
You can download the complete framework here. You may also want to consider the International Society for Technology in Education Standards. The ISTE Standards provide the competencies for learning, teaching and leading in the digital age, providing a comprehensive roadmap for the effective use of technology in schools worldwide.

NGSS MS.Engineering Design

The Next Generation Science Standards (NGSS) are K–12 science content standards.
  • MS-ETS1-1. Define the criteria and constraints of a design problem with sufficient precision to ensure a successful solution, taking into account relevant scientific principles and potential impacts on people and the natural environment that may limit possible solutions.
  • MS-ETS1-2. Evaluate competing design solutions using a systematic process to determine how well they meet the criteria and constraints of the problem.
  • MS-ETS1-3. Analyze data from tests to determine similarities and differences among several design solutions to identify the best characteristics of each that can be combined into a new solution to better meet the criteria for success.
  • MS-ETS1-4. Develop a model to generate data for iterative testing and modification of a proposed object, tool, or process such that an optimal design can be achieved.
For additional information on using content standards with our projects please visit the Maker Camp Playbook.

NGSS 3-5.Engineering Design

The Next Generation Science Standards (NGSS) are K–12 science content standards.
  • 3-5-ETS1-1. Define a simple design problem reflecting a need or a want that includes specified criteria for success and constraints on materials, time, or cost.
  • 3-5-ETS1-2. Generate and compare multiple possible solutions to a problem based on how well each is likely to meet the criteria and constraints of the problem.
  • 3-5-ETS1-3. Plan and carry out fair tests in which variables are controlled and failure points are considered to identify aspects of a model or prototype that can be improved.
For additional information on using content standards with our projects please visit the Maker Camp Playbook.
Makeyland Graphic

Sign up for monthly project ideas for young makers from the leading maker educators.

FEEDBACK