Skip to the content
2 layers87 × 96.4 mmSTM32L0LoraTx vl53l, the printed circuit board in 3D

STM32L0LoraTx vl53l

joba-1/STM32L0LoraTx1

Send ADC voltage and other payload via LoRa RFM95W

Size
87 × 96.4 mm
Copper layers
2
Thickness
1.6 mm
Parts
121
Nets
23
Pads
507
Tracks, vias
1,683, 171
Pours
7
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
31 May 2022
Updated
31 May 2022

Overview

STM32L0LoraTx vl53l is an open-source printed circuit board by joba-1, from the joba-1/STM32L0LoraTx repository on GitHub. It is a 2-layer board of 87 × 96.4 mm with 121 parts on 23 nets, routed with 1,683 tracks and 171 vias.

It is built around the RFM95W-868S2. Its parts include 34 resistors, 30 connectors, 19 capacitors, 16 diodes and 11 ICs. It belongs with the radio and wireless boards and the STM32 boards of this library.

Main components

1

README

README.md

STM32L0LoraTx

Firmware and PCB for a device that sends data with a STM32L0/RFM95, battery or solar powered, to a LoraGW ESP8266/RFM95 node

Build

  • Download and install STM32CubeIDE (as of now version 1.5.1)
  • Import this repo
  • Open .ioc file and select "Project/Generate Code" (should download needed "firmware" files for the chip from ST)
  • Build Release or Debug

Wiring

connect Gnd of all components

STM32L011

Not checked without, but generally recommended to use a small ceramic (~10nF) and big electrolyt condensator (~10µF) between + and - near STM pins

  • Look at the ioc file with CubeMX pinout view.
  • Vdd and Vdda to 1.8-3.3V
  • Vss to Gnd
  • Boot0 pulled to Gnd (~10k) to safely boot from flash
  • STLink for flashing and debug: SWD, SWC, Gnd, NRst (also can provide Vdd via JP1 and STLink-Rx to L0-Tx for serial out)

BME280

  • SDA=MOSI, SDC=MISO, others should be obvious

RFM95W

  • Ant=~8cm wire (vary length and position to get best average RSSI as reported by LoraRx).
  • NSS=CS, others should be obvious

Serial

Rx of a usb to serial converter sends at 115200. I use this command (serial port name ttyUSB_ser_red is defined in my /etc/udev/rules.d) pio device monitor -p /dev/ttyUSB_ser_red -b 115200

LED

can be used without resistor. I use 1kOhm to save battery

References

Good resource for STM32 is Stefan Frings He has links to reference, datasheet, errata and more. E.g.:

Power Info Bits

  • Examples for LL are here: STM32Cube/Repository/STM32Cube_FW_L0_V1.11.2/Projects/NUCLEO-L073RZ/Examples_LL/RTC/RTC_ExitStandbyWithWakeUpTimer

  • Periodic wakeup timer is in Reference 22.4.6 (Periodic auto-wakeup)

  • 1s to 18h periodic wakeup with ck_spre = 1s (see 22.4.3) and WUCKSEL [2:1] = 10

  • Enable by WUTE bit in RTC_CR register

  • Once setup it runs in normal and low power.

  • Sets WUTF flag in RTC_ISR if elapsed and reloads RTC_WUTR (timer counter). User resets WUTF

  • Set WUTIE bit in RTC_CR to generate interrupt to wake up from low power modes

  • System reset and Sleep, Stop, Standby have no influence on the WUT (wakeup timer)

  • Save Lora frame counter in backup register: Reference 22.7.20 RTC backup registers (RTC_BKPxR)

  • I couldnt make it work with LL lib, had to use big fat HAL for RCC and RTC. What is missing?

    text
      LL_RTC_DisableWriteProtection(RTC);
      LL_RTC_WAKEUP_Disable(RTC);
      while( !LL_RTC_IsActiveFlag_WUTW(RTC) );
      LL_RTC_WAKEUP_SetClock(RTC, LL_RTC_WAKEUPCLOCK_CKSPRE);
      LL_RTC_WAKEUP_SetAutoReload(RTC, 3); // wake up every 3+1 s
      LL_RTC_EnableIT_WUT(RTC);
      LL_RTC_WAKEUP_Enable(RTC);
      LL_RTC_EnableWriteProtection(RTC);
      while( LL_RTC_IsActiveFlag_WUTW(RTC) );
      LL_RTC_ClearFlag_WUT(RTC);
      NVIC_ClearPendingIRQ(RTC_IRQn);

Status

Working and sending LoRa packets to my LoraGW ESP8266 gateway (battery voltages and bme280 weather data)

Two devices operating with 2 AA 1.5V batteries (so far using 0.2-0.4 V per year, so >5 years between battery swaps is more than realistic). They send battery voltage data from within a car trunc - not ideal for RF :) - to a nearby house with no signal problems.

One device runs "forever" with a 3.7 Lipo ~1.6Ah, a ~3x8 cm² 5V solar cell and a small solar charger board (reducing vcc out a bit with a diode). No capacity problems during winter.

Todo

  • Provide more sensor data (probably more ADC stuff and more generic)
  • Move GPIO pins (CS, LED) to non-ADC pins to have them available for voltage measurements

Parts

