Arduino core for CMWX1ZZABZ-078-based LoRaWAN devices

The CMWX1ZZABZ is a module developed by ST Microelectronics and Murata with an embedded STM32L082 microcontroller and an SX1276 LoRa radio modem. We have developed a series of devices based on the CMWX1ZZABZ-078 module as well as a system layer and Arduino overlayer to allow simple use of the devices as LoRaWAN end nodes, for, among other things, use with TTN.

The devices are the 18 mm x 45 mm Grasshopper development board:

Grasshopper

with all 19 of the CMWX1ZZABZ GPIOs exposed to the user, a wide-band (858 - 928 MHz) pcb antenna and a uFl connector for an external antenna;

the 23 mm x 23 mm LoRa SensorTile:

LoRaSensorTile

with BME280 pressure, temperature, humidity sensor, a BMA280 accelerometer, and a VEML6040 RGBW ambient light sensor, as well as 16 MByte SPI NOR flash for data logging and STBC08 LiPo battery charger;

and the 23 mm x 46 mm Cricket Asset Tracker:

Cricket

which adds a CAM M8Q to the LoRa SensorTile to allow location logging and tracking.

We have successfully cast data via LoRaWAN using these devices to a TTN gateway and then on to the TTN. Set up of the LoRaWAN in an Arduino sketch is simple and intuitive.

We are testing the Arduino core now and are populating repositories on GitHub with sketches as we test out the peripherals, etc. The Arduino core should be available for general use before the end of January.

Grasshoppers are currently for sale at Tindie, while the Lora SensorTile and Cricket will be in production and for sale soon.

We expect to make good use of these low-power, easy-to-use platforms for all of our home and industrial IoT projects. We hope such devices will be of interest to the TTN community as well.

7 Likes

Thatā€™s very interesting, thanks!

I would definitely order a Lora SensorTile when it will be out if itā€™s in the same price range as the grasshoppers!

Please keep us aware of future releases :slight_smile:

yeah me to ā€¦ great work !

Q: ā€™ why the VEML6040 and not a gps on the LoRa SensorTile, whatā€™s a use case for this colorsensor in combination with LoRaWAN ?

The LoRaSensor Tile and Cricket Asset Tracker are both currently in production and we should have these for sale at Tindie in March. The cost will be higher, unfortunately, than Grasshopper. We are targeting $59.95 for the LoRaSensorTile and $79.95 for the Cricket Asset Tracker.

We chose three low-power I2C sensors for the LoRaSensorTile since it is intended as an environmental sensor and data logger. Putting GPS on this size board would have been quite difficult, and besides, we have done this on the Cricket Asset Tracker, intended specifically for location tracking and logging applications.

Both have enough GPIOs exposed so the user can add whatever I2C or SPI or UART sensors as required by the specific application. In this sense, these are somewhere between development boards and utility (single purpose) boards.

Both of these boards have low sleep current (<10 uA for LoRaSensorTile and < 20 uA for the Cricket Asset Tracker), and we have taken great pains to minimize the average current when running. They are both intended to last at least one year on a single AAA battery.

1 Like

Just a little more on the LoRaSensorTile application.

One specific use case for the VEML6040 RGBW light sensor is to monitor indicator leds on existing equipment, like leds that are green when everything is working normally, yellow when there is some maintenance required and red when there is a fault condition or something like this. The VEML6040 is able to detect these individual colors. Of course, it can also tell when room light are on or off.

So imagine an HVAC unit in a closet or utility building. With this LoRaSensorTile one can tell if/when the HVAC unit is on or off (acceleration/vibration), whether the HVAC unit is actually cooling or heating (pressure, humidity, temperature), and what the status of indicator lights might be or whether the lights are on or off in the room, etc.

Of course, as mentioned, it is easy to add other sensors by soldering another custom-designed pcb to the LoRaSensorTile or connecting an off-the-shelf board via wires, etc.

This was designed as a prototype but will have immediate applications for industrial IoT.

Hello onehorse, nice boards!

Iā€™m wondering if the Murata module is simply a STM32 + Semtech radio or they also offer some kind of software the LoRaWAN stack, for example, being able to use via AT commands or the LoRaWAN stack ready to use with the built-in STM32L0?

