Overview
mCore board |
The mCore is basically an Arduino Uno plus
- dual motor controller
- two serial RGB LEDs (WS2812 aka "NeoPixels")
- piezo buzzer
- light sensor
- IR LED
- IR receiver
- button
- header block for either a bluetooth or 2.4GHz radio
- four RJ25 connectors for external peripherals
The board is intended to be used for teaching programming, robotics, internet of things, etc. As a learning tool, it is primarily used with the custom version of the Scratch programming environment called mBlock. There is also a library for regular Arduino IDE programming as well.
What is lacking, however, is a good write up on the various pin assignments used for the on-board peripherals that Makeblock added. Thankfully, at least there is a schematic to help us out.
Pin assignments
Based on the schematic, here are the pin assignments. Additional detail on each peripheral is provided below the table.
D0/RXD | RXD on external radio connector |
D1/TXD | TXD on external radio connector |
D2 | IR receiver input |
D3~ | IR LED output (HIGH = ON) |
D4 | M2 direction (HIGH = CCW) |
D5~ | M2 PWM (speed) |
D6~ | M1 PWM (speed) |
D7 | M1 direction (HIGH = CW) |
D8 | Buzzer output |
D9~ | Pin 5 on RJ25 #2 |
D10~ (SPI) SS | Pin 6 on RJ25 #2 |
D11~ (SPI) MOSI | Pin 5 on RJ25 #1 |
D12 (SPI) MISO | Pin 6 on RJ25 #1 |
D13 (SPI) SCLK | Blue LED / Serial out to WS2812 LEDs |
A0 | Pin 5 on RJ25 #4 |
A1 | Pin 6 on RJ25 #4 |
A2 | Pin 5 on RJ25 #3 |
A3 | Pin 6 on RJ25 #3 |
A4 (I2C) SDA | Pin 2 on all 4 RJ25 connectors |
A5 (I2C) SCL | Pin 1 on all 4 RJ25 connectors |
A6 | Light sensor input |
A7 | Button input, low when pressed |
Arduino Pin | mCore function |
---|
Motor Controller
Motor Controller |
The M1 connector on the board is controlled by D6 (PWM speed) and D7 (direction). When D7 is HIGH, the motor turns CW. When D7 is LOW the motor turns CCW.
Likewise, the M2 connector is controlled by D5 (PWM speed) and D4 (direction). However, in this case the function of D4 is reversed. When D4 is HIGH the motor turns CCW, and when it is LOW it turns CW.
Reversing the function of the two direction pins may seem odd, however, when you think about it, the motors are generally on the opposite sides of the robot so they need to turn opposite directions for the bot to move either forward or backward. Consequently you can use the same 'direction' setting (HIGH or LOW) on both outputs to get the bot to go in one direction, for example, forward.
Serial RGB LEDs (WS2812 aka NeoPixels)
WS2812 Serial RGB LEDs |
In addition, the pin (D13) controls a blue LED on the board so the standard Arduino blink sketch will work correctly on the mCore.
Piezo Buzzer / Speaker
Speaker |
Light Sensor
Photocell |
The light sensor is a standard CdS photocell configured as a voltage divider. This is hooked to analog pin 5 so you can read the voltage (and hence the amount of light) using analogRead().
IR LED
IR LED |
The IR LED is simply hooked to a digital output pin (digital pin 3). You can use this to transmit data or to detect objects in front of the bot (by bouncing light off of objects and reading it with the receiver).
IR Receiver
IR Receiver |
Button
Pushbutton |
Radio Headers
Radio headers |
RJ25 Connectors
RJ25 Connectors |
Each connector has power (+5) and ground connections along with the I2C bus clock and data pins. The remaining two pins on each connector have either two digital or two analog port pins, depending on which connector it is.
Port 1 has digital pins 11 (PWM) & 12. Port 2 has digital pins 9 & 10 (both PWM). Port 3 has analog pins 2 & 3. Port 4 has analog pins 0 and 1.