Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2018 Nov 28.
Published in final edited form as: HardwareX. 2018 Jun 20;4:e00035. doi: 10.1016/j.ohx.2018.e00035

An open-source lickometer and microstructure analysis program

Martin A Raymond a, Thomas G Mast b, Joseph M Breza a,*
PMCID: PMC6261368  NIHMSID: NIHMS985176  PMID: 30505996

Abstract

Described herein is a design for a user-constructed electronic lickometer, intended to allow users to conduct relatively simple behavioral experiments with rodents while avoiding several common stumbling blocks. Primarily, this system does not require the purchase of specialized scientific equipment or software. Additionally, it is possible for users to construct and operate this lickometer without the prerequisite of advanced knowledge of electronics or programming. Overall, the goal of this apparatus is to provide a simple and affordable alternative for users seeking to study ingestion behaviors in rodents, while still allowing the user to obtain high-resolution data and conduct sophisticated microstructural analysis of the behavior in question. All of this is achieved using low-cost and commonly available materials for the construction of the apparatus itself, and open-source software to collect and analyze data. The only substantial prerequisites for this design are a PC with a 3.5 mm microphone input and a comfortable understanding of power tools. Finally, a validation of the operation of the describe apparatus is included.

Keywords: Lickometer, Ingestion, Behavior


Specifications Table

Hardware Name Soundcard LickometeR
Subject Area Neuroscience
Hardware Type Animal Behavior Analysis
Open Source License GNU General Public License
Cost of Hardware $24–216

1. Hardware in context

Those seeking to conduct behavioral experiments with mice face fairly substantial challenges. While they are the preferred animal model for many different areas of research, based in large part on the genetic tools available, their diminutive stature presents certain difficulties to effective measurement.

This is well-evidenced in ingestive research; one common method for assessing drinking behavior is to simply measure the amount of fluid a subject consumes. This method of measurement, however, faces several conflicting threats to resolution when applied to mice; since mice drink very little, one must choose between tracking very long periods of behavior (thus sacrificing any degree of temporal resolution), or attempting to measure very small changes in volume (a process highly susceptible to measurement error) [1,2].

A long-standing solution to this dilemma exists in the form of lickometers; devices designed to record the physical act of licking a spout. Lickometers allow users to record individual licks over a variable period of time, tidily solving any issues of resolution. However, while lickometers allow much more sophisticated measurement of animal drinking behavior, they also set the bar for entry much higher. Commercially available lickometers, while serving as uniquely powerful tools for recording animal behavior, are prohibitively expensive, and many of them must be custom made. For decades many industrious scientists have managed to circumvent that particular dilemma by constructing their own lickometers, but these alternative designs often come with their own challenges; the designs that are simple to construct and operate often rely on some other bit of prohibitively expensive hardware or software [3], while the designs that are relatively affordable also require an advanced understanding of circuit design and programming to construct and operate [2,4,5].

Our design attempts to address both of those problems by replacing the most sophisticated components of lickometer designs with a resource that most common users will have readily available; a PC soundcard (the component of computers that processes audio information). Since most lickometer designs rely on the subject to close the recording circuit when it licks a drinking spout, it’s a relatively simple matter to route that circuit through a standard 3.5 mm microphone jack, and obtain a high-resolution, high-fidelity recording of the licking behavior by treating the electronic signal as an audio file. This raw data can then be exported in a variety of forms, allowing users to conduct sophisticated microstructure analysis fairly easily with open-source statistical software.

2. Hardware description

The Soundcard LickometeR is fairly simple, with a few critical elements:

  • A durable, waterproof, non-conductive chamber to contain the animal.

  • Drinking bottles with conductive spouts.

  • A non-conductive device to hold the drinking bottles in the chamber.

  • A conductive surface that the animal must stand on as it drinks.

  • A computer with a sound card and 3.5 mm microphone input.

  • Wiring to connect the sound card to the drinking bottles and the grounding surface.

Beyond these critical elements, system components are flexible. Our chamber is built from acrylic sheets, with two sliding doors, opaque walls and floor, and a transparent ceiling (Fig. 1). Acrylic is durable and easily washed. The sliding doors allow for the system to be somewhat modular: different doors can be cut with a mill or table saw to change the number or position of drinking spouts fairly easily. The featureless opacity of the walls reduces extraneous distractions, and the transparent ceiling allows visual monitoring or recording.

