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

MicroMod Update Tool Hookup Guide

$
0
0

MicroMod Update Tool Hookup Guide a learn.sparkfun.com tutorial

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

Introduction

Introducing the SparkFun MicroMod Update Tool! This simple little board allows you to interact directly with the SARA-R5 LTE-M / NB-IoT module on the MicroMod Asset Tracker Carrier Board via the module's UART.

SparkFun MicroMod Update Tool

SparkFun MicroMod Update Tool

DEV-17725
$4.95

The MicroMod Asset Tracker Carrier Board provides you with a toolkit to monitor and track the location of your assets. Do you want to know where your assets are at all times? Or maybe you just want an update if an asset is moved? If so, this is the product for you!

Built around the u-blox SARA-R510M8S module, the asset tracker offers Secure Cloud LTE-M and NB-IoT data communication for multi-regional use and has an integrated u-blox M8 GNSS receiver for accurate positioning information. The SARA-R5 supports many different forms of data communication from full TCP/IP sockets and packet switched data, through HTTP Get/Put/Post, FTP (the SARA has a built-in file system), Ping, to good old SMS text messaging!

The Update Tool is not a full MicroMod Processor Board, it is much simpler than that. It has a CH340C USB-Serial converter on it which gives you full access to all eight pins of the SARA-R5's UART interface via the Asset Tracker’s USB-C connector. Think of it as a bridge from USB to serial.

Why is this a good idea? Well, for a start - as the name suggests - it is an ideal way to upgrade the SARA-R5’s firmware should you need to. The Update Tool also makes it simple to communicate directly with the SARA using u-blox’s sophisticated m-center cellular evaluation software. If you’re familiar with u-center, u-blox’s GNSS evaluation software, you’ll know how excellent their software is. m-center is every bit as good.

The Update Tool features eight pairs of Plated Through Hole connections for the UART signals. You can use these to connect directly to the SARA UART using 3.3V signals if you want to. The split pads on the rear of the Tool can be opened to isolate the CH340C completely; the pins nearest the M.2 will link straight to the SARA UART.

Required Materials

In order to follow along with this tutorial, you'll want to have the following items.

The Asset Tracker Firmware Update Tool, as the name suggests, is designed to work with the MicroMod Asset Tracker Carrier Board:

SparkFun MicroMod Asset Tracker Carrier Board

SparkFun MicroMod Asset Tracker Carrier Board

DEV-17272
$149.95

You'll also need a USB-C cable to connect the Carrier to your computer. Below are some options for USB cables:

USB 2.0 Cable A to C - 3 Foot

USB 2.0 Cable A to C - 3 Foot

CAB-15092
$3.95
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 - 0.8m

Reversible USB A to C Cable - 0.8m

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

Reversible USB A to C Cable - 2m

CAB-15424
$7.95

Optional Extras

If you want to manipulate the UART connections on the Update Tool we recommend soldering a set of headers to your board. Below are a few options:

Break Away Headers - Straight

Break Away Headers - Straight

