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

MicroMod Machine Learning Carrier Board Hookup Guide

$
0
0

MicroMod Machine Learning Carrier Board Hookup Guide a learn.sparkfun.com tutorial

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

Introduction

The MicroMod Machine Learning Carrier Board combines some of the features of our SparkFun Edge Board and SparkFun Artemis boards, but allows you the freedom to explore with any processor in the MicroMod lineup without the need for a central computer or web connection. Voice recognition, always-on voice commands, gesture, or image recognition are possible with TensorFlow applications. An on board accelerometer and Qwiic ports allow you even more flexibility.

Let's dive in, get a good look at what's available to us, and go over a few quick examples!

Required Materials

You are absolutely going to want to get one of these gems. Pick one up here:

SparkFun MicroMod Machine Learning Carrier Board

SparkFun MicroMod Machine Learning Carrier Board

DEV-16400
$19.95

You'll need a processor board to get started. Here we use the Artemis Processor Board, but there are a number of others you can choose from.

SparkFun MicroMod Artemis Processor

SparkFun MicroMod Artemis Processor

DEV-16401
$14.95
SparkFun MicroMod SAMD51 Processor

SparkFun MicroMod SAMD51 Processor

DEV-16791
$14.95

You'll also need a USB-C cable to connect the Carrier to your computer and if you want to add some Qwiic breakouts to your MicroMod project you'll want at least one Qwiic cable to connect it all together. Below are some options for both of those cables:

SparkFun Qwiic Cable Kit

SparkFun Qwiic Cable Kit

KIT-15081
$7.95
6
USB 3.1 Cable A to C - 3 Foot

USB 3.1 Cable A to C - 3 Foot

CAB-14743
$4.95
2
Reversible USB A to C Cable - 2m

Reversible USB A to C Cable - 2m

CAB-15424
$7.95

Suggested Reading

The SparkFun MicroMod ecosystem is a unique way to allow users to customize their project to their needs. Do you want to send your weather data via a wireless signal (eg. Bluetooth or WiFi)? There's a MicroMod processor for that. Looking to instead maximize efficiency and processing power? You guessed it, there's a MicroMod processor for that.

MicroMod Logo
MicroMod Ecosystem

We also recommend taking a look through the following tutorials if you are not familiar with the concepts covered in them:

New!

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

Common Components

Most SparkFun MicroMod Carriers will have some common components and all MicroMod Carriers will have the keyed M.2 MicroMod Connector to plug your processor into. The photo and list below outline some of the components you can expect on most SparkFun MicroMod Carriers.

  • M.2 MicroMod Connector - This special keyed M.2 connector lets you install your MicroMod Processor of choice on your Machine Learning Carrier Board.
  • USB-C Connector - Connect to your computer to program your Processor and also can provide power to your MicroMod system.
  • 3.3V Regulator - Provides a regulated 3.3V and sources up to 1A.
  • Qwiic Connector - The standard Qwiic connector so you can add other Qwiic devices to your MicroMod system.
  • Boot/Reset Buttons - Push buttons to enter Boot Mode on Processor boards and to Reset your MicroMod circuit.
  • microSD Slot - Insert a microSD card for reading and writing data.

Annotated photo showing which parts are common components

Machine Learning MicroMod Carrier Board Specific Components

Digital MEMS Microphones

What's better than ONE microphone? TWO!

  • Microphone 1 supports a PDM interface and is enabled by default. To disable this mic, cut the EN1 jumper. For more information on this microphone, refer to the datasheet here.
  • Microphone 2 supports an I2S interface and is disabled by default. To enable EN2, solder the jumper pads to close the circuit. For more information on this microphone, refer to the datasheet here.

IMage of the microphones highlighted on the board

GPIO

Along the sides of the Machine Learning Carrier Board, we've broken out dedicated PTHs for UART, digital, analog, pulse width modulation, and SPI. You may also notice that we've included a ground rail on the right side of the board.

General GPIO pins are highlighted

I2C Specific GPIO

