Skip to the content
PCBKitNew board
2 layers69 × 68.7 mmSGW-01 V1.0, the printed circuit board in 3D

SGW-01 V1.0

ymhtwe/SGW01

ESP-IDF based IoT gateway for solar pump monitoring and control using SIM7600 4G modem and Modbus RTU.

Size
69 × 68.7 mm
Copper layers
2
Thickness
1.6 mm
Parts
133
Nets
165
Pads
526
Tracks, vias
0, 0
Routed
Not yet
KiCad
KiCad 10.0 (file 20260206)
Created
25 Sep 2023
Updated
1 May 2026

Overview

SGW-01 V1.0 is an open-source printed circuit board by ymhtwe, from the ymhtwe/SGW01 repository on GitHub. It is a 2-layer board of 69 × 68.7 mm with 133 parts on 165 nets.

It is built around the MAX3485ED, SIM7600G and MMBT3904TT1G, with the SS34F, AO3401A and ESP32-C6-MINI-1 among its other parts. Its parts include 51 resistors, 33 capacitors, 21 ICs, 11 diodes and 5 connectors. It belongs with the ESP32 and RISC-V boards of this library.

Main components

12

README

README.md

SGW01 SIM7600 Solar Pump Gateway

ESP-IDF based IoT gateway for solar pump monitoring and control using SIM7600 4G modem and Modbus RTU.

Features

  • ✅ 4G/LTE Connectivity via SIM7600 modem
  • ✅ Modbus RTU Master for solar pump data collection
  • ✅ ThingsBoard Integration via MQTT
  • ✅ Remote Control via MQTT attributes
  • ✅ Real-time Telemetry publishing
  • ✅ Configurable via menuconfig

Hardware Requirements

  • ESP32-S3 development board
  • SIM7600 4G/LTE modem module
  • RS485 transceiver (for Modbus)
  • Solar pump controller with Modbus RTU interface
  • SIM card with data plan

Quick Start

1. Prerequisites

Install ESP-IDF v5.0 or later:

bash
# Follow ESP-IDF installation guide
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/

2. Configure Project

bash
cd d:\YMH\Myannovation\Projects\SGW01\FW\sgw01_v1.0.0
idf.py menuconfig

Important Configuration:

  • ThingsBoard Configuration → Device Access Token (MUST SET!)
  • SIM7600 Configuration → APN settings for your carrier
  • Modbus Configuration → Slave address and baud rate

3. Build and Flash

bash
idf.py build
idf.py -p COM_PORT flash monitor

Pin Configuration

SIM7600 Connections

ESP32-S3SIM7600Description
GPIO 43RXUART TX
GPIO 44TXUART RX
GPIO 39PWRKEYPower control
GPIO 38-Flight mode
GPIO 36STATUSStatus input
GPIO 37NETLIGHTNetwork status
GNDGNDGround
5VVCCPower supply

Modbus RS485 Connections

ESP32-S3RS485Description
GPIO 15TXTransmit data
GPIO 16RXReceive data
GPIO 4DE/REDirection control

Status LED

ESP32-S3Component
GPIO 11LED (active low)

Configuration Options

SIM7600 Settings

text
CONFIG_GSM_APN="internet"           # Your carrier's APN
CONFIG_GSM_USER=""                  # APN username (if required)
CONFIG_GSM_PASS=""                  # APN password (if required)

ThingsBoard Settings

text
CONFIG_TB_BROKER="demo.thingsboard.io"
CONFIG_TB_PORT=1883
CONFIG_TB_TOKEN="YOUR_DEVICE_TOKEN"     # Get from ThingsBoard
CONFIG_TB_CLIENT_ID="ESP32_SGW01"
CONFIG_TB_PUB_TOPIC="v1/devices/me/telemetry"
CONFIG_TB_SUB_TOPIC="v1/devices/me/attributes"

Modbus Settings

text
CONFIG_MODBUS_SLAVE_ADDR=1          # Solar pump Modbus address
CONFIG_MODBUS_BAUD_RATE=9600        # Modbus baud rate
CONFIG_MODBUS_READ_INTERVAL_MS=100  # Read interval
CONFIG_MQTT_PUBLISH_INTERVAL_MS=200 # Publish interval

