Skip to the content
2 layers80 × 73.9 mmBoya Parametrica V1.0, the printed circuit board in 3D

Boya Parametrica V1.0

cepya2022/Water_Quality_Probe-

The development of open-source code and hardware instruments enables both the creation of new technologies and the redesign and adaptation of existing instruments to the user's specific needs.

Size
80 × 73.9 mm
Copper layers
2
Thickness
1.6 mm
Parts
37
Nets
82
Pads
170
Tracks, vias
264, 10
Pours
1
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
15 Dec 2022
Updated
27 Aug 2026

Overview

Boya Parametrica V1.0 is an open-source printed circuit board by cepya2022, from the cepya2022/Water_Quality_Probe- repository on GitHub. It is a 2-layer board of 80 × 73.9 mm with 37 parts on 82 nets, routed with 264 tracks and 10 vias.

It is built around the DS18B20 and LM2931CD. Its parts include 13 resistors, 10 ICs, 6 transistors, 3 capacitors and 1 connector. It belongs with the AVR (ATmega, ATtiny) boards of this library.

Main components

2

README

README.md

Water_Quality_Probe-

Introduction

The development of open-source code and hardware instruments enables both the creation of new technologies and the redesign and adaptation of existing instruments to the user's specific needs. This allows free access to design and operational documentation, creating the possibility for the developed instruments to be replicated, assembled, studied, modified, shared, and collaboratively commercialized by anyone.

The current project involves the design of a low-cost multiparametric water quality probe that enables in situ and remote sensing of physicochemical variables relevant to the environment, such as conductivity, dissolved oxygen, temperature, and pH in bodies of water. The first prototype based on Arduino is already available, and efforts are underway to refine it in order to achieve a more robust, economical, and efficient product. This project proposes integrating the microcontroller into a single printed circuit board (PCB) that facilitates data acquisition and storage over extended periods, reduces energy consumption, and enhances robustness, considering its predominantly outdoor operation.

Hardware

The monitoring station consists of a sealed waterproof box that floats with the assistance of auxiliary buoys. Inside the box, there is an Arduino Mega microcontroller connected to an external clock, an SD memory module, a low-energy Bluetooth module, a solar-powered energy system, and signal processing and decoupling systems for each sensor. Submersible cables extend from this box to the probes, allowing sampling in the water.

Regarding energy aspects, a solar-powered system was designed. It includes a Li-Ion battery (or two arranged in parallel) that powers the microcontroller and sensors, connected to a 1 Watt solar panel, providing indefinite energy autonomy.

Additionally, it integrates a Bluetooth device using 4.0 BLE (Bluetooth Low Energy) technology. The Serial Bluetooth Terminal® app enables remote control of the probe, such as remote power on/off, selection of measurement intervals, sensor calibration, and data query, curing, and collection. It's worth noting that each measurement includes the exact date and time it was taken. These features make it easy to remotely monitor many relevant variables over extended periods with high sampling rates, allowing for detailed time-series data collection at the study site.

Components
  • Solar Panel
  • Double battery holder
  • Arduino Mega 2560 Rev3
  • Step Up Power Supply Xl6009 Dc Adjustable Dc 5v 35v 3a Max Arduino
  • Lithium Battery Charger Micro USB Module Tp4056 5v
  • HC-08 BLE Bluetooth Module
  • Micro SD Memory Reader Module: hw-125
  • DS3231 RTC Clock
  • DS18B20 Submersible Stainless Steel Digital Temperature Sensor
  • PH-4502C Liquid PH Sensor with E201-BNC Electrode
  • Conductivity Sensor Conductivity K 1.0 Kit (Atlas Scientific)
  • Gravity™ Analog Dissolved Oxygen Meter Dissolved Oxygen Sensor (Atlas Scientific)
  • 6x 2N7000 N-Channel MOSFETs (low-side power switching, one per module)
  • Resistors (1 kΩ gate series, 220 kΩ gate pull-down, 1.7 kΩ OneWire pull-up)

Each sensor and peripheral (pH, conductivity, dissolved oxygen, temperature, RTC and SD card) has its ground routed through its own 2N7000 MOSFET, so the microcontroller can power each module independently. Driving the corresponding gate pin HIGH closes the low-side switch and powers the module; LOW removes its ground reference and turns it off. Earlier prototypes used an optocoupled relay module for this; the V1.0 PCB replaced it entirely with MOSFETs.

Software

The research team is continuosly working on and improving the code. It is written in c++ programming language inside the Arduino IDE as it is the default language for arduino microcontrollers. The system was design to enter sleep mode inside the loop function while the measurement option is disabled or in between measurements. It includes an interruption function which is activated once a message is received via Bluetooth. This function wakes the system, executes the corresponding command and once it is finished, it enters the loop again. The different commands include turning on/off the measurement cycle and setting its frequency, sensor calibration, data query and current state information. The updated code is available here.