121
QtyValueFootprintReferences
1410kResistors_SMD:R_0805_HandSolderingR1, R1, R1, R1, R1, R1, R1, R2, R2, R2, R2, R2, R2, R2
121MResistors_SMD:R_0805_HandSolderingR4, R4, R4, R4, R5, R5, R5, R5, R7, R7, R7, R7
11100nCapacitors_SMD:C_0805_HandSolderingC1, C1, C1, C1, C1, C1, C1, C2, C2, C2, C2
810µCapacitors_SMD:C_0805_HandSolderingC3, C3, C3, C3, C4, C4, C4, C4
8Barrel_JackConnectors_Terminal_Blocks:TerminalBlock_Altech_AK300-2_P5.00mmJ3, J3, J3, J3, J5, J5, J5, J5
8Conn_01x06_FemaleConnectors_JST:JST_EH_B06B-EH-A_06x2.50mm_StraightJ2, J2, J2, J2, J4, J4, J4, J4
7STM32L011F4PxHousings_SSOP:TSSOP-20_4.4x6.5mm_Pitch0.65mmU1, U1, U1, U1, U1, U1, U1
6Conn_01x06_FemaleConnectors_JST:JST_XH_B06B-XH-A_06x2.50mm_StraightJ1, J1, J1, J2, J2, J2
6LED_GLEDs:LED_0805_HandSolderingD2, D2, D2, D3, D3, D3
6LED_RLEDs:LED_0805_HandSolderingD1, D1, D1, D4, D4, D4
410MResistors_SMD:R_0805_HandSolderingR6, R6, R6, R6
41kResistors_SMD:R_0805_HandSolderingR3, R3, R3, R3
4Antenna_ShieldConnectors_Molex:Molex_Microcoaxial_RFAE1, AE1, AE1, AE1
4Conn_01x02_FemaleConnectors_JST:JST_EH_B02B-EH-A_02x2.50mm_StraightJ6, J6, J6, J6
4Conn_01x04_FemaleConnectors_JST:JST_EH_B04B-EH-A_04x2.50mm_StraightJ1, J1, J1, J1
4LEDLEDs:LED_0805_HandSolderingD1, D1, D1, D1
4RFM95W-868S2RF_Modules:Hopref_RFM9XW_SMDU2, U2, U2, U2
4SW_PushButtons_Switches_THT:SW_PUSH_6mm_h5mmRESET, RESET, RESET, RESET
3Battery_CellBattery_Holders:Keystone_3034_1x20mm-CoinCellBT1, BT1, BT1

More from joba-1/STM32L0LoraTx

2
  • 2 layers58.8 × 96.4 mmSTM32L0LoraTx 4, the printed circuit board in 3D

    STM32L0LoraTx 4

    joba-1/STM32L0LoraTx

    Send ADC voltage and other payload via LoRa RFM95W

    88 parts1
  • 2 layers58.8 × 23 mmSTM32L0LoraTx, the printed circuit board in 3D

    STM32L0LoraTx

    joba-1/STM32L0LoraTx

    Send ADC voltage and other payload via LoRa RFM95W

    22 parts1

Similar boards

  • 4 layers66.3 × 40.2 mmCm4 drone, the printed circuit board in 3D

    Cm4 drone

    dridri/bcflight

    Raspberry Pi based drone flight controller and remote control

    56 parts175GPL-3.0
  • 4 layers83 × 109 mmD4 small pcb panel, the printed circuit board in 3D

    D4 small pcb panel

    unsurv/unsurv-offline

    Offline portable GNSS device based on the ESP32

    522 parts72
  • 2 layers57 × 35.5 mmWARS Birdhouse-2, the printed circuit board in 3D

    WARS Birdhouse-2

    brucemack/WARS-Birdhouse

    LoRa Mesh Network Node

    22 parts66GPL-3.0
  • 2 layers45 × 53 mmLoRa Node, the printed circuit board in 3D

    LoRa Node

    cernohorsky/LoRa-Node

    Simple LoRa Node based on Arduino Pro mini with RFM95W module and PCB antenna.

    35 parts66
  • 2 layers72 × 27 mmLoRaProMini, the printed circuit board in 3D

    LoRaProMini

    foorschtbar/LoRaProMini

    A low power LoRaWAN Node

    37 parts51MIT
  • 2 layers61.5 × 18.7 mmLoRA USBStick, the printed circuit board in 3D

    LoRA USBStick

    ElectronicCats/CatWAN_USB_Stick

    An Open Source USB Stick compatible with LoRa and LoRaWAN with Cortex M0+. To connect, review and analyze packages of LoRa®

    36 parts50GPL-3.0
  • 2 layers79.2 × 68.8 mmEnvironment slave, the printed circuit board in 3D

    Environment slave

    pcbcupid/Lora-Wireless-Sensor-Network

    A wireless sensor network based on Lora and esp32C3. This repo will help you build a complete product from scratch to finish!

    72 parts30MIT
  • 2 layers50 × 25 mmLoRa Environmental Sensors, the printed circuit board in 3D

    LoRa Environmental Sensors

    spielhuus/LoRa-Environmental-Sensors

    ATtiny85 based LoRa atmospheric sensor board with BME280

    5 parts28

Questions

How big is the STM32L0LoraTx vl53l PCB?

It measures 87 × 96.4 mm and has 2 copper layers, 1.6 mm thick.

What parts does the STM32L0LoraTx vl53l use?

121 parts, built around the RFM95W-868S2. 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 STM32L0LoraTx vl53l KiCad files?

From the joba-1/STM32L0LoraTx repository on GitHub, at the commit this page was made from: the board is kicad/STM32L0LoraTx/STM32L0LoraTx-vl53l.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the STM32L0LoraTx vl53l design in my own project?

Its repository states no licence, so its author keeps all rights: ask joba-1 before reusing the design.