On a laptop, when you run out of something you buy more. More storage, more memory, a bigger battery, a faster chip. On a collar that a dog wears all day, you can't. Every part has to be small and light enough for the dog not to care, and a battery the size of a coin has to go a long time between charges. So every feature we add takes something from somewhere else.
This is the part of hardware nobody warned me about. It's not one hard problem. It's a hundred small trade-offs, and each one pulls against the others.
The phone walks away
The collar doesn't talk to the internet. It sends its data over Bluetooth to the owner's phone, and the phone uploads it to our server. That works while the phone is nearby. But people go to work, leave the phone in another room, or walk the dog without it.
So the collar has to keep everything it records until the phone comes back. And that is where the first limit shows up.
No room for a 5 TB drive
The board we use has 2 MB of flash storage for this data. Not gigabytes. Megabytes. You can't put an SSD in a dog collar: there is no space, and it would eat the battery.
While the dog moves, the collar records a 2-second window of motion (26 readings a second from the motion sensor) about every 20 seconds, and each window takes 322 bytes. In practice that means the collar can hold about 34 hours of activity on its own. If the phone is gone longer than that, the oldest data gets overwritten by the newest. We chose that on purpose: a recent day is more useful than an old one.
Want 3 days? We could record less often, or keep less detail. But then we see less of the day, and we learned the hard way that a fixed sampling interval saw only 3.3% of the day.
Compression costs battery too
The obvious answer is: compress the data. But compression runs on the chip, and every bit of work on the chip uses battery.
A raw window is 624 bytes. We store only the first reading and then the small difference to each next one, which gets it to 322 bytes, about half. That trick is almost free for the chip. Stronger compression would save more space, but the chip would work harder and longer for every window, all day. Less storage on one side, more battery on the other.
The same story everywhere
Once you see it, you see it in every decision:
- Thinking on the collar or on the server. A neural net on the collar would know right away if the dog is walking or sleeping, but it costs battery. So we moved that work to our server, where power is free, and the collar only records.
- Sending data. The radio is one of the most expensive parts. Sending often means fresh data in the app; sending in batches means a longer battery life. We send in batches and accept that the app can be a quarter of an hour or more behind.
- Sensing more. Reading the sensor faster shows more detail, such as the small movements of breathing while the dog sleeps, which we are still testing. It also wakes the chip more often. We only do it in short bursts when the dog is still.
- Lights. One small status light, lit most of the day, ate most of our battery.
- A bigger battery. More capacity means more weight and size on the dog's neck. That is a trade-off too.
Finding the balance
There is no perfect setting. There is only the balance that fits what the collar is for: to learn what is normal for your dog, and notice when something changes. For that, we need the whole day, not every detail of it, and we need a collar the owner doesn't have to charge all the time.
Software taught me to add things. Hardware is teaching me to choose. Every feature has to pay for itself in bytes and in battery, and most of the work is deciding what we can live without.