Skip to the content
2 layersWaterputv4Schematics, the printed circuit board in 3D

ESP32-based water well level monitoring using a QDY30A RS485 sensor. Reads water level, uploads data to ThingSpeak, and supports remote logging and commands via Telnet (PuTTY). Includes wiring diagrams, setup instructions, and example telnet commands for easy integration and troubleshooting.

Copper layers
2
Thickness
1.6 mm
Parts
4
Nets
42
Pads
54
Tracks, vias
0, 0
Routed
Not yet
KiCad
KiCad 6 (file 20211014)
Created
3 Sep 2025
Updated
18 Apr 2026

Overview

Waterputv4Schematics is an open-source printed circuit board by mathiasvan, from the mathiasvan/LevelmetingWaterputV4 repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board with 4 parts on 42 nets.

It is built around the ESP32-DEVKITC-VE. Its parts include 2 ICs and 2 connectors. It belongs with the interfaces and adapters and sensors and measurement boards and the ESP32 boards of this library.

Main components

1

README

README.md

Levelmeting Waterput V4

Description

This project is V4 in the levelmeting waterput project. It uses the QDY30A level sensor with RS485 protocol because all the previous sensors broke.

This project uses the ModbusMaster library which can be installed from the Library Manager in the Arduino IDE.

Components

Diagram

Thanks lejmr for this diagram. I used it to test my sensor. It is wrong for the TX and RX pins, they should be swapped. (See below for more.) The rest is the same as in this diagram. Wiring diagram

My adaptation: I used pin 2 on the ESP32 to connect the DE and RE pins from the MAX485 module.

See the final KiCad diagram under the waterputv4Schematics folder. Here is a screenshot in case you don't have KiCad. The final diagram

Testing the sensor

This took a lot of trial and error but I got it working in the end. Some important remarks:

  1. R0 from the MAX485 module should be connected to RX on the ESP32 and DI to TX. This is wrong in the original diagram I used.
  2. The provided screw terminals on the MAX485 module are useful to connect the sensor to.
  3. You cannot use the Serial port for debugging as you need the TX and RX pins to communicate with the sensor. I used the Bluetooth Serial library instead. You need to download the Bluetooth Serial app on your phone to connect to the wireless Serial.
  4. When uploading the code, disconnect TX, RX, 5V and GND from the MAX485 and ESP32.
  5. The test code is in the folder testcode.

Final integration

  • I have been using ThingSpeak for all the previous versions and it works quite well to store the data.
  • The Bluetooth Serial library took too much space, so I have switched to the TelnetStream library. You need to install PuTTY and enter the IP adress which can be obtained from the Serial monitor. After this, it connects to the modbus sensor and from that moment on, all logging will happen with the telnet stream on PuTTY.
  • You need to add a credentials.h file in the same folder as the final code. You need to fill this template with your own credentials.
c++
#define mySSID "xxxxx"
#define myPASSWORD "xxxxx"
#define myChannelNumber 111111
#define myWriteAPIKey "xxxxxx"

Telnet Commands

After connecting to your ESP32 using PuTTY (see IP address in Serial Monitor), you can use the following commands in the telnet console:

  • ping
    The ESP32 will respond with pong, show the current sensor height, and display the time remaining until the next automatic data upload to ThingSpeak.

  • send data
    Immediately triggers a sensor reading and uploads the value to ThingSpeak, regardless of the regular upload interval.

Example session:

text
> ping
pong
Doing a height reading...
Data at adress 4: 158
Converted height: 15.8cm
15.80
Time to next data send: 122 seconds

> send data
Sending data now...
Data at adress 4: 158
Converted height: 15.8cm
Height: 15.8cm
Uploading data to ThingSpeak...
Successful upload to ThingSpeak.
Height: 15.80 uploaded to ThingSpeak server.

If you enter an unknown command, nothing will happen. Commands are case-sensitive.

Tip:
Make sure you have connected to the correct IP address and that your ESP32 is powered and connected to WiFi.

Wishlist

  • Add reconnect wifi command.
  • OTA updates

Resources

Parts

4
QtyValueFootprintReferences
1Barrel_JackConnector_BarrelJack:BarrelJack_HorizontalJ2
1ESP32-DEVKITCESP32-DEVKITC:MODULE_ESP32-DEVKITCU1
1MAX485_MODULE_5V_LOGIC_TLL_TO_RS-485_CONVERTERMAX485_MODULE_5V_LOGIC_TLL_TO_RS-485_CONVERTER:MODULE_MAX485_MODULE_5V_LOGIC_TLL_TO_RS-485_CONVERTERU2
1QDY30AConnector_JST:JST_XH_B4B-XH-AM_1x04_P2.50mm_VerticalJ1

Similar boards

  • 2 layers103.8 × 50 mmGalagino pcb set, the printed circuit board in 3D

    Galagino pcb set

    harbaum/galagino

    A Galaga, Pac-Man and Donkey Kong arcade emulator for the ESP32

    26 parts558
  • 2 layers115 × 75 mmSpinCoater, the printed circuit board in 3D

    SpinCoater

    RParkerE/OpenSilicon

    OpenSilicon enables DIY semiconductor fabrication with open-source guides for building IC equipment at home. The project includes BOMs, 3D files, firmware, and PDKs, supporting makers and researchers in chip fabrication.

    11 parts55GPL-3.0
  • 2 layers127.3 × 54.1 mmESP32 SolarBox, the printed circuit board in 3D

    ESP32 SolarBox

    cole8888/SRNE-Solar-Charge-Controller-Monitor

    Read data from SRNE solar charge controllers.

    34 parts42
  • 2 layers62.2 × 57.1 mmWs2mqtt, the printed circuit board in 3D

    Ws2mqtt

    Tho85/ws2mqtt

    Connect WiSafe2 devices to Home Assistant

    8 parts28BSD-3-Clause
  • 2 layers99.9 × 99.9 mmSplit flap, the printed circuit board in 3D

    Split flap

    tinkermax/split-flap

    DIY mechanical spli-flap display

    28 parts13CC-BY-4.0
  • 2 layersJF ECU32, the printed circuit board in 3D

    JF ECU32

    JoachimF/JF-ECU32

    RC Jet Engine ECU

    27 parts12GPL-3.0
  • 2 layers72.5 × 84.8 mmDevboard, the printed circuit board in 3D

    Devboard

    ste2425/PSP-Bluetooth-AVConnector

    An AV-Out Breakout library for the PSP. Providing Kicad symbols and footprints to interface with the PSP 2/3K AVOut socket (also known as the TVOut socket)

    13 parts12
  • 2 layers100 × 88.9 mmGen2, the printed circuit board in 3D

    Gen2

    Alignof/Juggernaut

    疑似時限爆弾解除競技

    41 parts10MIT

Questions

What parts does the Waterputv4Schematics use?

4 parts, built around the ESP32-DEVKITC-VE. 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 Waterputv4Schematics KiCad files?

From the mathiasvan/LevelmetingWaterputV4 repository on GitHub, at the commit this page was made from: the board is waterputv4Schematics/waterputv4Schematics.kicad_pcb and its schematic waterputv4Schematics/waterputv4Schematics.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Waterputv4Schematics design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).