Close
0%
0%

Automated mouse homecage two-bottle choice test v2

Version 2: A homecage-fitted apparatus for automated, photobeam-based detection of licks in a two-bottle choice task.

Public Chat
Similar projects worth following

This is an update to the original automated mouse two bottle test.  It performs the same function as the last version but it has been revamped to make it battery powered and include a screen to display data.  It lasts about 2 weeks on the battery, making it a truly mobile drinking monitor!  

This design fits into our colony caging (Allentown NextGen) while on the rack, for different caging you may have to modify the 3D design.

Sipper-053122.zip

Updated code with sleep enabled to get more battery life, more accurate sensing, and better control over outputs. Also fixes SD card bug with older Adafruit SAMD board definitions.

x-zip-compressed - 10.77 kB - 05/31/2022 at 19:47

Download

SipperLibraries102420.zip

Libraries to use with Sipper-102420Stable code

x-zip-compressed - 4.09 MB - 08/24/2021 at 19:05

Download

Sipper base.stl

3D design file for the main piece

Standard Tesselated Geometry - 319.22 kB - 07/16/2019 at 12:08

Download

Sipper cover.stl

3D design file for the cover

Standard Tesselated Geometry - 38.56 kB - 07/16/2019 at 12:08

Download

Mini sipper tube holder.stl

Mini single tube holder

Standard Tesselated Geometry - 67.66 kB - 08/11/2019 at 04:39

Download

View all 9 files

View all 14 components

  • Updated firmware

    Lex Kravitz08/19/2021 at 14:35 0 comments

    We updated the Sipper firmware (see files area for Sipper-102420Stable.zip)!  The new features/changes are:

    1. It puts the processor to “sleep” in between each mouse interaction.  This results in a ~2x increase in battery life.
    2. It has an additional lower power mode where it also turns off the screen whenever it’s sleeping.  To activate this, once you start a program hit “B” and it will say “DISPLAY OFF”.  This saves about 1mA which should add a couple days in theory (the processor sleeping in point #1 is more power savings).  The display will still turn on for a couple seconds whenever the mouse interacts with it.  You can hit “B” again to leave the display on full time again too.
    3. It has a more accurate way of measuring sipper interaction duration.
    4. A little circle appears on the screen next to each sipper when it is in use to help with troubleshooting
    5. You can hit “C” when a program is running to see the filename and elapsed time for the session.
    6. On the start-up screen you can hold “B” to set the date/time/sipper number as before.
    7. We added the ability to use an additional output:
      1. Pins A1 and A3 are programmed to go high whenever the sipper is broken (this was true in the old code as well).  You can use these to drive external stimuli, or log sipper interactions with ephys, etc. see: https://hackaday.io/project/160388-automated-mouse-homecage-two-bottle-choice-test-v2/log/153925-ttl-output-when-mouse-interacts-with-sippers
      2. We now added the ability to send output on a 3rd pin, dependent on the Left/Right Interactions.  The idea was to use this to control a foot shock as a specific probability to study compulsive behavior.  Ie: if he interacts with the Left sipper on 10% of the trials he gets shocked, while on the Right sipper on 30% of the trials he gets shocked.   To use this, on the start-up screen you can now hold “C” to set “probabilities” on the Left and Right sipper.  Based on these probabilities, the sipper will output a HIGH pulse on pin 12 for 1 second. 
    8. This updated firmware has not been extensively tested beyond our lab,  please comment here if you discover any bugs! 

  • Mini tube holder!

    Lex Kravitz08/11/2019 at 04:38 0 comments

    For a different project we needed a simple tube holder to fit in a cage without a wire rack.  The sipper design was perfect, and we printed this small part of it:

    This hangs over the cage edge like this:, providing a simple way to use a sipper tube as a water bottle, or for simple manual measurement.  STL in the files area!

  • Editable 3D design

    Lex Kravitz03/06/2019 at 16:04 0 comments

    The 3D design was developed in TinkerCAD and an editable design is available here:

    https://www.tinkercad.com/things/gPan0GUSNkd

    Please don't judge us! This device went though a very iterative design process so the current design build is a bit complicated.  We'll hopefully re-design this more simply and update in the future (or if someone does this please let us know so we can post better design files!).  

  • Troubleshooting

    Lex Kravitz02/04/2019 at 17:03 0 comments

    This log is about troubleshooting.  I'll add to it as we identify troubleshooting issues.  Please leave a comment if you know of any others!  

    1) Sipper position

    While the electronics on the sipper device are pretty much bulletproof, we have noticed the position of the sipper tubes can shift a bit, so these should be checked carefully.  Specifically, it's possible for one tube to move out of the detection beam, which obviously introduces error into the experiment.  Here's an example, with the red line estimating the position of the detection beam.  The sipper on the right is positioned too far from the detection beam.

    We're working on updating the 3D design to reduce this possibility, but either way it's a good idea to check this before putting them in with mice!

  • Quick video

    Lex Kravitz02/01/2019 at 19:37 1 comment

    Quick video of sippers in action, showing water vs. chocolate

  • Rat v2.0 design coming soon!

    jkhokhar11/07/2018 at 19:06 0 comments

    We are getting closer to a finalized design for use with rats v2.0. Hope to upload it all here by the end of the month. This version has a much smaller footprint compared to the previous version. We are just working on finalizing the mounting via suction cups and the code for the volume measurement. Stay tuned!

  • Modification for rats!

    Lex Kravitz10/23/2018 at 23:07 0 comments

    Dr. Jibran Khokhar at the University of Guelph has modified this sipper device to measure liquid intake in rats.  Really cool!  He also added an eTape liquid level monitor to measure actual intake as well as the number of interactions with the sipper.  He plans to put the full design online soon, but in the meantime here are some photos!

  • TTL output when mouse interacts with sippers

    Lex Kravitz10/06/2018 at 17:12 0 comments

    We made a slight update to the code and design to give the sippers 2 TTL output connections that can sync sipper interactions with external equipment such as a fiber photometry or ephys recording system.  There is now an optional step in the instructions for which pins to solder these BNC connectors (to A1 and A3), and an update to the code to enable these pins as outputs.

  • Homecage validation!

    Lex Kravitz09/16/2018 at 14:33 0 comments

    We made some tweaks to the 3D design to allow the sipper device to mount onto rack-mounted vivarium cages.  This will allow for higher-throughput experiments.  

  • First validation!

    Lex Kravitz08/15/2018 at 15:06 0 comments

    Earlier this week we assembled a sipper device and filled one tube with water and the other with diluted (1:2) chocolate ensure. We placed it in a mouse cage overnight.

    Some glamour shots of the device in a mouse cage:

    The next morning, guess what??  One tube was completely empty... the other untouched

    First data!

