Case Study: Development of a Handheld IoT Soil Analysis System Using nRF52840 IoT soil analysis system development using nRF52840. Ultra-low power handheld soil analyzer with pH, NPK, EC sensors, precision analog design, and complete manufacturing deliverables for smart agriculture.

IoT Soil Analysis System Development Using nRF52840

Adequate Infosoft provides firmware and hardware development services for platforms including Nordic Semiconductor solutions. We also deliver end-to-end software and cloud infrastructure for IoT devices.

In this post, we present a case study on engineering a professional handheld soil analysis system using the nRF52840.

Previously, we developed a similar IoT soil monitoring device using ESP32, now, the client requested a move to the nRF52840 platform to achieve better power efficiency and optimized BLE performance for a battery-operated handheld device.

Platform: Nordic Semiconductor nRF52840 (Advanced IoT SoC)

1. An Overview of the Smart Agriculture Soil Analyzer Development

An industrial standard hardware architecture is crucial for changing from a prototype to a manufacturable handheld device, implementation of the hardware is as important as writing code that fulfills desired criteria.

This case study describes the engineering work executed to develop a Smart Agriculture Soil Analyzer.

Through our decision to switch from an ESP32 chip to using Nordic Semiconductor's nRF52840 chip, we have focused on ultra-low power consumption, higher performance ADC, and a ruggedized signal path supporting the expected exposure to extreme environmental conditions.

Our objective was to develop a "Turnkey Manufacturing Pack" (TMP) allowing manufacturing, assembly, and testing of a SMP (Smart Agriculture Soil Analyzer) without the requirement of the original designer being on-site throughout this process.

IoT soil analysis system development with NRF52840.

2. Phase I: Core Architecture Selection

The following are three key factors that led to the selection of the Nordic nRF52840 for this handheld device versus the more popular ESP32:

Power Efficiency

The amount of current consumed while in "Deep Sleep" mode is measured by the nRF52840 in microamps, but the ESP32 usually consumes milliamps (unless properly optimized). This extends the life of a 2000 mAh battery from days to months.

Radio Performance

The Nordic chip provides a very stable BLE stack and is capable of higher output power, thus maintaining connection with the mobile app even when the farmer is several meters away in wide-open spaces.

The SAADC (Successive Approximation ADC)

The pH and EC soil sensors are needed to have a high-resolution (12-bit) sample. The combination of the Nordic's internal 12-bit ADC and oversampling provides the necessary precision to produce results that are scientific grade.

3. Phase II: Precision Analog & Sensor Integration

The heart of the device is its ability to interface with five distinct, electrically "noisy" sensors.

A. The pH Probe (The High-Impedance Challenge)

A pH probe is essentially a battery with extremely high internal resistance. Even a tiny amount of current "leakage" on the PCB will ruin the reading.

  • Solution: We implemented a Femto-ampere Bias Current Operational Amplifier (e.g., TI OPA326) in a voltage follower configuration.
  • Guard Ringing: On the PCB layout, a "Guard Ring" trace was placed around the high-impedance input to sink surface leakage currents to the ground, ensuring the signal remains pure.

B. NPK Sensor (RS485/Modbus)

Industrial NPK sensors use the RS485 standard, which requires higher voltages than the Nordic chip can provide.

  • Solution: We integrated a low-power RS485 transceiver (MAX3485). To save power, the transceiver's "Enable" pin is tied to a Nordic GPIO. The chip is only powered for the 500ms required to poll the sensor, then instantly killed.

C. EC & Moisture (The Polarization Problem)

Standard DC current will "plate" or polarize an EC probe, leading to drift.

  • Solution: We designed an AC Excitation Circuit. By rapidly flipping the polarity of the signal sent to the probes, we prevent ion buildup, ensuring the sensor remains accurate for years of field use.

4. Phase III: Power Management & Battery Logic

Handheld tools must be both safe and reliable.

Charging:

We selected a MCP73831 LiPo charger with a maximum charging rate of 500ma to charge our 2000mah battery. By doing this, we ensure the battery can be charged safely without the possibility of the enclosure becoming too hot.

Fuel Gauge:

The fuel inside a Lithium Polymer battery is measured in voltage; however, this is not a valid method as a fuel gauge. Therefore, we added a MAX17048 Fuel Gauge IC into the design to give the mobile application accurate "State of Charge" (%) and "Time to Empty" displayed on the unit.

