Skip to content

Free_feeding

Kravitz Lab edited this page Jan 31, 2026 · 1 revision

Free Feeding

Overview

The Free Feeding program configures FED4 to automatically dispense pellets on a timed interval, without requiring any nose pokes. This mode allows animals to consume food freely, while FED4 logs pellet removal timestamps.

Theory

Unlike operant schedules such as FR1 or PR, Free Feeding removes the response–reinforcement contingency. Pellets are delivered independent of animal behavior, allowing researchers to measure natural intake without effort requirements.

Considerations

  • Automatic delivery: Pellets are dispensed at fixed intervals (5 seconds by default).
  • No operant requirement: Animals do not need to poke; pellets are freely available.
  • Logging: Timestamps of pellet removal are recorded on the SD card.
  • Hoarding: Animals don't always immediately eat the pellets, some show hoarding behavior, take this into account when measuring food intake. Please see Barrett et al to learn more about this.

Code

/*
  Feeding experimentation device 3 (FED3)
  Free Feeding mode

  alexxai@wustl.edu
  December, 2020

  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
  Copyright (c) 2020 Lex Kravitz
*/

#include <FED3.h>                                       //Include the FED3 library 
String sketch = "FreeFeed";                             //Unique identifier text for each sketch (this will show up on the screen and in log file)
FED3 fed3 (sketch);                                     //Start the FED3 object

void setup() {
  fed3.begin();                                         //Setup the FED3 hardware
  fed3.DisplayPokes = false;                            //Customize the DisplayPokes option to 'false' to not display the poke indicators
}

void loop() {
  fed3.run();                                           //Call fed.run at least once per loop
  fed3.Feed();                                          //Drop pellet
  fed3.Timeout(5);                                      //5s timeout
}

Clone this wiki locally