Additionally, we've broken out the I2C SDA and SCL lines, with 3V3 and GND to complete your I2C functionality. These are primary I2C pins - they are connected to the Qwiic connector.

I2C specific GPIO pins are highlighted

Accelerometer

The LIS2DH12 is an ultra-low-power, high performance, three-axis linear accelerometer belonging to the “femto” family with digital I2C/SPI serial interface standard output. If you need more detail on this little guy, refer to the Datasheet here.

Image of the board with the accelerometer highlighted

Camera Connector

With this 24 pin connector, you can add image recognition to your machine learning board by popping in the Himax CMOS Imaging Camera.

Image of the board with the camera connector highlighted

JTAG

An unpopulated JTAG footprint is available for more advanced users who need breakpoint level debugging. We recommend checking out our JTAG section for the compatible male header and a compatible JTAG programmer and debugger.

Image of the board with SWD pins for JTAG debugging highlighted

RTC Battery

We've included a 3V Lithium Rechargeable Battery as a backup power source.

Image of the board with the Li battery highlighted

Jumpers

VE Jumper

VE Jumper on the back of the board is highlighted

VIN and 3V3 Jumpers

Cutting these jumpers will disable the VIN and 3V3 LEDs on the front of the board.

Highlighted VIN and 3V3 jumpers

I2C Jumper

If you are daisy-chaining multiple Qwiic devices, you will want to cut this jumper; if multiple sensors are connected to the bus with the pull-up resistors enabled, the parallel equivalent resistance could create too strong of a pull-up for the bus to operate correctly. As a general rule of thumb, disable all but one pair of pull-up resistors if multiple devices are connected to the bus. To disable the pull up resistors, use an X-acto knife to cut the joint between the highlighted jumper pads.

Highlighted I2C jumper

RESET PTH

Need an external reset button? These PTH allow you to tie in to the reset functionality.

Highlighted Reset plated through holes

Machine Learning MicroMod Carrier Pin Functionality

