Close
0%
0%

Feeding Experimentation Device 3 (FED3)

Version 3 of our home-cage feeding device, FED.
FED3 includes nosepokes and stimuli for behavioral training.

Public Chat
Similar projects worth following
NOTE: This project has moved, for the most recent files and designs please go to: https://github.com/KravitzLabDevices/FED3

FED3 is a wireless, battery-powered device designed for home-cage training of mice in operant tasks. Mice interact with FED3 through two nose-pokes, and FED3 responds to the mice with visual stimuli, auditory stimuli, and pellets. FED3 has an analog output that allows it to synchronize with and control external equipment. A screen provides feedback to the user, and all behavioral events are logged to an on-board microSD card. The default code includes 12 built-in programs, but FED3 is open-source and hackable, and can be easily modified to perform other tasks.

This is a battery powered FED device for training rodents in home cages.  FED was developed to free researchers from expensive and rigid behavioral testing equipment, and allow them to do their experiments wherever they'd like - in dedicated boxed, in the home cage, or even inside other scientific equipment.  Importantly, FED3 is open source and new sensors or code can be easily added to change its function.    

The device runs on an Adafruit Adalogger M0 Feather board, which also includes a microSD card slot for recording behavioral data.  The hardware include two "nosepoke" beambreak sensors, a beeper, a multi-color LED strip, a pellet dispenser, a BNC output jack for synchronizing with other equipment, and a screen for providing feedback to the user.   See logs for info on the build, costs, etc.  And as always, feedback is welcome! 



Please join our Google group for troubleshooting and questions.

Funding and license:  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:

human readable: https://creativecommons.org/licenses/by-sa/3.0/

legal wording: https://creativecommons.org/licenses/by-sa/3.0/legalcode

 

FED3 quickstart instructions.pdf

See latest design files here: https://github.com/KravitzLabDevices/FED3

Adobe Portable Document Format - 410.51 kB - 12/10/2019 at 14:23

Preview
Download

