

LevelSensor v2.0
Water level sensor with NBIoT data transmission
- Size
- 92 × 50.4 mm
- Copper layers
- 4
- Thickness
- 4.69 mm
- Parts
- 125
- Nets
- 128
- Pads
- 450
- Tracks, vias
- 330, 312
- Pours
- 26
- Routed
- Yes
- KiCad
- KiCad 6 (file 20211014)
- Created
- 26 Nov 2023
- Updated
- 1 Dec 2023
Overview
LevelSensor v2.0 is an open-source printed circuit board by lucasnoce, from the lucasnoce/IC-LevelSensor_v2 repository on GitHub. It is a 4-layer board of 92 × 50.4 mm with 125 parts on 128 nets, routed with 330 tracks and 312 vias.
It is built around the STM32L476RGT6, SIM7020E and SHT30-DIS, with the TPS613221ADBV, AMS1117-3.3 and ESDA6V1W5 among its other parts. Its parts include 37 resistors, 35 capacitors, 14 connectors, 9 transistors and 7 ICs. It belongs with the STM32 boards of this library.
Main components
12STM32L476RGT6
LQFP-64(10x10)-40℃~+85℃ 1.71V~3.6V 128KB 12bit 12bit 1MB 32 Bit 51 80MHz ARM Cortex-M4 Built-in FLASH LQFP-64(10x10) Microcontrollers (MCU/MPU/SOC) ROHSSTMicroelectronicsMicrocontrollers (MCU/MPU/SOC)SIM7020E
SMD,17.6x15.7mm-40℃~+85℃ 2.1V~3.6V 3.4uA B3、B5、B8、B28、B1、B20 DFOTA function NB-IoT USB、UART、ADC SMD,17.6x15.7mm 2G/3G/4G/5G Modules ROHSSIMCom Wireless Solutions2G/3G/4G/5G ModulesSHT30-DIS
DFN-8DFN-8 Temperature and Humidity Sensor ROHSSensirionUncategorisedTPS613221ADBV
SOT-23-5-40℃~+125℃@(TJ) 1 1.6MHz 3.3V 6.5uA 900mV~5.5V Boost Boost Built-in Fixed Yes SOT-23-5 DC-DC Converters ROHSTexas InstrumentsDC-DC ConvertersAMS1117-3.3
SOT-223-40℃~+125℃ 0.003%Vout 1 1.1V@(800mA) 15V 1A 3.3V 5mA 72dB@(120Hz) Fixed Over Current Protection、Short Circuit Protection、Thermal shutdown Positive SOT-223 Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSAdvanced Monolithic SystemsVoltage Regulators - Linear, Low Drop Out (LDO) RegulatorsESDA6V1W5
SOT-323-5-40℃~+125℃ 150W 3V 6.1V 6.1V ESD Four channels Unidirectional SOT-323-5 ESD and Surge Protection (TVS/ESD) ROHSSTMicroelectronicsESD And Surge Protection (TVS/ESD)USBLC6-2SC6
SOT-23-60.35pF、0.8pF 100nA 150W@8/20us 15V 2 5V 6A@8/20us 6V ESD SOT-23-6 ESD and Surge Protection (TVS/ESD) ROHSUMWESD And Surge Protection (TVS/ESD)AO3400A
SOT-23-55℃~+150℃ 1 N-channel 1.45V 1.4W 30V 48mΩ@2.5V 5.7A 50pF 630pF 75pF 7nC@10V N-Channel SOT-23 MOSFETs ROHSAlpha & Omega SemiconductorMOSFETsPESDHC2FD4V5B
DFN1006-2L-55℃~+150℃ 1 12V 1uA 300W@8/20us 33A@8/20us 4.5V 70pF Bidirectional ESD IEC 61000-4-2、IEC 61000-4-5、IEC 61000-4-4 DFN1006-2L ESD and Surge Protection (TVS/ESD) ROHSShanghai Prisemi ElecESD And Surge Protection (TVS/ESD)AO3401A
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 SemiconductorMOSFETsMMBT3904
SOT-23-55℃~+150℃ 1 NPN 100 100nA 200mA 200mW 300MHz 300mV 40V 6V NPN SOT-23 Bipolar (BJT) ROHSJiangsu Changjing Electronics Technology (CJ)Bipolar (BJT)DP3415
SOT-23-55℃~+150℃ 1 P-Channel 1.3W 116pF 120mΩ@1.8V 20V 5A 60nC@4.5V 940pF 950mV P-Channel SOT-23 MOSFETs ROHSDoeshareMOSFETs
README
README.mdIC-LevelSensor_v2
This is version 2 of an IoT device designed to measure water levels using an ultrasonic sensing module and transmit the acquired data via NBIoT.
Summary
Similar to version 1, the system employs an AJ-SR04M ultrasonic sensing module now connected to a STM32L476RGT6 microcontroller. This module measures the time interval it takes for an ultrasonic wave to travel from the transducer to the water level and back. By calculating the distance based on the time duration, the speed of sound, and dividing the result by 2, the accurate water level is determined. As the speed of sound varies based on factors such as temperature, humidity, and pressure, a SHT31-DIS sensor is incorporated to measure temperature and humidity (pressure is assumed constant). This additional information allows for precise estimation of the speed of sound just before each distance measurement is taken.
To transmit data to the TagoIO platform, a SIM7020 NBIoT module is utilized, employing the MQTT protocol. This facilitates the configuration of a comprehensive dashboard displaying variations in water and battery levels, local temperature and humidity over time, making it an excellent solution for monitoring purposes.
The device is specifically designed for deployment in remote environments and operates on battery power. Due to this constraint, the system primarily operates in low-power mode and wakes up periodically. In this initial version of the device, the wake-up period is intentionally kept small, and collected data is transmitted during each wake-up event via NBIoT. This design choice aims to facilitate easier debugging and testing of the device's functionality. Because it is designed to be battery powered, the device can monitor battery voltage through the microcontroller's ADC.
Designed PCB
The following image shows the designed PCB layout. It incorporates the SMT32, SHT31, SIM7020E and its adjacent circuitry onto the layout, only leaving the AJ-SR04M as an external module. The PCB features a P-Channel MOSFET at power input for low power reverse polarity protection, a selectable current sensing shunt resistor and ESD protection on the USB connector, SIM Card socket and SIM7020 power input tantalum capacitors. Also features IPEX connector for external antenna with impedance matched trace. The board works on 3.3V and can be powered either by 1.5V batteries such as AAA (through TPS613221ADBV DC-DC boost converter) or by the Micro USB type B (through AMS1117-3.3 regulator).
Software
Still under development, all drivers and functionalities will be implemented from scratch through STM32CubeIDE.
Parts
125| Qty | Value | Footprint | References |
|---|---|---|---|
| 12 | 100nF | Capacitor_SMD:C_0402_1005Metric | C3, C4, C9, C12, C14, C16, C18, C25, C29, C31, C34, C39 |
| 8 | 1k | Resistor_SMD:R_0603_1608Metric | R2, R3, R4, R10, R14, R16, R23, R32 |
| 8 | 4k7 | Resistor_SMD:R_0603_1608Metric | R12, R20, R27, R28, R30, R33, R34, R35 |
| 6 | 10k | Resistor_SMD:R_0603_1608Metric | R5, R6, R7, R9, R18, R19 |
| 6 | 51k | Resistor_SMD:R_0603_1608Metric | R11, R13, R15, R21, R29, R31 |
| 4 | 220uF | Capacitor_Tantalum_SMD:CP_EIA-3528-12_Kemet-T | C27, C28, C32, C37 |
| 4 | AO3400A | Package_TO_SOT_SMD:SOT-23 | Q2, Q4, Q5, Q8 |
| 4 | SupPCB | MountingHole:MountingHole_2.2mm_M2 | H1, H2, H3, H4 |
| 3 | 22R | Resistor_SMD:R_0402_1005Metric | R22, R24, R25 |
| 3 | 22pF | Capacitor_SMD:C_0402_1005Metric | C23, C24, C26 |
| 3 | 22uF | Capacitor_SMD:C_0603_1608Metric | C5, C6, C7 |
| 3 | LOGO | LOGO | G***, G***, G*** |
| 3 | PESDHC2FD4V5B | Footprint_Library:D_TVS_DFN1006-2L | D4, D6, D8 |
| 3 | ToolingHole | Footprint_Library:JLCPCB_ToolingHole | H5, H6, H7 |
| 2 | 100nF | Capacitor_SMD:C_0603_1608Metric | C20, C21 |
| 2 | 10nF | Capacitor_SMD:C_0603_1608Metric | C10, C11 |
| 2 | 12pF | Capacitor_SMD:C_0402_1005Metric | C17, C19 |
| 2 | 1uF | Capacitor_SMD:C_0402_1005Metric | C13, C30 |
| 2 | 4.7uF | Capacitor_SMD:C_0603_1608Metric | C1, C8 |
| 2 | 47k | Resistor_SMD:R_0603_1608Metric | R26, R36 |
| 2 | AO3401A | Package_TO_SOT_SMD:SOT-23 | Q1, Q3 |
| 2 | MMBT3904 | Footprint_Library:TBJ_SOT-23 | Q6, Q7 |
| 1 | 0R | Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm | R37 |
| 1 | 0R15/2W | Resistor_SMD:R_2512_6332Metric | R1 |
| 1 | 100k | Resistor_SMD:R_0603_1608Metric | R17 |
| 1 | 100uF | Capacitor_SMD:C_1206_3216Metric | C38 |
| 1 | 10nF | Capacitor_SMD:C_0402_1005Metric | C15 |
| 1 | 10uF | Capacitor_SMD:C_0603_1608Metric | C2 |
| 1 | 16MHz | Crystal:Crystal_SMD_Abracon_ABM8G-4Pin_3.2x2.5mm | Y1 |
| 1 | 2.2uH | Footprint_Library:L_SMD-FNR4030S2R2MT | L1 |
| 1 | 39nH | Inductor_SMD:L_0603_1608Metric | L2 |
| 1 | 47 | Resistor_SMD:R_0402_1005Metric | R8 |
| 1 | AJ-SR04M | IC_LabTel:AJ-SR04M | J10 |
| 1 | AMS1117-3.3 | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U2 |
| 1 | BATT | Footprint_Library:ScrewTerminal_1x2P_P5mm | J2 |
| 1 | DP3415 | Footprint_Library:PMOS_DP3415_SOT-23 | Q9 |
| 1 | ESDA6V1W5 | Footprint_Library:SOT323-5L | U6 |
| 1 | GND | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J1 |
| 1 | I2C | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J11 |
| 1 | IPEX | Footprint_Library:Conn_RF_Receptacle_SMT-TE_2337019-1 | J14 |
| 1 | JP_BOOST/USB | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J7 |
| 1 | JP_SHUNT | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical_SMD_Pin1Left | J5 |
| 1 | LED_INFO | LED_SMD:LED_0603_1608Metric | D2 |
| 1 | LED_NET | LED_SMD:LED_0603_1608Metric | D3 |
| 1 | LED_STATUS | LED_SMD:LED_0603_1608Metric | D7 |
| 1 | NB_MÓDULO | Connector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_Vertical | J15 |
| 1 | NB_USB | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J13 |
| 1 | ON/OFF | Footprint_Library:SW_SPDT_SS-12D10-G090 | SW1 |
| 1 | PWR_LED | LED_SMD:LED_0603_1608Metric | D1 |
| 1 | R_SHUNT | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical_SMD_Pin1Left | J8 |
| 1 | SHT30-DIS | Sensor_Humidity:Sensirion_DFN-8-1EP_2.5x2.5mm_P0.5mm_EP1.1x1.7mm | U4 |
| 1 | SIM7020E | RF_GSM:SIMCom_SIM800C | U7 |
| 1 | SIM_Card | Footprint_Library:NanoSIMCard-Socket_ZX-NSIM-281.4J | J12 |
| 1 | STM32L476RGT6 | Package_QFP:LQFP-64_10x10mm_P0.5mm | U3 |
| 1 | SWD/ExtTrig | Connector_PinHeader_2.54mm:PinHeader_1x07_P2.54mm_Vertical | J9 |
| 1 | SW_STM_BOOT | Footprint_Library:SW_TS-1187A-B-A-B | SW3 |
| 1 | SW_STM_NRST | Footprint_Library:SW_TS-1187A-B-A-B | SW2 |
| 1 | TPS613221ADBV | Package_TO_SOT_SMD:SOT-23-5 | U1 |
| 1 | USBLC6-2SC6 | Package_TO_SOT_SMD:SOT-23-6 | U5 |
| 1 | USB_B_Micro | Footprint_Library:USB_Micro_B-Dealon_USB-MR-D-015 | J3 |
| 1 | VCC | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J4 |
Questions
How big is the LevelSensor v2.0 PCB?
It measures 92 × 50.4 mm and has 4 copper layers, 4.69 mm thick.
What parts does the LevelSensor v2.0 use?
125 parts, built around the STM32L476RGT6, SIM7020E, SHT30-DIS and TPS613221ADBV. 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 LevelSensor v2.0 KiCad files?
From the lucasnoce/IC-LevelSensor_v2 repository on GitHub, at the commit this page was made from: the board is PCB_Design/LevelSensor_v2.0/LevelSensor_v2.0.kicad_pcb and its schematic PCB_Design/LevelSensor_v2.0/Alimentacao.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the LevelSensor v2.0 design in my own project?
Its repository states no licence, so its author keeps all rights: ask lucasnoce before reusing the design.
Similar boards
- 2 layers50 × 50 mm

