Sequans Monarch VZM20Q topic

Introduction

The Sequans Monarch VZM20Q is another LTE CatM1 chip. It's available in "Skywire" (XBee-like) format from Nimbelink.

Monarchs and Mayflys

To my knowledge, there are not any Sequans modules available that can directly connect to a Mayfly. Although the Nimbelink board linked above would fit the physical XBee footprint on the Mayfly, it will not work without some additional interface or other modifications. The power supply on the Mayfly is insufficient, the voltage reference is not implemented on the Mayfly, and the Nimbelink board requires 3 extra ground pins that aren't available on the Mayfly.

Manufacturer Documentation

The module datasheet and AT commands are available here: https://www.sequans.com/products-solutions/streamlitelte/monarch-lte-platform/ezlinklte-vzm20q/

Modem Constructor

SequansMonarch::SequansMonarch(Stream* modemStream, int8_t powerPin, int8_t statusPin, int8_t modemResetPin, int8_t modemSleepRqPin, const char* apn)

Construct a new Sequans Monarch object.

Parameters
modemStream The Arduino stream instance for serial communication.
powerPin The digital pin number of the mcu pin controlling power to the modem (active HIGH).
statusPin The digital pin number of the mcu pin connected to the modem status output pin.
modemResetPin The digital pin number of the pin on the mcu attached the the hard or panic reset pin of the modem.
modemSleepRqPin The digital pin number of a pin on the mcu used to request the modem enter its lowest possible power state.
apn The Access Point Name (APN) for the SIM card.

The constuctor initializes all of the provided member variables, constructs a loggerModem parent class with the appropriate timing for the module, calls the constructor for a TinyGSM modem on the provided modemStream, and creates a TinyGSM Client linked to the modem.

Should be set to a negative number if the modem should be continuously powered or the power cannot be controlled by the MCU. Should be set to a negative number if the modem status pin cannot be read. This could be the pin called either the GPIO3/STATUS_LED or POWER_MON in the Sequans Monarch integration guide. Should be set to a negative number if the modem reset pin is not connected to the MCU. This should be the pin called RESETN in the Sequans Monarch integration guide. Should be set to a negative number if there is no pin usable for deep sleep modes or it is not accessible to the MCU. This should be the pin called RTS or RTS0 in the Sequans Monarch integration guide.



Example Code

The monarch is used in the menu a la carte example.

1// For the Nimbelink LTE-M Verizon/Sequans or other boards based on the Sequans
2// Monarch series
3#include <modems/SequansMonarch.h>
4
5// NOTE: Extra hardware and software serial ports are created in the "Settings
6// for Additional Serial Ports" section
7const int32_t modemBaud = 921600; // Default baud rate of SVZM20 is 921600
8// NOTE: This baud rate is much too fast for many Arduinos! The module should
9// be programmed to a slower baud rate or set to auto-baud using the AT+IPR
10// command.
11
12// Modem Pins - Describe the physical pin connection of your modem to your board
13// NOTE: Use -1 for pins that do not apply
14// Nimbelink Skywire (NOT directly connectable to a Mayfly!)
15const int8_t modemVccPin = 18; // MCU pin controlling modem power
16const int8_t modemStatusPin = 19; // MCU pin used to read modem status
17const int8_t modemResetPin = 20; // MCU pin connected to modem reset pin
18const int8_t modemSleepRqPin = 23; // MCU pin for modem sleep/wake request
19const int8_t modemLEDPin = redLED; // MCU pin connected an LED to show modem
20 // status
21
22// Network connection information
23const char* apn = "xxxxx"; // APN for GPRS connection
24
25// Create the modem object
26SequansMonarch modemSVZM(&modemSerial, modemVccPin, modemStatusPin,
27 modemResetPin, modemSleepRqPin, apn);
28// Create an extra reference to the modem by a generic name
29SequansMonarch modem = modemSVZM;

Classes

class SequansMonarch
The loggerModem subclass for Nimbelink or other modules based on the Sequans Monarch VZM20Q.

Modem Pin Settings and Timing

The timing and pin level settings for a Sequans Monarch

