Thursday, 12 May 2016

BBC Micro:Bit Motor Control

BBC Micro:Bit Motor Control

A side project to all of the current programming lessons that I am doing has been to try and integrate circuits and run them with my Micro:Bit.

I have teamed up with the DT department to look at this and have so far managed to run a few bits and pieces.

A motor, it turns out is fairly straight forward to connect, with a little help from a transistor.

The setup looks like this...
                       ---------------------Output 0 - Micro:Bit - Ground  ---------------------
                       |                                               3V Power                                          |
                       |                                                       |                                                 |
                       |---------------------------------Transistor                                             |
                                                                               |                                                 |
                                                                               |------------Motor-----------------|


The BC108 transistor works a little like a physical AND gate. It requires that signal comes from both the power source AND Output 0 in order to then complete the circuit through connection to the ground pin.


I then programmed the Micro:Bit to use the following instructions...

Which enables us to power the motor when the A button is pressed.


The future plans for this starter are that we could use A to turn the motor on and leave it running (B to turn off) and attach the whole setup to a boat or similar.


We are also discussing whether we could have a motor running and pushing a small car and using A/B to control an air duct or fin that will steer the machine, somewhat like a hovercraft steers. Clearly this would require it working from a long wire or similar, the design is not quite considered yet. A fun summer holiday may happen.

No comments:

Post a Comment