Fig. 1.

Fig. 1.

Digital illustration of the behavioral chamber. 3D render of the completed behavioral chamber, acrylic. A: Exploded view; the chamber, filter film, two doors, tin floor, and bottle chuck. B: The assembled chamber (rotated 180°), with chuck affixed by Velcro. Doors slide down through brackets. Tin plate inside the chamber.

The bottle holder is similarly flexible; ours was milled (Central Machinery 44991; Larkin Pence and Martin A. Raymond) from a delrin block, but any plastic capable of holding set screws could replace the delrin. In many situations, it may be advantageous to 3D print the bottle holder (chuck) rather than milling it. There is no reason why the bottle holder must only hold two bottles; that number is somewhat variable (space permitting), so long as the bottles are uniformly positioned.

The drinking bottles themselves are perhaps the least variable part of the design. We recommend only using commercial metal drinking spouts, as any variation in spout design introduces a risk of failure in the form of air bubble formation [6], which blocks the flow of fluid out of the spout, and also has the capacity to independently alter animal behavior [7]. The reservoirs that supply the spouts are somewhat more variable; we find that 15 mL centrifuge tubes make excellent reservoirs, allowing for a rough determination of fluid volume consumed.

Sound card connection to the chamber is also subject to modification. The spouts and chamber floor can be wired by cutting the speakers off a pair of stereo headphones and soldering the right, left, and ground leads to three independent alligator clips. This system has the advantage of readily available components and a minimum of soldering, but is not very durable. For a more robust system, it is preferable to buy solder-ready 3-conductor 3.5 mm male plugs and fabricate your own wires from scratch (Fig. 2). Another variable in the wiring is resistance: the threshold for detection of electrical current by rats is between 1 and 5 μA [1], and standard PC sound cards supply 2.8 V. We have found that mice have more than sufficient body resistance (>3 MΩ--measured from the oral cavity to hind paw) to drop the recording current below 1 μA, but concerned experimenters may want to solder resistors in series with the recording circuit as an added precaution. We recommend between 1 and 3 MΩ; in our experience, adding resistance of >3 MΩ to this design degrades the fidelity of the signal, making it substantially more difficult to analyze licking microstructure.

Fig. 2.

Fig. 2.

Circuit diagram demonstrating lick recording pathway. Note that conductors on the 3.5 mm pin are labeled for clarity; do not attempt to solder to the locations indicated.

The soundcard itself presents an additional opportunity for hardware modification. The basic requirement for this system is a sound card with 1 stereo 3.5 mm microphone input, a feature which is fairly standard. However, if available computers lack that feature, or simultaneous recording of additional channels is desired, external USB sound cards are available at low cost.

Overall, we find it important to note that the materials used to construct the apparatus reflect the materials on hand, thus requiring very little additional investment. Adaptation of these techniques to suit the resources of each user is encouraged as a means to minimize costs.

3. Software

In this system, recording of raw data is handled by Audacity, an open-source audio program. This particular program has a few important features; the ability to set a sample rate and resample later, the ability to manage multi-track recordings, and the ability to export the “audio” file as a CSV. A side benefit, discovered accidentally, is the fact that Audacity’s recordings are AC-coupled; all voltage changes are gradually corrected to zero. The benefit that this provides is a substantial reduction of the threat of incidental contacts made by a paw or tail; regardless of the duration of such a contact the system will register at most a single false lick, and even sustained contact does not inhibit the ability of the system to detect concurrent licks, a pervasive problem in electronic lickometers [1].

Once exported to CSV, the raw data of the recordings can easily be handled by a variety of statistical analysis programs. We have generated a custom function for the open-source program R to automate the lick-counting process. The function returns data on a number of features of licking microstructure, and provides several options for graphing the results of individual sessions. The R function is a critical companion to the hardware, as without proper analysis software the raw lickometer data is at best lacking in nuance and at worst totally indecipherable.

4. Design files summary

File name Type License Location
Chamber .DAE GNU General Public License Mendeley Data
Chuck Grooved .STL GNU General Public License Mendeley Data
LickFunction .R GNU General Public License Mendeley Data