- 2 layers100 × 85 mm

ESP32 MediaCarrier routed
xmyoot/esp32-media-carrier
ESP32 multimedia carrier board with 7–24 V DC buck regulator, 3.2 W Class-D I2S audio amp, WS2812 LED ring driver, and SPI TFT display header
97 partsMIT - 4 layers56 × 52 mm

EdgeLink S3 Cellular
CDonohoe-Designs/EdgeLink_S3_Cellular
EdgeLink S3 Cellular is a four-layer embedded hardware platform combining an ESP32-S3 controller, SIM7080G cellular/GNSS modem, USB-C, battery power management and environmental/motion sensing.
114 parts - 4 layers38.5 × 47 mm

- 4 layers97.7 × 58.5 mm

Sumobot pcb
keer-nova74/STM32-Sumo-Robot-Controller-PCB
A robotics controller PCB project using an STM32 microcontroller, dual motor drivers, sensor interfaces, and power management, designed using KiCad.
111 parts - 2 layers148.6 × 192.2 mm

Badge
NuttyShell/NuttyBadge
NuttyBadge: A NuttyShell crafted multi-tool. Opensourced Hardawre and Software
169 parts31GPL-3.0 - 2 layers43.6 × 43.6 mm

Esp32 dron
Sagaz0501/esp32-drone
PCB ESP32 quadcopter: KiCad hardware + Madgwick IMU firmware + WiFi web UI
75 parts1MIT - 2 layers50 × 53 mm

Picoquorum key
jmcpheron/pico-quorum
Several people, several keys, one Safe. Hardware approvals for Safe multisig wallets.
71 partsMIT