FED is a Feeding Experimentation Device for measuring food intake in mice. It is a 3D printed pellet dispensing device that operates with the following logic:
1) Dispense a 20mg food pellet and monitor its presence with a photo interrupter
2) Log the date and time when the pellet is taken by the mouse
The data is stored to an SD card and can be analyzed after an experiment to understand feeding patterns over multiple days. FED is battery powered and small enough to be used in many experimental conditions, including rodent home cages.
FED2.0 improves on FED1.0 in the following ways:
Smaller, cheaper, and easier to build
More reliable pellet dispensing
Longer battery life - FED2 lasts about 10 days on a charge. This can be increased quite a bit with some hardware and code changes (message me if you want details) but we prioritized ease of build and use over battery life.
FED2 has a screen!
FED 2 is a redesign of the original FED device developed by Katrina Nguyen and her colleagues in 2016, and published in the Journal of Neuroscience Methods. FED2.0 runs on an Adafruit Feather Adalogger M0, and uses boards and code from Adafruit, Paul Stoffregen's Time library, and Arturo Guadalupi's ZeroRTC library.
This project was funded by the NIH Intramural Research Program (NIDDK). This project is released under the terms of the Creative Commons - Attribution - ShareAlike 3.0 license:
There’s a minor consideration with using the new parts - for FED3, the little “feet” click into the housing and ensure that the pellet foot is oriented towards the front of the device. Photo of FED3:
The FED2 housing doesn’t have anything for the feet to click into, so make sure it’s oriented with the pellet foot directly forward. If it’s off center it might result in multiple pellets coming down the pellet shoot. I could also see it loosening up over time, so keep an eye on that.
The motor also has to be more carefully “centered” than with the prior parts, to ensure the disk doesn’t rub on the walls. It is larger in diameter now so this is more of a concern than with the old disk:
Use a screw driver through the holes in the bottom to loosen the motor, make sure it's centered and can spin freely all the way around, and then tighten it up!
We have recently finished an analysis package for analyzing FED data files in Python. (Note: by "we", I mean programmer extraordinaire, Ilona Szczot!) The goals of this analysis package are to provide visualizations and quantification of feeding rates and patterns of mice using FED.
Background: FED spits out CSV files that update whenever a pellet is taken, resulting in a file of time-stamps:
Often, we'd rather look at data in a "binned" format, to answer questions like "How many pellets did they eat in the last 2 hours?" This requires some processing.
(Note: we didn't set up FED to bin the data as it is collected because we'd have to pre-specify the bin width to do this, and this may differ between different experiments.)
Use: We wrote a GUI-based Python analysis package (also available in the Files area) that allows for a user to chose a folder where the FED output files are stored, set the circadian cycle times, choose which dates to analyse, and set the bin size in minutes. To run:
1) First dump all of your FED files into a directory. These can include multiple files from the same FED.
2) Open the script in Python 3.6 or greater. I use Spyder to run it. When you first run the script this window pops up:
3) Set these variables and click OK. A second window will pop up which allows you to filter based on mice. It will default to choosing all of the mice that have data in the folder, but you can limit the analysis to specific mice.
4) Click "OK" and the script will run, generating a new folder in your data directory, named with the unique name/time-stamp "ResultsMMDD_HHMM_SSs". This new folder will contain several visualizations, as well as Excel files containing the data underlying these visualizations.
Output: The visualizations include individual histograms for each mouse:
An average histogram of all mice:
Individual figures for each mouse showing cumulative intake, motor turns, and an "inter-pellet-intervals" histogram. This histogram tells you about meal patterning. For instance, here we can see that the mouse consumed ~250 total pellets. The "motor turns" variable reports how many times FED moved the motor to dispense a pellet - this shows you where jams happen. <10 turns in OK, if it jams you might see a number >500 turns! The right plot is the inter-pellet-interval, in minutes. Here, the peak is at ~30seconds, meaning that this was the most common interval between pellets. If a manipulation changed the eating rate within means, this peak may shift to the left or right.
A zip file has been deposited in the files area that contains the Analysis Python script, a readme, and sample data that you can run to generate the above plots. Feedback is always welcome!
The Achilles heel of any pellet dispenser is pellet jamming. There are several reasons for a jam, but one of them is that the pellets inside the hopper align in a way that impedes the movement of the dispensing disc. To combat this issue, I've modified the stepper code to make the stepper "vibrate" while dispensing. This can help shake up the pellets in the hopper and reduce jams.
Please leave feedback in comments if you try this update!
We have heard from people building FEDs in several countries, which is great! These include Canada, France, Switzerland, Germany, S Korea, and several sites in the US! This log is recognizing where FEDs are going. Please get in touch to put your photos up here!
James Ousey sent his from Caltech in the USA:
Lydia Hanna sent this photo from Exeter University in the UK!
This is actually the FED1.0 design, from Zhenwei Su, Post-Doctoral fellow in Nick Betley's lab at University of Pennsylvania
And a FED2 from Kristina Wirkowski in the same lab!
From Sung-Yon Kim's lab at Seoul National University in S. Korea.
From Stephanie Borgland's lab at the University of Calgary in Canada:
From Diego Bohorquez's lab at Duke University in North Carolina, USA (this is one of the earliest versions of the original FED):
This log will include a few tips on 3D printing FEDs. Please feel free to add your own tips in the comments!
1. A note on suppports: The printer we use is cheap and does the job, the Sindoh 3DWox (This is not an endorsement of this printer over other printers BTW, just stating what we use). Because our printer doesn't print "support material", we have designed all of the parts to be printed with as few supports as possible. When you slice your models to print, it is possible that your software will want to add support. This may be OK for some parts, but you should remove any supports from inside the pellet "funnel". Stray plastic in here can cause pellet jams.
2. Inspect the pellet path for plastic strands. While it doesn't matter if they are on the housing, the FED is a mechanical device and imperfections in the pellet dispensing area or the pellet funnel can cause jams. Take care to look this over and make sure there aren't any stray pieces of plastic. For instance, in yellow I've circled a little piece that can interfere with the movement of the pellet disc in this print:
3. Different printers can produce parts with different tolerances and slightly different sizes. In particular, this can be a problem with tight-fitting parts, such as the sliding back door to FED. If your parts don't slide together nicely you may need to tweak the design a bit to get it dialed in for your printer. STL files are available in the files area.
A colleague asked for a small modification to FED, such that in addition to the output pulse on the BNC connector, it would have a 2nd BNC which it would use as an input. This input would trigger FED to dispense, but we would still monitor the pellet well and only dispense if it was empty. This allows FED to act like a "smart" pellet dispenser in operant tasks, such that it not only dispenses a pellet, but detects when it is removed.
Feeling a bit lazy, I just drilled a hole in a regular FED instead of reprinting a new base with 2 holes for BNC connectors. I connected the new BNC to digital pin 5 on the Feather (remember when we put extra 90 degree headers there?), and wrote an updated code to allow for this behavior. Updated code is available in the files area, to use simply connect the input BNC to pin 5 and ground, and flash the updated code.
We included a timeout between pellets to stop the mice from taking one pellet, dropping it, and immediately grabbing the next one. We set this to 15 seconds by default but it can be easily changed. In the "a_header" tab in the Arduino IDE, change the number "15" in this line to update it:
int timeout = 15; //timeout between pellets in seconds
We have experimented with several stepper and servo motors to control FED, and we found one that works well for dispensing pellets. This log will describe a bit of our experience and what to look for if you want to choose a different motor for a pellet dispenser.
We needed to find a balance between having a motor that is strong enough to move the pellet disk, but also weak enough to not grind up pellets if it encounters resistance. Grain pellets disintegrate very easily, and create dust that can gum up the works. While stepper motors are a bit more complicated to control than servos (they require a driver board), we found that they are a better choice as all of the servos we tried would grind up pellets and result in pellet jams. They would typically work for a couple of hours, but after 1-2 days they would look like this
Obviously this FED can no longer dispense until it is unclogged. So if you want to experiment with different motors, or designing a different pellet dispenser altogether, we recommend choosing a geared stepper motor that will stall when it encounters resistance, rather than powering through and pulverizing the pellet. While this can take a bit longer to dispense a pellet, we coded the motor to try dispensing 10 times, and then perform a big movement to dislodge any jammed pellets.
As one final point, if you use sucrose pellets they are much harder than the grain pellets and are therefore more resistant to crushing and jamming.
This will be a log dedicated to troubleshooting. I'll edit this post as more issues are identified and (hopefully!) resolved.
FED code won't compile in the Arduino IDE - errors about RTCZero come up. There is an incompatibility between the code for Pail Stoffregen's Timelib library that is used by FED and an older Time library in the Arduino IDE. The issue is documented in comments here: https://www.hackster.io/jkoger/simple-watch-using-rtc-59e635. Long story short, to fix this, go to wherever your "Time-master" library is installed (mine was in User\Documents\Arduino\libraries\Time-master), and rename the file "Time.h" to "Time_h.h". Restart the Arduino IDE and this should fix the issue.
Motor won't turn after building hardware - Check that battery is plugged in and charged. The motor requires the most current of anything in FED. When it is low, or if FED is powered by USB without a battery connected, everything else can appear to work but the motor won't receive enough current to turn.
FED keeps spitting out pellets and wont' stop! There are two main reasons why FED may not detect that a pellet has been dispensed: 1) If the photo-interrupter is not correctly in place the pellet may not be detected. Make sure the pellet lands in between the "arms" of the photo-interrupter. 2) The photo-interrupter works by detecting the IR LED in one arm with an IR detector in the other. If there is a lot of ambient IR light (for instance, if FED is in direct sunlight! the photo-interrupter may not detect the pellet. We've experienced this issue even indoors, when FED is placed in direct sunlight from a window.
FED takes a while to dispense each pellet. FED will attempt to dispense a pellet and continue trying until it is successful. If something is impeding the pellet disk from turning, this can take many attempts. We have found that sometimes a small bit of plastic from the printing will get in the way (see yellow circle below for example). Watch FED try to dispense with no pellets - if it seems to be getting caught make sure there is nothing impeding the turning of the disk
FED dispenses 2 pellets. In our hands, this happens <1% of the time. We have found it very hard to reduce this further. If it is occuring at a higher frequency than this, make sure the photo-interrupter is positioned correctly as it may not be detecting the first pellet.
Please message me more issues and I'll log solutions here!
The print needs to be of decent quality. It is a mechanical pellet dispenser, so if your print is poor it may jam or not work correctly. I printed these in PLA on a Sindoh 3DWox printer. STL files located in the files area.
(optional) Spray the 3D parts with clear acrylic
This is to protect them from mouse gross-ness. Don't spray the pellet disk. Also no need to coat the insides of the parts. Let them dry for a couple days before putting them with mice.
Add headers to the Adalogger M0 board and the Memory Display