Box Design is a CAD file to be used as a blueprint or reference in the construction of the device.

Chuck Design is a CAD file, including only the bottle holder component from the Box Design file, to facilitate 3D printing of this component.

LickFunction is an R script that creates a function in R called lickCount, as long as it is not removed from the workspace. It includes a plain text file describing its use, as well as several pointers on the use of Audacity to generate the required data files. Parameters for describing licking microstructure were adapted from previous literature [8,9]. Presently the script accommodates two-channel recordings.

5. Bill of materials

Designator Component Number Cost
Per ($)
Total
Cost($)
Source Type
See Build
Instructions
10–32 2″ Spade
screws (2 ct)
1 6.95 6.95 https://www.grainger.com/product/GRAINGER-APPROVED-Thumb-Screw-1JUP3?breadcrumbCatId=11427&s_pp=false&picUrl=//static.grainger.com/rp/s/is/image/Grainger/1JUP2_AS01?$smthumb$ Metal
15 mL Centrifuge
Tubes (120 ct)
1 11.99 11.99 https://www.amazon.com/Momok-Plastic-Centrifuge-17×120mm-Graduated/dp/B071KN58PV/ref=sr_1_1?ie=UTF8&qid=1503672698&sr=8–1-spons&keywords=15mL+conical+tubes&psc=1 Polymer
Silicone Tubing 1 19.62 19.62 https://www.amazon.com/gp/product/B000FMWTVG/ref=oh_aui_detailpage_o09_s00?ie=UTF8&psc=1 Polymer
Acrylic Plates
(3/16″ × 12″ × 24″)
1 20.00 20.00 https://www.acmeplastics.com/cut-to-size-black-acrylic-sheet-cast-2025 Polymer
Plastruct Plastic
Weld
1 11.79 11.79 https://www.amazon.com/Plastruct-Plastic-Weld-applicator-2oz/dp/B00FDFWJD8/ref=sr_1_1?ie=UTF8&qid=1504035237&sr=8-1&keywords=plastruct+plastic+weld Other
Filter Film 1 12.50 12.50 https://www.amazon.com/106-Primary-Red-Filter-Sheet/dp/B004GE19E2/ref=pd_sbs_421_3?_encoding=UTF8&psc=1&refRID=XQHV6JHWPPBDWYP4K54Q Polymer
Tin Plate (50 ct) 1 26.49 26.49 https://www.amazon.com/Handi-Foil-Smooth-Wall-Aluminum-Plate-Heavy/dp/B01JH4J6YU/ref=sr_1_11?ie=UTF8&qid=1510082841&sr=8-11&keywords=tin+pie Metal
Steel Sipper Tubes
(5/16″ × 4″)
2 Bulk As
quoted
http://unifabcorporation.com/animal-and-biomedical/mouse-water-bottles-stoppers-and-sipper-tubes/ Metal
Delrin Sheet 1 53.23 53.23 http://www.eplastics.com/ACTLBLK1-00012X12 Polymer
Wire 1 10.59 10.59 https://www.amazon.com/Softalk-Landline-Telephone-Accessory-46615/dp/B00HN3BLNW/ref=sr_1_4?s=electronics&ie=UTF8&qid=1504034305&sr=1-4&keywords=phone+cable Metal
Alligator Clips
(Mueller BU-55)
3 .65 1.95 https://www.alliedelec.com/mueller-bu-55/70188500/ Metal
1 MΩ Resistors
(100 ct)
1 6.16 6.16 https://www.amazon.com/dp/B0716SHM15/ref=biss_dp_sa1
Ceramic
3.5 mm plugs (10 ct) 1 4.85 4.85 https://www.amazon.com/Uxcell-10-Pieces-Black-Plastic-Housing/dp/B00MFRZ2SG/ref=sr_1_1?s=electronics&ie=UTF8&qid=1504034508&sr=1-1&keywords=3.5+mm+jack&refinements=p_89%3Auxcell Metal
Heat Shrink Tubing 1 7.89 7.89 https://www.amazon.com/gp/product/B01GO1D4Z6/ref=s9_acsd_topr_hd_bw_blQPPf_c_x_w?pf_rd_m=ATVPDKIKX0DER&pf_rd_s=merchandised-search-3&pf_rd_r=EJKFN4FH5GD35F0EG0A9&pf_rd_t=101&pf_rd_p=27946f43–963c-5f78–8d5b-3c8005a0e4bc&pf_rd_i=700782011
Polymer
CD (20 ct) 1 7.69 7.69 https://www.amazon.com/Hewlett-Packard-CR52020CB-CD-R-SPINDLE/dp/B000I2RD5U/ref=sr_1_6?s=electronics&ie=UTF8&qid=1510084549&sr=1-6&keywords=cd&dpID=51J5vJSQe1L&preST=_SX300_QL70_&dpSrc=srch Polymer
Epoxy 1 5.47 5.47 https://www.amazon.com/Gorilla-Epoxy-85-oz-Clear/dp/B001Z3C3AG/ref=sr_1_3?ie=UTF8&qid=1504035169&sr=8-3&keywords=epoxy Polymer
Velcro 1 2.98 2.98 https://www.amazon.com/VELCRO-Brand-Sticky-Strips-lack/dp/B000TGSPV6/ref=sr_1_1?ie=UTF8&qid=1504034930&sr=8-1&keywords=adhesive+velcro+strips Polymer
Headphones 1 5.40 5.40 https://www.amazon.com/MEE-Audio-Comfort-Fit-Headphones-Enhanced/dp/B017L216SO/ref=sr_1_10?ie=UTF8&qid=1504034772&sr=8-10&keywords=earbuds Non-
specific
other

