---
title: "EC-M12-BC-C6-C-D – USER GUIDE"
description: "## Overview The NORVI EC-M12-BC-C6-C-D is a rugged, IP67-rated IoT telemetry unit designed for reliable outdoor and remote monitoring applications. Powered by high-capacity non-rechargeable lithium batteries and built on the ultra-low-power STM32L072CZT6TR MCU, it delivers years of autonomous operation even…"
url: "https://norvi.io/docs/ec-m12-bc-c6-c-d-user-guide/"
updated: "2026-12-02"
category: "NORVI EC-M12 / EC-M12-BC-C6-C-D"
---

# EC-M12-BC-C6-C-D – USER GUIDE

## Overview

The NORVI EC-M12-BC-C6-C-D is a rugged, IP67-rated IoT telemetry unit designed for reliable outdoor and remote monitoring applications. Powered by high-capacity non-rechargeable lithium batteries and built on the ultra-low-power STM32L072CZT6TR MCU, it delivers years of autonomous operation even in harsh environments, making it well suited for agriculture, environmental monitoring, utilities, and industrial asset management.

The unit has two 4–20 mA analog inputs and one digital input on a sealed M8 8-pin connector, with switchable sensor power (12 V / 5 V) and a 3.3 V supply output. It suits utility metering, smart agriculture, environmental monitoring, tank level and fuel monitoring, and industrial asset monitoring.

This guide walks through everything needed to confidently install, configure, and deploy the EC-M12-BC-C6-C-D covering safety requirements, hardware specifications, GPIO and wiring references, Arduino IDE setup, diagnostic test code, supported communication protocols, and troubleshooting.

## Key Features

- Rugged Design IP67 weatherproof enclosure with industrial-grade connectors
- Cellular Connectivity Multi-band modem (2G / Cat-M / NB-IoT) via SIM7070G
- The device is powered by two ER34615H lithium batteries (38,000 mAh total), and the USB-C connector is used only for uploading code and debugging, though it can also power the device if wanted.
- **Magnetic Reset:** Contactless device reset using a magnet, with no need to open the enclosure.
- The magnetic transport switch is a contactless switch that saves battery power while the device is being transported, and it is not an on/off switch, as the device keeps running continuously after its first power-up via the switch.
- Storage microSD card slot for storage expansion
- Industrial M8 8-pin connector for sealed field wiring

## Safety Information

**Warning:**Before inserting the battery, verify that the polarity is correctly aligned to avoid damage to the device.

- Ensure the slide switch is set to the correct position (5V / 12V) to match the voltage required by the connected sensor.
- Confirm the jumper is correctly placed before powering the device via USB or Battery.
- Verify that the sensor wiring is properly connected before applying power to the unit.
- Set the rotary switch to the correct voltage corresponding to the connected digital input.

## Technical Specifications

### Peripherals

#### Microcontroller

| SOC / MCU | STM32L072CZT6TR |
| --- | --- |
| Flash Memory | 192 KB Flash |
| ROM | 6 KB |
| SRAM | 20 KB |
| PSRAM | Not Available |

#### MicroSD Card (SPI)

| Interface | SPI |
| --- | --- |
| CS | PB0 |
| MISO | PA6 |
| MOSI | PA7 |
| SCLK | PA5 |
| SD Detect | Not Implemented |

#### Cellular Modem (SIMCOM 7070G)

| Model of GSM Modem | SIMCOM SIM7070G |
| --- | --- |
| Technology | 4G LPWA (LTE Cat-M1 and Cat-NB1/NB2) with 2G GPRS/EDGE fallback |
| Cat-M1 bands | B1, B2, B3, B4, B5, B8, B12, B13, B14, B18, B19, B20, B25, B26, B27, B28, B66, B85 |
| Cat-NB (NB1/NB2) bands | B1, B2, B3, B4, B5, B8, B12, B13, B18, B19, B20, B25, B26, B28, B66, B71, B85 |
| RX with MCU | PA2 |
| TX with MCU | PA3 |
| Power Control | PA1 – Active High |
| DTR | PB12 |

