Quantcast
Channel: SparkFun Tutorials
Viewing all articles
Browse latest Browse all 1123

MicroMod Main Board Hookup Guide

$
0
0

MicroMod Main Board Hookup Guide a learn.sparkfun.com tutorial

Available online at: http://sfe.io/t1994

Introduction

The MicroMod Main Board - Single and Double are specialized carrier boards that allow you to interface a Processor Board with a Function Board(s). The modular system allows you to add an additional feature(s) to a Processor Board with the help of a Function Board(s).

SparkFun MicroMod Main Board - Single

SparkFun MicroMod Main Board - Single

DEV-18575
$14.95
SparkFun MicroMod Main Board - Double

SparkFun MicroMod Main Board - Double

DEV-18576
$17.95

Required Materials

To follow along with this tutorial, you will need the following materials at a minimum. You may not need everything though depending on what you have. Add it to your cart, read through the guide, and adjust the cart as necessary.

Reversible USB A to C Cable - 2m

Reversible USB A to C Cable - 2m

CAB-15424
$7.95
SparkFun MicroMod Artemis Processor

SparkFun MicroMod Artemis Processor

DEV-16401
$14.95
Pocket Screwdriver Set

Pocket Screwdriver Set

TOL-12891
$3.95
5
microSD Card - 1GB (Class 4)

microSD Card - 1GB (Class 4)

COM-15107
$4.95
SparkFun MicroMod WiFi Function Board - ESP32

SparkFun MicroMod WiFi Function Board - ESP32

WRL-18430
$14.95
SparkFun MicroMod Main Board - Single

SparkFun MicroMod Main Board - Single

DEV-18575
$14.95
SparkFun MicroMod Environmental Function Board

SparkFun MicroMod Environmental Function Board

SEN-18632
$149.95

MicroMod Main Board

To hold the processor and function boards, you will need one Main board. Depending on your application, you may choose to have either one or two function boards.

SparkFun MicroMod Main Board - Single

SparkFun MicroMod Main Board - Single

DEV-18575
$14.95
SparkFun MicroMod Main Board - Double

SparkFun MicroMod Main Board - Double

DEV-18576
$17.95

MicroMod Processor Board

There are a variety of MicroMod Processor Boards available to choose from. You will probably want to avoid having the same Processor and Function Board since there is an ESP32 on both types of boards.

SparkFun MicroMod Teensy Processor

SparkFun MicroMod Teensy Processor

DEV-16402
$19.95
2
SparkFun MicroMod ESP32 Processor

SparkFun MicroMod ESP32 Processor

WRL-16781
$16.95
SparkFun MicroMod STM32 Processor

SparkFun MicroMod STM32 Processor

DEV-17713
$14.95
SparkFun MicroMod RP2040 Processor

SparkFun MicroMod RP2040 Processor

DEV-17720
$11.95

MicroMod Function Board

To add additional functionality to your Processor Board, you'll want to include one or two function boards when connecting them to the Main Board. Make sure to check out the catalog for other function boards.

SparkFun MicroMod WiFi Function Board - ESP32

SparkFun MicroMod WiFi Function Board - ESP32

WRL-18430
$14.95
SparkFun MicroMod Environmental Function Board

SparkFun MicroMod Environmental Function Board

SEN-18632
$149.95

Tools

You will need a screw driver to secure the Processor and Function boards. To set the charge rate, you will need a precision screw driver (or a tiny, rounded object). The pocket screwdriver set is an excellent option. For users using a microSD card and want to easily read the contents of the memory card, you will need a microSD card adapter or USB reader.

microSD USB Reader

microSD USB Reader

COM-13004
$4.95
10
Pocket Screwdriver Set

Pocket Screwdriver Set

TOL-12891
$3.95
5
SparkFun Mini Screwdriver

SparkFun Mini Screwdriver

TOL-09146
$0.95
3

Suggested Reading

If you aren't familiar with the MicroMod ecosystem, we recommend reading here for an overview. We recommend reading here for an overview if you decide to take advantage of the Qwiic connector.

MicroMod LogoQwiic Connect System
MicroMod EcosystemQwiic Connect System

If you aren’t familiar with the following concepts, we also recommend checking out a few of these tutorials before continuing. Make sure to check the respective hookup guides for your processor board and function board to ensure that you are installing the correct USB-to-serial converter. You may also need to follow additional instructions that are not outlined in this tutorial to install the appropriate software.

What is an Arduino?

What is this 'Arduino' thing anyway? This tutorials dives into what an Arduino is and along with Arduino projects and widgets.

Installing Arduino IDE

A step-by-step guide to installing and testing the Arduino software on Windows, Mac, and Linux.

How to Install CH340 Drivers

How to install CH340 drivers (if you need them) on Windows, Mac OS X, and Linux.

Getting Started with MicroMod

Dive into the world of MicroMod - a compact interface to connect a microcontroller to various peripherals via the M.2 Connector!

Hardware Overview

The overall functionality of the Single and Double Main Boards are the same. We'll use the Single Main Board more in this section to highlight the features since this is also included in the Double Main Board. We'll switch to the Double Main Board when necessary to highlight the features that are only included in the Double Main Board.

The only differences are that the Double Main Board includes:

  • two jumper shunts
  • ability to add a second MicroMod Function Board to the mix
  • board's width
Main Board - Single MeasurementsMain Board - Double Measurements
(Zoomed Out)

Power

There are two ways to power the Main Boards, Processor Board, and Function Board(s).

  • USB
  • Single Cell LiPo Battery

It is fine to connect a power source to the USB connector and LiPo battery's JST connector at the same time. The MicroMod Main Board has power-control circuitry to automatically select the best power source.

Power USB

One option of powering the board is through the USB Type C connector. You will need a USB Type C cable to power the board with 5V. Power connected to the board's USB C connector will go through a resettable PTC fuse (rated at 2A max) and then the AP7361C 3.3V voltage regulator (rated at 1A max). The little green component close to the USB connector is the resettable PTC fuse while the square IC is the voltage regulator. The voltage regulator accepts voltages between ~3.3V to 6.0V.

USB Connector, PTC Fuse, and AP7361C Voltage Regulator

The USB Type C connector is also used to upload code to your Processor Board, send serial data to a terminal window, or charge the LiPo battery. Of course for portable power, you could connect a USB battery as an alternative to using a LiPo battery.

Power applied to the connector will light up the VIN and 3V3 LED. If you decide to bypass the PTC fuse, simply add a solder blob to the jumper labeled as PTC. There is also a jumper labeled as MEAS to measure the current consumption at the output of the 3.3V voltage regulator for your project.

Power LiPo

The other option is to connect a single cell LiPo battery (i.e. nominal 3.7V, 4.2V fully charged) to the 2-pin JST connector as shown below. A MCP73831 charge IC is included on the boards to safely charge the LiPo batteries via USB Type C connector. A switch is included to set the charge rate. The charge rate is probably set to ~166mA with both switches flipped to the ON position. This may vary depending on the position of the switch when it was pulled from the reel. Flip the switch to adjust the charge rate to either 100mA or 500mA using a precision flat head screw driver or tweezers.

LiPo Charge IC, Charge Rate Switch, and 2-Pin JST Connector

The voltage from the LiPo battery is regulated down to 3.3V as it goes through the AP7361C 3.3V voltage regulator (rated at 1A max).

MicroMod Processor Board

The MicroMod ecosystem allows you to easily swap out processors depending on your application. The location of the M.2 connector labeled as Processor is where you would connect and secure a MicroMod Processor Board.

Processor Board Socket

MicroMod Function Board

Beside the MicroMod Processor's socket is another M.2 connector for MicroMod Function Boards, which allow you to add additional functionality to your Processor Board. The Single Main Board includes one socket for a single Function Board while the Double Main Board includes two sockets for up two Function Boards.

Main Board - Single Function Board SocketsMain Board - Double Function Board Sockets
Main Board - Single Function Board SocketMain Board - Double Function Board Sockets

Reset and Boot Buttons

Each board includes a reset and boot button. There is an additional reset button PTH next to the reset button. Hitting the reset button to restart your Processor Board. Hitting the boot button will put the Processor Board into a special boot mode. Depending on the processor board, this boot pin may not be connected.

Reset and Boot Buttons

SWD Pins

For advanced users, we proke out the 2x5 SWD programming pins. Note that this is not populated so you will need a compatible header and compatible JTAG programmer to connect.

SWD Pins

MicroSD Socket

The board includes a microSD socket if your application requires you to log and save data to a memory card. The primary SPI pins (SDO, SDI, SCK, CS0) from your Processor and Function Board are connected to the microSD Socket.

MicroSD Card Socket

LEDs

There are three LEDs on the board:

  • VIN - The VIN LED lights up to indicate when power available from the USB connector.
  • 3V3 - The 3V3 LED lights up to indicate when there is a 3.3V available after power is regulated down from the USB connector or LiPo battery.
  • CHG - The on-board yellow CHG LED can be used to get an indication of the charge status of your battery. Below is a table of other status indicators depending on the state of the charge IC.

Charge StateLED status
No BatteryFloating (should be OFF, but may flicker)
ShutdownFloating (should be OFF, but may flicker)
ChargingON
Charge CompleteOFF

LEDs

Jumpers

The following five jumpers are included on both the Single and Double Main Boards.

  • MEAS - By default, the jumper is closed and located on the top side of the board. This jumper is used to measure your system's current consumption. You can cut this jumper's trace and connect the PTHs to a ammeter/multimeter to probe the output from the 3.3V voltage regulator. Check out our How to Use a Multimeter tutorial for more information on measuring current.
  • PTC - By default, the jumper is open and located on the bottom of the board. For advanced users that know what you are doing, add a solder blob to the jumper to bypass the resettable PTC fuse to pull more than 2A from the USB source.
  • 3.3V EN - By default, this jumper is open and located on the bottom of the board. Closing this jumper enables processor control of the 3.3V bus.
  • VIN LED - By default, this jumper is closed and located on the bottom of the board. Cut this trace to disable the LED that is connected to the input of the USB
  • 3.3V LED - By default, this jumper is closed and located on the bottom of the board. Cut this trace to disable the LED that is connected to the output of the 3.3V voltage regulator.
Top View Jumpers
Main Board - Single
Top View Jumpers
Main Board - Single
Bottom View Jumpers

Included only on the Double Main Board are two 1x3 male headers with 2-pin jumper shunts to enable the 3.3V voltage regulator for any Function Board connected to Function Zero and Function One using alternative Processor GPIO pins. Since certain processors have limited GPIO and may not be broken out on certain locations, alternative pins have been provided on the board. The ALT PWR EN0 jumper allows users to control the 3.3V voltage regulator on any Function Board that is connected to Function Zero. When the jumper shunt is on the left side toward the 2-pin JST connector, the jumper shunt connects the PWR EN0 to the Processor Board's GPIO G5 pin. Moving the jumper shunt to the other side connects the Processor Board's GPIO G5 pin to Function Board One's GPIO G3 pin.

Main Board - Double Jumpers

The ALT PWR EN1 jumper allows users control power from the 3.3V voltage regulator for any Function Board that is connected to Function One when the jumper shunt is connecting PWR EN1 and Processor Board's GPIO G6 pin. Moving the jumper shunt to the other side connects the Processor Board's GPIO G6 pin to Function Board One's GPIO G4 pin.

Qwiic and I2C

The board includes a vertical and horizontal Qwiic connector. These are connected to the primary I2C bus and 3.3V power on both the Processor and Function Board connectors allowing you to easily add a Qwiic-enabled device to your application.

