

Tracker v1
LoraWan soil sensor
- Size
- 56.5 × 66.8 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 45
- Nets
- 35
- Pads
- 203
- Tracks, vias
- 787, 68
- Pours
- 2
- Routed
- Yes
- KiCad
- KiCad 5 (file 20171130)
- Created
- 21 Jun 2020
- Updated
- 21 Jan 2024
Overview
Tracker v1 is an open-source printed circuit board by angelnu, from the angelnu/LorawanSensor repository on GitHub, published under the MIT licence. It is a 2-layer board of 56.5 × 66.8 mm with 45 parts on 35 nets, routed with 787 tracks and 68 vias.
It is built around the STM32L412KBT6, LIS3DH and RFM95W-868S2, with the AO3401A among its other parts. Its parts include 12 capacitors, 4 ICs, 2 resistors, 2 connectors and 1 diode. It belongs with the radio and wireless and sensors and measurement boards and the STM32 boards of this library.
Main components
4STM32L412KBT6
LQFP-32(7x7)-40℃~+85℃ 1.71V~3.6V 128KB 26 32 Bit 40KB 80MHz ARM Cortex-M4 Built-in FLASH LQFP-32(7x7) Microcontrollers (MCU/MPU/SOC) ROHSSTMicroelectronicsMicrocontrollers (MCU/MPU/SOC)LIS3DH
LGA-16(3x3)-40℃~+85℃ 1.71V~3.6V 16bit 500nA Accelerometer Motion event detection SPI、I2C X,Y,Z ±16g LGA-16(3x3) Accelerometers ROHSSTMicroelectronicsAccelerometersRFM95W-868S2
16-SMD16-SMD New Arrivals ROHSHopeRF Micro-electronicsUncategorisedAO3401A
SOT-231 P-Channel 14nC@10V 30V 47mΩ@10V、60mΩ@4.5V、85mΩ@2.5V 4A 55pF 645pF 80pF 900mV SOT-23 MOSFETs ROHSAlpha & Omega SemiconductorMOSFETs
README
README.mdSTM32 Low Power LoraWan Sensors
This project provides a framework to easily build LoraWan devices. The requirements are:
- sensors that could run without replacing batteries during the life cycle of the device
- small size
- easy to build and program (need a 20-30)
- simple to create a new type: just a new file
- cost bellow 20€
- resist the outside weather with easy to 3D print cages
The sensor can work on a CR123 battery for 20 years (self-discharge of the battery being the main factor). It sends the battery voltage and (optionally) the temp of the MCU (using factory calibration).
For each new detected device it generates unique LoraWan keys and upload them to flash. This way the same firmware can be used for multiple instances of the same board.
NOTE: Do not put the config directory in a public repository. Instead save as extra home/private repository so you have versioning while keeping your keys private!
Download commands might be used to query or modify the configuration. See the commands section bellow.
Bill of Materials
Devices can be built for ca 10-20€ ussing the following parts:
- STM32 MCU - any of the following:
- STM32L412KB (3 €) - prefered: 128KB RAM for a future firmware OTA update
- STM32L412KBT6 128K Flash, 8K RAM, LQFP-32
- STM32L412K8 (2.5 €) - same as STM32L412KB but only 64K Flash
- STM32L412K8T6 64K Flash, 8K RAM, LQFP-32
- STM32L010K8 (1.5 €) - cheaper MCO+, slower, less memory, not tem and slightly higher consumption
- STM32L412K8T6 64K Flash, 8K RAM, LQFP-32
- STM32L412KB (3 €) - prefered: 128KB RAM for a future firmware OTA update
- RFM95W (3.5 € via Aliexpress, 3x this price if bought in Europe)
- RC123a battery and holder (2€ via Aliexpress, 2x this price if bought in Europe)
- PCB (2-5 € when ordering 12 from Aisler ) - see Devices folder for the sources and the uploaded PCBs to Aisler
- 3D-printed boxes - see cages in Devices folder
- some SMT components (1 €) - see schematics in Devices folder
Downlink commands
Downlink commands are used to query and/or modify the device settings without having to reprogram the flash. Each command uses one byte plus optional data depending on the command. The commands are implemtented in the lorawan_process_command at lorawan.cpp
Commands will be queued and transferred to the device after the next uplink transfer. Multiple commands can be queued but be carefull not to exceed to the watdown timeout or the device will get reset.
Commands:
- 0x00 - READ configuration
- Description: Returns the configuration of the device. See device_config_t for more details on the struct
- Additional downlink bytes: none
- Example output: 02 03 3C00 05 3C 6400 5802 01 0A 05 FF
- 0x01 - Reset config to the default
- Additional downlink bytes: none
- 0x02 - Sets the configuration
- Additional downlink bytes: config as returned by the 0x00 command
- Example input: 02 02033C00053C64005802010A05FF
- 0x05 - Read Device UID
- Additional downlink bytes: none
- Output: 12 bytes with STM32 UID
- 0x06 - Read firmware GIT commit
- Additional downlink bytes: none
- Output: ASCII string
- 0x07 - Read firmware BUILD date
- Additional downlink bytes: none
- Output: ASCII string
Firmware
This project requires Platformio and the STM32 Cube Programmer. Both need to be installed and available in the PATH.
Keys for each detected device will be stored under config/devices.ini. Before you run for the first time please create the file and include your app EUI (or modify afterwards). You can create this by registering a new app at the TTN console. The file should have:
[global]
appeui = <your app EUI>If you run without creating the file first then the programmer will create a dummy APPEUI which you will need to modify. You can keep the config folder into its own git repository but please keep it private! On checkout you might use the this script to check it out.
For programming either use the platformio UI or any of the CLI commands proposed for the device.
If you connect a serial interface while booting you should see the following:
Settings unchanged
DEVICE VERSION: 3
DEVICE CONFIG: 0x02033C00053C64005802010A05FF
Device UID: 0x3200230006504D3843353720
BUILD DATE: Jun 21 2020
BUILD TIME: 18:07:48
COMMIT ID: e3d1d3b5d34d39d88d90022d6fe365ebce3887b5
APPEUI: 0x.....
DEVEUI: 0x....
Starting
7579 Sending.. 18248 TX_COMPLETEAdding new devices
- Add a section to
platformio.inifor your device. The key part is to have a dedicated-D SENSOR_<PCB name>_<sensor name>_<MCU name>(such as-D SENSOR_GENERIC_DISTANCE_SMT32) -> this will be needed in the next step.
- If you are just using the generic PCB then you can copy
Basic v1and modify to your needs - If you are creating your own PCB based on the STM32 MCU then you can copy
Generic v1and modify to your needs - If you use a different MCU then you will need to create your own target extending
baseandbase_debug. Please notice that you will in this case have to add support for the new MCU in multiple areas of the code where the MCU is relevant: the code has been tested with STM32 (mainly) and atmega32.
- Add a new cpp file to
src/devices/for your new device. The namming convention is .cpp. If you are using a STM32 CPU you should consider copyinggeneric_basic_stm32.cppwhich does not depend on any external sensors to work and then add your own sensors to it. You need to make this file to only get included and compiled whenSENSOR_<PCB name>_<sensor name>_<MCU name>is defined. - Add to
devices.ha section for your device where you set yourdevice_config_device_t. This struct includes what persistent settings your device needs. These settings can later be modified via a LORAWAN command. - Documment your device in the
devicesfolder. This folder structure is:-
- cages: instructions and files to 3D print cages for devices
- KiCad: Schematics and PCBs created with KiCad
- pictures: pcitures embedded in markdown readme
- README: instructions, pictures and links for devices. It is structured with a chapter for each device sharing the same PCB and a subcharter for each mayor version of the device.
-
ToDos
- Firmware OTA update
Parts
45| Qty | Value | Footprint | References |
|---|---|---|---|
| 8 | PU | Resistor_SMD:R_0805_2012Metric | RA0, RA1, RA8, RA9, RA15, RB3, RB4, RB5 |
| 7 | 100 nF | Capacitor_SMD:C_0805_2012Metric | C3, C4, C5, C6, C7, C9, C12 |
| 5 | MountingHole | MountingHole:MountingHole_2.2mm_M2 | H1, H2, H3, H4, H5 |
| 2 | 1 uF | Capacitor_SMD:C_0805_2012Metric | C8, C10 |
| 2 | 10 pF | Capacitor_SMD:C_0805_2012Metric | C1, C2 |
| 2 | 12K | Resistor_SMD:R_0805_2012Metric | R3, R7 |
| 2 | SolderJumper_2_Bridged | Jumper:SolderJumper-2_P1.3mm_Bridged_Pad1.0x1.5mm | JPC0, JPC3 |
| 2 | SolderJumper_2_Open | Jumper:SolderJumper-2_P1.3mm_Open_Pad1.0x1.5mm | JPO0, JPO3 |
| 1 | 10 uF | Capacitor_SMD:C_0805_2012Metric | C11 |
| 1 | 32KHz | Crystal:Crystal_SMD_3215-2Pin_3.2x1.5mm | Y1 |
| 1 | AO3401A | Package_TO_SOT_SMD:SOT-23 | Q1 |
| 1 | Antenna_Chip | RF_Antenna:Texas_SWRA416_868MHz_915MHz | AE1 |
| 1 | BOOT | Button_Switch_SMD:SW_SPST_TL3342 | BOOT1 |
| 1 | Battery_Cell | Battery:BatteryHolder_HALJIA_2xAA | BT1 |
| 1 | Conn_01x06_Male | Connector_PinSocket_2.54mm:PinSocket_1x06_P2.54mm_Vertical | J1 |
| 1 | Conn_01x09_Male | Connector_PinSocket_2.54mm:PinSocket_1x15_P2.54mm_Vertical | J2 |
| 1 | Ferrite_Bead_Small | Resistor_SMD:R_0805_2012Metric | FB1 |
| 1 | LED | Diode_SMD:D_0805_2012Metric | D1 |
| 1 | LIS3DH | Package_LGA:LGA-16_3x3mm_P0.5mm_LayoutBorder3x5y | U4 |
| 1 | RESET | Button_Switch_SMD:SW_SPST_TL3342 | RESET1 |
| 1 | RFM95W-868S2 | RF_Module:HOPERF_RFM9XW_SMD | U2 |
| 1 | STM32L412KB | Package_QFP:LQFP-32_7x7mm_P0.8mm | U1 |
| 1 | ublox_SAM-M8Q | RF_GPS:ublox_SAM-M8Q_HandSolder_plane | U3 |
More from angelnu/LorawanSensor
3- 2 layers25 × 59.7 mm

