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.

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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s