Building the firmware

Target board: Arduino Mega 2560.

⚠️ do_grav.h is not included in this repository, so the sketch will not compile from a fresh clone until the library that provides it is installed. It comes from Atlas Scientific's atlas_gravity library (the Gravity_DO class used for the dissolved oxygen sensor). That library is not published to the Arduino Library Manager — download it from Atlas Scientific's GitHub and copy the atlas_gravity folder into your Arduino libraries/ directory manually.

The following libraries are also required. All except atlas_gravity are available through the Arduino IDE Library Manager:

LibraryUsed for
atlas_gravitydissolved oxygen sensor (do_grav.h) — manual install, see above
RTClibDS3231 real time clock
Low-Powersleep between measurements
DallasTemperatureDS18B20 temperature sensor
OneWireDS18B20 bus
WireI²C (RTC) — bundled with the IDE
SPISD card bus — bundled with the IDE
SDSD card — bundled with the IDE

The conductivity module is driven over Serial2 with plain text commands, so it needs no library.

Setting the clock: corregirReloj() is called from setup() but is left commented out. Uncomment it, upload once while connected to a computer so the RTC picks up the compile-time timestamp, then comment it out again and re-upload — otherwise the clock is reset to the compile time on every boot.

Measurement cycles

Once the measurment is set to On, the interface will ask the user to identify the location with an ID (locationID) which must be a number. Once it is provided, the arduino will save the On state along with the location ID and the current frequency (default is 15 seconds), in a .txt file inside the SD Card. This feature acts as a reassurance in case of a sudden shutdown and restart of the system or any kind of reboot. In this case, during the setup function of the arduino, this file is checked to seek the last state in which the system was operating. In case the measurement was On, it sets the frequency and the location ID to their previous states and starts the measurement cycle, otherwise it keeps the default values and enters the loop. The frequency intervals available in the current version are 15 seconds and 1, 5, 15 or 30 minutes. Usually, for outdoor measurements, 30 minutes is a reasonable interval considering battery consumption, solar exposure and a relatively high sampling rate compared to other sampling methods.

During the measurement cycle, the arduino powers each sensor on and off in turn, so that only the module being read draws current at any given moment. First it turns on the pH sensor (pH) and waits about 2 seconds for it to settle, then averages 10 consecutive analog samples taken 10 ms apart and converts that average to a pH value using the stored calibration line. Next is the temperature sensor (T), which is read once. Third is the conductivity sensor (EC), one of the most accurate and precise ones and the slowest per reading, so a single measurement is taken; the value returned by the module is temperature-compensated, which is why it must be read after the temperature. Along with conductivity, the module also returns total dissolved solids (TDS). Finally, the dissolved oxygen (DO) is read once. Once the parameters are measured, the current date and time are read from the RTC and the record is appended to a .txt file on the SD card as semicolon-separated values, in the order: date;time;DO;EC;TDS;pH;T;locationID.

Note: earlier revisions of this document described a 3 minute pH stabilization wait, attributed to induction from the relay module, and a 10-reading average for every sensor. Both belong to the relay-based prototype and do not describe the current firmware — the V1.0 board has no relays, and only pH averages multiple samples. The paragraph above reflects what the code actually does.

Data query and state info

There are 3 types of data querys available. The first to refer to the data stored from the measurement cycles. One of them returns the entire information stored in the SD card inside the measurement file, while the other returns only the new information added since the last measurement data query. In case of a shutdown and restart of the system or any kind of reboot, the pointer of the file returns to the first line of the text file, so both queries will return the same information. The third type of data query refers to individual measurements of each sensor taken at real-time. This includes options for each of the 4 sensors and the RTC clock.

The current state information is also a query that returns wether the the measurement mode is On or Off, and the established frequency.

Sensor Calibration

The only sensor without the need of a calibration process is the Temperature one, the other three sensors have specific code and procedures for their correct calibrations.

For the pH sensor, the calibration requires a pH=7 and a pH=4 standard solutions. First, the interface will request the user to use the pH=7 solution and press the Ok command when a stable condition is reached. It is recommended to wait at least 3 minutes until it reaches a stable electronic condition in each solution. Then, it will request to do the same in the pH=4 solution. Make sure to wash the probe with distilled water in between solutions. Once both solutions are used, the arduino will give the user the notification that the pH sensor is calibrated and it will save the calibration curve parameters, slope of curve (m) and intercept to the origin (O.o.), in the same file as the Location ID and the measurement state for it to be used in case of a sudden shutdown and restart of the system or any kind of reboot.