#### INPUTS and OUTPUTS

**Analog Inputs**

| Number of Analog Inputs | 2 |
| --- | --- |
| Analog Inputs Measurement Range | 4 - 20 mA |
| Terminal Arrangement | ![](https://norvi.io/wp-content/uploads/2026/11/Terminal-Arrangement.png) |

**Digital Inputs**

| Number of Digital Input | 1 |
| --- | --- |
| DIgital Input Measurement Range | DI - SELECTION 1 -OFF 2 - 3.3V 3 - 5V 4 - 12V ![](https://norvi.io/wp-content/uploads/2026/11/DIgital-Input-Measurement-Range.png) |

![](https://norvi.io/wp-content/uploads/2026/11/Setting-the-Digital-Input-Voltage-via-Rotary-Switch.jpg)
Figure 1: Setting the Digital Input Voltage via Rotary Switch

#### M8 8-Pin Connector

The device uses an M8, 8-pin connector for field wiring. The pin functions are listed below.

| Pin 1 | GROUND |
| --- | --- |
| Pin 2 | 4-20mA 1 |
| Pin 3 | 4-20mA 1 |
| Pin 4 | VAR 12V / 5V |
| Pin 5 | 3.3V + |
| Pin 6 | DI 1 |
| Pin 7 | DCOM |
| Pin 8 | - |

## Hardware Layout & GPIO Map

The table below lists the STM32L072 GPIO assignments as used on the EC-M12-BC-C6-C-D board. Use this reference when writing or adapting firmware.

| GPIO | Description |
| --- | --- |
| PA1 | GSM Power Control |
| PA2 | Modem TX with MCU |
| PA3 | Modem RX with MCU |
| PA4 | Power Enable |
| PA5 | SD Card SCLK |
| PA6 | SD Card MISO |
| PA7 | SD Card MOSI |
| PA9 | SCL |
| PA10 | SDA |
| PA11 | USB_N |
| PA12 | USB_P |
| PA13 | SWDIO |
| PA14 | SWCLK |
| PB0 | SD Card Chip Select |
| PB2 | User Configurable LED |
| PB5 | Digital Input |
| PB12 | Modem DTR |
| PC14 | OSC32IN/Oscillator |
| PC15 | OSC32OUT/Oscillator |
| PH0 | OSCIN/Oscillator |
| PH1 | OSCOUT/Oscillator |

## Power Source Selection

The device has a built-in battery, which is designed for low power operation. During programming and testing of the device, the power source can be changed to USB to save the battery power for its actual operation.
The power source can be changed to USB by setting the onboard jumper to the USB side.

![](https://norvi.io/wp-content/uploads/2026/11/Setting-Jumper-Pins-for-USB-or-Battery-Supply-Mode.png)
Figure 2: Setting Jumper Pins for USB or Battery Supply Mode

The system utilizes a dual-input power architecture. A selection switch directs Battery power (position 1) through the internal LDO to generate the main VDD (3.3 V) system rail. When powered via USB, the 5 V USB input is regulated to 3.8 V before being supplied to the system through the internal LDO, which generates the same VDD (3.3 V) rail. The raw battery line also directly feeds an LDO and a Booster circuit, allowing the system to step up voltages up to 12V (Max. 100mA) or 5V. The microcontroller dynamically manages power delivery to these booster stages by toggling their enable (EN) lines through the SD_A (PA4) control pin.

![](https://norvi.io/wp-content/uploads/2026/11/Battery-Monitoring-Functional-Block-Diagram-Version-02.png)
Figure 3: Battery Monitoring Functional Block Diagram Version 02

## Wiring Guide

### Digital Input Wiring

![](https://norvi.io/wp-content/uploads/2026/11/Connecting-the-8-Pin-M8-Sensor-Cable.jpeg)
Figure 4: Connecting the 8-Pin M8 Sensor Cable

### Mounting and Connecting the Module

- **Mount the enclosure** using the provided wall-mounting points.
- **Connect the M8 8-pin connector** to the device’s mating field cable. Tighten the connector fully to maintain the **IP67 protection rating**. Verify the wiring against the terminal arrangement shown in the above diagram.
- **Check the sensor supply selection:** Set the **selectable sensor-voltage switch** according to the sensor being used. Select the appropriate **5 V or 12 V** supply before connecting the sensor.
- **Verify the SIM card and SD card:** Confirm that the SIM card and SD card are properly installed in the device before operation.

## Programming the Device

NORVI EC-M12-BC-C6-C-D is powered by a STM32L Series microcontroller, STM32L072CZT6. This microcontroller is designed for low power applications and can be programmed with Arduino IDE or any other IDE which supports STM32 micro-controllers. The board includes SWD programming Pins for connection with an ST-Link and USB Port for Serial Debugging. Configuring Arduino IDE for STM32L The boards package : STM32 MCU Based boards should be installed from the Arduino Boards Manager.

![](https://norvi.io/wp-content/uploads/2026/11/Arduino-IDE-Boards-Manager-Window-1.png)
Figure 5: Arduino IDE Boards Manager Window

Then setup the board setting from tools as the below Figure. In there; to get the serial monitor output needed to enable generic serial and CDC (generic ‘serial’ superseded U(S)ART. Board : Generic STM32L0 Series Board Part number : Generic L072CZTx U(S)ART support : Enabled generic Serial

![](https://norvi.io/wp-content/uploads/2026/11/Arduino-IDE-Board-and-Tools-Menu-Configuration-2.png)
Figure 6: Arduino IDE Board and Tools Menu Configuration

**Compiling and Uploading Code for STM32L with Arduino IDE**

The compiled binary can be downloaded from Arduino IDE from Sketch –> Export Compiled Binary Option.
Once the process is complete the binary file can be fetched from the program's saved location.

![](https://norvi.io/wp-content/uploads/2026/11/STM32-Exported-Binary-Upload-via-ST-Link-Programmer-1.png)
Figure 7: STM32 Exported Binary Upload via ST-Link Programmer

The exported binary file can be uploaded through a ST-Link Programmer.
The connections GROUND, SWCLK, SWDIO, RESET should be connected with the ST-Link Programmer .

Open STM32 ST-LINK Utility, go to Target > Connect, then open the BIN file and update the board using Target > Program & Verify.

## Test Code Examples

This test code lets you test all the peripherals and the device's shutdown mode. It is intended only for initial testing and evaluation and does not represent the final firmware.

### Programming Analog Inputs

The analog inputs are read through an ADS1115 ADC connected to the I2C bus. Two channels measure the current inputs and one channel measures the battery voltage.

**Pin definitions** – these lines define the I2C pins:

```cpp

                #define SCL_PIN PA9
#define SDA_PIN PA10
```

**ADC setup** – the ADC is created, the conversion factors are defined, and the ADC is started in setup() with a ±4.096 V range (gain ×1):

```cpp

                TwoWire Wire2(SDA_PIN, SCL_PIN);
Adafruit_ADS1115 ads1;
const float V_Factor = 3.3 / 1.65;
const float mA_Factor = 4.096 / 3269.826;
```

```cpp

                Wire2.begin();
```

```cpp

                if (!ads1.begin(0x49)) {
  Serial.println("Failed to initialize ADS 1 .");
  while (1);
}
ads1.setGain(GAIN_ONE);  // 1x gain +/- 4.096V
```

**Reading the inputs** – in loop(), the channels are read, converted and printed:

```cpp

                float current0 = ads1.readADC_SingleEnded(1) * mA_Factor;
float current1 = ads1.readADC_SingleEnded(0) * mA_Factor;
float voltage2 = (ads1.readADC_SingleEnded(2) * 4.096 / 32767.0) * V_Factor;
Serial.print("Current 0: "); Serial.print(current0); Serial.println(" mA");
Serial.print("Current 1: "); Serial.print(current1); Serial.println(" mA");
Serial.print("BATTERY VOLTAGE : "); Serial.print(voltage2); Serial.println(" V");
```

### Programming Digital Inputs

This section shows how to read the state of a digital input (INPUT1) on the board. The code first assigns the name INPUT1 to the hardware pin PB5. In setup(), it configures that pin as an input so it can receive signals. In loop(), it continuously reads the pin and prints the result to the Serial Monitor: 1 (HIGH) when a signal is present and 0 (LOW) when it is not.

- **Pin definition** – this line defines the digital input pin:

```cpp

                #define INPUT1 PB5
```

- **Pin setup** – in setup(), the pin is set as an input:

```cpp

                pinMode(INPUT1, INPUT);
```

- **Reading the input** – in loop(), the state is read and printed:

```cpp

                Serial.print("Input1: "); Serial.println(digitalRead(INPUT1));
```

### Sensor Supply Voltage Output

The device has a selector switch for choosing a 12 V or 5 V sensor supply, and a 3.3 V supply is also available. Set the switch to 12 V or 5 V if the sensor requires it, or use the 3.3 V supply for 3.3 V sensors. The selected 12 V / 5 V supply and the 3.3 V supply can be used together, so sensors with different voltage requirements can be powered at the same time through the M8 8-pin connector.

![](https://norvi.io/wp-content/uploads/2026/11/image-1.png)

**Enabling Power Output from firmware**

The output enable pin is connected to the GPIO PA4 on STM32.

```cpp

                pinMode(BOOST_EN, OUTPUT);
digitalWrite(BOOST_EN, HIGH);
delay(100);
```

**MicroSD Card Support**The microSD card is connected to the SPI bus of the STM32, with a GPIO to control its power. This cuts power to the microSD card when the device is in sleep mode. Booster enable, SD card enable, and 3.3V output enable are all controlled by a single GPIO, PA4. The example code below shows how to enable power to the microSD card and read the data

```cpp

                void SD_CHECK(){
  Serial.print("nInitializing SD card...");
   if (!card.init(SPI_HALF_SPEED, SD_chipSelect))
    {   Serial.println("CARD NOT FOUND");
    }
    else
    {
      Serial.println("SD WORKING");
    }

    Serial.print("nCard type: ");
    Serial.println(card.type());
    if (!volume.init(card)) {
      Serial.println("Could not find FAT16/FAT32 partition.nMake sure you've formatted the card");
      return;
    }
    if (!SD.begin(SD_chipSelect)) {
      Serial.println("Card failed, or not present");
      // don't do anything more:
      return;
    }

}
```

**Low Power Mode**

The device uses low-power mode to conserve battery energy. In the test code, the device can be put into low-power mode by sending the LP command through the serial monitor. In this mode, power consumption drops to just a few microamps, which makes the device suitable for long-term battery-powered operation.

**Power Control Pins**

| Pin | Name | Function |
| --- | --- | --- |
| PA4 | BOOST_EN | Single control for booster enable, RS485, INA196 and microSD card power. HIGH = enabled, LOW = disabled. |
| PA1 | GSM_POWER | GSM modem power key. A HIGH-then-LOW pulse powers on the modem. HIGH powers it off. |

**Active Cycle (after wake-up)**

| Step | Action | Purpose |
| --- | --- | --- |
| 1 | digitalWrite(BOOST_EN, HIGH) | Enable booster and microSD card power |
| 2 | Serial2.begin(9600) | Start modem UART |
| 3 | SPI.begin() | Start the SD SPI bus |
| 4 | Pulse GSM_POWER HIGH for 200 ms, then LOW | Power on the GSM modem |
| 5 | Wire2.begin() and ads1.begin(0x49) | Start I2C and initialize the ADC |
| 6 | I2C_SCAN() and RTC_Check() | List I2C devices and check the RTC |
| 7 | SD_CHECK() | Verify the microSD card |
| 8 | Send AT and AT+CPIN? | Verify modem communication and SIM status |
| 9 | Read the ADC channels and INPUT1 | Measure current inputs and battery voltage (V), and read the digital input |

**Entering Low Power Mode**

Type LP in the serial monitor. Any other command typed in the serial monitor is forwarded to the GSM modem as an AT command.

Before sleep, the peripherals are powered down in this order:

| Step | Action | Purpose |
| --- | --- | --- |
| 1 | Serial.flush() and delay 1 s | Complete any pending serial transmission |
| 2 | SPI.end() and delay 1 s | Stop SD communication |
| 3 | digitalWrite(BOOST_EN, LOW) and delay 1 s | Power off the booster and microSD card |
| 4 | digitalWrite(GSM_POWER, HIGH) and delay 2 s | Turn off the GSM modem and allow it to shut down safely |

**Entering Shutdown Mode**

```cpp

                LowPower.shutdown(16000);
```

The STM32 enters deep shutdown for 16000 ms (16 s). In this mode:

- Most peripherals and clocks are off.
- Power consumption drops to a few microamps.
- The RTC keeps running and wakes the MCU when the timer expires.

**Wake-Up and Resume**

After the period ends, the MCU performs a cold start and runs setup() again. All peripherals are re-initialized, the modem is powered on again, and the cycle repeats. The “LOW POWER MODE OFF” message in the code is never printed, because the MCU restarts instead of resuming after the shutdown call.

**Notes**

- To change the sleep duration, edit the value in LowPower.shutdown(<milliseconds>);.
- RAM contents are lost in shutdown mode. Store any data that must survive on the microSD card.
- Avoid serial communication immediately before shutdown, to prevent incomplete transmissions.
- Make sure the modem is powered off (GSM_POWER HIGH) before entering shutdown, otherwise sleep current will be higher.
- Make sure BOOST_EN is LOW before shutdown so the microSD card is not left powered.

**Powering On the Modem**

The modem is controlled through the power key on PA1:

```cpp

                digitalWrite(GSM_POWER, HIGH);   // Power key pulse
delay(200);
digitalWrite(GSM_POWER, LOW);    // Release power key
delay(2000);                     // Wait for the modem to start
```

To power the modem off before sleep, set GSM_POWER HIGH.

**Basic AT Command Communication**

The modem is connected to the microcontroller through Serial2 (PA2 TX, PA3 RX). After powering on the modem, open the serial interface at 9600 bps and send an AT command:

```cpp

                Serial2.begin(9600);
Serial2.println("AT");
```

The modem replies with OK when communication is successful.

**Indicator LED**

The indicator LED is connected to the NET light output of the modem and shows the network status:

- **Blinking every 1 second:** Modem is searching for a network.
- **Blinking every 3 seconds:** Modem is registered on the network successfully.
- **Blinking rapidly:** Modem is establishing a data connection.
- **Off:** Modem is powered off or in low-power mode.

The Indicator provides a quick visual reference to confirm modem activity and network connection status.

## Support & Resources

**Product documentation & datasheets: [Data Sheet](https://norvi.io/docs/norvi-ec-m12-bc-c6-c-d-datasheet/)**

**Product page:**[https://norvi.io/](https://norvi.io/)

**Technical support:**support@norvi.io

## REVISION HISTORY

| Rev. | Date | Change Description | Board Revision |
| --- | --- | --- | --- |
| 2.0 | 18/11/2026 | Updated modem power distribution; added user-configurable LED, magnetic reset and transport switches; introduced UART communication. GPIO changes: PB2 changed from Digital Input to Power LED, PB5 added as Digital Input. | V3 |
