The Micro:bit is a small, programmable microcontroller board designed to make learning electronics and programming accessible and fun. It features an array of built-in sensors, LEDs, and connectivity options, making it ideal for creating interactive projects. Originally developed by the BBC for educational purposes, the Micro:bit is widely used in schools, workshops, and by hobbyists to teach coding, electronics, and problem-solving skills.
Explore Projects Built with Micro:bit
Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
This circuit is designed to control multiple motors and servos using an Adafruit Crickit for microbit as the main controller, interfaced with a micro bit microcontroller. It includes two yellow hobby gear motors, two 9G micro servos, and two standard servos, all powered and controlled by the Crickit board. Additionally, there is a 0.96" OLED display for output and a piezo sensor, likely for input, connected to the Crickit, which is programmed via the micro bit.
This is a microcontroller-based interactive device featuring a Wemos D1 Mini, an OLED display, external EEPROM, and an I/O expander. It includes user input buttons and status LEDs, with potential MIDI interface capabilities.
This is a portable, microcontroller-driven interactive device featuring Bluetooth connectivity, visual (RGB LED), auditory (loudspeaker), and haptic (vibration motor) feedback, user input (pushbutton), and a rechargeable power system (TP4056 with Li-ion battery).
This is a microcontroller-based interactive circuit featuring touch and ultrasonic sensors for input, and LEDs, a buzzer, and an OLED display for output. It is powered by a 9V battery with a voltage regulator for stable operation, and includes a toggle switch for power control. The actual behavior of the circuit is determined by the embedded code, which is currently a placeholder for further development.
Power Supply: 3V to 3.3V (via USB or battery pack)
Connectivity: Bluetooth Low Energy (BLE), USB, I2C, SPI, GPIO
Sensors: Accelerometer, magnetometer, temperature sensor, light sensor
Display: 5x5 LED matrix
Buttons: 2 programmable buttons (A and B)
I/O Pins: 25 edge connector pins (3 are large and crocodile-clip friendly)
Pin Configuration and Descriptions
The Micro:bit has a 25-pin edge connector, with specific pins designed for power, input/output, and communication. Below is a table summarizing the key pins:
Pin Number
Name
Description
0
P0
General-purpose I/O pin, often used for analog input or digital output
1
P1
General-purpose I/O pin, often used for analog input or digital output
2
P2
General-purpose I/O pin, often used for analog input or digital output
3V
3V Power
Provides 3V power output for external components
GND
Ground
Ground connection for the circuit
19, 20
I2C (SCL, SDA)
I2C communication pins for connecting sensors and peripherals
21, 22
SPI (MOSI, MISO, SCK)
SPI communication pins for high-speed data transfer
25
LED Matrix
Controls the 5x5 LED matrix display
26, 27
Button A, B
Input pins for the two onboard buttons
Usage Instructions
The Micro:bit is designed to be beginner-friendly and can be programmed using block-based editors, Python, or JavaScript. Below are the steps to use the Micro:bit in a circuit and some best practices.
Getting Started
Power the Micro:bit: Connect the Micro:bit to your computer using a micro-USB cable or use a battery pack for portable projects.
Use Python with the MicroPython editor for more advanced projects.
Write and Upload Code:
Write your code in the chosen editor.
Download the .hex file and drag it to the Micro:bit drive that appears on your computer.
Connect External Components:
Use crocodile clips or jumper wires to connect external components to the edge connector pins.
Ensure proper polarity and voltage levels to avoid damaging the Micro:bit.
Example: Blinking LED with Micro:bit
Here is an example of how to blink an external LED connected to pin P0 using MicroPython:
from microbit import *
# Connect the positive leg of the LED to pin P0 and the negative leg to GND
while True:
pin0.write_digital(1) # Turn the LED on
sleep(1000) # Wait for 1 second
pin0.write_digital(0) # Turn the LED off
sleep(1000) # Wait for 1 second
Important Considerations and Best Practices
Voltage Levels: Ensure external components operate at 3.3V to avoid damaging the Micro:bit.
Pin Limitations: Avoid drawing more than 90mA total from the Micro:bit's pins.
Static Protection: Handle the Micro:bit by its edges to prevent static damage.
Firmware Updates: Keep the Micro:bit firmware updated for compatibility with the latest tools.
Troubleshooting and FAQs
Common Issues and Solutions
Micro:bit Not Recognized by Computer:
Ensure the USB cable is a data cable (not just a charging cable).
Try a different USB port or cable.
Check if the Micro:bit's power LED is on.
Code Not Running:
Verify that the .hex file was successfully copied to the Micro:bit.
Check for syntax errors in your code.
Reset the Micro:bit by pressing the reset button on the back.
External Components Not Working:
Double-check connections to the edge connector pins.
Ensure the components are compatible with 3.3V logic levels.
Test the components separately to confirm they are functional.
FAQs
Can I use the Micro:bit with Arduino components?
Yes, many Arduino-compatible components (e.g., sensors, LEDs) can be used with the Micro:bit, provided they operate at 3.3V.
How do I reset the Micro:bit?
Press the small reset button on the back of the board. This will restart the program.
Can I use Bluetooth and USB simultaneously?
No, Bluetooth functionality is disabled when the Micro:bit is connected to a computer via USB.
By following this documentation, you can effectively use the Micro:bit to create a wide range of interactive and educational projects!