Solar Pump Parameters

The gateway monitors 11 parameters from the solar pump:

  1. Actual_voltage - Current voltage reading
  2. Undervoltage_limit - Low voltage threshold
  3. Overvoltage_limit - High voltage threshold
  4. Actual_current - Current draw
  5. Overcurrent_limit - Current limit
  6. Input_power - Power consumption
  7. Motor_speed - Motor RPM
  8. Actual_temperature - Temperature reading
  9. Overheating_limit - Temperature limit
  10. Working_speed - Operating speed
  11. Control/alarm - Control and alarm flags

MQTT Topics

Publishing (Telemetry)

text
Topic: v1/devices/me/telemetry
Format: {"Parameter_name": value}
Example: {"Actual_voltage": 220}

Subscribing (Attributes)

text
Topic: v1/devices/me/attributes
Format: {"MControl": value}
Example: {"MControl": 1}

ThingsBoard Setup

  1. Create a new device in ThingsBoard
  2. Copy the device access token
  3. Configure the token in menuconfig
  4. Create dashboard widgets for telemetry visualization
  5. Create shared attributes for remote control

Troubleshooting

SIM7600 Not Responding

  • Check UART connections (TX/RX swapped?)
  • Verify power supply (5V, sufficient current)
  • Check SIM card insertion
  • Monitor STATUS pin (should go HIGH after boot)

Network Registration Failed

  • Verify SIM card has data plan
  • Check APN settings for your carrier
  • Ensure good signal strength (check RSSI)
  • Try manual network selection

Modbus Communication Error

  • Verify RS485 wiring (A, B terminals)
  • Check baud rate matches pump controller
  • Verify slave address is correct
  • Check RW pin logic (HIGH=TX, LOW=RX)
  • Use Modbus simulator for testing

MQTT Connection Failed

  • Verify ThingsBoard token is correct
  • Check broker address and port
  • Ensure network connection is active
  • Monitor serial output for error codes

Serial Monitor Output

Expected startup sequence:

text
I (1000) SGW01_SIM7600: ********************************* SYSTEM INFO *********************************
I (1050) SGW01_SIM7600: >> Free memory: XXXXX bytes
I (1100) SGW01_SIM7600: >> IDF version: vX.X
I (1150) sim7600_task: Starting SIM7600 task
I (1200) modbus_task: Starting Modbus task
I (1250) mqtt_task: Starting MQTT task
I (2000) sim7600_task: Powering on SIM7600...
I (22000) sim7600_task: Modem is ready!
I (25000) sim7600_task: Network registered (status: 1)
I (26000) sim7600_task: Signal quality: RSSI = 25
I (27000) sim7600_task: MQTT connected successfully
I (28000) mqtt_task: Subscribed successfully
I (30000) modbus_task: Read successful: V=220, I=13, P=2200, T=22
I (30200) mqtt_task: Published successfully (state 0)

Project Structure

text
sgw01_v1.0.0/
├── components/          # Custom ESP-IDF components
│   ├── sim7600_driver/  # SIM7600 modem driver
│   ├── modbus_rtu/      # Modbus RTU master
│   └── solar_pump/      # Solar pump data management
├── main/                # Main application
│   ├── app_main.c       # Entry point
│   ├── sim7600_task.c   # Modem management
│   ├── modbus_task.c    # Modbus communication
│   └── mqtt_task.c      # MQTT publish/subscribe
├── CMakeLists.txt       # Project build config
└── sdkconfig            # ESP-IDF configuration

Development

Adding New Parameters

  1. Update solar_pump_data_t structure in solar_pump.h
  2. Add parameter name to param_names[] array
  3. Update solar_pump_read_all() to read new register
  4. Add new case in MQTT publish state machine

Modifying MQTT Topics

  1. Update Kconfig.projbuild with new topic defaults
  2. Rebuild and reconfigure via menuconfig
  3. Update ThingsBoard dashboard accordingly

Changing Publish Strategy

Currently publishes one parameter at a time. To publish all at once:

  1. Use solar_pump_create_json_all() instead of solar_pump_create_json_single()
  2. Remove state machine from mqtt_task.c
  3. Adjust publish interval accordingly