#define VZM20Q_STATUS_LEVEL = HIGH
The loggerModem::_statusLevel.
#define VZM20Q_STATUS_TIME_MS = 5000
The loggerModem::_statusTime_ms.
#define VZM20Q_RESET_LEVEL = LOW
The loggerModem::_resetLevel.
#define VZM20Q_RESET_PULSE_MS = 1
The loggerModem::_resetPulse_ms.
#define VZM20Q_WAKE_DELAY_MS = 0
The loggerModem::_wakeDelayTime_ms.
#define VZM20Q_WAKE_LEVEL = LOW
The loggerModem::_wakeLevel.
#define VZM20Q_WAKE_PULSE_MS = 0
The loggerModem::_wakePulse_ms.
#define VZM20Q_ATRESPONSE_TIME_MS = 15000L
The loggerModem::_max_atresponse_time_ms.
#define VZM20Q_DISCONNECT_TIME_MS = 15000L
The loggerModem::_disconnetTime_ms.

Define documentation

#define VZM20Q_STATUS_LEVEL = HIGH

The loggerModem::_statusLevel.

Depending on firmware, you MIGHT be able to monitor the status on either GPIO2/POWER_MON or GPIO3/STATUS_LED

The module integration guide says:

GPIO3: Optional STATUS_LED. Note that the LED function is currently not available.

GPIO2: GPIO or Power monitor (Output) in option. POWER_MON is high right after POWER_ON, then remains high until shutdown procedure is completed. Module can be safely electrically power off as soon as POWER_MON goes low. Note that this feature is currently not available.

Very useful, right?

The Nimbelink manual for their breakout lists a status pin, but doesn't disclose which of these it is and the time for reporting isn't mentioned either.


#define VZM20Q_STATUS_TIME_MS = 5000

The loggerModem::_statusTime_ms.

Depending on firmware, you MIGHT be able to monitor the status on either GPIO2/POWER_MON or GPIO3/STATUS_LED

The module integration guide says:

GPIO3: Optional STATUS_LED. Note that the LED function is currently not available.

GPIO2: GPIO or Power monitor (Output) in option. POWER_MON is high right after POWER_ON, then remains high until shutdown procedure is completed. Module can be safely electrically power off as soon as POWER_MON goes low. Note that this feature is currently not available.

Very useful, right?

The Nimbelink manual for their breakout lists a status pin, but doesn't disclose which of these it is and the time for reporting isn't mentioned either.


#define VZM20Q_RESET_LEVEL = LOW

The loggerModem::_resetLevel.

Reset for VZM20Q with a minimum 1µs LOW pulse on RESETN. The maximum time is not documented.


#define VZM20Q_RESET_PULSE_MS = 1

The loggerModem::_resetPulse_ms.

Reset for VZM20Q with a minimum 1µs LOW pulse on RESETN. The maximum time is not documented.


#define VZM20Q_WAKE_DELAY_MS = 0

The loggerModem::_wakeDelayTime_ms.

Module automatically boots when power is applied, no further command is needed.

To enter PSM (power save mode), you need to do the following :

  1. Request timers from the network
  2. Register on the network
  3. Pull the RTS pin logic - level HIGH - device will enter PSM a minimum of 100s later

To exit PSM, you need to do the following :

  1. Pull the RTS pin logic - level LOW

#define VZM20Q_WAKE_LEVEL = LOW

The loggerModem::_wakeLevel.

The Sequans Monarch/VZM20Q wakes at LOW level.


#define VZM20Q_WAKE_PULSE_MS = 0

The loggerModem::_wakePulse_ms.

The Sequans Monarch/VZM20Q wakes at LOW level.


#define VZM20Q_ATRESPONSE_TIME_MS = 15000L

The loggerModem::_max_atresponse_time_ms.

Time to UART availability not documented for the VZM20Q; allowing a long 15s buffer.


#define VZM20Q_DISCONNECT_TIME_MS = 15000L

The loggerModem::_disconnetTime_ms.

Shutdown time for VZM20Q is undocumented. We allow 15sec in case it is not monitored.