Yl105 Datasheet ✔

Based on the yl105 datasheet for the Hall IC, the internal architecture consists of:

On the module level, the YL105 adds:

When a magnet approaches, the Hall IC outputs a voltage change. The comparator compares this against a reference voltage set by the potentiometer. If the Hall voltage exceeds the reference, the comparator output toggles, changing the DO pin state.


Code Example:

int relayPin = 7;

void setup() pinMode(relayPin, OUTPUT); digitalWrite(relayPin, LOW); // relay off initially

void loop() digitalWrite(relayPin, HIGH); // turn relay ON delay(2000); digitalWrite(relayPin, LOW); // turn relay OFF delay(2000);

The YL-105 typically ships as a two-part system: the waterproof probe and a signal conditioning board. Understanding the pinout is critical for integration.

The most significant challenge with the YL-105 is translating voltage into a standard unit of measurement: NTU (Nephelometric Turbidity Units).

Because the YL-105 is not a calibrated scientific instrument, it does not output "NTU" directly. To achieve this, you must create a lookup table or formula. yl105 datasheet

The LM393 output is open collector. The datasheet usually notes this, meaning you can pull it up to a different voltage (e.g., 3.3V for a Raspberry Pi) than the module’s VCC (5V). This is a major plus for mixed-voltage systems.

In hydroponic systems, sudden spikes in turbidity can indicate root rot or nutrient precipitation. The sensor acts as an early warning system before the plants show physical symptoms.