Parts

37
QtyValueFootprintReferences
61kResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_HorizontalR1, R2, R3, R7, R8, R9
6220kResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_HorizontalR4, R5, R6, R10, R11, R12
62N7000Package_TO_SOT_THT:TO-92L_WideQ1, Q2, Q3, Q4, Q5, Q6
3100ufCapacitor_THT:C_Disc_D3.8mm_W2.6mm_P2.50mmC1, C2, C3
11.7KResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_HorizontalR13
110KPotentiometer_THT:Potentiometer_Bourns_3296W_VerticalRV1
1Arduino_Mega2560_R3_ShieldPCM_arduino-library:Arduino_Mega2560_R3_ShieldA1
1BATTConnector_JST:JST_EH_B2B-EH-A_1x02_P2.50mm_VerticalBT1
1Conductivity SensorConnector_JST:JST_EH_B5B-EH-A_1x05_P2.50mm_VerticalU8
1DO SensorConnector_JST:JST_EH_B3B-EH-A_1x03_P2.50mm_VerticalU10
1DS18B20Connector_JST:JST_EH_B3B-EH-A_1x03_P2.50mm_VerticalU9
1HC-08Connector_JST:JST_EH_B4B-EH-A_1x04_P2.50mm_VerticalU6
1HW-125Mi Libreria:MICRO SD CARD HW-125U5
1LM2931Package_TO_SOT_THT:TO-220-3_VerticalU2
1Modulo TP4056Mi Libreria:TP4056-18650U1
1PH SensorConnector_JST:JST_EH_B6B-EH-A_1x06_P2.50mm_VerticalU7
1Panel SolarTerminalBlock:TerminalBlock_bornier-2_P5.08mmJ1
1RTC DS3231Mi Libreria:RTC_DS3231U4
1Step UPMi Libreria:hw-045U3
1~Button_Switch_THT:SW_CK_JS202011AQN_DPDT_AngledSW1

Similar boards

  • 2 layers43.2 × 47 mmCurrent sink or swim, the printed circuit board in 3D

    Current sink or swim

    ALeggeUp/current-sink-or-swim

    Project work from The Online Electronics Aprenticeship program at Contextual Electronics

    29 partsCC-BY-SA-4.0
  • 2 layers34 × 28 mmCurrentSink, the printed circuit board in 3D

    CurrentSink

    plainsimpledot/currentSink

    1st PCB project building a current sink with uController interface

    42 parts
  • 4 layers122 × 87 mmK64-io pcb, the printed circuit board in 3D

    K64-io pcb

    ratsept/k64-io-pcb

    181 parts
  • 2 layers41.7 × 51.6 mmCurrentSinkOrSwim, the printed circuit board in 3D

    CurrentSinkOrSwim

    rmemory/CurrentSink

    Building a current sink for battery testing

    22 parts
  • 2 layers100 × 100 mmSynchro2, the printed circuit board in 3D

    Synchro2

    waynegramlich/synchro_drive_motor_driver_pcb

    Dual motor drive for dual motor synchro drive PCB

    98 parts
  • 2 layers33.7 × 97.8 mmHAN ESP TSS721, the printed circuit board in 3D

    HAN ESP TSS721

    UtilitechAS/amsreader-firmware

    ESP8266 and ESP32 compatible firmware to read, interpret and publish data to MQTT from smart electrical meters, both DLMS and DSMR is supported

    29 parts470
  • 2 layers121 × 68 mmFreeds sanchez, the printed circuit board in 3D

    Freeds sanchez

    pablozg/freeds

    Derivador de energía solar excedente creado por Pablo Zerón, Diseño PCB por Amcalo, Tester original por Aeizoon, Wiki por Zoilo Mora

    42 parts108
  • 2 layers80 × 54.9 mmESP32WifiAisTempVolt2, the printed circuit board in 3D

    ESP32WifiAisTempVolt2

    AK-Homberger/NMEA2000WifiGateway-with-ESP32

    This repository shows how to build a NMEA2000 WiFi Gateway with voltage and temperature alarms.

    18 parts94GPL-3.0

Questions

How big is the Boya Parametrica V1.0 PCB?

It measures 80 × 73.9 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Boya Parametrica V1.0 use?

37 parts, built around the DS18B20 and LM2931CD. 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 Boya Parametrica V1.0 KiCad files?

From the cepya2022/Water_Quality_Probe- repository on GitHub, at the commit this page was made from: the board is Circuito/Boya Parametrica_V1.0/Boya Parametrica_V1.0.kicad_pcb and its schematic Circuito/Boya Parametrica_V1.0/Boya Parametrica_V1.0.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Boya Parametrica V1.0 design in my own project?

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