Video summary
Anchor Chain Counter with SMART SCOPE
Main summary
Key takeaways
Summary: Anchor Chain Counter with SMART SCOPE (ESP32 + INA219 + Magnetic Pulse Sensor)
This video/tutorial walks through building a practical, accurate anchor chain counter for a boat using an ESP32 integrated with Home Assistant. The system provides:
- Real-time chain deployed length (counts gypsy/winch rotations)
- Direction detection (chain letting out vs retrieving)
- Depth-based “SMART SCOPE” recommendations for how much chain to deploy
- Safety alerts when the deployed chain is insufficient for the current conditions
- A dashboard UI showing winch activity and chain status, plus a reset button after fully retrieving the anchor
Hardware / Sensing Approach
1) ESP32 as the hub
- The ESP32 acts as the central controller, wirelessly sending anchor/chain data to the smart boat system / Home Assistant dashboard.
2) INA219 voltage sensor (winch state)
- INA219 measures winch voltage to determine whether the winch is operating retrieving vs letting out chain.
- Logic described:
- If INA219 voltage > 2V, the system considers the winch in a retrieving/powered state.
- Otherwise, it’s considered letting out.
3) Magnetic pulse sensor (rotation counting)
- A normally-open magnetic reed-switch style sensor is mounted near the anchor winch/gypsy.
- A small magnet is attached to the gypsy; each time it passes the sensor, it generates a pulse.
- The ESP32 counts pulses and uses direction (from the INA219) to increment/decrement the deployed chain count.
- Calibration uses distance-per-pulse (e.g., “20 cm per pulse” initially), which the installer should tune for their specific winch + chain.
SMART SCOPE Feature (Depth-Based Chain Recommendation)
A key product feature in the setup is SMART SCOPE, which:
- Uses real-time depth readings from a depth sensor in Home Assistant.
- Calculates a recommended chain length using configurable scope ratios by depth ranges.
Rationale / Example scope ratios
- Shallow water: weaker chain catenary effect → recommend higher scope ratios
- Example ratios: 7:1 or greater
- Deeper water: stronger catenary effect due to more deployed chain → recommend lower ratios
- Example ratios: 4:1 or 3:1
- Goal: avoid over-deploying
Alerts
The system triggers an automation/alert if:
- The boat is anchored (or chain length suggests anchoring), and
- Deployed chain length is below the recommended chain length
Example behavior:
- If winds/currents cause the boat to swing into deeper water, it warns that the current scope setting is insufficient.
Home Assistant Integration (Setup Artifacts)
The creator provides code/templates from their website for:
-
ESPHome YAML (ESP32 firmware)
- Includes INA219 I2C config, pin assignments for wiring, and logic for winch direction + chain counting.
-
Template sensor helper for SMART SCOPE
- Computes “recommended chain length” from depth sensor readings using scope-ratio rules.
- Mentions rounding and notes you can use tools like ChatGPT to help craft YAML if needed.
-
Dashboard configuration
- A custom dashboard with:
- Chain sensor state (magnet detected / winch operating)
- Current deployed chain length
- Winch operating indicator
- Reset button to set chain length to zero after fully retrieving the anchor
- A custom dashboard with:
-
Automation YAML for alerting (e.g., “chain scope loop”)
- Includes a threshold rule (mentions using a minimum deployed chain like ~5 m) to avoid notifications when not anchored.
Calibration / Installation Notes
Calibration method
The best approach described is:
- Let out a known length of chain (example: 10 m).
- Count the pulses generated.
- Compute distance per pulse as:
10 m / pulse_count
Calibration improves precision for the user’s specific winch + chain.
Physical installation details
- Magnet placement: attach directly to the gypsy in a location that won’t interfere with the chain path.
- Sensor placement: mount the magnetic sensor so it is close enough to reliably detect the rotating magnet.
- The sensor is described as waterproof and production-oriented (with a link to the manufacturer’s manual).
24V vs higher voltage
- If running 24V systems, the video suggests switching to INA226 for higher-voltage compatibility.
- The setup is described as identical, aside from changing the sensor configuration.
Step-by-Step Tutorial Flow (High Level)
- Assemble wiring:
- INA219 to ESP32 via I2C (SDA/SCL) + power + ground
- Magnetic sensor to ESP32 digital input (with logic based on magnet pass)
- Configure ESPHome using the provided YAML, including:
- distance-per-pulse calibration value
- winch direction detection threshold
- Install ESPHome firmware over-the-air (OTAA).
- Add the SMART SCOPE template helper based on depth sensor name.
- Create the Home Assistant dashboard using provided raw dashboard configuration.
- Add the automation for insufficient chain deployment alerts.
Main Speakers / Sources
- Main speaker: The YouTube creator (tutorial author) demonstrating the build, coding, and Home Assistant setup.
- Referenced sources/components:
- ESP32 (central hub)
- INA219 voltage sensor (and INA226 for higher voltage)
- Magnetic sensor from Quick (with manufacturer manual referenced)
- Home Assistant / ESPHome (software integration platform)