License

Copyright © 2026 Myannovation. All rights reserved.

Author

Ye Min Htwe
Myannovation
January 2026

Support

For technical support or questions:

  • Review IMPLEMENTATION_SUMMARY.md for detailed documentation
  • Check ESP-IDF documentation: https://docs.espressif.com/
  • Examine component source code for implementation details

Version: 1.0.0
Last Updated: January 17, 2026

Parts

133
QtyValueFootprintReferences
11100 nFSGW-01-LIB:C0603C4, C7, C10, C13, C14, C18, C19, C28, C30, C31, C32
10NPN BJTSGW-01-LIB:SC-75-3_L1.6-W0.8-P1.00-LS1.6-BRU7, U8, U9, U10, U11, U16, U17, U18, U20, U21
70RSGW-01-LIB:R0402R4, R27, R28, R29, R30, R31, R32
6100kSGW-01-LIB:R0402R18, R20, R21, R40, R41, R43
610kSGW-01-LIB:R0402R9, R14, R36, R37, R38, R51
61kSGW-01-LIB:R0402R17, R19, R22, R39, R42, R44
6~SGW-01-LIB:TestPoint_Pad_1.5x1.5mmTP1, TP2, TP3, TP4, TP5, TP6
410 uFSGW-01-LIB:C0603C3, C9, C12, C29
4390RSGW-01-LIB:R0402R15, R16, R45, R50
44.7kSGW-01-LIB:R0402R23, R25, R47, R49
447kSGW-01-LIB:R0402R24, R26, R46, R48
320kSGW-01-LIB:R0402R12, R34, R35
322 pFSGW-01-LIB:C0603C20, C21, C22
3~SGW-01-LIB:D0402D5, D6, D7
3~SGW-01-LIB:IPEX-SMD_BWIPX-1-001EJ2, J3, J4
2100 nFSGW-01-LIB:C0805C26, C27
2100 uFSGW-01-LIB:CASE-B_3528C23, C24
22.7 uHSGW-01-LIB:IND-SMD_L6.0-W6.0_1255AY-2R2NL1, L2
2237kSGW-01-LIB:R0402R6, R10
233 nFSGW-01-LIB:C0603C2, C11
25.1kSGW-01-LIB:R0402R1, R2
2REDSGW-01-LIB:LED-SMD_L1.7-W1.1-R-RD_ORANGELED1, LED2
2TPS62933FDRLRSGW-01-LIB:SOTFL50P160X60-8NU5, U6
2~SGW-01-LIB:DFN-SMD_L1.0-W0.6-BID1, D2
11 uFSGW-01-LIB:C0603C17
110 kSGW-01-LIB:R0402R3
1100 pFSGW-01-LIB:C0603C15
1120RSGW-01-LIB:R0402R33
118 pFSGW-01-LIB:C0603C5
120 kSGW-01-LIB:R0402R5
1220 uFSGW-01-LIB:CASE-B_3528C33
13 ASGW-01-LIB:SMAF_L3.5-W2.6-LS4.7-RD-1U4
130.9kSGW-01-LIB:R0402R13
130V 4ASGW-01-LIB:SOT-23_L2.9-W1.3-P1.90-LS2.4-BRU3
133 pFSGW-01-LIB:C0603C16
137.4kSGW-01-LIB:R0402R8
147 nHSGW-01-LIB:L0402L3
147 uFSGW-01-LIB:C0805C25
147 uFSGW-01-LIB:C0603C6
147uFSGW-01-LIB:C0603C8
178.7SGW-01-LIB:R0402R11
178.7kSGW-01-LIB:R0402R7
19.2 VSGW-01-LIB:SMF_L2.8-W1.8-LS3.7-RDD3
1BLUESGW-01-LIB:LED-SMD_L1.7-W1.1-R-RD_ORANGELED4
1BOOTSGW-01-LIB:SW-SMD_L3.9-W3.0-P4.45SW2
1CON-SMA-EDGE-SSGW-01-LIB:RFSOLUTIONS_CON-SMA-EDGE-SJ5
1ESP32-C6-MINI-1RF_Module:ESP32-C6-MINI-1U1
1GREENSGW-01-LIB:LED-SMD_L1.7-W1.1-R-RD_ORANGELED3
1MAX3485EDSGW-01-LIB:SOP-8_L4.9-W3.9-P1.27-LS6.0-BLU14
1ResetSGW-01-LIB:SW-SMD_L3.9-W3.0-P4.45SW1
1SIM7600GSGW-01-LIB:IC_SIM7600GU2
1USBC_16PINSGW-01-LIB:USBC_C2765186J1
1~SGW-01-LIB:C0603C1
1~SGW-01-LIB:RJ45-TH_R-RJ45R10P-B000U15
1~SGW-01-LIB:SOT-23_L2.9-W1.3-P1.90-LS2.4-BRD4
1~SGW-01-LIB:BUZ-TH_BD9.0-P4.00-D0.6-FDU19
1~SGW-01-LIB:KEY-TH_K2-1102AQ-JXXW-XXSW3
1~SGW-01-LIB:SIM-SMD_SMN-305U13
1~SGW-01-LIB:VSSOP-8_L2.3-W2.0-P0.50-LS3.1-BLU12

