MIOS Cage Cam

The MIOS Cage Cam is a device designed for research mouse cages to report cage cleanliness information via the MIOS ecosystem.

Similar projects worth following
The MIOS Cage Cam is a device for measuring and reporting on the amount of waste inside mouse cages. The goal of the project is to enable researchers and animal care staff with reliable measures of cage cleanliness to improve animal well-being and better utilize facility resources.

When the device is set up and active, images are acquired using an on-board camera and are segmented to identify the number of detected waste pellets. This value is then transmitted to the cloud via the MIOS ecosystem and is then accessible to users live via the Blynk App.

The MIOS Cage Cam is currently under development by Jonathan Krynitsky and his colleagues.

Project Goals:

  • Reliable, cloud-based reporting of mouse waste
  • Tolerance for different room lighting conditions under a typical 24 hour circadian cycle
  • Does not disrupt circadian cycle of mice
  • Battery Powered
  • Easy to use and easy to set up


  • Ability to mount the device inside the cage including...
    • Power
    • Clear, unobstructed view of bedding
    • Enough distance so mice cant access/damage hardware
  • Lighter colored bedding (ideally lighter colored wood chip style)
  • Not suitable for light-sensitive mice/experiments


The MIOS Cage Cam is currently designed for Allentown NexGen Cages although the hardware likely can be retrofitted to other cages. The device attaches to the food hopper of the cage using a set of magnets. The prototype unit uses a 5V wired power adapter however the final system will use a battery. The device is connected to a Particle Photon or MIOS Environmental and Activity Monitoring Device that is set up to stream data to the MIOS Cloud via the Blynk. Once the device is mounted, powered on, and connected to the MIOS ecosystem, the device will begin to report mouse waste counts to the MIOS Cloud.


The MIOS Cage Cam acquires and processes images using an OpenMV Cam M7 microcontroller. The OpenMV Cam M7 features a programmable LED that is used for constant illumination across different lighting conditions. However, before any images are acquired with LED illumination, a test image is always acquired without illumination and is processed to determine if the room's circadean cycle is in its night period. Once the device verifies the room is in its daytime portion of the circadean cycle, an image is acquired with brief LED illumination. Waste pellets are segmented in the image using a combination of thresholds and filters. A value is formed based on the number of detected pellets and is then transmitted to a Particle Photon via I2C or SPI connection and then to the MIOS cloud via Blynk. The data is then available live via the MIOS App.

Funding and terms:

This project was funded by the NIH Intramural Research Program (NIDDK and CIT).

This project is released under the terms of the Creative Commons - Attribution - ShareAlike 3.0 license:
human readable:
legal wording:

MÍOS was conceived by a team of researchers at the National Institutes of Health (NIH) and Food and Drug Administration (FDA), and all app development was done by Blynk. While MÍOS devices and designs are open-source and free, Blynk is a "freemium" service and some features cost money to use.  100% of this money supports the business operations of Blynk.  NIH, FDA, and members of the MÍOS team receive no royalties or payments from Blynk.

Standard Tesselated Geometry - 209.91 kB - 05/25/2018 at 18:46


sldprt - 438.55 kB - 05/25/2018 at 18:46


Standard Tesselated Geometry - 275.99 kB - 05/25/2018 at 18:46


sldprt - 142.24 kB - 05/25/2018 at 18:46


sldprt - 322.54 kB - 05/25/2018 at 18:46


View all 7 files

  • 1 × OpenMV Cam M7 Small, low power, microcontroller board containing GPIO pins, RGB LED, micro SD card slot, and OV7725 image sensor.
  • 1 × 3D Printed Enclosure Currently printed in Rigur on an Objet Eden260vs
  • 2 × Disk Magnets
  • 1 × Bar Magnet
  • 1 × 5V USB AC-DC Power Adapter

View all 7 components

  • New 3D design

    Lex Kravitz10/06/2018 at 18:44 0 comments

    We have updated the 3D design several times and it now looks and works great!

  • Initial Results!

    Jonathan Krynitsky06/20/2018 at 17:27 0 comments

    I was able to test the algorithm on a large set of images from 2 different cage setups. The results are mixed but generally positive. Most of the waste pellets are detected by the segmentation algorithm however dark spots, shadows, and the exposed cage floor still prove to be challenges. I am shifting the focus of development to creating methods to help filter out these false positives.

    In parallel, we are developing a validation setup that includes a separate higher definition camera to help visually verify the presence of detected waste pellets. This setup will only be used to evaluate the module's accuracy using the different perspective and higher definition camera to more easily view the cage floor. 

  • Initial Log Entry

    Jonathan Krynitsky05/25/2018 at 18:31 0 comments

    Project Created on Hackaday!

    Development up to this point included...

    1. Initial OpenMV Cam M7 image acquisition and testing
    2. Design of 3D Printed Enclosure
    3. Initial acquisition in animal facility
    4. Troubleshooting of image quality (exposure was too short and captured room light flicker)
    5. Added LED control for consistent lighting

    Currently, 2 units are deployed in an animal facility to acquire images under varied lighting conditions.

View all 3 project logs

  • 1
    Mount Camera to Cage Food/Water Hopper

    Find a position on the food/water hopper where the Cage Cam can be mounted such that it has an unobstructed view of the cage bedding. The camera should be mounted so that the barrel of the lens is perpendicular to the cage floor. 

    When ready to mount, place the Cage Cam in the desired spot and place the rectangular mounting magnet on the other side of the hopper bars so that it mates with the Cage Cam enclosure magnets.

  • 2
    Attach Power and Signal Wires

    Route the signal cable from the Cage Cam to a particle photon that is connected to the MIOS ecosystem or to the corresponding expansion port on a MIOS Environmental Sensor.

    Ensure the power cable is long enough to reach the cage from a standard 5V, 1A USB power supply. 

    Plug the USB side into the power supply and route the other side into the cage via the lid and plug it in to the Cage Cam.

  • 3
    Monitor Cage Cam using the Blynk powered MIOS App!

View all 3 instructions

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates