DC Motor with Microbit – Part 2

A new exercise for controlling a DC motor with the Microbit has been added to my Microbit course.  In this example a DC motor can reverse direction and vary the speed using an integrated circuit (IC) taking the place of a transistor and diode in the previous lesson. Only one motor is controlled in this exercise, but the  IC can control two motors.  Full lesson.



Screen Shot 2017-10-15 at 12.47.47 PM

Using a DC Motor with the Microbit

The next lesson for the Microbit is nearly finished. The lesson is how to control a small DC motor with the Microbit programmed in the Makecode block language. The circuit is pretty simple. The circuit uses a transistor,  a diode and a resistor.



The lesson starts with simply turning on and off the motor using the built-in Microbit button using the DigitalWrite block.  Next, there are instructions on how to vary the motor speed with the AnalogWrite block.



The circuit is then modified to use a knob to control the speed of the motor. The detailed lesson is here. The next lesson is adding the ability to change the direction of the motor.

The class I’m teaching will make DC motor instruments. For example:

Solar Bristlebots

Yesterday I met with Rachel’s 1st grade class for the first time. In the past, we have done either bristlebots or solar cockroaches. This year, I combined them and it was the best EVER.


Let’s start with the results, then I’ll get into the super easy making process.

One child created something wonderful and totally unexpected. He added what looked like a basketball rim made with a pipecleaner. Then he put a styrofoam ball in it and it SPUN when the bot was in motion!


This slideshow requires JavaScript.

So this is how the Solar Bristlebots are made. The parts list is at the bottom.

  1. Stick the motor to the back of the solar panel. Orientate the motor so the red wire is 20170930_125628.jpgon the + side and the blue wire on the “-” side. I was working with 1st graders, so I soldered the motors on beforehand. After you solder the motor, put it under a strong light or take it outside to make sure it works. The solar panel might have a protective plastic cover that should be peeled off before you test.



20170930_1257442. Cut a piece of the double stick foam tape the length of the solar panel. Place it on the back of the solar panel (over the motor) and press down for a strong bond. Peel of the protective paper.


20170930_1302133. Cut off the handle of the toothbrush. Again, since I was working with 1st graders, I did this beforehand.



20170930_1303164. Put the toothbrush heads on the sticky foam tape. In this example, I switched the orientation. But the brushes on so the bristlebot has stability.


That’s it! Now the students should decorate the bristlebots, with tails and antenna etc. Rachel and I also them with with the hot gluing.



Solar Cell Solar Panel 30*60mm 2V 50mA 0.1W

12mm disc vibration motor 

double sided foam tape

toothbrushes – I usually get packs of toothbrush at a dollar store. The flatter and wider the better.

misc. decoration materials (feathers, pipe cleaners, googly eyes, etc.)



soldering iron / solder

large snips

hot glue gun / glue sticks

safety glasses

Weather Monitoring and the Microbit

Being in love with the Microbit, I try to get my hands on anything related to it. Over the summer Sparkfun came out with a weather monitor expansion board called the Weather:Bit. For $14.95, its not a bad deal.

Well, last week I received an email from the pre-kindergarten teacher at Poughkeepsie Day School that they are studying the weather and want to collect weather data. Yes! So today, I got out the Weather:bit, plugged it in and went to Sparkfun.com to see how to program it.

First thing to do is to import the (beta) weather:bit package. This is done by clicking on the Add Package link in the Makecode, search for weather and select the package from Sparkfun.

Screen Shot 2017-09-19 at 3.12.45 PM

Using Sparkfun’s code as a template, I created the program below. One new fact I learned about the Microbit that disappointed me greatly is that floating point numbers are not supported in Makecode. Ok, this is a great excuse to use MicroPhython. But for now, I press on.

In order to upload the data to the web, I’ll use the serial port interface on the weather bit or the radio function to get the data from the Microbit to a website. Stay tuned ….



Screen Shot 2017-09-23 at 5.22.08 PM

Microbit Animals

In August, I’ll be one of 4 facilitators at the NYSAIS STEAM Camp, a 3 day intensive making/learning/unconference workshop. The opening project will be making a Microbit Cardboard Animals. This project is a takeoff on  a project by TechHive Studio’s of Science in Berkeley, CA. At the Camp, each participant will receive a BBC Microbit to keep. The Microbit is great platform for making for students from grades 4 through 12. Learn more about the Microbit from microbit.org

Here’s a video of my test Microbit Cardboard Animals.

One Solar Panel


This is one of the 4,158 solar panels which will be installed at Poughkeepsie Day School.

The panel is wired to an electrical outlet and an on/off switch. The lamp is plugged into the outlet. There is also a multimeter wired to the panel, so you can see the number of volts the panel generates at any given time. If the switch is up and there is enough light hitting the panel, the bulb will light up.

On a cloudy day, inside the lobby, about 10 volts are generated. On a sunny day over 70 volts is being generated.

Answer two questions about kids and STEM

I received an email this afternoon from the school’s Communications person, asking me to for an article.
How can parents get kids interested in STEM at an early age?

Is important to keep a child’s natural curiosity about how the the world works. Children ask a lot of questions. Answer them in a simple, accurate way and tell them how it ties into the wider world. And if you don’t know the answer, together find the answer. And if after answering a question and they respond “Why”, keep answering till you’re both exhausted!
them a sunflower and explain how the flower and my other objects of natural express themselves in math (the Fibonacci series).

Take them a planetarium, a Maker Faire, and watch episodes of PBS’s NOVA series. Fix things together. Make a solar powered bug or shine a laser on a piece of mirror taped to an audio loudspeaker to see the patterns that sound make.
There are plenty of resources out there. Start with San Francisco’s Exploratorium website -www.exploratorium.edu/explore/activities
What can schools and educators do to support students learning STEM?
The very definition of STEM means that there is an interconnection of knowledge and systems. Many schools have a robotics program in which hardware, software and structure must work in tandem. The Maker Movement and school’s creating makerspaces are another manifestation of how STEM is taught in school. Think big. Create a hydroponic garden that is connected to the Internet of Things or build marionettes that are controlled by sensors mounted on your body.