Introduction

Look for more hardware to play with your new micro:bit? Check this out! This is a micro:bit V2-based multi-functional expansion board for programming education.

Featuring a small size of 57×87mm and a compact layout, the board expands more than 10 functional modules including sensors of all kinds, 4-way motor, LED lights, OLED screen and external power supply, which allows students to not only learn the basic functions of micro:bit but also further advance to the next level like controlling robot cars, Mecanum wheel robot, and so on. Moreover, even with so many things integrated on the board, the price still remains low. Come and explore all these extra features!

Specification

  • Operating Voltage: 5V(USB)
  • External Power Supply: 5V~12V (The switch only controls the external power)
  • Infrared Receiver (P13) ×1
  • W2812RGB Light (P15) ×2 (RGB0 RGB1)
  • Relay Module (I2C) ×1 (On-board status indicator )
  • Infrared Flame Sensor (I2C) ×1
  • Temperature & Humidity Sensor (I2C) ×1
  • Rotation Angle Sensor (I2C) ×1
  • Red/Yellow/Green Traffic Light Module (I2C) ×1
  • 12864_OLED Display (I2C) ×1 (With black metal protective cover)
  • Motor Drive (I2C)×4 (Onboard forward/backward rotation two-color indicator)
  • GPIO(5V): P0 P1 P2 P8 (External power with stronger driving capability)
  • GPIO(3.3V): P0 P1 P2 P8 P12 P14 P16 (Inner power of micro:bit main-board)
  • I2C Expansion Port (3.3V) ×2
  • HuskyLens Port (5V I2C ) ×1 (External power with stronger drive capability)
  • SR04 Ultrasonic Sensor Port ×1 (5V P0 P1 GND)
  • URM10 Ultrasonic Sensor Port ×1 (5V P0 P1 GND)
  • Dimensions: 57×87 mm/2.24×3.43”

Board Overview

Power Supply Method

  • USB power supply: The power supply of the USB interface is 5V. It can be powered by the USB interface of PC or the charger of phone, and at this time, the on-boarded switch doesn’t work. This method mainly facilitates class teaching. However, the current supplied by the USB interface is limited, it is hard to drive multiple motors or servos.

  • External power supply: Next to the USB interface, here is an external power supply interface, which supplies voltage of 5~12V. The on-boarded switch works here. This method of power supply is mainly used to drive multiple motors and servos. It can be used to make robot car, servo robot, etc. Multiple lithium batteries are used to power. To avoid damage to the mainboard, distinguish the positive and negative poles when connecting.

IO Ports Description

  • GPIO (3.3V): the IO port power of 3.3V is leaded out from the micro:bit mainboard, so that the driving current is low, and it is suitable for low-power sensors and actuators.
  • GPIO (5V): the IO port power of 5V is directly connected to the power supply, so that the driving ability is strong, and it is suitable for high-power external devices such as servo, and some sensors that can be only powered by 5V.
  • I2C (3.3V): the IO port power of 3.3V is leaded out from the micro:bit mainboard, so that the driving current is low, and it is suitable for low-power sensors and actuators.
  • I2C (5V): the IO port power of 5V is directly connected to the power supply, so that the driving ability is strong, and it is suitable for high-power external devices such as servo, and some sensors that can be only powered by 5V.

Tutorial- MakeCode

  1. Enter the MakeCode programming platform in browser: https://makecode.microbit.org/
  2. Create a new project and name it.
  3. Load in the program library of xia_mi board: click “setting”, and “expansion” in turn, then paste this link in the search box: https://github.com/DFRobot/pxt-DFRobot_xia_mi_Board.

1. Light Up RGB LED

In this sample, we are going to make the RGB light present three colors in turn.

MakeCode Program Link: https://makecode.microbit.org/_FJt7rr78WMKC

RGB LED color switching

2. Traffic Signal Light

In this sample, the red one lights for 30s, the yellow one lights for 2s, and the green one lights for 30s, in a loop execution.

MakeCode Program Link: https://makecode.microbit.org/_RduW652MPKyk

Traffic Light

3. Ambient Temperature and Humidity Sensor

In this sample, read the values of temperature and humidity, and display them on the OLED.

MakeCode Program Link: https://makecode.microbit.org/_K7y2TtVvMio7

Read temperature and humidity

4. Control Servo via Angular Rotation Sensor

In this sample, a 9g servo is connected to the P0 port, and the rotation angle sensor is used to control the angle of the servo. The position of the knob and the angle of the servo are displayed on the screen in real time.

MakeCode Program Link: https://makecode.microbit.org/_TVmLvAXTq2v5

Angle

5. IR-controlled Relay Switch

In this sample, the mini-infrared remote control is used to control the relay. When the button 1 on the remote control is pressed, the relay is closed, and when the button 0 is pressed, the relay is released. The corresponding relay indicator will switch automatically.

Infrared remote control and corresponding key value:

IR Remote Controller

MakeCode Program Link: https://makecode.microbit.org/_FEt27cb1qLar

IR

6. Fire Alarm

In this sample, a lighter is needed, please pay attention to the safety of using fire. Turn on the lighter about 20cm in front of the flame sensor, the display will show the current flame intensity value, if it exceeds 200, the buzzer will start to alarm, and stop the alarm when it is lower than 200. Because the infrared flame sensor also has a certain sense of sunlight, it has a value of several tens by default. The stronger the light, the larger the value, which is normal. But the infrared flame sensor is more sensitive to the wavelength of the flame.

MakeCode Program Link: https://makecode.microbit.org/_HAJPpYYfW6hq

Fire

Fire Alarm

7. SR04 Ultrasonic Distance Sensor

This sample will use the SR04 ultrasonic module. This module is not included in the product and needs to be purchased independently. Insert the SR04 ultrasonic sensor into the interface (as shown in the figure below), and it will display the measured distance on the OLED screen.

MakeCode Program Link: https://makecode.microbit.org/_0K01rcdXf0y1

SR04 Ultrasonic Sensor

SR04

8. 4-way Motor Drive

This product is equipped with 4 motor drives on board, which can be used as the control board of the Mecanum wheel robot platform. In this sample, 4 motors are driven to realize forward and reverse rotation. Demonstrate the use of motor drive.

MakeCode Program Link: https://makecode.microbit.org/_eR62rrYvCfyo

Motor

FAQ

For any questions, advice or cool ideas to share, please visit the DFRobot Forum.

More Documents