System Protection

A P-Channel Mosfet has been used for Reverse Polarity protection. The P-Channel Mosfet will not allow current to flow back towards the battery connection if a technician connects the battery backwards while assembling the device; thus, preventing damage to the device circuitry from reverse voltage.

5. Phase IV: PCB Layout for Manufacturing

The Printed Circuit Board - (PCB) consists of four layers as follows: Signal, Ground, Power and Signal.

  • EMI Shielding: Our design includes an area for a shielding can to be included over the Nordic SoC and the analogue front-end. This will prevent the BLE Radio communications from disrupting the sensitive measurements of pH.
  • Thermal Design: Handheld devices may become excessively hot when exposed to sunlight. The use of 1 oz of heavy copper and the inclusion of thermal vias will have a cooling effect upon the Power Regulator.
  • Test Points: We have included gold-plated test points for use with a Bed of Nails Fixture. The Test Points enable a factory machine's downward pressure to assist in compressing the Test Point against the PCB to check voltages and flash its firmware in less than 10 seconds.

6. Phase V: Detailed Manufacturing Deliverables

The project concludes with the delivery of the Technical Data Package (TDP). This is what makes the project "Manufacturing-Ready."

1. The Production BOM (Bill of Materials)

This isn't just a list; it's a strategy.

  • Primary Source: MPNs from global distributors (DigiKey/Mouser).
  • Alternates: Every capacitor and resistor has a "Secondary Approved Part" to prevent production stops if one vendor is out of stock.
  • Lead Times: Notated lead times for critical components (Nordic SoC, Memory LCD).

2. Connector Mapping & Wire Harness Guide

A handheld device has wires. We provided a visual map:

  • J1 (5-Pin): NPK Sensor (Red: VCC, Black: GND, Blue: A, White: B, Green: Shield).
  • J2 (BNC): pH Probe.
  • J3 (2-Pin JST): LiPo Battery.
  • J4 (FPC 10-Pin): Sharp Memory LCD.

3. System Interconnect Block Diagram

A high-level visual showing how the Nordic "Brain" talks to the "Muscles" (Sensors) and the "Face" (LCD). This allows non-engineers at the factory to understand the product flow.

4. Assembly & Quality Control (QC) Guide

We authored a 10-step assembly manual:

  • Solder Paste Inspection.
  • Pick and Place (Nordic Module placement is critical).
  • Reflow Profile (Specific to lead-free SAC305 solder).
  • Visual Inspection (Reference photos of "Good" vs. "Bad" solder joints).
  • Housing Fitment (How to seat the BNC connector without stressing the PCB).

5. Testing & Validation Procedure

The most critical part for a third-party factory. We provided a "Test Firmware" that:

  • Step 1: Checks the I2C address of the Fuel Gauge.
  • Step 2: Reads the internal temperature sensor.
  • Step 3: Pulses the RS485 line.
  • Step 4: Displays a "PASS" or "FAIL" message on the Memory LCD itself.

7. Result and End Goal Achievement

We created an ultra-low power-consuming device that uses the Nordic nRF52840.

  • 6µA standby power consumption.
  • ±0.05 units precision of measurement for the pH sensor.
  • Complete production package delivered and ready to start production of 1,000 units.

The final deliverable ensures that the client owns the intellectual property (IP) completely. They can take these files to any manufacturer in the world (China, Vietnam, USA) and receive a finished, working product. This is the difference between a "prototype" and a "product."

8. Comparison Table: Why Nordic Won

FeatureESP32-C3Nordic nRF52840Impact on Soil Analyzer
Deep Sleep Power ~20–50 μA ~3–5 μA Longer field life between charges.
ADC Quality Known Non-linearity High Linearity/Low Noise Accurate NPK and pH data.
Bluetooth Range Standard Long Range (Coded PHY) Connection stays stable across a farm.
Stability Good Industrial Grade Less firmware crashing in high-heat.

What Our Clients Say About Us

Client satisfaction is our ultimate goal. Here are some kind words of our precious clients they have used to express their satisfaction with our service.

Leadership That Leads Worldwide

With a physical presence in over 15 countries and a global footprint spanning 25+ countries, we are ready to serve you anywhere. Location, language, or culture is never a barrier, because our global team can work with you in your language. Our strong international team ensures seamless collaboration across borders We have a strong tech team, highly recognized in their domains, with extensive technical expertise.