LoRaWAN Node Experimental PlatformThe LoRaWAN Node Experimental Platform is based on the idea to have a small PCB with recharable and changable batteries, a common microcontroller, a STM32 in LQFP48, and a RFM95 LoRa Module. All this component should go into an enclosure that can be sourced at one of the bigger distributors. As the enclosure also will bound the space we can use for the energy source we need to discuss this in the first place. The first set of ideas had been to power the device from non-rechargeable batteries, but was at the same moment thrown away, as we don't want to produce any more waste of batteries, a rechargeable solution it should it be, and also easy to replace by the user. This would make a small, servable, water-resistant node, that can not only be operated under lab conditions but also take into the wild and get some real environmental data.
But what is on the PCB, how long will it run, and what kind of sensors and already on board. We had a few applications in mine as we designed the first boards, but it is not bound to those. This shall be a flexible and useful platform to play with LoRa, and not even on your desk, but also to put it somewhere outside for data collection and processing. The challenge from here is the squaring of the circle, in terms of flexibility , power usage and size.
PCB design and softwareWith this project we like to share not even just the text, but also the probelms encountered and the tools used developing the project. The PCB is developed in KiCad, a free, open source, multi-platform, design tool, that is getting more and more user every day. If you like to start with KiCad we have a nicely written book in the shop that will guide you through KiCad and its various functions.
From the template we generated a new board for the STM32F072 in LQFP48 , now you can use this MCU also with the Arduino IDE. This makes development pretty easy as you can now use most of your well known arduino librarys. As we don't have any kind of crystal or oscillator on board we are using the internal ones. This will default here to 8MHz for the MCU to reduce the power consumption, but can be expanded up to 72MHz if desired.
You can grab the latest files form our GitHub page.
The modular approachTo meet certain points, decision were made to think in a modular way. If all components are placed, you will get LoRaWAN device with GPS module, crypto co-processor , SPI F-RAM or Flash storage. As all of this features are nice to have, not everyone will need them. Also this means, components that are not populated will save money in the basic version, and you don't need to buy features you'll never need. As the pinout for the SPI F-RAM and SPI Flash modules is standardized, you can add the module you like or you have already software around. Also for the crypto co-processor, the ATECC608a, you can also choose to just add an I²C-EEROM or F-RAM chip, meaning you have a very flexible and user configurable device at your hands. On the
This also brings us to the MCU. In the current phase we have a STM32F072 in LQFP48 on the PCB, a Cortex-M0 based one with 64kB of flash and 16k of RAM, allowing you to even have USB for firmware updates or used in your own applications.
The nice thing about the STM32 series is the pin combability. This means you can change the MCU without changing the board, e.g. you could use an even lower power STM32L072, or if you need more computation power and flash, and STM32L151. Also the STM32F103 you commonly find on the bluepill board will be can be fitted to the PCB.
So in a short summary we have the following features:
- Li-Ion powered
- User changeable cells
- STM32F072 MCU or STM32F103 MCU
- SPI F-RAM or FLASH (optinal)
- Crypto Co-Processor (optinal)
- GPS Module (optional)
- USB-Interface (optional)
The first prototypes have been build, but we still need some adjustments. For the GPS module we need some tweaks to get better reception. You can build a miniaturized antenna but you need also take care for the ground plane. From the modules datasheet it states we need a minimum size for the PCB to have the antenna work. Currently we are not satisfied with the performance for signal reception.
PCB design and challenges
After the Version 1 of the board we dittched the Quectel L96 module and replaced it with the GPS Module from the Elektor Shop as this is cheaper and easyer to attatch to the board itself. Also this lead to some redesigns for the used connectors, so everything is now in a 2,54mm raster, so you can plug the module to a breadbaord of choise.
Secondly we have the RFM95 LoRa module that needs an antenna too. With the size and enclosure we choose we will use a helix one for 868MHz you can build yourself. If you like to have even better reception, an external antenna is a option. We know the design here is a compromises of space and functions and transmit and receive with the internal antenna could be better or even more optimized.
Also we have the power supply. As mentioned in the beginning we use li-Ion batteries in 10440 ( AAA ) format, you can find in e-cigarettes. These can be easy replaces by the user and charged outside the device with a proper li-ion charger. To protect the cells from deep discharge a voltage monitor ic is included that switches of the used LDO for the 3.3V supply.
Also added is now in the pinout a 2mm pinhole part to attach lopo-battery paks you normaly use for drones. This small and flat cells comes with a Molex 510005 or JST connector and offer a good capacity and space ratio. This makes the whole design more fexable and allows to use off the shelf recharable batterys that can sourced from big waarehouses starting with an A... .
The reverse current protection is now done with a loadswitch. We use the TI TPS22917 for this porpose, as it will disconnect if a certain amout of current flows reverse through the switch. Also we added a second one for the power supply towars the GPS module, so the MCU can cut power to the module to extend battery life. This also means if you don't use the GPS module in the first place you have MCU controlled switchable 3.3V you can use to power or disable other external circutry.
Bowering the device form NiMH-Cells would be possible but needs additional circuits, in this case a DC/DC boost stage. As the boost stage will consume power all the time this may reduce runtime, and we also need to reconsider the under voltage lockout.