# ag telemetry prototype ## Description SDI-12 Open-Collector Interface on Swan GPIO D5 ## Project Details - **Owner:** masonlanphear - **Created:** 1/23/2026 - **Last Updated:** 1/23/2026 - **Visibility:** Public - **Operating Voltage:** 3.3V - **ERC/DRC Status:** Latest ERC/DRC checks have been run via @review; see Reviews panel for any remaining violations or warnings related to SDI-12 interface changes. - **System Architecture Mermaid Source:** flowchart TD Charger["LiIonSolarChargerBlock"] Gauge["BatteryGauge"] Reg3V3["Regulator3V3"] Reg5V["Regulator5V"] BW["BluesWirelessNotecard"] MCU["SwanMCU"] BLE["BLEProvisioningModule"] SDI["SDI12Interface"] Loop4_20["FourToTwentyMilliampInterface"] DI["DigitalInputInterface"] PC["PulseCountingInterface"] TB["TerminalBlock12Position"] Charger --> Gauge Charger --> Reg3V3 Charger --> Reg5V Reg3V3 --> BW Reg3V3 --> MCU Reg3V3 --> BLE Reg3V3 --> SDI Reg3V3 --> Loop4_20 Reg3V3 --> DI Reg3V3 --> PC Reg3V3 --> TB Reg5V --> TB BW --> MCU BLE --> MCU Gauge --> MCU MCU --> SDI MCU --> Loop4_20 MCU --> DI MCU --> PC SDI --> TB Loop4_20 --> TB DI --> TB PC --> TB - **Reliability Target (MTBF):** 50000hours - **License:** http://solderpad.org/licenses/SHL-2.1/ - **Manufacturing Quantity Target:** 100 - **Domain:** Agriculture - **Power Management Strategy:** Ultra-low-power solar agricultural telemetry node with duty-cycled sensing and cellular uplink - **Power Source:** Solar + Li-Ion Battery - **System Architecture Diagram:** Mermaid - **Design Decisions:** BOM Component Selections and Power Budget Solar Input: - Panel: 1.2 W, 6 V nominal (I_max ≈ 0.2 A) - Use single-panel input to MCP73871 solar-friendly Li-ion charger (U4). - Front-end protection: TPS25210 (U8) for reverse-polarity and inrush control, LTC4365 (U9) and TPS25962 (U10) for OV/UV and eFuse-style protection. Battery and Gauge: - Cell: Single-cell Li-ion/LiPo, nominal 3.7 V, capacity TBD (e.g., 2000–5000 mAh depending on deployment). - Charger: MCP73871-2CCI/ML (U4), configured for solar input via VPCC and PROG pins. - Fuel gauge: BQ27441-G1 (U5) on I2C with pull-ups (R1–R3). Regulators: - 3.3 V rail: TPS62840DLCR (U6), high-efficiency buck, selected for ultra-low quiescent current to minimize standby drain. - 5 V rail: TPS61030PWP (U7), boost converter for 5 V sensor/IO needs, duty-cycled to reduce average consumption. Protection and I/O Conditioning: - ESD: 0603ESDA-MLP7 (D1–D4) on SDI-12, 4–20 mA, Digital Input, and Pulse Counting lines. - EMI filters: 10 uH generic inductors (L1–L4) inline with each sensor channel. - Current sense: 500 Ω shunt (R4) for 4–20 mA loop, instrumentation amplifier INA333AIDGKR (U11). Terminal Block: - Phoenix Contact 1875522 (TB1) 12-position, 3.81 mm pitch for SDI-12, 4–20 mA, Digital Input, Pulse Counting, and expansion. Core Compute and Connectivity: - MCU: Blues Swan Feather 3.0 (U1) as main microcontroller. - Cellular: Blues Note NBNA (U2) for cloud uplink. - BLE: Raytac MDBT50Q-P1MV2 (U3) for provisioning. Power Budget (from 1.2 W, 6 V Panel): - Panel electrical limits: P_max = 1.2 W, V_nom = 6 V, I_max ≈ 0.2 A. - Assuming MPPT/charger efficiency ~85% and Li-ion battery voltage ~3.7 V: usable battery charge power ≈ 1.0 W. - Resulting average charge current into battery: I_charge_avg ≈ 1.0 W / 3.7 V ≈ 270 mA (best-case full sun). System-Level Budgeting Notes: - Daytime: allow higher system activity (MCU + Notecard + radio + sensors) while surplus panel power is available. - Night / low-irradiance: system primarily runs from battery; MCU and radios heavily duty-cycled with regulators kept in low-IQ modes. - Design target: average system consumption over 24 h kept well below the panel’s daily energy harvest at deployment site (weather and latitude dependent). - Panel and battery sizing margins to be revisited once detailed per-mode current profiling is available (sleep, sample, transmit, fault conditions). SDI-12 Interface: - SDI-12 bus is implemented as an open-collector bus on net SDI12_BUS. - TX path: Q1 (MMBT2222A NPN) has emitter at GND, collector on SDI12_BUS, and base driven from Swan GPIO D5 (net SWAN_D5) via R5 = 1 kΩ. When SWAN_D5 is driven high, Q1 sinks current and pulls SDI12_BUS low; when SWAN_D5 is low or high-Z, SDI12_BUS is released. - Bus pull-up: R6 = 4.7 kΩ from SDI12_BUS to 5 V defines the idle high level for the SDI-12 line. - RX path: Q2 (MMBT2222A NPN) has emitter at GND, base connected to SDI12_BUS via R7 = 100 kΩ (net SDI12_RX_BUF), and collector tied to Swan GPIO D5 (net SWAN_D5) with R8 = 10 kΩ pull-up to 3.3 V. - Logic behavior: When SDI12_BUS is high (idle), Q2 base is biased, Q2 conducts, and pulls SWAN_D5 low against R8, so the RX stage inverts the SDI-12 line. When SDI12_BUS is pulled low, Q2 turns off and R8 pulls SWAN_D5 high. - Firmware considerations: Swan D5 is shared for TX and RX. Firmware must account for the inverted polarity on SWAN_D5 when receiving SDI-12 (e.g., by inverting bits in software or configuring an inverted UART/bit-bang routine) and must ensure direction control so D5 never actively drives the bus high. - Open-collector operation: Only open-collector (or open-drain) devices are allowed to pull SDI12_BUS low. No device may drive SDI12_BUS high; the bus high level is solely defined by R6 to 5 V (on the field side) and R8 to 3.3 V (on the MCU side via Q2’s transistor action). This preserves SDI-12 multi-drop compatibility and prevents contention with external sensors’ open-collector drivers. - Voltage domains: SDI12_BUS is at 5 V logic high for compatibility with SDI-12 sensors, while Swan D5 operates at 3.3 V. The Q1/Q2 transistor stages and resistors (R5, R6, R7, R8) provide level shifting and protect the MCU from the 5 V bus. - **Power Requirements:** Battery - **Connectivity:** Cellular - **Software:** Arduino ## Key Components ### D1 — [0603ESDA-MLP7](https://www.flux.ai/lcsc/0603esda-mlp7~419s.md) - Part Type: ESD Protection Devices - Datasheet URL: https://storage.googleapis.com/graviton-electric-symbols/document_assets/lcsc/2003272010_BUSSMANN-0603ESDA-MLP7_C328933.pdf - Product Info Url: https://lcsc.com/product-detail/Lack-of-specifications_BUSSMANN_0603ESDA-MLP7_BUSSMANN-0603ESDA-MLP7_C328933.html - Package or Case Code: D0603-BI - Role: Protection - LCSC Part Number: C328933 - Manufacturer Part Number: 0603ESDA-MLP7 - Manufacturer Name: BUSSMANN - Role Details: ESD protection for SDI-12 net - JLCPCB Part Class: Extended Part **Pins:** - 1 [pin 1] - 2 [pin 2] ### D2 — [0603ESDA-MLP7](https://www.flux.ai/lcsc/0603esda-mlp7~419s.md) - Package or Case Code: D0603-BI - Datasheet URL: https://storage.googleapis.com/graviton-electric-symbols/document_assets/lcsc/2003272010_BUSSMANN-0603ESDA-MLP7_C328933.pdf - Product Info Url: https://lcsc.com/product-detail/Lack-of-specifications_BUSSMANN_0603ESDA-MLP7_BUSSMANN-0603ESDA-MLP7_C328933.html - Part Type: ESD Protection Devices - JLCPCB Part Class: Extended Part - Manufacturer Name: BUSSMANN - Role: Protection - Manufacturer Part Number: 0603ESDA-MLP7 - Role Details: ESD protection for FourToTwentyMilliamp net - LCSC Part Number: C328933 **Pins:** - 1 [pin 1] - 2 [pin 2] ### D3 — [0603ESDA-MLP7](https://www.flux.ai/lcsc/0603esda-mlp7~419s.md) - Manufacturer Part Number: 0603ESDA-MLP7 - Role Details: ESD protection for DigitalInput net - LCSC Part Number: C328933 - JLCPCB Part Class: Extended Part - Manufacturer Name: BUSSMANN - Part Type: ESD Protection Devices - Role: Protection - Package or Case Code: D0603-BI - Datasheet URL: https://storage.googleapis.com/graviton-electric-symbols/document_assets/lcsc/2003272010_BUSSMANN-0603ESDA-MLP7_C328933.pdf - Product Info Url: https://lcsc.com/product-detail/Lack-of-specifications_BUSSMANN_0603ESDA-MLP7_BUSSMANN-0603ESDA-MLP7_C328933.html **Pins:** - 1 [pin 1] - 2 [pin 2] ### D4 — [0603ESDA-MLP7](https://www.flux.ai/lcsc/0603esda-mlp7~419s.md) - Part Type: ESD Protection Devices - Package or Case Code: D0603-BI - Product Info Url: https://lcsc.com/product-detail/Lack-of-specifications_BUSSMANN_0603ESDA-MLP7_BUSSMANN-0603ESDA-MLP7_C328933.html - Datasheet URL: https://storage.googleapis.com/graviton-electric-symbols/document_assets/lcsc/2003272010_BUSSMANN-0603ESDA-MLP7_C328933.pdf - LCSC Part Number: C328933 - Manufacturer Part Number: 0603ESDA-MLP7 - Manufacturer Name: BUSSMANN - Role Details: ESD protection for PulseCounting net - JLCPCB Part Class: Extended Part - Role: Protection **Pins:** - 1 [pin 1] - 2 [pin 2] ### Q1 — [MMBT2222A,215](https://www.flux.ai/adrian95/mmbt2222ac215~dx8.md) - Part Type: Transistor - Datasheet URL: https://assets.nexperia.com/documents/data-sheet/MMBT2222A.pdf - Manufacturer Name: Nexperia USA Inc. - Manufacturer Part Number: MMBT2222A,215 - Role: Switching - Package: SOT-23 - License: https://creativecommons.org/licenses/by/4.0/ - Role Details: Open-collector driver for SDI-12 TX stage **Pins:** - B [pin 1] - C [pin 3] - E [pin 2] ### Q2 — [MMBT2222A,215](https://www.flux.ai/adrian95/mmbt2222ac215~dx8.md) - Manufacturer Part Number: MMBT2222A,215 - License: https://creativecommons.org/licenses/by/4.0/ - Datasheet URL: https://assets.nexperia.com/documents/data-sheet/MMBT2222A.pdf - Part Type: Transistor - Role Details: Buffer for SDI-12 RX stage - Role: Switching - Manufacturer Name: Nexperia USA Inc. - Package: SOT-23 **Pins:** - B [pin 1] - C [pin 3] - E [pin 2] ### TB1 — [1875522](https://www.flux.ai/adrian95/1875522~x6a.md) - Manufacturer Part Number: 1875522 - Role: Connector - Part Type: Connector - License: https://creativecommons.org/licenses/by/4.0/ - Package: 3.81mm Vertical Through Hole - Role Details: 12-position terminal block for sensor and I/O connections - Datasheet URL: https://www.phoenixcontact.com/us/products/1875522/pdf - Manufacturer Name: Phoenix Contact **Pins:** - 1_1 [pin 1_1] - 1_2 [pin 1_2] - 10_1 [pin 10_1] - 10_2 [pin 10_2] - 11_1 [pin 11_1] - 11_2 [pin 11_2] - 12_1 [pin 12_1] - 12_2 [pin 12_2] - 2_1 [pin 2_1] - 2_2 [pin 2_2] - 3_1 [pin 3_1] - 3_2 [pin 3_2] - 4_1 [pin 4_1] - 4_2 [pin 4_2] - 5_1 [pin 5_1] - 5_2 [pin 5_2] - 6_1 [pin 6_1] - 6_2 [pin 6_2] - 7_1 [pin 7_1] - 7_2 [pin 7_2] - 8_1 [pin 8_1] - 8_2 [pin 8_2] - 9_1 [pin 9_1] - 9_2 [pin 9_2] ### U10 — [TPS259621DDAR](https://www.flux.ai/adrian95/tps259621ddar~gwa.md) - Datasheet URL: https://www.ti.com/lit/ds/symlink/tps2596.pdf - License: https://creativecommons.org/licenses/by/4.0/ - Part Type: Integrated Circuit - Package: PowerPad-8 - Role: Protection - Role Details: Over-current protection for power input - Manufacturer Name: Texas Instruments - Manufacturer Part Number: TPS259621DDAR **Pins:** - ~FLT [pin 6] - DVDT [pin 2] - EN/UVLO [pin 3] - GND_1 [pin 1] - GND_2 [pin 9] - ILM [pin 7] - IN [pin 4] - OUT [pin 5] - OVLO/OVCSEL [pin 8] ### U11 — [INA333AIDGKR](https://www.flux.ai/adrian95/ina333aidgkr~t0s.md) - Datasheet URL: http://www.ti.com/lit/ds/symlink/ina333.pdf - Role: Amplification - Package or Case Code: SOP65P490X110-8N - Manufacturer Name: Texas Instruments - Role Details: Instrumentation amplifier for 4-20mA signal conditioning - Package: VSSOP-8_L3.0-W3.0-P0.65-LS4.9-BL - Part Type: Operational Amplifier (OP-AMP) - Manufacturer Part Number: INA333AIDGKR - License: https://creativecommons.org/licenses/by/4.0/ **Pins:** - REF [pin 5] - RG_1 [pin 1] - RG_2 [pin 8] - V- [pin 4] - V+ [pin 7] - VIN- [pin 2] - VIN+ [pin 3] - VOUT [pin 6] ### U3 — [MDBT50Q-P1MV2](https://www.flux.ai/vasyl/mdbt50q-p1mv2~3sa.md) - Role: Modulation / Demodulation - Datasheet URL: https://www.raytac.com/download/index.php?index_id=43 - Manufacturer Part Number: MDBT50Q-P1MV2 - Manufacturer Name: Raytac Cororation - Part Type: RF module - Role Details: BLE provisioning interface - License: https://creativecommons.org/licenses/by/4.0/ - Package or Case Code: XCVR_MDBT50Q-1MV2 **Pins:** - P0.20 [pin 44] - D- [pin 34] - D+ [pin 35] - DCCH [pin 31] - GND [pin 15] - GND [pin 2] - GND [pin 33] - GND [pin 55] - GND [pin 1] - P0.00 [pin 17] - P0.01 [pin 18] - P0.02 [pin 11] - P0.03 [pin 9] - P0.04 [pin 20] - P0.05 [pin 21] - P0.06 [pin 22] - P0.07 [pin 23] - P0.08 [pin 24] - P0.09 [pin 52] - P0.10 [pin 54] - P0.11 [pin 27] - P0.12 [pin 29] - P0.13 [pin 37] - P0.14 [pin 36] - P0.15 [pin 39] - P0.16 [pin 38] - P0.17 [pin 41] - P0.18/NRST [pin 40] - P0.19 [pin 42] - P0.21 [pin 43] - P0.22 [pin 46] - P0.23 [pin 45] - P0.24 [pin 48] - P0.25 [pin 49] - P0.26 [pin 19] - P0.27 [pin 16] - P0.28 [pin 13] - P0.29 [pin 10] - P0.30 [pin 14] - P0.31 [pin 12] - P1.00 [pin 47] - P1.01 [pin 61] - P1.02 [pin 50] - P1.03 [pin 60] - P1.04 [pin 56] - P1.05 [pin 59] - P1.06 [pin 57] - P1.07 [pin 58] - P1.08 [pin 25] - P1.09 [pin 26] - P1.10 [pin 3] - P1.11 [pin 4] - P1.12 [pin 5] - P1.13 [pin 6] - P1.14 [pin 7] - P1.15 [pin 8] - SWDCLK [pin 53] - SWDIO [pin 51] - VBUS [pin 32] - VDD [pin 28] - VDDH [pin 30] ### U4 — [MCP73871-2CCI/ML](https://www.flux.ai/adrian95/mcp73871-2cciml~xz9.md) - Role Details: Li-ion battery charger IC with solar panel input and power path management - Datasheet URL: https://ww1.microchip.com/downloads/en/DeviceDoc/MCP73871-Data-Sheet-20002090E.pdf - Manufacturer Name: Microchip Technology - Role: Power Management - License: https://creativecommons.org/licenses/by/4.0/ - Manufacturer Part Number: MCP73871-2CCI/ML - Part Type: Integrated Circuit **Pins:** - ~PG [pin 6] - ~TE [pin 9] - CE [pin 17] - EP [pin 21] - IN_1 [pin 18] - IN_2 [pin 19] - OUT_1 [pin 1] - OUT_2 [pin 20] - PROG1 [pin 13] - PROG2 [pin 4] - PROG3 [pin 12] - SEL [pin 3] - STAT1/~LBO [pin 8] - STAT2 [pin 7] - THERM [pin 5] - VBAT_1 [pin 14] - VBAT_2 [pin 15] - VBAT_SENSE [pin 16] - VPCC [pin 2] - VSS_1 [pin 10] - VSS_2 [pin 11] ### U5 — [BQ27441-G1B](https://www.flux.ai/vasyl/bq27441-g1b~0r.md) - Role: Power Management - Role Details: Li-ion battery fuel gauge IC with I2C interface - Datasheet URL: https://octopart.com/opatz8j6/a1?t=dx5KY0PgFtxHA0c4Urg6X5AMeqRdLFptUxSiA7TXNaAcUi1cbbJma3XZdmvB-meuCMJCIzwnAu56Lcl6q_SoNEdtIVdkR3c75MiESoW74xlcUZw4k0F_wSDcFmhFQRXgHxfGF1_ODzrxjPdWaGa5bizlHP7kt2ymbQOsfcPzZAhe6dgzdilUrrn4Vp6OfYsyy3iQZBTsuo3vFcEQ6WvrmiIZlVWQAgA618koH2moktQV4FSSM3OPkbQD_UFGyrFPbhzmgpfPKjs2HK8Q1hJ3ruo5KA_1lCPPPgO9KxhUQCS4OBFXv9EL3DJdAYUzLQ - Manufacturer Part Number: BQ27441-G1 - Part Type: Integrated Circuit - Manufacturer Name: Texas Instruments **Pins:** - BAT [pin 6] - BIN [pin 10] - GPOUT [pin 12] - NC [pin 4] - NC [pin 9] - NC [pin 11] - PAD [pin 13] - SCL [pin 2] - SDA [pin 1] - SRN [pin 7] - SRP [pin 8] - VDD [pin 5] - VSS [pin 3] ### U6 — [TPS62840DLCR](https://www.flux.ai/lcsc/tps62840dlcr~fpxf.md) - LCSC Part Number: C2071859 - Role Details: High-efficiency buck regulator for 3.3V rail - Part Type: DC-DC Converters - Role: Power Management - Manufacturer Part Number: TPS62840DLCR - JLCPCB Part Class: Extended Part - Manufacturer Name: TI(德州仪器) - Package or Case Code: VSON-8_L2.0-W1.5-P0.50-BL **Pins:** - EN [pin 4] - GND [pin 1] - MODE [pin 3] - STOP [pin 6] - SW [pin 7] - VIN [pin 2] - VOS [pin 8] - VSET [pin 5] ### U7 — [TPS61030PWP](https://www.flux.ai/lcsc/tps61030pwp~ya4.md) - Manufacturer Part Number: TPS61030PWP - Role Details: Boost regulator configurable to 5V output - LCSC Part Number: C1355627 - Role: Power Management - Package or Case Code: HTSSOP-16_L5.0-W4.4-P0.65-LS6.4-BL-EP - JLCPCB Part Class: Extended Part - Manufacturer Name: TI(德州仪器) - Part Type: DC-DC Converters **Pins:** - EN [pin 9] - EP [pin 17] - FB [pin 12] - GND [pin 11] - LBI [pin 7] - LBO [pin 10] - NC [pin 16] - PGND [pin 3] - PGND [pin 4] - PGND [pin 5] - SW [pin 1] - SW [pin 2] - SYNC [pin 8] - VBAT [pin 6] - VOUT [pin 13] - VOUT [pin 14] - VOUT [pin 15] ### U8 — [TPS25210LRPWR](https://www.flux.ai/adrian95/tps25210lrpwr~9ww.md) - Datasheet URL: https://www.ti.com/lit/ds/symlink/tps2521.pdf?ts=1625110620252&ref_url=https%253A%252F%252Fwww.ti.com%252Fstore%252Fti%252Fen%252Fp%252Fproduct%252F%253Fp%253DTPS25210LRPWR - Package: SC70-6 - Part Type: Power Management - License: https://creativecommons.org/licenses/by/4.0/ - Role: Protection - Role Details: Reverse polarity protection for solar/battery input - Package or Case Code: TPS25210LRPWR - Manufacturer Name: Texas Instruments - Manufacturer Part Number: TPS25210LRPWR **Pins:** - DVDT_1 [pin 7] - DVDT_2 [pin 14] - EN/UVLO_1 [pin 1] - EN/UVLO_2 [pin 12] - GND [pin 8] - ILM [pin 9] - IN [pin 5] - ITIMER_1 [pin 10] - ITIMER_2 [pin 11] - OUT [pin 6] - OVCSEL [pin 2] - PG [pin 3] - PGTH_1 [pin 4] - PGTH_2 [pin 13] ### U9 — [LTC4365ITS8#TRMPBF](https://www.flux.ai/adrian95/ltc4365its8trmpbf~yhh.md) - Role Details: Over-voltage and under-voltage protection for battery/supply input - Role: Protection - License: https://creativecommons.org/licenses/by/4.0/ - Part Type: Integrated Circuit - Manufacturer Part Number: LTC4365ITS8#TRMPBF - Manufacturer Name: Analog Devices Inc. - Package: TSOT-23-8 - Datasheet URL: https://www.analog.com/media/en/technical-documentation/data-sheets/LTC4365.pdf **Pins:** - ~FAULT [pin 6] - ~SHDN [pin 5] - GATE [pin 8] - GND [pin 4] - OV [pin 3] - UV [pin 2] - VIN [pin 1] - VOUT [pin 7] *The full schematic, PCB layout, bill of materials, and interactive design are available at [https://www.flux.ai/masonlanphear/ag-telemetry-prototype~ea](https://www.flux.ai/masonlanphear/ag-telemetry-prototype~ea).* --- *Generated from [https://www.flux.ai/masonlanphear/ag-telemetry-prototype~ea](https://www.flux.ai/masonlanphear/ag-telemetry-prototype~ea)*