-
RADv2!
11/24/2019 at 17:43 • 0 commentsCheck out the newest iteration of this project!
https://hackaday.io/project/168588-rad2-research-activity-detector-version-2
-
Glamour shots!
12/20/2018 at 22:35 • 0 commentsWe just submitted this project for publication in a research journal, and as part of the figures took some nicer photos. Thought I'd share them!
-
Monitoring pets!
10/09/2018 at 01:49 • 0 commentsThis device can be used for many things beyond mouse cages. My wife and I have two parakeets, so I zip-tied a PIR device near their feeder and found that they eat almost exclusively during the day. (I already kind of knew that but it's neat to see the data!)
Update 10/09/18:
3 weeks of data on one charge! The variance in daily feeding early on was the result of us putting a different food source (a "treat stick") in the cage on 9/23. Still, there is a lot of daily variance in activity near the feeder, maybe some days they're hungrier than others?
-
Battery life and power consumption
09/17/2018 at 02:33 • 0 commentsThe battery we chose for this project is a large 6600mAh battery sold by Adafruit. We measured the power consumption of the entire device to be ~15mA, so it should last 440 hours, or about 18 days on a full charge. Below is a discharging curve from a device in a cage with a mouse, showing that it lasted 14 days from fully charged (this is close enough to 18 days to satisfy me that our calculations were correct).
A 2 week battery life is acceptable for many applications, but is not ideal. On the bright side, we achieved this battery life with no sleep modes activated on the processor. We have been experimenting with sleep modes and believe we can extend the battery life by ~5x with updates to the code, but we don't have that ready to release just yet.
However, searching online, a PIR based motion detector should be able to last MUCH longer - Texas Instruments has a reference design that they claim can last for 10 years on a coin cell battery. In future iterations of this device we may move to a design like that.
-
Validating the PIR sensor for detecting movement inside of a mouse cage
09/09/2018 at 17:11 • 0 commentsWe used a low--power PIR sensor to detect animal movement. This sensor returns nice looking data when mounted in a mouse cage, for example we can see a nice circadian rhythm in daily activity. See 1 month of activity data here - note the cyclical rhythm that shows more activity each night, and less during the daytime (mice are nocturnal):
While this data showed us that the PIR was detecting biological variance in activity, we wanted to calibrate what exactly was being detected by the sensor. We set up an experiment where we put the PIR next to a video camera, and recorded 4 mice this way for 24 hours. We then ran the video through a commercial motion tracking software (Noldus Ethovision) to understand what the sensor was correlated with.
We evaluated the data in 1 second, 10 second, 30 second, and 5-minute bins, and learned that the PIR correlated extremely well with total distance moved (as assayed by video analysis) at long bin widths, but not so much at the 1 second bin width. Our conclusion is that the PIR is very useful for measuring gross changes in movement, such as those that occur across minutes, but is not so great at returning second-by-second changes in movement. This is fine for our purposes, and good to know.
We then used a machine learning classifier (also part of Ethovision) to classify movement into Walking, Resting, Grooming, Rearing, Sniffing, and Digging. At a 10 second bin width, the time identified as "Walking" correlated well with how long the PIR was on (R2=0.61), while all other R2 were below 0.2. This indicates that the PIR captures locomotion from place to place, but not "in place" actions such as grooming and digging.
To more explicitly test this idea, we bought a small robot from Adafruit and programmed it to move back and forth at a constant speed (~6inches/sec), but make movements of different lengths between 0.1 and 1.0 inches. We mounted an IR LED on top of the robot to make sure it activated the PIR sensor.
With this test, we confirmed that only movements that displaced the robot >0.3inches triggered the PIR. Small vigorous movements in place did not. This test was consistent with our results from video analysis of mice, in which locomotion triggered the sensor, grooming did not.
-
Sample validation data
09/09/2018 at 16:59 • 0 comments -
First build and testing!
09/09/2018 at 15:54 • 0 commentsWe designed and built this project fairly quickly (~1 month). There are a few areas for improvement but we are already collecting cool data with it. Here are some photos of the finished build, we will post more info and validation data soon.