View all 14 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 sketches to it.  This should reduce frustration later.  Start by installing the Arduino IDE.

  • 2
    Install Arduino boards files to let the Arduino IDE flash the Adalogger M0

    The Adafruit M0 Adalogger board is not natively supported by the Arduino IDE.  Follow instructions here to install support for this board in the Arduino IDE.  After completing these steps make sure you can flash the example sketch "Blink" to the Adalogger board before continuing.  To do this, open the Blink example in File>Examples>Basic>Blink.  

    "Double-click" the small physical button on the Adalogger board to put it in bootloader mode, set Board to "Adafruit Feather M0" and port to the correct COM port and click 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

    The Sipper device requires the following libraries:

    #include <Adafruit_SSD1306.h>
    #include <Wire.h>
    #include <RTCZero.h>
    #include <SPI.h>
    #include <SdFat.h>
    #include <Adafruit_GFX.h>
    #include <TimeLib.h> //include the Arduino Time library
    #include <stdio.h>  // include the C++ standard IO library
    

    These are available for download as a single zip file from the files area, or you can search for them online.  Download the zip file and extract into your Arduino/libraries directory.  When you're done it should look something like this:

    If this doesn't work, or you'd prefer to install libraries a different way there are instructions here for how to manually add libraries.

View all 15 instructions

Enjoy this project?

Share

Discussions

Duncan wrote 03/08/2019 at 10:41 point

This looks great. I am trying to build some but am having trouble getting the Hydropac valves in Europe. I'm wondering if you have tried other valves or know of something I could try as an alternative?

  Are you sure? yes | no

dhuzard wrote 11/25/2019 at 12:30 point

Hi Duncan, did you find a solution to obtain the valves in europe ?

  Are you sure? yes | no

Lex Kravitz wrote 11/30/2019 at 22:23 point

Unfortunately we don't know of a drop-in alternative.  I would try to find a facility near you that uses Hydropac watering and see if they can give you some valves, they're only a few cents each if you can get them. 

One valve idea that I thought was intriguing but didn't try to adapt were these:

https://www.amazon.com/Mtsooning-Chicken-Poultry-Nipple-Drinker/dp/B07CPSKSHJ/

If you find something that works please reply here with your experience!

  Are you sure? yes | no

Sophi Kravitz wrote 02/15/2019 at 17:35 point

This was a featured project today on Hackaday.com, congrats!

  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