PRT-00116
$1.50
20
Header - 2x8 (Male, 0.1")

Header - 2x8 (Male, 0.1")

PRT-13156
$0.95

Suggested Reading

If you aren't familiar with the MicroMod ecosystem, we recommend reading here for an overview:

MicroMod Logo
MicroMod Ecosystem

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

Serial Communication

Asynchronous serial communication concepts: packets, signal levels, baud rates, UARTs and more!

How to Work with Jumper Pads and PCB Traces

Handling PCB jumper pads and traces is an essential skill. Learn how to cut a PCB trace, add a solder jumper between pads to reroute connections, and repair a trace with the green wire method if a trace is damaged.

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

In this section we'll go over the hardware and components on the MicroMod Update Tool.

M.2 Connector

All of our MicroMod Processor boards come equipped with the M.2 MicroMod Connector, which leverages the M.2 standard and the Update Tool is no different. Just remember this is for use only with the MicroMod Asset Tracker Carrier Board.


M.2 Connector from the FrontM.2 Connector from the Back

CH340 USB-Serial Converter

The heart of the Asset Tracker Firmware Update Tool is the CH340C USB-Serial converter which we use on many of our RedBoards and other breakouts. It converts 8-wire UART serial to USB.

Photo highlighting the CH340 IC

PTH Connections and Jumpers

The Update Tool includes a set of eight jumpers to allow users to connect the SARA-R5 UART pins to a 3.3V devlopment board. The jumpers can be opened to disconnect the pins from the CH340C to be re-routed to your development board.

Photo highlighting the PTH Jumpers

Take care to only connect the pins to a 3.3V RedBoard or Arduino Board or properly shift the logic level down to 3.3V. Connecting them to a 5V board may damage the Asset Tracker.

Read on to the Using the PTH Connections for more information.

MicroMod Update Tool Pin Functionality

Since the MicroMod Update Tool serves a specific purpose to communicate directly with the SARA-R5 on the MicroMod Asset Tracker Carrier Board, the pinout is much simpler than other MicroMod Processors. The tables below outline the pin functionality for the Update Tool along with the general MicroMod pinout. If you prefer to refer to the schematic it can be viewed here.

AUDIOUARTGPIO/BUSI2CSDIOSPIDedicated
MicroMod Pin NumberFunctionAsset Tracker ConnectionNotes
75GNDGround
743.3V3.3V
69G7SARA DSR_O / RTS2_ISARA Data Set Ready / AUX UART Request to Send
48G4SARA RI_O / CTS2_OSARA Ring Indicator / AUX UART Clear to Send
22TX2SARA DTR_I / TXD2_ISARA UART Data Terminal Ready / AUX UART Data Input
20RX2SARA DCD_O / RXD2_OSARA UART Data Carrier Detect / AUX UART Data Output
19RX1SARA TXD_ISARA UART Data Input
17TX1SARA RXD_OSARA UART Data Output
15CTS1SARA CTS_OSARA UART Clear to send
13RTS1SARA RTS_ISARA UART Request to send
5USB_D-USB-CPassthrough to USB-C connector
3USB_D+USB-CPassthrough to USB-C connector
23.3V3.3V
1GNDGround
FunctionBottom
Pin
   Top   
Pin
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 request 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 measures 22mm x 22mm, with 15mm to the top notch and 12mm to the E key. For more information regarding the processor board physical standards, head on over to the Getting Started with MicroMod tutorial and check out the Hardware Overview section.

MicroMod Update Tool Board Dimensions

Hardware Assembly

Inserting your Update Tool

With the M.2 MicroMod connector, connecting your Update Tool to the Asset Tracker is a breeze. Simply match up the key on your Processor's beveled edge connector to the key on the M.2 connector. At a 45° angle, insert the processor board to the M.2 connector. The Update Tool will stick up at an angle as seen here:

Update Tool inserted into M.2 connector.

Once the update tool is in the socket, gently press the board down, grab the set screw and tighten it with a Phillip's head screwdriver:

Securing the Update Tool

Once the Update Tool is secure, your assembled MicroMod Asset Tracker system should look similar to the image below!

Secured Update Tool on the Asste Tracker Carrier

Connecting Everything Up

Now is a good time to insert the Nano SIM from your service provider into the Asset Tracker. Make sure the orientation matches the symbol on the PCB; the edge with the trimmed corner is inserted first.

The LTE and GNSS connections simply screw on to the appropriate SMA connectors. Make sure you check the labelling and connect them the right way round. LTE is on the Left.

With your Update Tool inserted and secured it's time to connect your MicroMod Asset Tracker Carrier Board to your computer using the USB-C connector. Depending on which drivers you already have installed, you may need to install drivers for the CH340. Please refer to our CH340 tutorial for further instructions.

Software Setup

Note: This guide assumes you already have the CH340 drivers installed. If needed, please refer to our How to Install CH340 Drivers tutorial.

Installing u-blox m-center

You can find the webpage for u-blox's m-center software here. Sadly m-center is only available for Windows and we don’t know of an equivalent for Linux. This link will download version 2.03.0 of m-center (but please do check the u-blox website for more recent versions):

Unzip the file and run the m-center .EXE to install the software.

Using u-blox m-center

Like u-center, m-center is very easy and intuitive to use. Let's go over the features of the software.

Home

Begin by clicking Set port and selecting the port for the CH340 Update Tool:

Selecting the port for the Update Tool

Having trouble seeing the detail in this screenshot? Click on it for a closer look.

Click Connect, followed by Initialization to connect to the SARA-R5. The IMEI and firmware version should appear:

m-center screenshot showing port and firmware version

The carrier operator name and signal strength will appear in the top right corner of the window. We are told by u-blox that it is normal for the signal strength to appear quite low; LTE communication works with relatively low signal levels.

We believe the Trace Port option can be used to connect to the SARA-R5's USB diagnostic port via the SARA USB D+/D-/DET pins on the Asset Tracker Carrier Board, but we have not tried that yet.

Click Set current time to set the SARA's internal clock from the LTE network.

Network

Click the Network icon, next to the Home icon in the top left of the window, to see the network operator settings.

Click Refresh Info, Get List and Refresh to update the network information and Packet Switched Data Profiles.

Network information in m-center

You can choose to deregister from the current operator and connect to a new one if your SIM supports it.

You can also activate and deactivate the Packet Switched Data profile from this page. You will not able to send and receive data until you have activated a profile.

Phonebook

As the name suggests, the phonebook icon opens the SARA’s phonebook. You can add and delete numbers here.

m-center Phonebook menu

SMS

The SMS (envelope) icon will allow you to send text messages and read or reply to any received messages.

m-center SMS menu

File System

The File System icon provides access to the SARA’s internal file system. You can add, retrieve and delete files from here. If you have run the Asset Tracker ThingSpeak (HTTP POST) example, the results of the most recent POST are stored in post_response.txt.

Did you know that the SARA-R5 supports FTP transfer too? Of course it does...

m-center File System menu

Positioning

The Positioning icon provides access to positioning information derived from either the LTE network, or the SARA-R510M8S’s built-in M8 GNSS receiver.

m-center Positioning menu

Firmware Over the Air (FOTA) and eCall Simulator

Advanced users can make use of the SARA’s Firmware download Over The Air and eCall Simulation functions:

m-center eCall Simulator

AT Terminal

One of the most important features offered by m-center is the AT Terminal. Clicking the button below the signal strength indicator opens a Pandora’s Box full of AT Command goodies!

m-center AT Terminal
Having trouble seeing the detail in this image? Click on it for a larger view.

You can either type the AT commands manually into the text box, or select a template message from the drop-down menus, and then click Send or hit Enter to send the message. The replies from the SARA are shown in the Terminal window. You can log everything to file too if you wish. Scripts? Yes, you can run those too! This is a very powerful tool.

To manually Ping a server (such as www.sparkfun.com) the truncated set of commands is:

  • AT+UPSD=0,100,1
    • This instructs the SARA to map the Context ID 1 profile into Profile ID 0.
  • AT+UPSD=0,0,2
    • This instructs the SARA to use the “IPv4v6 with IPv4 preferred” protocol for Profile ID 0 (this needs to match the operator’s protocol).
  • AT+UPSDA=0,3
    • This instructs the SARA to activate Profile ID 0.
  • AT+UPING="www.sparkfun.com"
    • This instructs the SARA to ping the SparkFun server

Upgrading the SARA Firmware with u-blox EasyFlash

Just about the only thing that m-center doesn’t allow you to do is to upgrade the SARA-R5’s firmware. To do that you need to download and install u-blox’s EasyFlash update tool.

u-blox EasyFlash main menu.

The link below will download EasyFlash version 12.08 but do check the SARA-R5 resources page for the latest version as of this writing:

Again, EasyFlash only appears to be available for Windows. We are not aware of a version for Linux. Unzip the .ZIP file and run the EasyFlash .MSI installer to install the software. u-blox will make the firmware updates available through the SARA-R5 resources page.

Note: SparkFun is not able to give users the latest firmware file. It must come from u-blox.

You need to manually download the .DOF update binary file and place it in the same folder as the EasyFlash executable. (That bit is important!). After the .DOF file is downloaded follow these steps:

  • Run the EasyFlash executable.
  • Select SARA-R5 as the Product.
  • Select the COM port your Firmware Update Tool (CH340) is connected to.
  • Select 921600 as the Baud Rate.
    • Do not select 3000000 Baud as the CH340 cannot support it.
  • Turn the SARA-R5 off by pushing and holding the SARA On button on the Asset Tracker for five seconds.
    • Check that the white On LED on the Asset Tracker goes out.
  • Click the Start button on EasyFlash.
  • Press the SARA On button briefly when instructed to turn the SARA back on again.
  • The update process takes around three minutes to complete.
  • Turn the SARA off again when instructed to complete the update.
EasyFlash updating SARA-R5 FirmwareEasyFlash firmware update completed.
Firmware update in progressFirmware update completed

You can confirm that the update was successful by opening m-center and connecting to the SARA-R5. The firmware version is shown on the Home page:

m-center Home menu showing updated firmware version.

Having trouble seeing the detail in this screenshot? Click on it for a larger view.

Using the PTH Connections

Want to connect the SARA UART pins to your favourite 3.3V RedBoard or Arduino Board? The Firmware Update Tool lets you do that too!

Photo highlighting solder jumpers and PTH pins.

If you flip the Update Tool over, you will see eight jumpers linking each pair of Plated Through Holes. You can cut the jumpers to disconnect the PTHs from the CH340C. You can then connect the holes closest to the M.2 connector to your 3.3V board.

Insert 1x8 or 2x8 0.1”-pitch header pins through the front of the Firmware Update Tool and solder them on the back. 2x8 header pins are a good idea as it means you can use header jumper links to reconnect the CH340C again if you want to.

Important Notes:
  • Take care when selecting which header pins to solder onto the Update Tool. The pins must not protrude from the back of the board by more than 1.25mm or they will collide with the IMU and other components on the Asset Tracker circuit board. Trim the pins if necessary before soldering.
  • Take care to only connect the pins to a 3.3V RedBoard or Arduino Board or properly shift the logic level down to 3.3V. Connecting them to a 5V board may damage the Asset Tracker.

Troubleshooting

Below we have outlined a few troubleshooting tips for the MicroMod Update Tool and MicroMod Asset Tracker Carrier Board.

LTE Network Availability

The SARA-R5 supports LTE-M and NB-IoT data communication for multi-regional use. Please check the LTE signal availability for your area before purchasing a SARA-R5 product and selecting an LTE service provider / operator.

TP (1PPS) Pin and LED

At the time of writing, we are shipping the SARA-R5 on the Asset Tracker with firmware version 02.06 on it. 02.06 contains a feature (which is just a polite name for a bug!) which means the 1 Pulse-Per-Second from the GNSS does work, but the pulse is only ~3 microseconds wide and cannot be adjusted. Handy huh? u-blox are aware of this - in fact we told them about it - and a fix is coming but they haven’t added it yet. We will keep an eye out for this fix and update this page when it is available.

Just to complicate matters, 3 microseconds is too short for the buffer FET and LED connected to the timing pulse to respond. So, we regret that you cannot currently use the TP PTH. We will share the fix with you as soon as we have it. The SARA firmware is easy to update using the Asset Tracker Firmware Update Tool.

General Troubleshooting

Resources and Going Further

Want more information on the MicroMod Update Tool? Check out these links!

u-blox Documentation and Software:

MicroMod Documentation:

If you have not already, be sure to check out our Hookup Guide for the Asset Tracker Carrier Board:

New!

MicroMod Asset Tracker Carrier Board Hookup Guide

February 25, 2021

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.

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>