Qwiic Connectors

Note that there are two mounting holes for Qwiic-enabled boards that have a standard 1.0"x1.0" size board. The image below highlighted with a black square is where you would place the board.

Qwiic Mounting Holes

MicroMod Pinout

Depending on your window size, you may need to use the horizontal scroll bar at the bottom of the table to view the additional pin functions. Note that the M.2 connector pins on opposing sides are offset from each other as indicated by the bottom pins where it says (Not Connected)*. There is no connection to pins that have a "-" under the primary function.

AUDIOUARTGPIO/BUSI2CSDIOSPIDedicated
Processor PinsFunction Zero PinsMain Board - Single Miscellaneous Pins
GNDGNDGND
3.3V-3.3V
USB_D+_Processor-USB_D+
3.3V_EN-3.3V_EN
USB_D-_Processor-USB_D-
RESET# (I - Open Drain)-RESET# (I - Open Drain)
GNDGNDGND
USB_VIN-USB_VIN
D0_ProcessorF0-
BOOT (I - Open Drain)-BOOT (I - Open Drain)
I2C_SDA_ProcessorI2C_SDAI2C_SDA (Qwiic)
UART_RTS_ProcessorUART_RTS-
I2C_SCL_ProcessorI2C_SCLI2C_SCL (Qwiic)
UART_CTS_ProcessorUART_CTS-
I2C_INT_ProcessorI2C_INT-
UART_TX_ProcessorUART_RX-
D1_Processor-SD Card CS
(microSD Card)
UART_RX_ProcessorUART_TX-
SWDCK_Processor-SWDCK (2x5 Header)
SWDIO_Processor-SWDCK (2x5 Header)
PWM0_ProcessorPWM0-
GNDGNDGND
A0_ProcessorA0-
USBHOST_D+_ProcessorUSBHOST_D+-
GNDGNDGND
USBHOST_D-_ProcessorUSBHOST_D--
A1_ProcessorPWR_EN0-
GNDGNDGND
G0_ProcessorF3-
CAN_RX_ProcessorCAN_TX-
G1_ProcessorF4-
CAN_TX_ProcessorCAN_RX-
G2_ProcessorF5-
GNDGNDGND
G3_ProcessorF6-
G4_ProcessorF7-
BATT_VIN / 3 (I - ADC) (0 to 3.3V)-BATT_VIN / 3 (I - ADC) (0 to 3.3V)
SPI_CS0_ProcessorF1-
SPI_SCK_ProcessorSPI_SCKSPI_SCK
(microSD Card)
SPI_DI_ProcessorSPI_DOSPI_DO
(microSD Card)
SPI_DO_ProcessorSPI_DISPI_DI
(microSD Card)
SDIO_DATA2_ProcessorPWR_EN0-
Processor PinsFunction Zero PinsFunction One PinsMain Board - Double Miscellaneous Pins
GNDGNDGNDGND
3.3V--3.3V
USB_D+_Processor--USB_D+
3.3V_EN--3.3V_EN
USB_D-_Processor--USB_D-
RESET# (I - Open Drain)--RESET# (I - Open Drain)
GNDGNDGNDGND
----
USB_VIN--USB_VIN
D0_ProcessorF0--
BOOT (I - Open Drain)--BOOT (I - Open Drain)
I2C_SDA_ProcessorI2C_SDAI2C_SDAI2C_SDA (Qwiic)
UART1_RTS_ProcessorUART_RTS(No Flow Control)-
I2C_SCL_ProcessorI2C_SCLI2C_SCLI2C_SCL (Qwiic)
UART_CTS_ProcessorUART_CTS(No Flow Control)-
I2C_INT_ProcessorI2C_INTI2C_INT-
UART1_TX_ProcessorUART_RX--
D1_Processor-F0-
UART1_RX_ProcessorUART_TX--
UART2_RX_Processor-UART_TX-
SWDCK_Processor--SWDCK (2x5 Header)
UART2_TX_Processor-UART_RX-
SWDIO_Processor--SWDCK (2x5 Header)
PWM0_ProcessorPWM--
GNDGNDGNDGND
A0_ProcessorA0--
USBHOST_D+_ProcessorUSBHOST_D+(No USB Host)-
GNDGNDGNDGND
USBHOST_D-_ProcessorUSBHOST_D-(No USB Host)-
A1_Processor-A0-
GNDGNDGNDGND
G0_ProcessorF3--
CAN_RX_ProcessorCAN_TX(No CAN BUS)-
G1_ProcessorF4--
CAN_TX_ProcessorCAN_RX(No CAN BUS)-
G2_ProcessorF5--
GNDGNDGNDGND
G3_ProcessorF6--
PWM1_Processor-PWM-
G4_ProcessorF7-SD Card CS
(microSD Card)
BATT_VIN / 3 (I - ADC) (0 to 3.3V)--BATT_VIN / 3 (I - ADC) (0 to 3.3V)
----
----
----
----
----
SPI_CS0_ProcessorF1--
----
SPI_SCK_ProcessorSPI_SCKSPI_SCKSPI_SCK
(microSD Card)
----
SPI_DI_ProcessorSPI_DOSPI_DOSPI_DO
(microSD Card)
SDIO_CLK_Processor-F7-
SPI_DO_ProcessorSPI_DISPI_DISPI_DI
(microSD Card)
SDIO_CMD_Processor-F6-
----
----
----
SDIO_DATA1_Processor-PWR_EN1-
----
SDIO_DATA2_ProcessorPWR_EN0--
G7_Processor-F5-
SPI_CS1_Processor-SPI_CS1-
G6_Processor-F4-
----
Alternative
Function
Primary
Function
Bottom
Pin
   Top   
Pin
Primary
Function
Alternative
Function
(Not Connected)75GND
VIN74733.3V
VIN7271Power EN
-7069-
-6665-
-6463-
-6261F7
-6059F6
-5857F5
-5655F4
-5453F3
-5251F2PWM
-5049F1SPI_CS0
-4847F0INT
-4645GND
-4443CAN_TX
-4241CAN_RX
-4039GND
A03837USBHOST_D-
EEPROM_A03635USBHOST_D+
EEPROM_A13433GND
EEPROM_A23231Module Key
Module Key3029Module Key
Module Key2827Module Key
Module Key2625Module Key
Module Key2423I2C_INT
-2221I2C_SCL
-2019I2C_SDA
UART_CTS1817-
UART_RTS1615UART_RX
-1413UART_TX
-1211-
-109-
-87SPI_SDO
-65SPI_SDI
-43SPI_SCK
-21GND
Alternative FunctionAlternative FunctionAlternative FunctionPrimary FunctionBottom
Pin
   Top   
Pin
Primary FunctionAlternative FunctionAlternative FunctionAlternative Function
(Not Connected)75GND
3.3V7473G5 / BUS5
RTC_3V_BATT7271G6 / BUS6
SPI_CS1#SDIO_DATA3 (I/O)7069G7 / BUS7
SDIO_DATA2 (I/O)6867G8
SDIO_DATA1 (I/O)6665G9ADC_D- CAM_HSYNC
SPI_CIPO1SDIO_DATA0 (I/O)6463G10ADC_D+CAM_VSYNC
SPI COPI1SDIO_CMD (I/O)6261SPI_CIPO (I)
SPI SCK1SDIO_SCK (O)6059SPI_COPI (O)LED_DAT
AUD_MCLK (O)5857SPI_SCK (O)LED_CLK
CAM_MCLKPCM_OUTI2S_OUTAUD_OUT5655SPI_CS#
CAM_PCLKPCM_INI2S_INAUD_IN5453I2C_SCL1 (I/O)
PDM_DATAPCM_SYNCI2S_WSAUD_LRCLK5251I2C_SDA1 (I/O)
PDM_CLKPCM_CLKI2S_SCKAUD_BCLK5049BATT_VIN / 3 (I - ADC) (0 to 3.3V)
G4 / BUS44847PWM1
G3 / BUS34645GND
G2 / BUS24443CAN_TX
G1 / BUS14241CAN_RX
G0 / BUS04039GND
A13837USBHOST_D-
GND3635USBHOST_D+
A03433GND
PWM03231Module Key
Module Key3029Module Key
Module Key2827Module Key
Module Key2625Module Key
Module Key2423SWDIO
UART_TX2 (O)2221SWDCK
UART_RX2 (I)2019UART_RX1 (I)
CAM_TRIGD11817UART_TX1 (0)
I2C_INT#1615UART_CTS1 (I)
I2C_SCL (I/0)1413UART_RTS1 (O)
I2C_SDA (I/0)1211BOOT (I - Open Drain)
D0109USB_VIN
SWOG1187GND
RESET# (I - Open Drain)65USB_D-
3.3V_EN43USB_D+
3.3V21GND
Signal GroupSignalI/ODescriptionVoltage
Power3.3VI3.3V Source3.3V
GNDReturn current path0V
USB_VINIUSB VIN compliant to USB 2.0 specification. Connect to pins on processor board that require 5V for USB functionality4.8-5.2V
RTC_3V_BATTI3V provided by external coin cell or mini battery. Max draw=100μA. Connect to pins maintaining an RTC during power loss. Can be left NC.3V
3.3V_ENOControls the carrier board's main voltage regulator. Voltage above 1V will enable 3.3V power path.3.3V
BATT_VIN/3ICarrier board raw voltage over 3. 1/3 resistor divider is implemented on carrier board. Amplify the analog signal as needed for full 0-3.3V range3.3V
ResetResetIInput to processor. Open drain with pullup on processor board. Pulling low resets processor.3.3V
BootIInput to processor. Open drain with pullup on processor board. Pulling low puts processor into special boot mode. Can be left NC.3.3V
USBUSB_D±I/OUSB Data ±. Differential serial data interface compliant to USB 2.0 specification. If UART is required for programming, USB± must be routed to a USB-to-serial conversion IC on the processor board.
USB HostUSBHOST_D±I/OFor processors that support USB Host Mode. USB Data±. Differential serial data interface compliant to USB 2.0 specification. Can be left NC.
CANCAN_RXICAN Bus receive data.3.3V
CAN_TXO CAN Bus transmit data.3.3V
UARTUART_RX1IUART receive data.3.3V
UART_TX1OUART transmit data.3.3V
UART_RTS1OUART ready to send.3.3V
UART_CTS1IUART clear to send.3.3V
UART_RX2I2nd UART receive data.3.3V
UART_TX2O2nd UART transmit data.3.3V
I2CI2C_SCLI/OI2C clock. Open drain with pullup on carrier board.3.3V
I2C_SDAI/OI2C data. Open drain with pullup on carrier board3.3V
I2C_INT#IInterrupt notification from carrier board to processor. Open drain with pullup on carrier board. Active LOW3.3V
I2C_SCL1I/O2nd I2C clock. Open drain with pullup on carrier board.3.3V
I2C_SDA1I/O2nd I2C data. Open drain with pullup on carrier board.3.3V
SPISPI_COPIOSPI Controller Output/Peripheral Input.3.3V
SPI_CIPOISPI Controller Input/Peripheral Output.3.3V
SPI_SCKOSPI Clock.3.3V
SPI_CS#OSPI Chip Select. Active LOW. Can be routed to GPIO if hardware CS is unused.3.3V
SPI/SDIOSPI_SCK1/SDIO_CLKO2nd SPI Clock. Secondary use is SDIO Clock.3.3V
SPI_COPI1/SDIO_CMDI/O2nd SPI Controller Output/Peripheral Input. Secondary use is SDIO command interface.3.3V
SPI_CIPO1/SDIO_DATA0I/O2nd SPI Peripheral Input/Controller Output. Secondary use is SDIO data exchange bit 0.3.3V
SDIO_DATA1I/OSDIO data exchange bit 1.3.3V
SDIO_DATA2I/OSDIO data exchange bit 2.3.3V
SPI_CS1/SDIO_DATA3I/O2nd SPI Chip Select. Secondary use is SDIO data exchange bit 3.3.3V
AudioAUD_MCLKOAudio master clock.3.3V
AUD_OUT/PCM_OUT/I2S_OUT/CAM_MCLKOAudio data output. PCM synchronous data output. I2S serial data out. Camera master clock.3.3V
AUD_IN/PCM_IN/I2S_IN/CAM_PCLKIAudio data input. PCM syncrhonous data input. I2S serial data in. Camera periphperal clock.3.3V
AUD_LRCLK/PCM_SYNC/I2S_WS/PDM_DATAI/OAudio left/right clock. PCM syncrhonous data SYNC. I2S word select. PDM data.3.3V
AUD_BCLK/PCM_CLK/I2S_CLK/PDM_CLKOAudio bit clock. PCM clock. I2S continuous serial clock. PDM clock.3.3V
SWDSWDIOI/OSerial Wire Debug I/O. Connect if processor board supports SWD. Can be left NC.3.3V
SWDCKISerial Wire Debug clock. Connect if processor board supports SWD. Can be left NC.3.3V
ADCA0IAnalog to digital converter 0. Amplify the analog signal as needed to enable full 0-3.3V range.3.3V
A1IAnalog to digital converter 1. Amplify the analog signal as needed to enable full 0-3.3V range.3.3V
PWMPWM0OPulse width modulated output 0.3.3V
PWM1OPulse width modulated output 1.3.3V
DigitalD0I/O General digital input/output pin.3.3V
D1/CAM_TRIGI/OGeneral digital input/output pin. Camera trigger.3.3V
General/BusG0/BUS0I/OGeneral purpose pins. Any unused processor pins should be assigned to Gx with ADC + PWM capable pins given priority (0, 1, 2, etc.) positions. The intent is to guarantee PWM, ADC and Digital Pin functionality on respective ADC/PWM/Digital pins. Gx pins do not guarantee ADC/PWM function. Alternative use is pins can support a fast read/write 8-bit or 4-bit wide bus.3.3V
G1/BUS1I/O3.3V
G2/BUS2I/O3.3V
G3/BUS3I/O3.3V
G4/BUS4I/O3.3V
G5/BUS5I/O3.3V
G6/BUS6I/O3.3V
G7/BUS7I/O3.3V
G8I/OGeneral purpose pin3.3V
G9/ADC_D-/CAM_HSYNCI/ODifferential ADC input if available. Camera horizontal sync.3.3V
G10/ADC_D+/CAM_VSYNCI/ODifferential ADC input if available. Camera vertical sync.3.3V
G11/SWOI/OGeneral purpose pin. Serial Wire Output3.3V

