IO Expansion Board
Introduction
This expansion board is fully compatible with both the micro:bit and the zhangkong mainboards. It allows for the zhangkong board to be inserted on the front side, while the micro:bit can be inserted on the reverse side. The board features 10 digital/analog 3Pin ports and three I2C interfaces. It also comes with two onboard motor drivers that do not require additional pins. For power supply, the board is equipped with both PH2.0 and microUSB ports, enabling it to be powered either through a USB cable or a battery box/lithium battery, with a voltage range of 3.5-5V. An onboard switch allows for controlling the external power supply. Additionally, the board includes a high-quality buzzer with a switch for turning it off at any time. Nine alligator clip interfaces are provided for easy connections. The expansion board is compatible with both the zhangkong's touch-sensitive edge connector and the micro:bit's edge connector. Furthermore, it features LEGO-compatible holes, allowing it to be seamlessly integrated with LEGO bricks.
Technical Specifications
Supply Voltage: 3.5V~5V DC (Three AAA batteries or 3.6V~3.7V lithium battery)
IO Ports: P0, P1, P2, P8, P9, P12, P13, P14, P15, P16
I2C Interfaces: ×3
Pin Edge Connector: 0, 1, 2, 3V, GND
Touch Edge Connector ×5: P, Y, T, H, O, N (Exclusive to the zhangkong)
micro:bit Buzzer ×1 on P0 port (When using micro:bit, it's useful; in zhangkong mode, please turn off the buzzer switch to avoid occupying the P0 port).
Buzzer Switch: x1
Motor Interface: x2
Edge Connector Hole Diameter: 4.8mm, compatible with LEGO
Edge Connector Hole Spacing: 8mm, compatible with LEGO
Dimensions: 80mm x 47mm
Function diagram
Usage Instructions
Power Supply Methods
1. Direct Motherboard Power Supply:
This method utilizes the USB port or power socket on the motherboard to supply power. When powered this way, you can use various expansion ports and the buzzer on the expansion board. Due to the limited driving current of the motherboard, motor drivers cannot be used in this mode.
2. USB Port Power Supply:
Power can be supplied via a computer's USB port, a power bank, or a mobile phone charger. The interface used is microUSB. In this mode, all functions of the expansion board are available for use.
3. External Battery Box Power Supply: An external PH2.0 interface is used with an input voltage range of 3.5~5V. Either a 3-cell dry battery box with a PH2.0 interface or a 3.7V lithium battery can be used. In this mode, all functions of the expansion board are available for use.
Zhangkong Board Usage
Insert the Zhangkong Board with the side that has the OLED screen facing the direction of the "掌控板" logo, as shown in the diagram.
At this point, the functions supported by the zhangkong extension board are as follows:
All IO ports
2-channel motor drive
Touch Edge Connector (for zhangkong)
0, 1, 2, 3V, GND Edge Connector
USB power supply, PH2.0 external power supply port, and power switch.
Notes:
In zhangkong mode, the buzzer on the extension board is not supported. When using the zhangkong board, please turn off the buzzer. At this time, the P0 port can be used normally.
The touchpad’s function is based on changes in capacitance, affected by various factors like finger size, moisture, and touch pressure. You must first read the touch values to set appropriate thresholds in the program.
micro:bit Board Usage
Insert the micro:bit with the LED matrix side facing the direction of the "micro:bit" logo, as shown in the diagram.
At this point, the expansion board supports the following features:
- All IO ports
- 2 motor drivers
- "0, 1, 2, 3V, GND" edge connector compatible with the micro:bit P0,P1,P2, 3V GND
- USB and PH2.0 external power, with power switch
- Buzzer and buzzer switch
Notes:
- The "PYTHON" touchpads are not supported in micro:bit mode.
- The buzzer uses the P0 port. To use the P0 touchpad, the buzzer must be turned off.
MakeCode example(for micro:bit)
Makecode online programming address: https://makecode.microbit.org.
Please copy the library link address and paste it into the Makecode extension to search: https://github.com/DFRobot/pxt-DFRobot_creative-robotics-kit
Example: The result of the following program: Two motors rotate at speeds of 200 RPM and 100 RPM, rotating forward for 2 seconds, then backward for 2 seconds, and stopping for 2 seconds, continuously looping.