6. Build instructions (Chamber)

  1. From the acrylic sheets (0.5 cm or 3/16″ thickness), cut 2 doors (12.6 cm × 13.1 cm), 2 walls (12.6 cm × 13.5 cm), 1 floor (12.6 cm × 14.5 cm), and 1 ceiling (12.6 cm × 14.5 cm). Use caution when using power tools.

  2. Drill holes in the walls for air circulation.

  3. Using guides, bond the walls, floor, and ceiling together with Plastruct Plastic Weld.

  4. Cut a CD into strips (1 cm × 4 cm): score the plastic with a file and bend back and forth to break along the crease. Soften the strips cautiously over a small flame, and bend using a right-angle square. [Or use brackets]

  5. Affix brackets to the box with epoxy or hot glue.

  6. With a table saw, cut a piece of delrin to the appropriate size (12.6 × 2.5 × 7 cm).

  7. Using a mill, drill 0.7 cm diameter holes through the block at 30° below horizontal, starting 1.5 cm from the top, at 3.8 cm and 8.8 cm positions. Mill gutters along the edge, 1 cm wide by 0.3 cm deep. [Or 3D print it]

  8. Drill and tap holes for set screws, insert screws.

  9. Affix the bottle holder to door with epoxy, or to the Chamber with Velcro.

  10. Cut a 3 cm length of silicone tubing, and roll it back on itself. [Or buy stoppers]

7. Build instructions (Recording Circuit- Headphones)

  1. Cut the speakers off headphones.

  2. Strip the exterior insulation from the several inches of the wires, and separate the active lead for each ear (red for right, blue for left) from the copper-colored ground wire.

  3. Pass the ends of the copper wires through a flame to remove insulating coating.

  4. Solder each of the active leads and one of the ground wires to separate alligator clips.

8. Build instructions (Recording Circuit- from scratch)

  1. Cut telephone cable to the desired length.

  2. Strip 1-2″ of the outermost insulation from one end of the cable, and strip 1/4″ of the end of each individual wire.

  3. Solder 3/4 of these to the 3 separate conductors on the 3.5 mm plug (4th is not used).

  4. Strip 6-8″ of the outer insulation from the other end of the cable, and 1/4″ of each of the wires on that side.

  5. Solder desired resistors to the left and right (based on the 3.5 mm plug) wires.

  6. Solder the resistors and the wire to be used as a ground to alligator clips.

