Dog Collar Seizure Detection with TinyML

Dog Collar Seizure Detection with TinyML

ISEF Category: Embedded Systems

Ready to Turn This Idea Into a Real Project?

This guide was put together with the help of AI research tools to give you a solid starting point.But a competitive science fair project lives in the details: refining your research question, fine-tuning your variables, analyzing your data, and presenting your findings like a seasoned scientist.

For next steps tailored to your interests, skill level, and timeline, work one-on-one with a MehtA+ mentor. Learn more about MehtA+ Science & Engineering Research Mentorship →

Subcategory: Internet of Things  ·  Difficulty: Advanced  ·  Setup: School Lab  ·  Time: Full Year

The Hook

A dog can look normal one minute and crash into a dangerous episode the next. That makes fast motion detection a real safety problem, not just a tech demo. You can turn cheap sensors into a collar that spots unusual movement patterns and sends an alert before a person notices something is wrong.

What Is It?

This project uses motion data from a dog collar, usually from an inertial measurement unit, or IMU, plus GPS. An IMU measures acceleration and rotation. Think of it like a tiny motion diary on the collar. Your goal is to train a small machine learning model, often a 1D convolutional neural network, or 1D-CNN, to tell normal activity from seizure-like patterns.

TinyML means machine learning that runs on small devices with limited memory and power. Instead of sending raw data to a big computer all the time, the collar can make the first decision on-device. MQTT is the messaging system that sends a short alert over a network. In simple terms, the collar senses motion, the model classifies it, and the alert goes out if the pattern looks risky.

Why This Is a Good Topic

This is a strong science fair topic because you can test clear variables, measure real performance, and build something useful. You can compare sensor types, feature sets, window sizes, and model choices, then track accuracy, false alarms, and detection delay. The project connects to animal health, wearable devices, and smart-home alert systems, so the real-world value is easy to explain. You can learn embedded systems design, data labeling, model evaluation, and basic wireless communication without needing a medical lab.

Research Questions

  • How does IMU placement on the collar affect seizure-like motion detection accuracy?
  • What is the effect of adding GPS features to IMU-only classification?
  • Does a 1D-CNN outperform a simpler model, such as decision trees or logistic regression, on collar motion data?
  • To what extent does sensor sampling rate change false alarm rate and missed detection rate?
  • Which motion window length gives the best balance between early detection and stable classification?
  • How does class imbalance between normal play, sleep, and seizure-like motion affect model performance?

Basic Materials

  • Microcontroller with wireless support, such as ESP32 or Raspberry Pi Pico W,
  • IMU sensor module with accelerometer and gyroscope,
  • GPS module,
  • Battery pack and safe charging setup,
  • Dog collar or harness mount,
  • Laptop for coding and data analysis,
  • USB cables and breadboard or soldered prototyping board,
  • Tape, zip ties, or 3D-printed holder for sensor mounting,
  • Smartphone for timestamped video reference during data collection,
  • Notebook or spreadsheet for labeling sessions.

Advanced Materials

  • Microcontroller with edge AI support, such as ESP32-S3,
  • IMU module with higher sampling stability,
  • GPS module with antenna,
  • Commercial collar form factor for repeatable mounting,
  • Logic analyzer or oscilloscope for debugging timing,
  • Soldering tools and prototyping boards,
  • Larger battery test setup for power profiling,
  • Reference vibration source for repeatable motion tests,
  • Environmental sensor for context logging,
  • Secure network router for MQTT testing.

Software & Tools

  • Python: Cleans sensor data, builds features, trains models, and plots confusion matrices.
  • TensorFlow Lite: Converts a trained model into a form that can run on a small device.
  • Edge Impulse: Helps collect, label, and test embedded sensor data with a free tier.
  • MQTT Explorer: Lets you inspect alert messages and debug network publishing.
  • ImageJ: Not for the model itself, but useful if you also analyze frame-by-frame video labels from reference footage.

Experiment Steps

  1. Define the exact motion problem you want to detect, such as seizure-like episodes versus normal collar movement.
  2. Choose the sensor signals you will compare, then decide whether GPS adds useful context beyond IMU data.
  3. Plan a labeling system that ties sensor windows to video or observed events so your training data stays consistent.
  4. Build a baseline model first, then compare it with your 1D-CNN so you can prove whether the extra complexity helps.
  5. Design evaluation metrics that matter for safety, including sensitivity, false alarms, and time to alert.
  6. Plan on-device testing and MQTT alert logic so you can measure whether the system works outside the laptop.

Common Pitfalls

  • Labeling normal zoomies as seizure-like motion, which inflates false alarms and ruins model trust.
  • Mounting the collar differently in each trial, which changes the sensor signal more than the behavior does.
  • Training on one dog or one movement style only, which makes the model memorize a narrow pattern instead of generalizing.
  • Ignoring GPS noise or dropout, which can add fake features and confuse the classifier.
  • Reporting accuracy only, which hides missed detections and makes a safety system look better than it is.

What Makes This Competitive

A class-level version of this project stops at a working alert. A stronger version compares multiple models, multiple sensor setups, and multiple dogs or motion datasets, then uses the same evaluation rules for all of them. You can get much stronger if you focus on false alarm rate, detection delay, and power use, not just accuracy. A competitive entry also explains why one design choice works better, instead of only showing that the device turns on.

Project Variations

  • Test whether an IMU-only collar can match an IMU plus GPS design for motion classification.
  • Compare a tiny 1D-CNN with a hand-engineered feature model, such as random forest, on the same collar data.
  • Adapt the system to detect other high-risk events, such as repeated falls, frantic scratching, or nighttime pacing.

Learn More

  • PubMed: Search for review articles on canine epilepsy, wearable sensing, and seizure detection to ground your background research.
  • NIH RePORTER: Look up funded projects on animal health monitoring and wearable biosensing.
  • IEEE Xplore: Search for papers on TinyML, IMU classification, and edge-based anomaly detection.
  • TensorFlow Lite Micro documentation: Read the official guides for running small models on microcontrollers.
  • NASA Open Source Software and data practices pages: Use their documentation style as a model for clean logging, versioning, and reproducibility.
Shopping Cart