Board Dimensions

The board dimension of the MicroMod Main Board - Single is 2.90" x 3.40" while the MicroMod Main Board - Double is 2.90" x 4.90". Both boards include 5x mounting holes. Four are located on the edge of each board. The fifth mounting hole is located 0.80" away from another mounting hole to mount Qwiic-enabled boards that have the standard 1.0"x1.0" size board.

MicroMod Main Board - SingleMicroMod Main Board - Double

Hardware Hookup

If you have not already, make sure to check out the Getting Started with MicroMod: Hardware Hookup for information on inserting your Processor and Function Boards to the Main Board.

Getting Started with MicroMod

October 21, 2020

Dive into the world of MicroMod - a compact interface to connect a microcontroller to various peripherals via the M.2 Connector!

USB

To program and power the Main Board, you will need to insert the USB-C cable into the USB connector. We will leave the other end disconnected when connecting a Processor or Function board to the Main Board.

When the boards are secure, insert the other end to a computer. When you are finished programming the processor, you can use a USB battery via the USB connector or LiPo battery via the JST connector to power the board.

Processor Board

Align the Processor Board's key into its M.2 connector's socket. Insert the board at an angle (~25°), push down, and tighten the screw. In this case, we had the MicroMod Artemis Processor Board secured in the M.2 connector socket. Depending on your application, you may have a different Processor Board.

Function Boards

Align the Function Board's key into its M.2 connector's socket. Insert the board at an angle (~25°), push down, and tighten one of the screw to hold the board down. Attach the second screw on the other side of the board. Once the board is aligned, tighten both screws fully to secure the board. In this case, we had the Environmental Function Board secured in the M.2 connector socket. Depending on your application, you may have a different Function Board.

Main - Single, Processor, and Function Board

If you decide to have two function boards attached to the Main Board - Double, we recommend tightening the screw between the two Function Boards first to hold them down before attaching the remaining screws on either side of the Function Boards. In this case, we had the WiFi Function Board and the Environmental Function Board secured in the M.2 connector socket. Depending on your application, you may have different function boards.

Main - Double, Processor, and Function Boards

Single Cell LiPo Battery

A precision flat head (or a tiny, rounded object) is needed to set the charge rate for your single cell LiPo battery. When the switch is flipped to the ON position on the 500mA side, the charge rate will be 500mA. When the switch is flipped to the ON position on the 100mA side, the charge rate will be 100mA. When the switch is flipped to the ON position on both the 100mA and 500mA sides, the charge rate will be 166mA.

Setting the LiPo Charge Rate on the DIP Switch

For mobile applications, attach a single cell LiPo battery to the 2-pin JST connector. Attach a USB cable to a USB port or charger when the battery is low to begin charging.

LiPo Battery Connected

