MegaPi

1. Overview

MegaPi is a main control board specially designed for makers and also an ideal option for being applied to education field and all kinds of matches. It is based on Arduino MEGA 2560 and supports programming with Arduino IDE perfectly. MegaPi can be divided into 6 function area, allowing you to connect with various plug-in modules to drive motors and sensor and to realize wireless communication. MegaPi has strong motor-driving ability which is capable of driving 10 servos or 8 DC motors simultaneously. It is the ideal option for various robotic projects, such as smart robot car and 3D printer.

2. Features:

Four motor driver interfaces for adding encoder motor driver and stepper motor driver, and thus to drive DC motors, encoder motors and stepper motors
● One wireless communication interface for adding Bluetooth module or 2.4G module
● Ten servo interfaces which enable the board to drive up to 10 servos at the same time
● Two high-power MOS driver interface which is able to drive devices with a maximum current of 10A. Maximum output of normal I/O ports is DC 5V 3A
● One Raspberry Pi switch interface (requires manual soldering) to realize 5V to 3.3V serial communication
● Three M4 mounting holes which allow the board to be connected with Raspberry Pi
● Slide switch for controlling the power supply
● B-type USB interface for downloading programs and communications. It uses the CH340G USB to serial chip which can realize communication between the computer and MegaPi easily and stably
● High-power DC input interface with an over-current protection of 2A and anti-reverse measurement
● One reset key, one power indicator (red) and one I/O indicator (blue)

3. Specification:

● Microcontroller: ATMEGA2560-16AU
● Input Voltage: DC 6V-12V
● Operating Voltage: DC 5V
● I/O Pins: 43
● Serial Ports: 3
● I2C Interface: 1
● SPI Interface: 1
● Analog Input Pins: 15
● DC Current per I/O Pin: 20mA
● Flash Memory: 256KB
● SRAM: 8KB
● EEPROM: 4KB
● Clock Speed: 16 MHz
● Dimension: 85*63mm

4. Introducing Interfaces of MegaPi and Other Plug-in Modules

10050_10

The various colors on MegaPi represents specialized functions:
● Red pin–power output/motor output
● Yellow pin–I/O pin
● Blue pin–wireless communication interface
● Black Pin–power GND
● Green Interface–power output/motor output

5. Introduction to ports

MegaPi for RJ 25 provides four RJ25 ports identified by labels of five different colors. Their colors and functions are as follows:

MegaPi Port

Wireless communication interface – for adding Bluetooth module or 2.4G module (require corresponding communication module)
Port 1 – motor driver interface for driving DC motor, stepping motor and encoder motor (require corresponding driving module)
Port2 –motor driver interface for driving DC motor, stepping motor and encoder motor (require corresponding driving module) 
Port3 – motor driver interface for driving DC motor, stepping motor and encoder motor (require corresponding driving module)
Port4 – motor driver interface for driving DC motor, stepping motor and encoder motor (require corresponding driving module)
Port5 – RJ25 communication module interface for adding Bluetooth or WIFI which requires RJ25 (require keyset for MegaPi’s transferring to RJ25)
Port6 – RJ25 dual-digital/analog interface for adding sensors or input/output RJ25 modules (require keyset for MegaPi’s transferring to RJ25)
Port7– RJ25 dual-digital/analog interface for adding sensors or input/output RJ25 modules (require keyset for MegaPi’s transferring to RJ25)
Port8– RJ25 dual-digital/analog interface for adding sensors or input/output RJ25 modules (require keyset for MegaPi’s transferring to RJ25)

6.Guide to programming

1.Graphical Programming-mBlock

2.Arduino Programming

Arduino is an open-source electronics platform based on easy-to-use hardware and software. It’s intended for anyone making interactive projects. The Arduino development environment makes it easy to write code and upload it to the i/o board. You can use Arduino language (C\C++) to interface with Arduino hardware. We provide a complete Arduino using environment.

MegaPi is compatible with Arduino Mega 2560, so you can develop program with Arduino IDE. We suggest you install Makeblock program library if using Makeblock’s electronic modules.

3.Python Programming

4.Node JS Programming

英文产品单页_Ranger_V0.5.1

7.Schematic Circuit Diagram
MegaPiSchematic1MegaPiSchematic 2

8. FAQ of MegaPi

8.1 Where to get the driver package if the computer fails to install it automatically?
A: Manually install the driver
Windows : Download
Mac OSX : Download 
8.2 Why the Port1 – Port4 of MegaPi are anti-reverse?
A: The Port1 – Port4 of MegaPi are designed as one the row of female header or male header, and they are divided into red or yellow color, which can avoid connecting reversely. The red port is for the input/output of large current, while the yellow port is for I/O pin. The master chip or the driver module may get burn if you connect them reversely.
8.3 How much current can the large current driver interface (MOS driver interface) output?
A: Two interfaces can output current up to DC12V10A.
8.4 Why the stepping motor get hot?
A: Considering the usage scenario of stepping motor, the driver current was adjusted to the larger one, so the motor may get hot. Please contact the cooling fin and the driver module well, or the master chip may get burn.
8.5 What’s the function of the black adjustable potentiometer on the stepping motor?
A: This potentiometer is for adjusting the current of stepping motor driver. The default position is on the middle, but you can turn it up or down. When potentiometer turned up, the chip will get hotter. So remember to dissipate heat with larger cooling pin or in good cooling conditions.
8.6 Why the master chip reset when MegaPi drives several motors at the same time? How to deal with this problem?
A: When the motor starts to run or rotate clockwise/anticlockwise, the  power consumption will be enormous. In this situation, the current from the power source will be insufficient, which leads to the result of low voltage and the reset of master chip. You should use stronger power source or adjust the program to avoid the motor rotating  clockwise/anticlockwise frequently.
8.7 How to weld 2*10 pin header while connecting MegaPi with Raspberry Pi?
A: MegaPi is not weld to the Raspberry Pi, so you have to weld by yourself. Do avoid short circuit when welding the pins.
8.8 Raspberry Pi resets when connected to Raspberry Pi and drive high power device. How to deal with this problem?
When supplying power to  Raspberry Pi  through MegaPi and controlling motors at the same time, the voltage will be unstable and Raspberry Pi will reset. Just supply power to Raspberry Pi directly.
8.9 How to get after-sales service if there are some quality problem with MegaPi?
A: tec-support@makeblock.com
8.10 Is there any accessories that can work with MegaPi? Where should I buy them?
A: Encoder motor drivers, stepping motor drivers, Bluetooth, 2.4G, DC motors, encoder motors, stepping motors, Shield, sensors of RJ25,  steering engines, structural parts, etc.