- 2 layers26 × 133.4 mm

- 2 layers

Similar boards
- 2 layers72 × 52 mm

GarageNotifier
zbockaj/GarageNotifier-PCB
Helium-network device for reporting open/closed status of (garage) door.
78 parts - 2 layers44.5 × 31.7 mm

- 4 layers39 × 92 mm

Chaac ng
alvarop/chaac
This is a work in progress for a wireless weather station project.
82 parts21MIT - 2 layers87 × 30.8 mm

- 2 layers24 × 24 mm

SX1280 module
dabit20/ExpressLRS-SX1280-module
SX1280 based 2.4GHz module for the ExpressLRS radio system
50 parts - 2 layers85 × 48 mm

- 2 layers57 × 57 mm

Sensor node
henriheimann/prosper3-monitor
Repository of the Prosper III Environment Monitor project ☀️🌱
52 parts - 4 layers102 × 52 mm

Questions
How big is the Tracker v1 PCB?
It measures 56.5 × 66.8 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Tracker v1 use?
45 parts, built around the STM32L412KBT6, LIS3DH, RFM95W-868S2 and AO3401A. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the Tracker v1 KiCad files?
From the angelnu/LorawanSensor repository on GitHub, at the commit this page was made from: the board is devices/tracker/KiCad/tracker_v1.kicad_pcb and its schematic devices/GenericSensor/KiCad/GenericSensor_v2.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Tracker v1 design in my own project?
Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).