To remove the LiPo battery, you can pull the white JST connector away from the socket while also wiggling the connector side to side using your thumb and index finger.

Qwiic-Enabled Devices

To Qwiic-ly connect I2C devices, simply insert a Qwiic cable between one of the MicroMod Main Board's Qwiic ports and your Qwiic device.

Qwiic-Enabled Board Connected

If you need to mount a Qwiic-enabled board to the MicroMod Main Board, you can grab some standoffs and mount a standard Qwiic 1.0"x1.0" sized board using the two mounting holes near the USB Type C connector. Place the standoff between the boards and tighten the screws to mount. The image below used standoffs with built-in threads.

Qwiic-Enabled Board Mounted

MicroSD Card

With power removed from the board, insert a microSD card (with the pins facing toward the board) into the socket. You'll hear a nice click indicating that the microSD card is locked in place.

MicroSD Card Inserting into the MicroSD Card Socket

To remove, make sure power is off and press the microSD card into the socket to eject. You'll hear a nice click indicating that the card is ready to be removed from the socket.

Software Installation

Note: This example assumes you are using the latest version of the Arduino IDE on your desktop. If this is your first time using Arduino, please review the following tutorials.

Arduino Board Definitions

We'll assume that you installed the necessary board files for your Processor Board. In this case, we used the MicroMod Artemis Processor Board. If you are using a different board file, make sure to check out the hookup guide for your Processor Board.

MicroMod Artemis Processor Board Hookup Guide

October 21, 2020

Get started with the Artemis MicroMod Processor Board in this tutorial!

Examples

Let's go over a few basic examples to get started with the MicroMod Main Board Single and Double. We'll toggle the 3.3V voltage regulator and log data to a microSD card on both boards.

Example 1: MicroMod Main Board - Single Enable Function Board

If you have not already, select your Board (in this case the MicroMod Artemis), and associated COM port. Copy and paste the code below in your Arduino IDE. Hit the upload button and set the serial monitor to 115200 baud.

language:c
/******************************************************************************

  WRITTEN BY: Ho Yun "Bobby" Chan
  @ SparkFun Electronics
  DATE: 10/19/2021
  GITHUB REPO: https://github.com/sparkfun/SparkFun_MicroMod_Main_Board_Single
  DEVELOPMENT ENVIRONMENT SPECIFICS:
    Firmware developed using Arduino IDE v1.8.12

  ========== DESCRIPTION==========
  This example code toggles the Function Board's AP2112 3.3V voltage 
  regulator's enable pin. The Function Boards built-in power LED should blink.
  This example is based on Arduino's built-in Blink Example:

      https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink

  Note that this example code uses the MicroMod Main Board - Single. The MicroMod
  Main Board - Double routes the PWR_EN# pins slightly different for the
  two function boards. 

  ========== HARDWARE CONNECTIONS ==========
  MicroMod Artemis Processor Board => MicroMod Main Board - Single => Function Board

  Feel like supporting open source hardware?
  Buy a board from SparkFun!
       MicroMod Artemis Processor Board - https://www.sparkfun.com/products/16401
       MicroMod Main Board - Single - https://www.sparkfun.com/products/18575
       MicroMod Environmental Function Board - https://www.sparkfun.com/products/18632

  LICENSE: This code is released under the MIT License (http://opensource.org/licenses/MIT)

******************************************************************************/

/*Define the power enable pins for the processor board with either SDIO_DATA2 or A1.
  Depending on the processor board, the Arduino pin may be different. 

  Note: Certain Processor Boards like the Artemis have SDIO_Data2 and A1 available
        to control the Function Board's voltage regulator. SAMD51, ESP32, and STM32
        Processor Board pins do not have SDIO Data 2, so users will need to reference
        the Processor Pin A1. Below are a few examples. */


//ARTEMIS
#define PWR_EN0 4   //Function Board 0's "PWR_EN0" pin <= MicroMod SDIO_DATA2 => Artemis Processor Board (D4)
//Alternative option that does the same thing. Make sure to just choose one for PWR_EN0
//#define PWR_EN0 35   //Function Board 0's "PWR_EN0" pin <= MicroMod A1 => Artemis Processor Board (A35)

//TEENSY
//#define PWR_EN0 15   //Function Board 0's "PWR_EN0" pin <= MicroMod A1 => Teensy Processor Board (A1)

//SAMD51
//#define PWR_EN0 18   //Function Board 0's "PWR_EN0" pin <= MicroMod A1 => SAMD51 Processor Board (18)



void setup() {
  // initialize the digital pin as an output.
    pinMode(PWR_EN0, OUTPUT);
}



void loop() {
  digitalWrite(PWR_EN0, HIGH); // turn the 3.3V regulator on (HIGH is the voltage level)
  delay(5000);                 // wait for a few seconds to do something with the function boards

  digitalWrite(PWR_EN0, LOW);  // turn the 3.3V regulator off by making the voltage LOW
  delay(5000);                 // wait for a few seconds before turning function boards back on

}

After uploading, take a look at your Function Board's PWR LED. The LED will be on for about 5 seconds and then turn off for another 5 seconds. It will continue to repeat until power is removed from the MicroMod Main Board - Single.

Example 2: MicroMod Main Board - Double Enable Function Boards

If you have not already, select your Board (in this case the MicroMod Artemis), and associated COM port. Copy and paste the code below in your Arduino IDE. Hit the upload button and set the serial monitor to 115200 baud.

