Using a DC Motor with the Microbit

Posted by

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.

MicrobitSimpleDCMotor

 

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:

Leave a comment