Cat-M1 Kit Start Guide

Use this page with AI

Set up with your favorite AI

Gemini & other AI

Copy the setup prompt into your AI. Work through each step together, from checking your kit to getting it running.

Open Gemini

Copy the prompt, then paste it into Gemini’s message box.

View prompt

Cellular LPWA Cat-M1 Kit is a compact, low-power development kit that sends sensor data directly to the cloud over a cellular network. You can record temperature and humidity in remote locations without setting up Wi-Fi.

Play video (1:49, Japanese)

1. Kit contents

The leaves arrive individually packed in bags. First, check that you have all the following leaves and accessories.

Assembled Cat-M1 Kit leaves, AX02B, a 1NCE SIM, and an empty battery holder
Assembly example and accessories. The leaves arrive individually packed in bags.

Leaves

Leaf Role
AC09 Cat-M1 TY Cellular LPWA Cat-M1 communication over a cellular network.
AX04 Spacer Adds space between stacked leaves.
AI05 Env Sensors Measures temperature, humidity, pressure and 3-axis acceleration. The standard configuration uses BME280 and LIS2DW12.
AP03B STM32 MCU Runs programs to read sensors and control communication leaves. A redesigned version of AP03.
AZ01C USB-C Connects to a computer over USB Type-C for serial communication and 3.3V power. Check the connections and settings specified by the matching firmware before uploading to AP03B.
AV06 1.8V~5.5V Supplies 3.3V to the leaves from batteries. The battery holder connects through a PH connector.
AX02B 29-pin Routes all 29 Leafony Bus pins to 2.54mm-pitch through-hole pads for prototyping external circuits and checking signals.

Accessories

Accessory Purpose
AZ63 Nut Plate Secures leaves with screws.
1NCE SIM (nanoSIM-compatible) Used for AC09 cellular communication. Check the SIM's service status and communication settings before use.
M2×18 mm screws Secure the stacked leaves.
PH-connector holder for two AA cells Connects to AV06 for battery power.

2. What you will build

The goal of this guide is to run the sample program and record the temperature and humidity measured by the kit in Google Sheets every 10 minutes.

The data follows this path:

Measure temperature and humidity with AI05 → Send over a cellular network with AC09 → Record in Google Sheets

Each row in the spreadsheet contains the reception timestamp, temperature, and humidity. You can also chart the recorded data to see how the values change over time.

3. What you need

Prepare the following items in addition to the kit.

ItemPurpose
Computer with internet accessInstall the development tools, upload the program, and set up the spreadsheet.
USB-C cable that supports data transferConnect the computer to the included AZ01C USB-C leaf. A charging-only cable will not work.
Two AA batteriesPut these in the included battery holder when you try battery power at the end of the guide.
Screwdriver that fits the screwsTighten the screws that secure the leaves.
Google accountCreate the Google spreadsheet that will store the data.

Complete these preparations on your computer:

  1. Follow Development environment setup to install VS Code, PlatformIO, and STM32CubeProgrammer.
  2. Check that the included 1NCE SIM is ready to use and confirm its assigned APN (the setting for connecting to the cellular network). Refer to the kit's sales information for activation instructions.
  3. Follow Prepare Google Sheets to set up the destination spreadsheet and the Apps Script that receives data. Note the issued endpoint URL and the authentication token you configured.

4. Assemble the kit

Disconnect the USB cable and batteries before assembly.

Watch the assembly from SIM installation (Japanese)
  1. Prepare the included 1NCE SIM in nanoSIM size and insert it into the AC09 SIM holder. Check the card's notch and the shape of the holder.
  2. Align the bus contacts and screw holes, then stack the leaves in the order shown below.
  3. Check the connector orientation and make sure components do not touch each other, then secure the stack with the included M2×18 mm screws and AZ63 Nut Plate.

The assembled stack must have the following order from top to bottom:

PositionLeaf
1 (top)AI05 Env Sensors leaf
2AZ01C USB-C leaf
3AP03B STM32 leaf
4AX04 Spacer leaf
5AC09 Cat-M1 leaf
6 (bottom)AV06 power leaf

Place the Spacer leaf between the STM32 and Cat-M1 leaves. The included AX02B 29-pin leaf is for connecting external circuits, so leave it out of this stack.

See Assembly and reconfiguration basics for guidance on stacking leaves and tightening the screws.

5. Upload the sample code

Open and configure the sample

  1. Obtain the sample from the AC09 development repository and open the platformio/google_sheets folder in VS Code. If you cannot access the repository, see Obtain the source.
  2. Copy include/config.example.h to config.local.h in the same folder.
  3. Update the following entries in config.local.h with your settings.
SettingValue
GAS_URLThe Apps Script URL you prepared. Use the URL ending in /exec.
GAS_API_TOKENThe same authentication token registered in Apps Script.
SIM_PROVIDER1 for the included 1NCE SIM.
ONE_NCE_APNThe APN assigned to the included SIM.
SEND_INTERVAL_MS600000UL (10 minutes).

Upload to AP03B

Keep the batteries disconnected and connect the AZ01C USB-C leaf to your computer with the USB cable.

  1. Set upload_port and upload_command in platformio.ini to match your computer's connection port and STM32CubeProgrammer location. Refer to the OS-specific configuration examples, and use the leafony_ap03b environment for this kit.

  2. Open the PlatformIO terminal in VS Code and build the program.

    pio run -e leafony_ap03b
  3. Set AP03B's PG switch to Program and press the RST button. Then upload with the following command:

    pio run -e leafony_ap03b -t upload
  4. After the upload succeeds, return the PG switch to Run.

See the AP03B documentation for the switch location.

6. Check operation

  1. Keep the USB cable connected and open the serial monitor with the following command:

    pio device monitor -e leafony_ap03b -b 115200
  2. Press AP03B's RST button to start the program. Wait for it to connect to the cellular network and acquire the time.

  3. When Saved to Google Sheets appears in the serial monitor, open the Google spreadsheet.

  4. If a row containing the reception timestamp, temperature, and humidity has been added to the temperature sheet, the sample is working. Leave it running to add new measurements every 10 minutes.

Reception timestamps are recorded in UTC. Add nine hours to read them in Japan Standard Time.

If no row is added, check the settings for the message shown in the serial monitor using Serial logs and troubleshooting.

7. Next steps

Run on batteries away from your computer

  1. Disconnect the USB cable and turn the AV06 power switch OFF.
  2. Insert two AA batteries into the included battery holder, checking the positive and negative orientation. Connect the holder's PH connector to AV06.
  3. Make sure AP03B's PG switch is set to Run, then turn the AV06 power switch ON.
  4. Check that a new row is added to the spreadsheet.

Keep the USB cable disconnected when running on batteries. See the AV06 documentation for the power switch and connector locations.

Use the recorded data and customize the program

  • Chart changes in temperature and humidity: Select the timestamp, temperature, and humidity columns in the spreadsheet, then choose “Insert” → “Chart”.
  • Change the recording interval: Change SEND_INTERVAL_MS and upload the program again. See Sample configuration for the allowed range.
  • Learn how to reduce battery consumption: Low-power design explains communication intervals and sleep modes.
Leaf photo
Search documentation, sample apps, and Q&A