AUDIOUARTGPIO/BUSI2CSDIOSPI0Dedicated
NameBottom Pin   Top    PinName
(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
SPI SCK1SDIO_SCK (O)6059SPI_COPI (O)LED_DAT
AUD_MCLK (O)5857SPI_SCK (O)LED_CLK
PCM_OUT / CAM_MCLKI2S_OUTAUD_OUT5655SPI_CS#
PCM_IN / CAM_PCLKI2S_INAUD_IN5453I2C_SCL1 (I/O)
PCM_SYNC / PDM_DATAI2S_WSAUD_LRCLK5251I2C_SDA1 (I/O)
PCM_CLK / PDM_CLKI2S_SCKAUD_BCLK5049BATT_VIN / 3 (I - ADC) (0 / 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
NameBottom Pin   Top    PinName
(Not Connected)75GND
7473CAMERA_D5
RTC_3V7271CAMERA_D6
7069CAMERA_D7
6665CAMERA_HSYNC
6463CAMERA_VSYNC
6261SPI_CIPO
6059SPI_COPI
5857SPI_SCK
CAMERA_MCLK5655SPI_CS
CAMERA_PCLKI2S_SD5453
PDM_DATI2S_WS5251
PDM_CLKI2S_SCK5049BATT_VIN/3
CAMERA_D44847PWM1CAM_VDD
CAMERA_D34645
CAMERA_D24443
CAMERA_D14241
CAMERA_D04039
A13837
A03433
PWM03231
2423SWDIO
2221SWDCK
2019RX1
CAMERA_TRIGD11817TX1
CAMERA_INT1615
I2C_SCL1413
I2C_SDA1211BOOT
HEADER_CSD0109VIN
87GND
RESET65USB_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

Hardware Hookup

To get started with the Machine Learning Carrier Board, you'll need a compatible processor board. Here we are using the Artemis MicroMod Processor Board.

Align the top key of the MicroMod Artemis Processor Board to the screw terminal of the Machine Learning Carrier Board and angle the board into the socket. Insert the board at an angle into the M.2 connector.

Note: There is no way to insert the processor backward since the key prevents it from mating with the M.2 connector and as an extra safeguard to prevent inserting a processor that matches the key, the mounting screw is offset so you will not be able to secure an improperly connected processor board.

MicroMod Processor Board inserted into the carrier board - Top angle

The Processor Board will stick up at an angle, as seen here:

MicroMod Processor Board inserted into the carrier board

Once the board in the socket, gently hold the MicroMod Processor Board down and tighten the screw with a Phillip's head.

screwing in the machine screw

Once the board is secure, your assembled MicroMod system should look similar to the image below!

Top down image of Machine Learning Carrier Board with Artemis Processor board inserted correctly

Connecting Everything Up

With your processor inserted and secured it's time to connect your carrier board to your computer using the USB-C connector on the Carrier. Depending on which carrier you choose and which drivers you already have installed, you may need to install drivers.

Note: Make sure that for whatever processor board you choose, you have the correct board definitions installed.

For this particular tutorial, we are using the Artemis MicroMod Processor Board. Board definitions for this processor board can be found in the Software Setup and Programming section of the Artemis MicroMod Processor Board Hookup Guide.

If you are using a different processor board, go to our MicroMod Processor Boards landing page, find your processor board, and head on over to that tutorial for help installing your board definition.
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 our tutorial on installing the Arduino IDE. If you have not previously installed an Arduino library, please check out our installation guide.

To get started uploading code and working with your Machine Learning Carrier Board, make sure you have the Artemis MicroMod board definition selected under your Tools>Board menu (or whatever processor you've chosen to use).

Arduino Board Select

Having a hard time seeing? Click the image for a closer look.


Then select your serial port under the Tools>Port menu.

Port Selection for the Artemis MicroMod Processor Board

Loading Blink

Let's start with something basic - let's blink an LED. Go to File->Examples->01.Basics->Blink.

Blink Basics Example in the pulldown

Having a hard time seeing? Click the image for a closer look.


With everything setup correctly, upload the code! Once the code finishes transferring, you should see the STAT LED on the Artemis Processor Board begin to blink!

If the blue LED remains off, it's probably still sitting in the bootloader. After uploading a sketch, you may need to tap the reset button to get your Artemis MicroMod to run the sketch.

Look at all the blinks!

blink blink blink

Example 2: Accelerometer

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 our tutorial on installing the Arduino IDE. If you have not previously installed an Arduino library, please check out our installation guide.

SparkFun has written a library to work with the LIS2DH12 Accelerometer that's included on this board. You can obtain this library through the Arduino Library Manager by searching for "LIS2DH12". Find the one written by SparkFun Electronics and install the latest version. If you prefer downloading libraries manually, you can grab them from the GitHub Repository. We've linked the datasheet for the accelerometer in the Resources and Going Further section, but if you'd like it handy, you can also refer to it here.

With your library installed, navigate to the examples located under File->Examples->SparkFun LIS2DH12 Arduino Library. Let's load up Example1_BasicReadings to get you started.

File->Examples->SparkFun LIS2DH12 Arduino Library

Having a hard time seeing? Click the image for a closer look.


Making sure you have the correct board and port selected, go ahead and upload your code. Once the code finishes transferring, open the serial monitor and set the baud rate to 115200. You should see x y and z locations flying by, telling you the directions the accelerometer is reading!

Accelerometer serial output

Having a hard time seeing? Click the image for a closer look.


Troubleshooting

Resources and Going Further

Want more information on the SparkFun Machine Learning Carrier Board? Check out these links!

MicroMod Documentation:

Looking for some project inspiration using your Machine Learning Carrier Board? The tutorials below can help you get started!

New!

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!
New!

MicroMod ESP32 Processor Board Hookup Guide

A short Hookup Guide to get started with the SparkFun MicroMod ESP32 Processor Board
New!

MicroMod All The Pins (ATP) Carrier Board

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

MicroMod Machine Learning Carrier Board Hookup Guide

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

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>