← Israel Gayoso

Mosicu

GPS collars for mountain livestock.

Andorra Since September 2026 Piloting

In summer, Andorran herds climb high, the phone signal drops, and one cow that wanders off can cost a farmer a whole morning of walking. Most livestock trackers are designed for flat farmland with good coverage.

Mosicu is a collar plus an app. The collar reports where the animal is every 15 minutes over the mobile network. The app shows the whole herd on a map and sends an alert when an animal leaves its pasture, stops reporting, hasn't moved for hours, or is in heat stress. No antennas to install.

I built all of it: the electronics, the case, the firmware, the cellular link, the backend, the iOS and Android apps and the website.

Exploded render of the collar enclosure: base with board, 18650 cell and sensors, lid with GNSS patch and buzzer
The collar, exploded: board, battery and sensors in the base; GNSS antenna and buzzer in the lid.

The hardware.

The collar is built around a LilyGO T-SIM7080G-S3: an ESP32-S3 with a SIMCom SIM7080G modem that does both GNSS and NB-IoT. Around it:

One soldered wire from the accelerometer's interrupt to a GPIO lets the collar sleep through the night and wake when a resting animal gets up, without shortening the reporting interval.

The enclosure

The case is a parametric model in Python with build123d (an OpenCascade B-rep kernel), so it exports STEP as well as STL, and every dimension is a named constant with asserts guarding the critical clearances. It's on its fourth version:

The base comes in a goat and a cow version (only the strap lugs differ), and the logo and serial number are engraved into the lid.

Closed collar enclosure render Lid with the engraved Mosicu mark and serial
The closed v4 enclosure, and the engraved lid (filled with a paint marker after printing).

The firmware.

PlatformIO on the ESP32-S3. The firmware is deliberately minimal: measure, buffer, send, obey. Every wake it gets a GNSS fix, reads the sensors and battery, sends the reading, executes any pending commands, and goes back to deep sleep. Anything likely to change lives on the server.

NB-IoT in Andorra.

Andorra Telecom's NB-IoT is the only IoT network in the country (no LTE-M), so the collar uses WiFi when it can and NB-IoT when it can't. I measured what one HTTPS uplink really costs on a test SIM:

Per uplink~5.8 KB total, of which ~3.2 KB is the TLS 1.2 handshake
Radio on29–36 s: network attach 12–18 s, TLS connect 7–11 s
Per month~17 MB if every 15-minute reading goes out alone, on a 100 MB SIM

The modem can't resume TLS sessions or report byte counters, so the firmware keeps its own daily and monthly data budget in flash and buffers readings when the budget runs out. The next steps are about bytes: batch several readings per session, resume TLS on the ESP32 itself over the modem's raw TCP (~0.7 KB instead of 3.2 KB per handshake), and eventually CoAP over DTLS with a compact binary payload.

The cloud.

Collar ──HTTPS──▶ Cloudflare Worker ──▶ Supabase
                  (the only URL         ├─ Edge Function "ingest"
                   collars know)        ├─ Postgres + PostGIS
                                        ├─ Auth, Realtime
                                        └─ pg_cron ──▶ push alerts
                                                 │
                                    Flutter app ◀┘

The apps.

One Flutter codebase for iOS and Android, in Catalan, Spanish and English. The users are farmers outdoors, with gloves, in bright sun and patchy coverage, so: map first, big targets, high contrast, and the age of every value ("15 min ago") always on screen.

App map with the herd, pastures and an out-of-zone alert Animal profile with history and battery
The herd on the map with an out-of-zone alert, and an animal's profile.
Alerts list Drawing pastures on the satellite map
Alerts, and pastures drawn on the satellite map. Store screenshots are generated by script.

The website.

mosicu.tech is a static site from a tiny dependency-free generator, served by a Cloudflare Worker. It picks the language from a cookie or the visitor's country, and its contact form is protected by Turnstile and rate limits, with leads stored in Cloudflare D1 and deleted after 24 months.

Mosicu website preview: Know where your herd is, even high up the mountain

What I learned.