View all 19 components

  • JST battery extension

    Lex Kravitz11/16/2020 at 16:02 0 comments

    The battery connection on FED3 is pretty annoying, as it is right next to the stepper and is difficult to plug in when swapping batteries.  As a workaround I looked online for a small 2-pin LiPo extension cable be couldn't find one.  The closest I found was this JST jumper, which won't do it, or this long extension, which won't fit inside of FED.   If anyone can point me to a short extension that would be great!

    Anyway as I couldn't find one to purchase, I designed a small PCB to fit this need.  Here is a link where you can purchase it from Oshpark, the PCB costs 25 cents each.

    Tiny JST connector PCB

    You will also need a JST PH 2.0 2-pin female connector with cable, and a male through-hole connector (here). Watch out when buying these parts from Amazon and make sure to read the reviews, apparently the polarity (red/black wire locations) can be reversed from some suppliers. 

    Solder the JST female pigtail and male connector into the PCB and plug the cable into the Adalogger on the FED3. Now you have a battery extension that makes it much easier to swap out the battery!



  • FED3 GitHub site

    Lex Kravitz11/16/2020 at 15:36 0 comments

    We set up a pretty extensive GitHub site that includes the latest design files, code, and documentation.

    https://github.com/KravitzLabDevices/FED3

    Look for the newest files there!

  • Angled dispenser

    Lex Kravitz11/16/2020 at 15:30 0 comments

    We have been working with the horizontal pellet dispensing design of FED since 2016, but while stuck at home during the Spring of 2020 I started experimenting with a completely different pellet dispensing approach, using an angled dispenser.  This dispenser is much less likely to jam, and we've switched over completely to these in my lab.  Here's a demo of how it works:

    The 3D files and more info can be found at the FED3 Github site.

  • New parts for May 2020

    Lex Kravitz05/27/2020 at 03:09 0 comments

    Over the quarantine I've been working on tweaking a few things on the FED3 parts.  This log will go over the new tweaks, which are available in the Files area.

    1.  The back cover latching mechanism has always been a bit hard to use.  I've now put notches in the part to make it easier to take on and off:

    2. The motor mount used a clip, combined with small self-tapping screws.  The screws could cause problems by either stripping the 3D plastic, or tapping in with the motor misaligned.  Either one could run the print.  Now I use two 8mm M4 0.7 threaded bolts with M4 0.7 nuts to secure the motor. This is much more reliable than the self-tapping screws and does not risk destroying the print if the screws go in misaligned. Because the bolts work so well I also removed the clip, which makes this part easier to print.


    3. Finally, researchers Zane Andrews and Claire Foldi at Monash University showed me that mice could steal an extra pellet by poking their nose in the pellet well and grabbing the pellet before it enters the photo-beam.  This would cause FED to not register a pellet was dropped, and therefore drop another one.  I updated the front piece to include a "canopy" over the pellet well to prohibit this behavior.



    So those are the newest edits.  Editable TinkerCAD parts are here.

  • Cage insert to protect FED3

    Lex Kravitz03/29/2020 at 15:40 0 comments

    In June of 2019 Zane Andrews and Nino Benci from Monash University posted a cool idea to the FED3 forum.  They used a simple laser-cut piece of acrylic in the cage to block the mice from climbing on the top of FED3, keeping the FED3 cleaner.  Here is a photo of their design, they also provide PDF files for laser cutting in their post linked above:

    I recently re-made this idea to fit in our cages (AllenTown NexGen caging), and put editable 3D print files available here (you can edit them to fit your own caging). I also included small cut-outs for 3x8mm round magnets (the same ones on the front-plate of FED3) to hold it in place. The extra cut-out on the right side is a customization in case you need any wiring to pass from the BNC output jack on FED into the cage (for controlling an LED for instance).



    While 3D printing works fine, these can also be laser cut - I just received these parts from Ponoko for ~$3-5 each for acrylic (black was the cheapest).  I even got it cut in Delrin (bottom piece), which is autoclavable for $9.50.

    The best looking laser cut version I made was to use the 0.5mm thick "Silver on Black Adhesive-Backed Plastic" ($8.77 each) for the front and 3.0mm thick "Black Matte Acrylic" ($5.24 each) for the back.
    The adhesive backed "front" can be carefully aligned and stuck to the back, and 8mm x 3mm round magnets can then be glued into the holes in the back part.  These mate with identical magnets on the FED3.
    Here's a photo in a cage (note that plants are not normally found in our mouse facility... I'm doing all of this testing at home due to the pandemic).


  • Aligning the motor to reduce pellet jams

    Lex Kravitz09/21/2019 at 22:09 0 comments

    The biggest issue with FED is jams, and this video will show one source of them and how to fix it to improve dispensing.  

    The most important thing is to make sure the pellet disk is completely stable inside the hopper.  If you can wiggle it back and forth it's likely the motor is misaligned and the device may jam.  In this case, either take it apart and try to align things better, or you may even need to re-print the FED front.  See video for more info:


    When everything is aligned well FED can dispense reliably.  Here is a timelapse of 1200 pellets being dispensed in a row.  Under normal conditions this would be ~1 week of continuous feeding.  I still recommend checking the FEDs and cleaning crumbs out daily if you run it over multiple days.

  • Quantitative error testing, July 2019

    Lex Kravitz07/11/2019 at 12:34 1 comment

    We have built 6 FEDs using the new STL files and done some quantitative error testing on them.  Specifically, we dispensed 200 pellets from each manually and recorded 4 types of errors.  These included:

    - Pellet "jumps", where the dispensed pellet jumped out of the pellet well, leading to a 2nd pellet dispensed.  n=28/1200 dispenses, 2.3%

    - Double pellets, where the dispensed pellet was not detected, resulting in a 2nd pellet dispensed, n=23/1200 dispenses, 1.9%

    -Jams (self-cleared), where the FED took longer than 10 tries to dispense, activating its self-clearing motor movements, n=9, 0.8%

    -Jams (not cleared), where the FED required experimenter intervention to clear, this did not occur in these tests, n=0!  

    Our next tests will involve mice in cages, stay tuned!  

  • Updated FED3 3D design files for July 2019!

    Lex Kravitz07/09/2019 at 00:01 2 comments

    The last release of STL files was in October of 2018, and I have made many tweaks since then to improve the function of FED.  I have just uploaded a new set of STL files.  These parts result in better dispensing, better aesthetics, and they solve some unexpected problems (like mice stealing SD cards!) 

    These include tweaks to all of the parts, which I'll quickly review here:

    1. Wall Mounts. The front now includes corner insets to hold 8mm magnets for wall mounting. This allows FED3 to be mounted externally on a cage or wall, or be placed inside of it:

    Here are 8 FEDs mounted on plastic boxes in my lab.  Wall mounting keeps the FEDs cleaner but it requires dedicated space to run them.

    2. Option for a metal pellet well.  I included 2 variants of the front file, one (above) that is printed in one piece, as before, and another (in the STL pack) that has the "nose" removed.  This is so the nose can be printed as a separate part in metal to stop mice from chewing on it (I've been doing this commercially through Shapeways at $15 each for the metal part). Here it is in brass (nose-piece STL is in the files area too):

    3. SD card door. The housing now has a sliding door for covering the SD card and USB port (take that, curious mice!)

    It has a nice "click" to it too, see here.

    4. Larger diameter pellet disk.  The diameter of the pellet disk was increased by 2mm to reduce the chance of pellets getting in between the disk and the wall of the pellet hopper, creating a jam.  During assembly, it is important to "center" the disk so it rotates freely.

    5. More reliable hopper. Four significant changes were made to the hopper itself.  First, the pellet "foot" was decreased in size to just cover the dispensing hole.  I found this reduced pellet "grinding".  (Fun fact, this was like this in the FED1 design!)

    Second, I removed the inner "ring" inside the pellet disk.  This was designed to stop pellets from becoming jammed between the pellet disk and the wall of the pellet hopper, but it ended up creating a new place where pellets could become jammed if the hopper was not seated perfectly.  With the wider diameter pellet disk this is no longer necessary.  New (left) vs. old (right):

    Third, I added "feet" to secure the orientation of the hopper correctly. When screwing the hopper on, the feet should align like this:

    Fourth, I reduced the height of the hopper by ~1cm, which will allow FED to fit in even more caging (we had some caging that the old design was just barely too tall to fit in with the lid comfortably closed.  In terms of capacity, the hopper previously fit ~2000 pellets, and now holds ~1500.  This is an estimated drop from ~13 to ~10 days of dispensing, which I think is worth it for the decrease in height. FED3 needs to be checked more often than that anyway so it's sort of a moot point.

    Old (left) vs new (right):

    6. Tessellated lid text! (Update 11-16-19 - while awesome looking, I found that this tessellated text design wasn't ideal as it got dirty really easily and was hard to clean inside the text, I've removed the text in the most recent version in the files area).

    7. Tweaked back cover. Very minor tweaks to improve how it slides, and update the label to FED3 version 1.1!

    If you made it this far here are photos of completed FED3 with the new parts:

  • New programs

    Lex Kravitz05/20/2019 at 16:22 0 comments

    Based on feedback, I've updated the number of programs to 10!  Here are the modes present in the newest version of the code.  Use the left and right pokes at startup to scroll though:

      0 Free feeding
      1 FR1
      2 FR3
      3 FR5
      4 Progressive Ratio
      5 Extinction
      6 Light tracking FR1 task
      7 FR1 (reversed)
      8 PR (reversed)
      9 Optogenetic stimulation
      10 Optogenetic stimulation (reversed)

  • Interfacing FED3 with Bonsai

    Andrew Hardaway04/18/2019 at 20:47 0 comments

    Hi,

    Many of you may be using the FED3 in satellite mode, logging the data locally and extracting it for later analysis. Lex and I wanted to codify a platform where the outputs from the FED3 could be read in real-time and paired with other neural circuit manipulations like fiber photometry that use open source platforms like Bonsai. Briefly, Bonsai is an open source program with near limitless potential to read out and drive multiple pieces of hardware, software and provide you with behavioral or physiological data in real time. All for the low low price of $0. It uses a visual programming language to control different functions which means zero front end coding - the flow of commands appear as nodes that move left to right. Check out and install Bonsai here at https://bonsai-rx.org/

    My goal was to use the FED3 as an operant feeding device reading out the sensors in real time to generate time stamps that I could then extract from fiber photometry data sets. I'm using the Neurophotometrics (NPM) System with 3 LEDs 415, 470, and 560 and a BlackFly Camera. Sage Aronson of NPM provided us with some starting bonsai files to control his system and I've adapted it and combined it with the FED3 bonsai layout. You can access the Bonsai layouts in the Files section above. Ultimately it does 3 things: 1) Talk to the FED3 and generate a timestamp file of the different sensor outputs 2) Talk to another camera to capture video of the chamber and 3) Talk to the NPM and generate fiber photometry signal data in csv format. A simple schematic of the hardware is below. Notably, you will need a separate Arduino to function as an I/O Box for the FED3. 

