Training Session 5:

Programming robots and actuators II

mBot servo extension pack

Makeblock offers extension kits for the Arduino UNO compatible mBOT. As well as the main control board; Light Sensor, Me Ultrasonic Sensor, Me Line Follower Sensor; Bluetooth/USB communication ports, the servo extension pack provides the Me RGB LED, Me RJ25 adapter and 9g Micro Servo, along with hardware mounting components.

The extension kit allows the construction of modified robots - shown right.

More details at: https://www.makeblock.com/steam-kits/mbot

 MakeBlock mBot
mbot-add-on-pack-servo-pack-2_1.jpg

 

mCore board
Arduino ports for onboard devices

Light sensor A6
Buzzer: D8
Button: A7
2x Neopixel RGB LEDS D13
Motor 1:  D6, D7
Motor 2: D4, D5
IR emitter: D3
IR receiver: D2

The board also has solder points for ports A0-3, D9-12 and I2C SDA,SCL

Servo extension pack:
Me RGB LED
Me RJ25 adapter
9g Micro Servo+ mounting kit

 RGB LED module

RGB LED module

 Me RJ25 adapter

Me RJ25 adapter

 9g micro servo

9g micro servo

Technical information:

Click here to download the instruction manual for the mBot Servo Extension Kit (PDF 3.7 MB)

Click here to download 9g Micro Servo information sheet

Click here for link to Core CPU Board information
Click here for link to RGB LED module information
Click here for link to Me RJ25 Adapter information
Click here for link to  9g Micro Servo Kit information

Tutorials for using XOD with servos:

Click here for link to Official XOD.io tutorial
Click here for link to servo control via potentiometer

Click here for link to XOD Tutorials about:
Create a Self-Driving Robot — Part One
Advanced Motor Control — Part Two
Servo control - Part Three
Hacking Nodes with C++ — Part Four
(From Tommy Warner, Medium)

Video tutorials:
XOD control of servos

mBotServoPack_image.png

Don't forget:

Before you can connect your mBot to your PC, Mac or mobile device, you need to install the mBot USB drivers. The mBot manufacturers have provided a range of programming tools that can be used with the robot: https://www.makeblock.com/steam-kits/mbot/software. Installing the MakeBlock software packages also provides access to the USB drivers - and this may the simplest way to get up and running. This will also provide an alternative programming platform to explore.

25d91eb3cc07a94c6b98247aeb10d07cc619a42e.jpg
3121fafea6249aa3223e24e8e5a947a8f89a9d10.jpg

Alternatively, drivers for the CH340/341 USB-serial chip can be found online

Troubleshooting guide for mBothttps://www.vernier.com/til/4136/
Mac drivershttp://download.makeblock.com/mblock/CH34x_Install_V1.3.pkg
Cheat Sheethttps://forum.makeblock.com/t/cheat-sheet-getting-started-mbot-more/2960


Challenges:

The mBot is equipped with a range of peripheral devices - can include these in any of your programmes - for example to provide collision warnings or feedback?

A0 RJ25 plug 4 (default not-connected)
A1 RJ25 plug 4 (default not-connected)
A2 RJ25 plug 3 ultrasonic
A3 RJ25 plug 3 ultrasonic
A6 light sensor
A7 button
D2 IR RCV
D3 IR TX
D4 DIR2 - direction motor2
D5 PWM2 - pwm motor2
D6 PWM1 - pwn motor1
D7 DIR1 - direction motor1
D8 buzzer
D9 RJ25 plug 2 linefollower
D10 RJ25 plug 2 linefollower
D11 RJ25 plug 1 (default not-connected)
D12 RJ25 plug 1 (default not-connected)
D13 2 WS2812 Neopixel RGB LEDs

The board also has solder points for ports A0-3, D9-12 and I2C SDA,SCL, so additional components could be added to the robots.Can you engineer robot-robot sensing and communication?

More details about mBot ports athttp://blog.hmpg.net/2016/04/makeblock-mcore-information.html


Additional resources:

XOD tutorial: How to control a servo: https://xod.io/docs/tutorial/11-servo/

XOD library for the mBOT: https://xod.io/libs/gabbapeople/mbot-lib/ (gabbapeople/mbot-lib to be loaded in XOD)
XOD library for servos: https://xod.io/libs/gweimer/servo/ (gweimer/servo to be loaded in XOD)
Enhanced servo implementations to detach servo and allow it to free-wheel (or allow other nodes to control the servo)

MakeBlock downloads for mBot series: https://www.makeblock.com/steam-kits/mbot/downloads
(Instructions, videos, schematics, etc.)

MakeBlock programming information for the mBot: http://learn.makeblock.com/en/mbot-programming/

Thingiverse 3D printed accessories for mBot: https://www.thingiverse.com/tag:mbot
(Including brackets, pen holders, bumpers, etc.)

Collection of mBlock pseudo-code for controlling the mBot: http://www.mblock.cc/example/introduction/
(includes control of mCore onboard LEDs, sensors, etc.)

MakeBlock Github site: https://github.com/Makeblock-official

PID Controller Basics Using XOD and Arduino: https://medium.com/@victoriandeolrn/pid-controller-basics-using-xod-and-arduino-d1eb604b46d

Alternative programming applications for mBot:

Find details and links for downloading mBlock, MakeBlock, mBlock Blockly

Circuit digrams:

 Circuit diagram for the mCore control board of the mBot

Circuit diagram for the mCore control board of the mBot

 Makeblock mBot ultrasonic rangefinder circuit

Makeblock mBot ultrasonic rangefinder circuit

 Makeblock mBot line follower circuit

Makeblock mBot line follower circuit

 Makeblock RJ25 adapter board circuit

Makeblock RJ25 adapter board circuit

 Makeblock RGB LED module circuit

Makeblock RGB LED module circuit