I see your Github and the examples include ā€œlorawan.hā€, but I couldnā€™t find it. Really keen to try it, but just trying to estimate what is necessary on the software sideā€¦

so you can ā€˜disconnectā€™ (solderblob) the onboard sensor and free that gpio ?

@Moebiusi Very little will be necessary to use LoRaWAN once we release the Arduino core, probably this weekend. You can see in the working examples already posted that no AT commands are required. Just need the coreā€¦

@BoRRoZ Not sure what you mean, on the LoRaSensorTile there are three on-board sensors and lots of exposed GPIOs at the board edge so a user can add sensors by designing a pcb that would mate with 3V3/GND/SDA/SCL for I2C sensors or 3V3/GND/SCLK/MISO/MOSI/nCS for SPI. Or just buy a sensor board from me at Tindie or Adafruit, etc and solder wires to the LoRaSensorTile. The LoRaSensorTile has seven free GPIOs plus I2C, UART, and SPI ports exposed at the board edge. Why would you need to unsolder anything??

I was thinking freeing gpio / power saving / conflicting I2cā€¦ but ok, there are lots of other free gpio ā€¦
I understand now why you choose that very typical color sensor ā€¦ you wrote a driver for teensyduino :wink:

Iā€™ve been working with these sensors for a little while for my hobby projects as well as for commercial applications. For a taste of the former, see this.

I used to use the Teensy a lot until we designed our own STM32L4 platforms. Hard to get low power when using the Teensy :<

1 Like

Some results for power usage for the Grasshopper:

Grasshopperpowerusage

2.0 uA in STOP mode. More discussion here.

And some results for the LoRaSensorTile:

LoRaSensorTilePowerUsage

Stop current is ~12 uA. More discussion here.

1 Like

So how do we go about programming the grasshopper? Does it contain a serial bootloader or do we need the old ST-Link?

The first Arduinoā€™s MKR WAN 1300 are seen in the wild to

All ST MCUs (AFAIK) but certainly the CMWX1ZZABZ (Grasshopper) have an embedded bootloader in ROM so you donā€™t need to add one nor can you damage it by writing to Flash/SRAM unless you use a hammer. The Arduino core will be dropped here:

either today or tomorrow. You need to install the latest Arduino IDE, install the Arduino core by either dropping the core into the hardware folder of your Arduino directory or using the board manager and .JSON. Make sure you have the SAMD boards selected as well since the Arduino core uses the SAMD compiler. Then flash your sketches as usual using the USB connector just like any Arduino board.

You can still use an ST-link and the exposed SWD port on the Grasshopper if you think the Arduino IDE is too limiting, but I find it rather easy to use and I can do just about everything I need to with it. The CMWX1ZZABZ github repository has enough Arduino sketches to get you started.

1 Like

Fantastic, Iā€™m reviewing the CMWX1ZZABZ ahead of my Things Conference talk on LoRaWAN modules and would love for this Arduino core to be part of it.

Should be up on github for you to try today or tomorrow. I hope you like it!

First drop of the (alpha) Arduino core for CMWX1ZZABZ-based boards here.

Hereā€‹ is a more or less complete how-to to get going with this STM32L0 Arduino core using the Arduino IDE with the Grasshopper development board. Just follow the instructions. Any question or trouble, send me an e-mail at tleracorp@gmail.com.

2 Likes

Hi. I am trying to upload the sketch on the board with the arduino IDE and the Grashopper-L082CZ and correct port. When I try uploading the sketch I get the following on the console. What am I doing wrong. Thanks

Sketch uses 68032 bytes (34%) of program storage space. Maximum is 196608 bytes.
Global variables use 5480 bytes (26%) of dynamic memory, leaving 15000 bytes for local variables. Maximum is 20480 bytes.
10
9
8
7
6
5
4
3
2
1
FAIL

Hold the BOOT button pressed while you toggle the RESET button. This forces the devices into bootloader mode. Sometimes if you a sketch that crashes or puts the chip into low power mode, USB does not respond otherwise.

Thanks. I think it was a driver issue as well on my linux box
No I got it working on windows.
Only issue I have is that I cannot get the serial monitor to work and makes it had to debug. Is there any trick to make the serial monitor work?
Thanks again