View all 33 project logs

  • 1
    Download Arduino IDE

    Before starting with building anything you should make sure your computer can communicate with the Adalogger M0 board and that you can flash the operant FED sketch.  Start by installing the Arduino IDE.

  • 2
    Install relevant Arduino boards to run the Adalogger M0

    The Adafruit M0 Adalogger board is not natively supported by the Arduino IDE.  To enable the Arduino IDE to flash sketches to this board, follow instructions here.  

    Note: There is an incompatibility between the FED code and Adafruit SAMD board packages >1.5.5.  We don't know why, but while we try to figure it out, just install version 1.5.5 of the Adafruit SAM Board package.

    After completing these steps make sure you can flash the example sketch "Blink" to the Adalogger board before continuing.  Open Blink in File>Examples>Basic>Blink.  "Double-click" the button on the Adalogger to put it in bootloader mode and make sure Board is set to "Adafruit Feather M0" and port is set to the same before clicking upload (the right arrow at the top of the Arduino IDE).

    You should see "Upload complete" in the bottom feedback window and the red LED on the board should blink once per second.  

    Congratulations, you have configured your Arduino IDE and uploaded a sketch to the Adalogger!

  • 3
    Install relevant libraries

     FED3 requires the following libraries:

    #include <Wire.h>
    

    #include <SPI.h> #include <Stepper.h> #include <RTCZero.h> #include "RTClib.h" #include <SdFat.h> #include <Adafruit_GFX.h> #include <Adafruit_SharpMem.h> #include <Fonts/FreeSans9pt7b.h> #include <Adafruit_NeoPixel.h>

    You can install them in multiple ways, but the simplest will be to download the prepared zip file (FED3libraries.zip from the files area).  Extract these libraries to your Arduino libraries directory (for most it will be: /Documents/Arduino/libraries

    When you're done they should all be in your libraries directory, see example:

    NOTE: copy these libraries right into the Arduino/libraries folder, not inside another sub directory or the Arduino IDE won't find them.  If this doesn't work, or you'd prefer a different way go through instructions here for how to manually add libraries.

View all 16 instructions

Enjoy this project?

Share

Discussions

Jaya wrote 01/18/2023 at 21:30 point

Great work on FED3 device. Can this device be used for  monitoring rat food intake? And may I know the dimension of this  device please? Thank you :)

  Are you sure? yes | no