9. Notice

9.1. Apply MegaPi voltage DC 6-12V
9.2. Prevent short circuits
9.3. Prevent the contamination of water, acidity/ alkalinity liquid, or solid debris, etc.
9.4. Keep away from children and pets 
9.5. Do not throw away

10. Contact us

tec-support@makeblock.com

38 thoughts on “MegaPi”

  1. Can anyone say if this works for the Raspberry Pi 3? I have concerns with the higher rated required amperage.

  2. where are the instructions for attaching the megapi to the raspberry pi? I know there is solding involved but where on each unit?

    1. Hi Claudio,

      We do not sell the connectors separatly.
      The name for the stepper motor connector is HT3.96-4P

  3. Hi Admin,
    2 questions:
    1. Could you please provide the instructions (step to step) about how to connect MegaPI to RPI 3?
    2. Additionally, I am interested in order to connect RPI + MegaPI + Auriga, could you please provide some help about it? (I saw some forums saying that I can connect up to 112 devices via I2C using RPI as the mater, so I would like to attach MegaPIs and Aurigas in serie)

    Any ideas or urls will be appreciated,
    Thanks.

    1. Hi Christian,

      There is a interface for RP on MegaPi while we don’t have the instructions to guide connection in detailes, you may refer to the schematic of MegaPi and RP3 for the connection.

  4. I bought the laserbot from amazon and made it. Where is the megaPi driver? What is the password for the Mlaser?

    1. Hi Peter,
      Since the Maximum output of normal I/O ports is DC 5V 3A, it will provide the proper power to the load as it needs.

    1. Hi Misbah,

      Since MegaPi just provide a interface for raspberry Pi to provide more possibilities for geeks.
      For further application, you may need to figure it out by yourself base on the existed instructions we provided.

  5. Hello, i’m wondering that can i connect adxl345 acceleration sensor to MegaPi without using RJ25. if it possible, how it is going to happen, which pin should i use. i want to get analog data from megapi by using adxl345 ?

    thank you

    1. Hi Meim3452,

      For this kind application, I am afraid that we don’t have enough ability to support since we don’t sell adxl345 acceleration sensor and know little about it.
      You may need to figure out the connections according to the schematics for MegaPi and the adxl345 acceleration sensor.

  6. Does Me Wifi module work with MegaPi?
    If yes, can I get a sample code for that?
    I can’t find any Wifi signal (ESP+ chip ID)

  7. I cannot send signal to port 4 and port 4b separately. I only want one of them to respond, not both. I tried with other ports as well but still yeild the same result. I use makeblock android app. I connected encoder motor on port 5 and dc motor on port 4b. Please help.

      1. I’m just using Firmware_for_MegaPi.ino file which is the source file. I am using the file as a reference for my project.

  8. What exactly balanced_model() in MegaPi firmware code does? Does it ensure the robot travels perfectly straight?

    1. We are sorry that we don’t have enough ability to answer this question, so you might need to figure it out by yourself.

  9. Hi, i have a Laserbot and an (Code 28) driver not found problem, i cant connect to the system.

  10. Hello,

    Does megapI pyhton code provided by makeblock support only python2 or also python3?

    Thanks

    1. Hi, Oliver,
      Our MegaPi supports Pyhton 2.7. Please refer to this link for further information.
      Please note, Raspberry Pi has many different versions. If you would like to know more about information regarding Raspberry Pi, I’d suggest that you learn more about the raspberry Pi on the raspberry Pi official website before you start using it.The relationship between MegaPi and Raspberry Pi is just a serial communication protocol.
      Best,
      Makeblock

    1. Hi, Kelvin,
      MegaPi’s Ten servo interfaces which enable the board to drive up to 10 servos at the same time, but we are afraid that we cannot tell you if they jitter during usage. It really depends on how you going to run your project.You could try, or you could visit our forum to see if there is any similar project like yours.
      Best,
      Makeblock

  11. I would like to control 4 stepper motors with encoders.
    I have known that mega pi can control dc servo and stepper motors togather.
    But i want to ask you how i can connect encoder wires when i use mega pi with drv8825 driver.

    1. Dear Jw,
      Sorry we cannot provide advice for Non-Makeblock branded product. Namely, it is beyond our supporting abilities to provide advice for drv8825 driver. We afraid that you need to figure it out by yourself, or you could search on our forum and check if there is any similar project like yours.
      Best,
      Makeblock

Leave a Reply

Your email address will not be published. Required fields are marked *