Questions

How big is the SGW-01 V1.0 PCB?

It measures 69 × 68.7 mm and has 2 copper layers, 1.6 mm thick.

What parts does the SGW-01 V1.0 use?

133 parts, built around the MAX3485ED, SIM7600G, MMBT3904TT1G and SS34F. 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 SGW-01 V1.0 KiCad files?

From the ymhtwe/SGW01 repository on GitHub, at the commit this page was made from: the board is HW/SGW-01_V1.0/SGW-01_V1.0/SGW-01_V1.0-backups/SGW-01_V1.0-2026-04-28_213030/SGW-01_V1.0.kicad_pcb and its schematic HW/SGW-01_V1.0/SGW-01_V1.0/SGW-01_V1.0-backups/SGW-01_V1.0-2026-04-28_213030/SGW-01_V1.0.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the SGW-01 V1.0 design in my own project?

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

Similar boards

  • 2 layers67.6 × 128.2 mmMacPicoModem, the printed circuit board in 3D

    MacPicoModem

    gutbomb/MacPicoModem

    This project is an adaptation of the mecparts's Pico WiFi Modem.

    24 parts12GPL-3.0
  • 2 layers49 × 62 mmFone, the printed circuit board in 3D

    Fone

    bestestdev/fone

    It's a cell phone. Going with a simple old school Nokia-style for this project.

    18 parts2
  • 4 layers70 × 70 mmCLOCK CORE, the printed circuit board in 3D

    CLOCK CORE

    Han-ZenX/CLOCK

    High-precision frequency meter clock generation module

    145 parts1
  • 2 layers33.6 × 29.3 mmKeyChain, the printed circuit board in 3D

    KeyChain

    Brammert42/EPKeychain

    A keychain equipped with a RP2040 and a E-ink

    71 parts
  • 4 layers100 × 80 mmOpen Beam Interface, the printed circuit board in 3D

    Open Beam Interface

    nanographs/Open-Beam-Interface

    Just what you need to control the beam and get an image.

    334 parts371
  • 4 layers88.3 × 112.3 mmSoil metrics, the printed circuit board in 3D

    Soil metrics

    Aryan-git-byte/Soil-metrics

    Portable AI-powered soil monitoring device with LTE connectivity, GPS, touchscreen interface, and real-time soil health analytics.

    74 parts1MIT
  • 4 layers44 × 55.1 mmAg ce A7671G card, the printed circuit board in 3D

    Ag ce A7671G card

    Open-Air-Foundation/pcb-module-ce-card

    The CE card adds 4G cellular connectivity (LTE Cat 1) to AirGradient monitors. It can be used in the AirGradient Open Air, the AirGradient ONE, and the Open Air Max.

    106 parts1CC-BY-SA-4.0
  • 4 layers41.5 × 41.5 mmZenFly F71, the printed circuit board in 3D

    ZenFly F71

    LongDo1902/STM32_Drone

    Developing quadcopter from scratch including stm32 programing and self-built flight controller PCB.

    180 parts