language:c
/******************************************************************************

  WRITTEN BY: Ho Yun "Bobby" Chan
  @ SparkFun Electronics
  DATE: 10/19/2021
  GITHUB REPO: https://github.com/sparkfun/SparkFun_MicroMod_Main_Board_Double
  DEVELOPMENT ENVIRONMENT SPECIFICS:
    Firmware developed using Arduino IDE v1.8.12

  ========== DESCRIPTION==========
  This example code toggles the Function Board's AP2112 3.3V voltage
  regulator's enable pin. The Function Boards built-in power LED should blink.
   This example is based on Arduino's built-in Blink Example:

      https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink

  Note that this example code uses the MicroMod Main Board - Double. The MicroMod
  Main Board - Single routes the PWR_EN0 pin slightly different for the
  function board. 

  ========== HARDWARE CONNECTIONS ==========
  MicroMod Artemis Processor Board => MicroMod Main Board - Double => Function Boards

  Feel like supporting open source hardware?
  Buy a board from SparkFun!
       MicroMod Artemis Processor Board - https://www.sparkfun.com/products/16401
       MicroMod Main Board - Double - https://www.sparkfun.com/products/18576
       MicroMod Environmental Function Board - https://www.sparkfun.com/products/18632

  LICENSE: This code is released under the MIT License (http://opensource.org/licenses/MIT)

******************************************************************************/

/*Define the power enable pins for the processor board with SDIO_DATA2.
  Depending on the processor board, the Arduino pin may be different. 

  Note: Certain Processor Boards like the Artemis have more than one pin available 
        to control the Function Board's voltage regulator (e.g. SDIO_DATA2 and G5).
        SAMD51, ESP32, and STM32 Processor Board pins do not have SDIO Data 2, so
        users will need to reference the Processor Pin G5. Below are a few examples. */

//ARTEMIS
#define PWR_EN0 4    //Function Board 0's "PWR_EN0" pin <= MicroMod SDIO_DATA2 => Artemis Processor Board (D4)  
#define PWR_EN1 26   //Function Board 1's "PWR_EN1" pin <= MicroMod SDIO_DATA1 => Artemis Processor Board (D26)

//Alternative option that does the same thing. Make sure to just choose one for PWR_EN0 and PWR_EN1
//#define PWR_EN0 29   //Function Board 0's "PWR_EN0" pin <= MicroMod G5 => Artemis Processor Board (A29)
//#define PWR_EN1 14   //Function Board 1's "PWR_EN0" pin <= MicroMod G6 => Artemis Processor Board (D14)


//TEENSY
//#define PWR_EN0 39   //Function Board 0's "PWR_EN0" pin <= MicroMod SDIO_DATA2 => Teensy Processor Board (D39)
//#define PWR_EN1 34   //Function Board 1's "PWR_EN1" pin <= MicroMod SDIO_DATA1 => Teensy Processor Board (D34)

//Alternative option that does the same thing. Make sure to just choose one for PWR_EN0 and PWR_EN1
//#define PWR_EN0 45   //Function Board 0's "PWR_EN0" pin <= MicroMod G5 => Teensy Processor Board (45)
//#define PWR_EN1 6   //Function Board 1's "PWR_EN1" pin <= MicroMod G6 => Teensy Processor Board (6)

//Note: The SAMD51, ESP32, and STM32 Processor Board Pins do not have SDIO Data 2 and SDIO Data 1.

//SAMD51
//#define PWR_EN0 7   //Function Board 0's "PWR_EN0" pin <= MicroMod G5 => SAMD51 Processor Board (D7)
//#define PWR_EN1 8   //Function Board 1's"PWR_EN1" pin <= MicroMod G6 => SAMD51 Processor Board (D8)

//ESP32
//#define PWR_EN0  32   //Function Board 0's "PWR_EN0" pin <= MicroMod G5 => ESP32 Processor Board (32)
//#define PWR_EN1  33   //Function Board 1's"PWR_EN1" pin <= MicroMod G6 => ESP32 Processor Board (33)



void setup() {
  // initialize the digital pins as an output.
  pinMode(PWR_EN0, OUTPUT); 
  pinMode(PWR_EN1, OUTPUT);

}



void loop() {

  digitalWrite(PWR_EN0, HIGH); // turn the 3.3V regulator on (HIGH is the voltage level)
  digitalWrite(PWR_EN1, HIGH); // turn the 3.3V regulator on (HIGH is the voltage level)
  delay(5000);                 // wait for a few seconds to do something with the function boards 

  digitalWrite(PWR_EN0, LOW);  // turn the 3.3V regulator off by making the voltage LOW
  digitalWrite(PWR_EN1, LOW);  // turn the 3.3V regulator off by making the voltage LOW
  delay(5000);                 // wait for a few seconds before turning function boards back on

}

After uploading, take a look at the PWR LEDs on the Function Boards. The LEDs will be on for about 5 seconds and then turn off for another 5 seconds. It will continue to repeat until power is removed from the MicroMod Main Board - Double.

Example 3: Reading and Writing to a MicroSD Card

The example below uses the built-in SD Arduino library. The only difference in the code is the CS pin for the microSD card, which you will need to adjust for your processor board (in this case we use the Artemis Processor Board). Make sure to reference your Processor Board's CS pin for either the Main Board - Single (D1) or Main Board - Double (G4).

If you have not already, select your Board (in this case the MicroMod Artemis), and associated COM port. Copy and paste the code below in your Arduino IDE. Hit the upload button and set the serial monitor to 9600 baud.

language:c
/*
  SD Card Read/Write

  This example shows how to read and write data to and from an SD card file
  The circuit:

  SD card attached to SPI bus as follows:

   SD Card  - MicroMod Artemis Processor Board
   -----------------------------------
   COPI/SDO - pin 38
   CIPO/SDI - pin 43
   CLK      - pin 42
   CS       - pin 1 (Main Board - Single) or 28 (Main Board - Double)

  created   Nov 2010
  by David A. Mellis
  modified 9 Apr 2012
  by Tom Igoe

  This example code is in the public domain.

*/

#include <SPI.h>
#include <SD.h>

//ARTEMIS
//const int SD_CS_PIN = 1; // The microSD Card CS pin is D1 for the MicroMod Main Board - Single and Artemis Processor (D1). Adjust for your processor if necessary.
const int SD_CS_PIN = 28; // The microSD Card's CS pin is G4 for the MicroMod Main Board - Double and Artemis Processor (D28). Adjust for your processor if necessary.

File myFile;

void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }


  Serial.print("Initializing SD card...");

  if (!SD.begin(SD_CS_PIN)) {
    Serial.println("initialization failed!");
    while (1);
  }
  Serial.println("initialization done.");

  // open the file. note that only one file can be open at a time,
  // so you have to close this one before opening another.
  myFile = SD.open("test.txt", FILE_WRITE);

  // if the file opened okay, write to it:
  if (myFile) {
    Serial.print("Writing to test.txt...");
    myFile.println("testing 1, 2, 3.");
    // close the file:
    myFile.close();
    Serial.println("done.");
  } else {
    // if the file didn't open, print an error:
    Serial.println("error opening test.txt");
  }

  // re-open the file for reading:
  myFile = SD.open("test.txt");
  if (myFile) {
    Serial.println("test.txt:");

    // read from the file until there's nothing else in it:
    while (myFile.available()) {
      Serial.write(myFile.read());
    }
    // close the file:
    myFile.close();
  } else {
    // if the file didn't open, print an error:
    Serial.println("error opening test.txt");
  }
}

void loop() {
  // nothing happens after setup
}

If all goes well, you should see the following output if this is the first time writing to the card!

language:bash
Initializing SD card...initialization done.
Writing to test.txt...done.
test.txt:
testing 1, 2, 3.

If you are looking to go the extra mile to see if data was saved, close the Serial Monitor and remove power from the MicroMod Main Board. Eject your microSD card from the socket and insert into a microSD card adapter. Then insert the microSD card into your computer's card reader or USB port. Open the test.txt file in a text editor. You should see an output similar to what you saw in the Serial Monitor after the file was opened as shown below.

language:bash
testing 1, 2, 3.

Besides verifying the data in the file, this step is also useful if you adjust the code to continuously log data in a CSV format. After logging data, you could the open text document in a spreadsheet and graph the values!

More Examples!

Sweet! Now that we know that we can read and write to the microSD card, try exploring the other examples in either the SD or SdFat Arduino libraries. Or check out the following MicroMod tutorials that have a built-in microSD card socket for ideas on data logging. Better yet, try adding a sensor and write some code to log some data!

MicroMod Weather Carrier Board Hookup Guide

A quick guide to help to create your own MicroMod weather station using the MicroMod Weather Carrier Board and Processor of your choice.

MicroMod Data Logging Carrier Board Hookup Guide

Get started with some customizable MicroMod data logging with the Data Logging Carrier Board.

MicroMod Asset Tracker Carrier Board Hookup Guide

Get started with the SparkFun MicroMod Asset Tracker Carrier Board following this Hookup Guide. The Asset Tracker uses the u-blox SARA-R510M8S LTE-M / NB-IoT module to provide a host of data communication options.

Looking for more examples with a Function Board? Below are a few examples from our tutorials that are tagged with MicroMod.

New!

1W LoRa MicroMod Function Board

Everything you need to get started with the 1W LoRa MicroMod function board; a MicroMod function board that provides LoRa capabilities for your MicroMod project. Must be used in conjunction with a MicroMod main board and processor.
New!

MicroMod WiFi Function Board - ESP32 Hookup Guide

The MicroMod ESP32 Function Board adds additional wireless options to MicroMod Processor Boards that do not have that capability. This special function board acts as a coprocessor that takes advantage of Espressif's ESP32 WROOM to add WiFi and Bluetooth® to your applications.
New!

MicroMod Environmental Function Board Hookup Guide

The SparkFun MicroMod Environmental Function Board adds additional sensing options to the MicroMod Processor Boards. This function board includes three sensors to monitor air quality (SGP40), humidity & temperature (SHTC3), and CO2 concentrations (STC31) in your indoor environment. To make it even easier to use, all communication is over the MicroMod's I2C bus! In this tutorial, we will go over how to connect the board and read the sensors.

Better yet, try connecting a Qwiic-enabled device to the Main Board's Qwiic connector. Below are a few examples from our tutorials that are tagged with Qwiic.

Qwiic 12-Bit ADC Hookup Guide

Need to add more analog inputs for your project? Check out the Qwiic 12-bit ADC.

Hookup Guide for the SparkFun RedBoard Artemis Nano

Get started with the powerful RedBoard Artemis Nano

Qwiic SHIM for Raspberry Pi Hookup Guide

Ever wanted to prototype I2C components on a Pi? Now you can!

Temperature Sensor Comparison

A comparison of analog and digital temperature sensors. Which is better?
insert image here 




check when tutorials go live since macro will not link WIP tutorials...
reading EEPROM? Kyle is still working...

Troubleshooting

Resources and Going Further

Now that you've successfully got your MicroMod Main Board with a Processor Board, it's time to incorporate it into your own project! For more information, check out the resources below:

Looking for more inspiration? Check out these other tutorials related to MicroMod.

MicroMod All The Pins (ATP) Carrier Board

Access All The Pins (ATP) of the MicroMod Processor Board with the Carrier Board!

SparkFun MicroMod Input and Display Carrier Board Hookup Guide

A short Hookup Guide to get started with the SparkFun MicroMod Input and Display Carrier Board

MicroMod Machine Learning Carrier Board Hookup Guide

Get hacking with this tutorial on our Machine Learning Carrier Board!

MicroMod nRF52840 Processor Hookup Guide

Get started with the MicroMod nRF52840 Processor following this guide.

learn.sparkfun.com | CC BY-SA 3.0 | SparkFun Electronics | Niwot, Colorado


Viewing all articles
Browse latest Browse all 1123

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>