9. Operation instructions

  1. Fill bottles with desired solutions.

  2. Insert stopper and spout, and charge the tube.

  3. Fit bottles in bottle holder, and tighten the set screws.

  4. Plug in 3.5 mm male to sound card.

  5. Clip clamps to the bottles and baseplate.

  6. Open Audacity, set sample rate, and test leads.

  7. Add mouse, close door.

  8. Hit record in Audactiy.

  9. After desired time, hit stop.

  10. Open door, remove animal.

  11. Resample if needed.

  12. Sample data export, save aup, close Audacity.

  13. Open R, create new script, and source the LickFunction.R file.

  14. Call the lickCount function, and enter your desired settings.

  15. Run.

10. Validation and characterization

As a proof of concept, a pilot test was conducted using 6 adult mice (C57BL/6J background), including 3 male (mean weight 36.3 g, standard deviation 3.9) and 3 female (mean weight 32.1 g, standard deviation 3.4) mice. Mice had previous experience with the experimental apparatus. Prior to testing, mice were group housed (separated by sex) in standard shoebox cages with ad-libitum access to chow (LabDiet #5015) and tap water. Twenty-four hours prior to testing, H2O was removed from the home cages, though free access to chow remained. Animals were tested on 2 subsequent days, and received all of their fluid during the test sessions. H2O was replaced on the home cage at the end of testing on the second day. Lickometer recordings were initially captured with 10 MΩ resistors added to the recording circuit, and the experiment was repeated 20 days later with the additional resistance removed.

In the 30 min experimental trials, animals were given simultaneous free access to two drinking spouts, one containing tap H2O and the other containing a 0.2 M sucrose solution, made up in the same tap H2O. We chose to make our sucrose solutions in tap H2O, as our animals have never had access to deionized H2O, and because deionized H2O is bitter to rodents [10,11]. Bottles were reversed on the second day of testing to account for the established phenomenon of side preference [12], which we also found to have a significant effect (p < 0.001, d = 1.82).

After all experiments were complete, we exported our raw data from Audacity to R, where it was analyzed by our custom script. The script operates by setting a threshold at −3 Standard deviations, and recording time codes for electrical disturbances that cross that threshold. Thresholds were set manually for one session, in which an intermittent fault in the path to ground increased background noise. By default, the program removes events occurring within 40 ms of previous events, per established practice [John D. Boughter, personal communication, March 31, 2017]. This cutoff is variable, accommodating the variable lick rate of different mouse strains [8,9].

For comparison, we also exported our files to Spike2, a professional waveform analysis software package (Cambridge Electronic Design; CED, Cambridge, England) that has been demonstrated as an effective lick-counting program [3]. R was then used to conduct statistical analysis of the results.

To validate the results of the R script against Spike2 in assessing the lickometer recordings, t-tests and correlation coefficients were calculated comparing licks counted on water, licks counted on sucrose, and the preference score for sucrose versus water (Table 1). No significant differences were found on any of the three measures, and the scores for R and Spike2 were found to be highly correlated on all measures. Results are illustrated in Fig. 3. Additionally, ILIs (InterLick Interval, or the interval in milliseconds between licks) were calculated for all licks, and distributions thereof (Fig. 4) are consistent with previous lickometry findings, from the positioning of the main distribution around ~110ms to the small secondary distribution at around twice that interval [8]. An additional small distribution of licks near 50 ms in the 10 MΩ condition is presumably a reflection of signal fidelity; increasing the resistance in the recording circuit dramatically reduced the amplitude of the signal relative to electrical noise (Fig. 5), resulting in the counting of several false “double contacts”. Importantly, these instances of double contact can be automatically removed, as is the standard practice in the field. We chose to leave them in this case, both in order to maintain adherence to our 40 ms cutoff, and to illustrate the potential problems with the excess noise associated with high-resistance recordings. The analysis program allows for the selection of different thresholds, per user requirements.

Table 1.

Programs.

R
Spike2
Mean SD Mean SD p D r
Water Licks 249.62 154.74 250.38 154.84 0.99 0.00 1.00
Sucrose Licks 679.62 343.17 685.88 351.53 0.95 0.02 1.00
Preference Score 0.70 0.21 0.70 0.21 0.99 0.01 1.00

Notes: SD = Standard Deviation. D = Cohen’s D.

Fig. 3.

Fig. 3.

Comparisons of lick data calculated by R and Spike2 for all recordings. A: Preference scores for water over sucrose, B: total licks counted on sucrose solutions, C: total licks counted on tap water. All values are averages (± S.E.M.).

Fig. 4.

Fig. 4.

Histograms of lick events per inter-lick interval (ILI). A: All ILIs recorded in the experiment, B: ILIs recorded with no resistance added to the recording circuit, C: ILIs recorded with 10 MΩ of resistance added to the recording circuit.

Fig. 5.

Fig. 5.

Examples of the raw lickometer signal and threshold placement. A: A view of the raw signal recorded using no additional resistance, B: a similar magnification of a raw signal recorded with 10 MΩ of additional resistance. Both examples depict two-second windows containing the onset of a lick burst. Note the greatly diminished signal amplitude in the 10 M condition relative to 0 M.

Additionally, several tests were performed assessing the impact of electrical resistance in the recording equipment. Results are shown in Table 2, and illustrated in Fig. 6. MPI (Mean Primary Interlick Interval) describes a characteristic ILI by calculating the “mean of all ILIs less than or equal to 160 ms” [8]. Essentially, this summarizes an animal’s average rate of licking, excluding long pauses.

Table 2.

Resistors Added.

0 MΩ
10 MΩ
Mean SD Mean SD P D
Preference score 0.73 0.13 0.67 0.07 0.38 0.53
Sucrose Licks 801.83 190.67 557.42 120.95 0.03 1.53
Water Licks 226.75 72.64 272.50 79.10 0.32 0.60
Sucrose MPI 108.70 5.37 111.17 4.03 0.39 0.52
Water MPI 105.34 4.58 105.42 7.69 0.98 0.01

Notes: SD = Standard Deviation. D = Cohen’s D.

Fig. 6.

Fig. 6.

Comparisons of lick data between recording conditions of 10 M and 0 M of added resistance. A: Preference score (calculated as licks to sucrose/licks to sucrose + licks to H2O) (± S.E.M.), B: Average total licks to sucrose counted (± S.E.M.), C: Average total licks to tap water counted (± S.E.M.), D: Mean primary interlick interval (MPI) of sucrose licks calculated (± S.E.M.), E: MPI of tap water licks calculated (± S.E.M.).

Only a single significant difference was found, which was somewhat surprising given the severe degradation of signal fidelity occurring at 10 MΩ of added resistance. It’s unclear why the lick count for sucrose increased when resistance was removed; clearly it is not the result of aversive current, so we speculate that the shift may be due to increasing familiarity with the mechanism, particularly given that there was no change in MPI.

Finally, we ran a few tests comparing sucrose and water consumption (Table 3, Fig. 7). Sex differences in preference score were also tested, and found non-significant (p = 0.34).

Table 3.

Taste Solution.

Sucrose
Tap Water
Mean SD Mean SD p D r
Total Licks 679.62 198.66 249.62 76.24 0.00 2.86 −0.25
MPI 109.93 4.71 105.38 6.03 0.05 0.84 0.61
# of Bursts 25.54 8.77 13.71 3.5 0.00 1.77 0.22
Licks per Burst 25.04 6.22 16.46 4.76 0 1.55 0.8

Notes: SD = Standard Deviation. D = Cohen’s D.

Fig. 7.

Fig. 7.

Microstructure variables by fluid consumed (0.2 M Sucrose & tap H2O). A: Total licks to sucrose versus tap water, B: MPI of licks to sucrose versus tap water, C: Total bursts of licks to sucrose versus tap water, D: Average burst duration (licks/burst) oflicks to sucrose versus tap water. All values are averages (± S.E.M.).

11. Conclusions

The purpose of this report was to provide instructions for producing a low-cost lickometer for educational and research purposes. The processing program in particular (coded in R) seems to function quite well; all of our statistical tests indicated no difference in lick counts between the professional-neurophysiology software and our custom program. Additionally, the distribution of ILIs in the recordings mirrors trends established in existing literature [8], suggesting that our lick-counting device is reliably counting licks, rather than extraneous artifacts.

Supplementary Material

Supplemental

Footnotes

12.

Conflict of interest

None of the authors of this manuscript have reported a conflict of interest.

Appendix A. Supplementary data

Supplementary data associated with this article can be found, in the online version, at https://doi.org/10.1016/j.ohx.2018. e00035.

References

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Supplemental

RESOURCES