nicolasluarte wrote 09/24/2021 at 14:17 point

Great job on the FED!. I've been using FED 2 for a long a time, and I would like to ask if there's a way to put FED 3 nose poke ports into  the FED 2

  Are you sure? yes | no

Lex Kravitz wrote 09/24/2021 at 16:31 point

Hi!  Thanks for writing.  The short answer is that you can, as the FED2 uses the same microcontroller as the FED3 (Adafruit Adalogger M0).  You can use something like this: https://hackaday.io/project/106604-simple-nosepoke, and just solder the output of it to free pins on the M0 to control pellet dispensing with pokes.  In practice though it may be difficult to retrofit FED2 with new electronics and 3D design, vs. just making FED3.  Good luck with it!

  Are you sure? yes | no

nicolasluarte wrote 09/24/2021 at 17:43 point

Thanks! will try that out

  Are you sure? yes | no

Tommaso Biagini wrote 07/09/2020 at 08:27 point

Hi! Thank you very much for your work I like it very much! I just would like to know how I could connect the device with an Arduino UNO and make the arduino board control the FED3 device, because I saw that in the scheme you inserted in the gallery you use a BNC connector but I don't know how to connect the arduino with a BNC cable.

Thank you very much!

  Are you sure? yes | no

Lex Kravitz wrote 07/29/2020 at 14:41 point

Thanks Tommaso!  The input port is programmable (it's just the GPIO connected to A0).  I typically use it as an output to send FED info to other devices but it could be changed to an input so you could control it with an UNO.  What are you trying to do?  Also can you post your question on the FED forum?  I check it more frequently than here.  Thanks!   https://groups.google.com/forum/#!forum/fedforum

  Are you sure? yes | no

Tommaso Biagini wrote 07/30/2020 at 13:08 point

So, I have the UNO connected to a IR sensor that triggers the opening of a door through servo motor also connected  to the UNO. What I need would be the FED to release a pellet in response to a poke (indifferently if the left or right) and then waiting for the opening and closure of the door to return at the initial stage. Can I bypass the UNO and make make everything controlled by the Adalogger?

  Are you sure? yes | no

Jay Phansalkar wrote 04/08/2019 at 13:22 point

Really great design, and fun to put  together!

I am having trouble fitting the electronics into the the 3D housing. 

- The holes for the photointerrupters are too small

- The front plate won't click in with the body

- The pellet disk won't fit with the motor

What do you think is the best way to remedy this? Scale up the parts and reprint, or try to make modifications to my existing prints?

Also have you ever encountered the RTC error in which the date uploads as 165/165/2165?

  Are you sure? yes | no

Lex Kravitz wrote 04/08/2019 at 23:05 point

Hi Jay!

Thanks!  The short answer is that this will depend on your 3D printer and the quality of the prints that you are getting with it.  If you are experiencing multiple issues you may want to try using a different printer and see if you get better results.  Or try changing the settings on your printer to try to get better quality prints.  If the parts are only slightly off you can heat them gently with a heat gun and see if it helps them snap together.

I have seen this RTC error, it suggests either the RTC board is disconnected, doesn't have a battery, or isn't set.  Did you follow the instructions on these parts?

Lastly, can post these issues on the FED Google group?  There are other people there who may benefit from these questions.  Please request access here: https://groups.google.com/forum/#!forum/fedforum

Thanks!

  Are you sure? yes | no

zane.andrews wrote 04/08/2019 at 01:13 point

Great job on the FED3 system Lex. And massive thanks for all your efforts to help us put these together.

One question - It would be really useful to have a way to change the active poke port. Even a protocol that has FR1-reversed would be super helpful and useful.

  Are you sure? yes | no

Lex Kravitz wrote 04/08/2019 at 23:11 point

Thanks Zane!  I'm exited to see what you do with it!

That's a great suggestion, and I will look into a simple way to implement this.  Adding a reversed FR1 protocol is very simple, I can whip that up for you.

As a more elegant solution for all programs, what do you think about leaving all programs as is, but swapping which poke is active if a user holds both pokes for ~3 seconds or something?  (BTW, that move is currently programmed to reset the FED but I rarely use it so I could re-purpose it...).

Also, could you post this question on the FED Google group?  There are other people there who may benefit from this or have ideas. Thanks!  https://groups.google.com/forum/#!forum/fedforum

  Are you sure? yes | no

nino.benci wrote 03/11/2019 at 01:38 point

Components list update.

The excel file lists the following LiPo battery;

Adafruit product 354

The component list on this website lists;

Adafruit product 353

The 353 (3.7V 6600mAH) is too big to fit the housing, the 354 (3.7V 4400mAH) is the correct size.

Order the component off the excel list.

  Are you sure? yes | no

Lex Kravitz wrote 04/08/2019 at 02:05 point

Thanks again for catching this Nino - I'm really sorry/embarrassed for all of the errors 8(  It's updated now.

  Are you sure? yes | no

nino.benci wrote 03/03/2019 at 23:13 point

Quick note of advice, the following items are incorrect... "2mm pitch headers" do not fit the 2.5mm pitch of the pin headers...

2mm Pitch Female Headershttps://www.adafruit.com/product/2672

I ordered the kit components and have just found out ( did not do a check, thought the parts numbers were correct )

The following are actually 2.5 mm ( 0.1 inch )

2 mm Pitch Short Male Headershttps://www.adafruit.com/product/3002

Cheers.

  Are you sure? yes | no

Lex Kravitz wrote 03/04/2019 at 01:21 point

Shoot I'm sorry about that, I'll update the part number right away.  Please let me know if you detect any other errors, thanks in advance!

  Are you sure? yes | no

Lex Kravitz wrote 10/07/2018 at 23:26 point

Thanks Sophi!  Yeah I need to do a few more videos and finish the instructions, hopefully I'll find time for that this week!

  Are you sure? yes | no

Sophi Kravitz wrote 10/06/2018 at 22:43 point

FED 3! Hooray! Two mouse pokes in one package is impressive and so is the build. Very clean. Awesome job on the video too! Next time do the video with a mouse :D

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

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