From Wiki for Dragino Project
Jump to: navigation, search


Internet of Things Module - M32

M32 Internet of Things module is designed for the easy of programming and installation of IoT projects. It is a plug-in module for MS14-S and powered by an AVR ATmega32u4 micro-controller.

M32 is Arduino Yun compatible, it communicates with MS14-S CPU via SPI and UART interface and provide the power / GPIOs via the 14 positions screw terminal on MS14-S. M32 can be programmed by the latest Arduino IDE. The board type in Arduino IDE is "Arduino Yun".

With the combination of MS14-S, M32 and Arduino Yun software, users can install Internet of Things projects in an easy / rapidly way.


  • Internet of Things Gateway module to connect sensor network to internet.
  • Log sensor data and upload to remote server.
  • Control switch/relay from Internet.
  • Easy programming use Arduino IDE.
  • Program/update/ debug via WiFi network.


Microcontroller ATmega32u4
Operating Voltage 5V
I/O voltage 5V
3.3V output channel 1
5V output channels 2
Flash Memory 32KB(of which 4KB used by bootloader)
Clock Speed 16Mhz
Digital I/O pins 10
Analog input channels 8
PWM channels 4
ESD-protection IEC 61000-4-2
Over Voltage Protect

Pin Map

M32 Pin Map


Pin 6+ can be configured as 5V or 3.3V output

M32 uses 5v power from ms14. The mega32u4 avr is powered by 5v as well. M32 provides 5V or 3.3V output power.

5V: The 5V output power pin is 1+ and 6+

3.3V: pin 6+ can be used for 3.3v power output, by using the VOUT_SEL jumper.

GND: 2 GND pins are available in 1- and 6-.

Input and Output Pins

Each of the 10 digital i/o pins on the m32 can be used as an input or output, using pinMode(), digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin can provide or receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of 20-50 kOhms. In addition, some pins have specialized functions:

TWI: 2 (SDA) and 3 (SCL). Support I2C / TWI communication using the Wire library.

External Interrupts: 3 (interrupt 0), 2 (interrupt 1). These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value. See the attachInterrupt() function for details.

PWM: 3, 6, 9, 10. Provide 8-bit PWM output with the analogWrite() function.

LED: 13. The "heart beat" LED is connected to digital pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it's off.

Analog Inputs: A0 - A3, [A6, A8, A10, A11 (on digital pins 4, 6, 9 and 10)]. The m32 has 8 analog inputs, all of which can also be used as digital i/o. Each analog input provide 10 bits of resolution (i.e. 1024 different values). The analog inputs measure from ground to 5 volts.

RESET_MS14:11(PB7): Bring this line LOW to reset the AR9331 microprocessor on ms14. Resetting the AR9331 will cause the reboot of the ms14. All the data stored in RAM will be lost and all the programs that are running will be terminated. The reset feature is deactivate by default to avoid error program on 11. Solder a 0ohm capacitor on R14 or short the two ends of this resister will active this feature.

ESD and Overvoltage Protection

Except 7+ and 7- , all other pins are Over-voltage and ESD protected following the standard IEC 61000-4-2.

Internal Connectors

M32 Internel I2C connector

The M32 has two on board connectors which are reserve for further development.

  • I2C Connector: This 1x4 (2.54mm) connector has SCL/SDA/5V/GND pin out, it can used to hook up a small I2C PCB and place into MS14.
  • J2 Connector: This connector is reserved for further process the signal on 7+ and 7- pins.

USB Connector

USB Port of M32, used for debug or program

M32 has a micro USB connector and can act as standard USB COM device. This USB connection can be used to upgrade firmware or debug the software via serial monitor on Arduino IDE.

Program / Upload sketch to M32

Program via WiFi

M32 is running a sketch (program) inside which define how to process the sensor data or send command to the actuator.

User can upload the sketch via Arudino IDE (use the version support Arduino Yun) to M32 ( installed in MS14).

Make sure your laptop and ms14 are in the same network. The ms14 will broadcast data in the network and the Arduino IDE will receive this data and show the ms14 in Tools --> Port.

Arduino Detect ms14 in the same network

Then choose the correct board type Arduino Yun for M32 IoT module.

M32 board type is Arduino Yun

After we have correctly configured board info as above, we can use the Arduino IDE to compile and upload the sketch to M32.

During upload, Arduino IDE will ask for a password. This is the password we have configured in the ms14 Web GUI, default password is arduino.

Compile and Upload sketch to M32

Program via USB

M32 has a USB port which can be used for upload as well. Connect this port to PC and the M32 will shown in Arduino IDE as a COM port in Tools --> Port. Select this COM port and user can program and upload sketch to M32.

Debug MCU code

M32 has two easy way to debug the MCU code.

Debug via Console Class(WiFi cnnnection)

The console class can be used to print out debug info to the Arduino IDE serial monitor. An example for how to use console class is under Arduino IDE --> Files --> Examples --> Bridge --> ConsoleAsciiTable.

Debug via Serial Class(USB Connection)

If M32 USB port is connected to PC. User can use serial class to debug the code as well. A example of how to use can see Arduino IDE --> Files --> Examples --> Bridge --> WiFiStatus


CLICK HERE for some detail examples.

Or consult Arduino Yun Example Git Source for more examples source.

Hardware / Software Source

Schematic/PCB V1.0 source