
SGW-01 V1.0
ymhtwe/SGW01
ESP-IDF based IoT gateway for solar pump monitoring and control using SIM7600 4G modem and Modbus RTU.

It's a cell phone. Going with a simple old school Nokia-style for this project.
Fone is an open-source printed circuit board by bestestdev, from the bestestdev/fone repository on GitHub. It is a 2-layer board of 49 × 62 mm with 18 parts on 44 nets, routed with 188 tracks and 22 vias.
It is built around the SIM7600G and W25Q128JVSIQ. Its parts include 6 connectors, 4 resistors, 3 capacitors and 1 IC. It belongs with the RP2040 boards of this library.
A modern take on the classic Nokia cell phone experience, built with a Raspberry Pi Pico 2 running MicroPython. This project combines the simplicity and reliability of old-school Nokia phones with quality-of-life improvements for modern usability.
fone is a DIY cellular phone that captures the essence of classic Nokia devices while incorporating modern components and conveniences. The device features a minimalist design focused on essential communication functions: calls, SMS, and basic navigation, all powered by MicroPython for easy customization and development.
The SIM7600G module connects via UART and requires the following connections:
| SIM7600G Pin | Description | Connection | Notes |
|---|---|---|---|
| V | VCC | 5V from MT3608 | Requires stable 5V (up to 2A) |
| G | Ground | Battery - | Battery ground |
| G | Ground | Pico GND (Pin 38) | Shared ground with Pico |
| T | TX (Module transmit) | GP1 (Pin 2) | UART0 RX |
| R | RX (Module receive) | GP0 (Pin 1) | UART0 TX |
| K | Power Key | GP2 (Pin 4) | GPIO for power control |
| S | Status | GP3 (Pin 5) | GPIO for status monitoring |
The primary input is an ANO directional navigation and scroll wheel rotary encoder, providing directional control, rotary scroll input, and a center-press button.
| Encoder Pin | Description | Connection | Notes |
|---|---|---|---|
| ENCA | Encoder A Pin | GP17 (Pin 22) | Rotary encoder quadrature A |
| ENCB | Encoder B Pin | GP22 (Pin 29) | Rotary encoder quadrature B |
| SW1 | Center Button | GP6 (Pin 9) | Digital input |
| SW2 | Down Button | GP5 (Pin 7) | Digital input |
| SW3 | Right Button | GP4 (Pin 6) | Digital input |
| SW4 | Up Button | GP19 (Pin 25) | Digital input |
| SW5 | Left Button | GP18 (Pin 24) | Digital input |
| COM | Common | GND (Pin 38) | Common ground for all switches |
Note: This component has been deprecated and replaced by the ANO Directional Navigation and Scroll Wheel Rotary Encoder.
The phone uses two analog joysticks for navigation and input, connected through an ADS1115 16-bit ADC for full 4-channel analog precision.
ADS1115 ADC Module:
| ADS1115 Pin | Description | Connection | Notes |
|---|---|---|---|
| VDD | Power | 5V (Pin 40 - VBUS) | Module power supply |
| GND | Ground | GND (Pin 38) | Common ground |
| SCL | I2C Clock | GP21 (Pin 27) | I2C0 SCL |
| SDA | I2C Data | GP20 (Pin 26) | I2C0 SDA |
| ADDR | Address | GND | Sets I2C address to 0x48 |
Left Joystick (mounted upside down):
| Joystick Pin | Description | Connection | Notes |
|---|---|---|---|
| VCC | Power | 5V (Pin 40 - VBUS) | Joystick power supply |
| GND | Ground | GND (Pin 38) | Common ground |
| VRX | X-axis analog | ADS1115 AIN0 | Left joystick X |
| VRY | Y-axis analog | ADS1115 AIN1 | Left joystick Y (inverted) |
| SW | Switch button | GP19 (Pin 25) | Digital input with pull-up |
Right Joystick:
| Joystick Pin | Description | Connection | Notes |
|---|---|---|---|
| VCC | Power | 5V (Pin 40 - VBUS) | Joystick power supply |
| GND | Ground | GND (Pin 38) | Common ground |
| VRX | X-axis analog | ADS1115 AIN2 | Right joystick X |
| VRY | Y-axis analog | ADS1115 AIN3 | Right joystick Y |
| SW | Switch button | GP18 (Pin 24) | Digital input with pull-up |
The vibration motor provides haptic feedback for notifications and user interactions.
For Low Current Motors (< 40mA):
| Motor Pin | Description | Connection | Notes |
|---|---|---|---|
| + | Positive | GP16 (Pin 21) | Direct PWM control |
| - | Negative | GND (Pin 38) | Direct ground connection |
For Higher Current Motors (> 40mA) or if direct control fails:
| Motor Pin | Description | Connection | Notes |
|---|---|---|---|
| + | Positive | GP16 (Pin 21) via NPN Transistor | PWM-controlled output |
| - | Negative | GND (Pin 38) | Direct ground connection |
Transistor Circuit (NPN - 2N2222 or similar):
| Transistor Pin | Description | Connection | Notes |
|---|---|---|---|
| Base | Control | GP16 (Pin 21) via 1kΩ resistor | PWM signal from Pico |
| Collector | High side | Motor + | Connects to motor positive |
| Emitter | Ground | GND (Pin 38) | Common ground |
The 2.42" monochrome OLED display provides the main user interface with a 128x64 resolution using SPI communication.
Display Module Connections:
| Display Pin | Description | Connection | Notes |
|---|---|---|---|
| VCC | Power | 3V3 (Pin 36) | 3.3V power supply |
| GND | Ground | GND (Pin 38) | Common ground |
| CLK | SPI Clock | GP10 (Pin 14) | SPI1 SCK |
| DIN | SPI Data In | GP11 (Pin 15) | SPI1 MOSI (TX) |
| CS | Chip Select | GP9 (Pin 12) | SPI chip select (active low) |
| DC | Data/Command | GP12 (Pin 16) | Command mode control |
| RST | Reset | GP13 (Pin 17) | Hardware reset (active low) |
The W25Q128 provides 16MB (128Mbit) of non-volatile storage for contacts, messages, and system data, connected via SPI interface. This flash memory offers faster access times and lower power consumption compared to SD cards.
W25Q128 Module Connections:
| W25Q128 Pin | Description | Connection | Notes |
|---|---|---|---|
| VCC | Power | 3V3 (Pin 36) | 3.3V power supply |
| GND | Ground | GND (Pin 38) | Common ground |
| DC | SPI Data Out (MISO) | GP8 (Pin 11) | SPI1 MISO (RX) |
| D1 | SPI Data In (MOSI) | GP11 (Pin 15) | SPI1 MOSI (TX) - Shared with display |
| SLK | SPI Clock | GP10 (Pin 14) | SPI1 SCK - Shared with display |
| CS | Chip Select | GP7 (Pin 10) | SPI chip select (active low) |
The MAX98357A is a digital I2S audio amplifier used to drive the speaker for calls, notifications, and other audio feedback.
MAX98357A Module Connections:
| MAX98357A Pin | Description | Connection | Notes |
|---|---|---|---|
| Vin | Power In | 5V (Pin 40 - VBUS) | 3-5.5V input range |
| GND | Ground | GND (Pin 38) | Common ground |
| DIN | Data In | GP20 (Pin 26) | I2S Serial Data |
| BCLK | Bit Clock | GP14 (Pin 19) | I2S Bit Clock |
| LRC | Left-Right Clock | GP15 (Pin 20) | I2S Word Select |
| SD | Shutdown | GP21 (Pin 27) | Active-low shutdown control |
| GAIN | Gain Select | (unconnected) | Default 9dB gain. Connect to GND for 3dB, VCC for 15dB. |
Speaker Connection:
| Component | Connection |
|---|---|
| Speaker + | MAX98357A Left/Right + |
| Speaker - | MAX98357A Left/Right - |
GAIN pin can be used to adjust the amplification level if needed. Default (unconnected) is 9dB.The GY-MAX4466 microphone module with automatic gain control (AGC) is used for voice input. It's connected directly to one of the Pico's ADC pins.
Microphone Module Connections:
| Microphone Pin | Description | Connection | Notes |
|---|---|---|---|
| VCC | Power | 3V3 (Pin 36) | 2.4-5.5V input range |
| GND | Ground | GND (Pin 38) | Common ground |
| OUT | Analog Out | GP28 (Pin 34) | Connects to ADC2 |
GP28, one of the Pico's three dedicated ADC pins.To monitor the battery level, a voltage divider is used to scale the battery's voltage (3.0V-4.2V) down to a range the Pico's ADC can safely read (0-3.3V). The reading is taken on the now-available ADC pin.
Voltage Divider Circuit:
| Component | Connection | Notes |
|---|---|---|
| Battery + | Resistor 1 (R1) - e.g., 100kΩ | Connects to the positive battery terminal |
| R1 + R2 | GP26 (Pin 31) & Resistor 2 (R2) | Center point connects to Pico's ADC pin |
| R2 | GND (Pin 38) | Connects to ground |
A 1:1 ratio (e.g., two 100kΩ resistors) is simple and effective.
Pin Connection:
| Description | Connection | Notes |
|---|---|---|
| Voltage Sense | GP26 (Pin 31) | ADC capable pin (ADC0) |
2 * adc_voltage.GP26 and multiply it by the divider ratio to calculate the true battery voltage.[Development in progress - setup instructions coming soon]
| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | 100k | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R1, R2, R3, R4 |
| 2 | 0.1uf | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C1, C3 |
| 2 | MountingHole_2.2mm_M2 | MountingHole:MountingHole_2.2mm_M2 | HOLE1, HOLE2 |
| 1 | 1uf | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C2 |
| 1 | 2.42_OLED | Connector_JST:JST_PH_B7B-PH-K_1x07_P2.00mm_Vertical | J3 |
| 1 | External_Battery_Board | Connector_JST:JST_PH_B3B-PH-K_1x03_P2.00mm_Vertical | J2 |
| 1 | MAX98357A | Connector_JST:JST_PH_B7B-PH-K_1x07_P2.00mm_Vertical | J5 |
| 1 | Micrpohone_Module | Connector_JST:JST_PH_B3B-PH-K_1x03_P2.00mm_Vertical | J4 |
| 1 | Motor_DC | Connector_Wire:SolderWire-0.1sqmm_1x02_P3.6mm_D0.4mm_OD1mm | M1 |
| 1 | Navigation_Module | Connector_JST:JST_PH_B8B-PH-K_1x08_P2.00mm_Vertical | J6 |
| 1 | RaspberryPi_Pico | Module:RaspberryPi_Pico_Common_Unspecified | A1 |
| 1 | SIM7600G | Connector_JST:JST_PH_B7B-PH-K_1x07_P2.00mm_Vertical | J1 |
| 1 | W25Q128JVS | Package_SO:SOIC-8_5.3x5.3mm_P1.27mm | U1 |
It measures 49 × 62 mm and has 2 copper layers, 1.6 mm thick.
18 parts, built around the SIM7600G and W25Q128JVSIQ. 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.
From the bestestdev/fone repository on GitHub, at the commit this page was made from: the board is pcb/fone.kicad_pcb and its schematic pcb/fone.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask bestestdev before reusing the design.

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

Polprzewodnikowy/SummerCart64
SummerCart64 - a fully open source N64 flashcart


shanteacontrols/OpenDeck
A platform for building interactive control and sensing devices using MIDI and OSC built with Zephyr RTOS.



polpo/picogus
Emulation of ISA sound cards and CD-ROM on Raspberry Pi Pico (GUS, SB/Adlib, MPU-401, Tandy, CMS, Panasonic CD-ROM) with USB mouse/joystick support

iMike78/nest-mini-drop-in-pcb
Drop-in PCB replacement for the Google Nest Mini v2 with ESP32-S3, ESP32-P4 and optional ESP32-C6. Inspired by Onju Voice and Home Assistant Voice PE.