Feb 27, 2025

Public workspaceSnackerTracker

  • Marissa Mueller1,2,3,4,
  • Selma Tir2,3,4,
  • Carina Pothecary2,3,4,
  • Elise Meijer1,2,4,
  • Laurence Brown2,3,4,
  • Keiran Foster5,
  • Vladyslav Vyazovskiy1,2,4,
  • Stuart Peirson2,3,4,
  • Zoltán Molnár1
  • 1Department of Physiology, Anatomy, and Genetics, University of Oxford, OX1 3PT, UK;
  • 2Sleep and Circadian Neuroscience Institute, University of Oxford, OX1 3QU, UK;
  • 3Nuffield Department of Clinical Neurosciences, University of Oxford, OX3 9DU, UK;
  • 4Kavli Institute for Nanoscience Discovery, University of Oxford, OX1 3QU, UK;
  • 5University of Oxford Department of Physics, University of Oxford, OX1 3PU, UK
Icon indicating open access to content
QR code linking to this content
Protocol CitationMarissa Mueller, Selma Tir, Carina Pothecary, Elise Meijer, Laurence Brown, Keiran Foster, Vladyslav Vyazovskiy, Stuart Peirson, Zoltán Molnár 2025. SnackerTracker. protocols.io https://dx.doi.org/10.17504/protocols.io.rm7vzke8rvx1/v1
License: This is an open access protocol distributed under the terms of the Creative Commons Attribution License,  which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited
Protocol status: Working
We use this protocol and it's working
Created: February 15, 2025
Last Modified: February 27, 2025
Protocol Integer ID: 120450
Keywords: Home-cage monitoring, Food measurement, Animal behaviour, Activity tracking, Animal welfare, Cryptochrome, Circadian, Biological rhythms
Funders Acknowledgements:
Biotechnology and Biological Sciences Research Council
Grant ID: BB/X008711/1
Wellcome Trust
Grant ID: 227093/Z/23/Z
Biotechnology and Biological Sciences Research Council
Grant ID: BB/X002357/1
Medical Research Council
Grant ID: MR/W029073/1
Disclaimer
Users are entirely responsible for their own decisions and actions in using any part of this protocol (e.g., construction, operation, and analysis). Users should pay careful attention to health and safety recommendations, both listed here and as provided by working facilities. Users must adhere to ethical standards and policies particularly related to the use of animals in research, gaining the necessary regulatory approvals before using the SnackerTracker experimentally. The authors are not liable for any negative consequences resulting for use of the protocols provided. This protocol may not be entirely accurate or up-to-date (e.g., recommended materials and support links may become obsolete). This protocol has not undergone peer-review before being published.
Abstract
Accurately measuring activity and feeding is frequently important in laboratory animal research, whether for welfare-monitoring or experimental recording. Quantification commonly involves manual pellet-weighing; however, this can physically disturb animals and cannot continuously assess both the amount and pattern of feeding. Improved means of food-intake measurement have been developed yet are often costly and incompatible with cage configurations. We therefore developed and validated the SnackerTracker—a cost-effective, open-source, and user-friendly measurement system which continuously records food-intake, food-seeking activity, and ambient light conditions in the home-cages of small laboratory animals.

This protocol describes how to build and operate the SnackerTracker, including device initialisation, data collection, and analysis.
Image Attribution
This image was taken by Marissa Mueller. It depicts a fully assembled and functional SnackerTracker (including electronics within the chassis body) after having successfully recorded data from a mouse cage for six months.
Guidelines
All institutional and facility health and safety guidelines should be adhered to during construction processes.
Materials
Download SnackerTracker Bill of Materials Extended Version.xlsxSnackerTracker Bill of Materials Extended Version.xlsx44KB

This spreadsheet summarises the tools and equipment needed to build a SnackerTracker (including associated costs and supplier information). Product information is also provided in corresponding protocol steps, and provided below as well in order of appearance. The equipment listed may differ slightly from that which is in the spreadsheet due to discontinuation of some supplier/product lines (in which case a more updated alternative is provided).

Equipment
Ultimaker S3
NAME
3D printer
TYPE
Ultimaker
BRAND
192-5469
SKU
LINK
Download 192-5469 - RS Components Ultimaker 3D Printer - DATA SHEET.pdf

Equipment
ABS Black 3D Printing Filament
NAME
3D printing filament
TYPE
Ultimaker
BRAND
1621
SKU
LINK
Download 1621- Farnell Ultimaker 3D Printing Material ABS Black - IMAGE.png

Equipment
PVA Natural 3D Printing Filament
NAME
3D printing filament
TYPE
Ultimaker
BRAND
9731
SKU
LINK
Download 9731 - Farnell Ultimaker 3D Printing Material PVA Natural - IMAGE.png

Equipment
Lexar USB Drive
NAME
USB drive
TYPE
Lexar
BRAND
230-4402
SKU
LINK
Download 230-4402 - RS Components Lexar USB Flash Drive - DATA SHEET.pdf




Equipment
Acetone
NAME
Acetone
TYPE
Thermo Scientific
BRAND
10666182
SKU
LINK
Download 10666182 - Fisher Scientific Thermo Scientific Chassis Care Acetone - DATA SHEET.pdf





Equipment
M-M Pin Headers
NAME
Pin headers
TYPE
Molex
BRAND
90120-0761
SKU
LINK
Download 90120-0761 - RS Components Molex Pin Headers M-M - DATA SHEET.pdf

Equipment
HX711
NAME
Adapter
TYPE
Zee Electronics
BRAND
SKUHX711
SKU
LINK
Download 126663068 - Radwell HX711 Amplifier - DATA SHEET.pdf


Equipment
Arduino MKR MEM Shield
NAME
Memory IC development tool
TYPE
Arduino
BRAND
ASX00008
SKU
LINK
Download ABX00008 - Mouser Arduino SRL MKR MEM Shield - DATA SHEET.pdf

Equipment
Light-Dependent Resistor
NAME
Light-dependent resistor
TYPE
LPRS
BRAND
N5AC501085
SKU
LINK
Download N5AC501085 - Farnell LPRS LDR - DATA SHEET.pdf

Equipment
M-F Pin Headers
NAME
Pin headers
TYPE
Harwin
BRAND
M20-7821146
SKU
LINK
Download M20-7821146 - Mouser Harwin Pin Headers M-F - DATA SHEET.pdf


Equipment
Multimeter
NAME
Multimeter
TYPE
DURATOOL
BRAND
D03047
SKU
LINK
Download D03047 - Farnell DURATOOL Multimeter - DATA SHEET.pdf


Equipment
Hook-Up Wire - 24AWG, 7/0.2 mm
NAME
Wires
TYPE
RS PRO
BRAND
196-4211
SKU
LINK
Download 196-4211 - RS Components RS PRO Peripheral Connector Wires Brown-Black - DATA SHEET.pdf


Equipment
Crimper
NAME
Crimper
TYPE
CK TOOLS
BRAND
430024
SKU
LINK
Download 430024 - Farnell CK TOOLS Crimper 4-in-1 for Push Plugs - DATA SHEET.pdf

Equipment
Female Spade Connector
NAME
Female spade connector
TYPE
RS PRO
BRAND
534-351
SKU
LINK
Download 534-418 - RS Components RS PRO Wire Crimp Push Connector for Switches - DATA SHEET.pdf


Equipment
Heat Shrink Wrap
NAME
Heat shrink wrap
TYPE
Distrelec
BRAND
700-4532
SKU
LINK
Download 700-4532 - RS Components RS PRO Heat Shrink Wrap - IMAGE.png


Equipment
Light-Dependent Resistor
NAME
Light-dependent resistor
TYPE
LPRS
BRAND
N5AC501085
SKU
LINK
Download N5AC501085 - Farnell LPRS LDR - DATA SHEET.pdf

Equipment
Accessory Protoboard
NAME
Accessory protoboard
TYPE
SparkFun
BRAND
PRT-08808
SKU
LINK
Download PRT-08808 - Mouser SparkFun Protoboard - LDR Mount - IMAGE.png


Equipment
JST Female Connector Housing
NAME
JST female connector housing
TYPE
JST
BRAND
820-1466
SKU
LINK
Download 820-1466 - RS Components JST Wire Connector Housing for Battery - DATA SHEET.pdf

Equipment
JST PH Crimp Terminal
NAME
JST PH crimp terminal
TYPE
JST
BRAND
820-1456
SKU
LINK
Download 820-1456 - RS Components JST Wire Crimp Connector for Battery - DATA SHEET.pdf


Equipment
Glass Cover Slip
NAME
Glass cover slip
TYPE
ACADEMY
BRAND
MIC2162
SKU
LINK
Download MIC2162 - SLS Glass Cover Slides - DATA SHEET.pdf


Equipment
Standoffs - M2 10+5mm
NAME
Standoffs
TYPE
Mac 8
BRAND
500-6621
SKU
LINK
Download 500-6621 - RS Components Mac 8 Hex Standoff M-F Microchip Mount - DATA SHEET.pdf

Equipment
Hex Nuts - M2
NAME
Hex nuts
TYPE
RS PRO
BRAND
483-0316
SKU
LINK
Download 483-0316 - RS Components RS PRO Hex Nut Microchip Mount - DATA SHEET.pdf


Equipment
Hex Nuts - M5
NAME
Hex nuts
TYPE
RS PRO
BRAND
232-6976
SKU
LINK
Download 232-6976 - RS Components RS Pro Hex Nut Load Cell Interior - DATA SHEET.pdf

Equipment
Hex Nuts - M4
NAME
Hex nuts
TYPE
Essentra
BRAND
102-6429
SKU
LINK
Download 102-6429 - RS Components Essentra Hex Nut Food Mount Plate - DATA SHEET.pdf

Equipment
Washers - M5
NAME
Washers
TYPE
RS PRO
BRAND
232-6959
SKU
LINK
Download 232-6959 - RS Components RS PRO Washers Load Cell Interior - DATA SHEET.pdf

Equipment
Screws - M5 Nylon
NAME
Screws
TYPE
MULTICOMP PRO
BRAND
MP008089
SKU
LINK
Download MP008089 - Farnell MULTICOMP PRO Screws Load Cell Interior - DATA SHEET.pdf

Equipment
Screwdriver - Small
NAME
Screwdriver
TYPE
WERA
BRAND
05118014001
SKU
LINK
Download 05118014001 - Farnell WERA Screw Driver - DATA SHEET.pdf

Equipment
Screws - M4 Nylon
NAME
Screws
TYPE
TR FASTENINGS
BRAND
TRNSE-1207-M4-10
SKU
LINK
Download TRNSE-1207-M4-10 - Farnell TR Fastenings Screws - Food Mount Plate - DATA SHEET.pdf


Equipment
Hook Tape
NAME
Hook tape
TYPE
Distrelec
BRAND
890-4161
SKU
LINK
Download 890-4161 - RS Components RS PRO Velcro Hook Tape for Battery Mount - DATA SHEET.pdf

Equipment
Screws - M2.5 Nylon
NAME
Screws
TYPE
TR FASTENINGS
BRAND
TRNSE-1207-M2.5-10
SKU
LINK
Download TRNSE-1207-M2.5-10 - Farnell TR Fastenings Screws LDR Mount - DATA SHEET.pdf

Equipment
Micro SDXC Card
NAME
Micro SDXC card
TYPE
INTEGRAL
BRAND
INMSDX64G10-90U1
SKU
LINK
Download INMSDX64G10-90U1 - Farnell Integral Micro SD Card - DATA SHEET.pdf


Equipment
Cable - Male USB A to Male Micro USB B, 1.8-3.0m
NAME
Cable
TYPE
RS PRO
BRAND
182-8872
SKU
LINK
Download 3023017-02M - Qualtek Electronics Farnell USB Cable 3.0 Plug A to Micro B 3m - DATA SHEET.pdf





Equipment
Electrical Tape
NAME
Electrical tape
TYPE
MULTICOMP PRO
BRAND
MP003360
SKU
LINK
Download MP003360 - Farnell Multicomp Electrical Tape - DATA SHEET.pdf

Equipment
Masking Tape - Pellets
NAME
Masking tape
TYPE
Thorlabs
BRAND
T743-1.0
SKU
LINK
Download T743-1 - Thorlabs Black Masking Tape  - DATA SHEET.pdf


Safety warnings
When soldering, risks include burns to fingers/hands/other parts of the body (whether directly from the soldering iron or from spitting solder/flux), harmful fumes, and electrical shock if equipment is faulty. To minimise these risks, users should: use tweezers, pliers, or a vice to hold work pieces where possible; switch off the soldering iron when not in use; wear PPE and ensure adequate ventilation (described above); avoid close working distances (e.g., near the face); avoid lead-based solder; keep work areas tidy and free of combustible items (including having a fire-resistant work surface); ensure electronics have been recently PAT tested; and visually inspect all equipment for faults prior to use.

Use of hand tools, including but not limited to screwdrivers, pliers, and cutters, comes with an inherent risk of stabs, cuts, and pinches to hands and fingers. To minimise these risks, users should: keep sharp edges pointed away from the body at all times; visually inspect tools for defects prior to use; avoid using unnecessary force; ensure tools are stored safely when not in use; and keep work areas tidy at all times.

Hazardous chemical exposure may occur during 3D printing and acetone-brushing (if applied). To minimise risks, users should ensure that appropriate ventilation/fume extraction systems are in place during the entire duration of 3D prints and where appropriate PPE as described previously.
Ethics statement
No animal experiments are necessary for SnackerTracker construction. All testing and validation experiments complied with the UK Animals (Scientific Procedures) Act (1986), the University of Oxford’s Policy on the Use of Animals in Scientific Research, and the ARRIVE guidelines 2.0. Procedures were approved by Oxford’s Animal Welfare and Ethical Review Board and performed under valid personal and project licenses.
Before start
Ensure that appropriate PPE is available for use, including but not limited to protection for eyes (goggles/glasses), lungs (soldering and 3D printing ventilation/fume extraction), skin/clothing (overcoat/labcoat), hair (elastic/net), and hands (gloves where appropriate, e.g., if brushing with acetone).
3D Printing
3D Printing
1d 9h 31m
1d 9h 31m
Set up the 3D printer (e.g., Ultimaker S3, which this protocol is tailored towards).
Equipment
Ultimaker S3
NAME
3D printer
TYPE
Ultimaker
BRAND
192-5469
SKU
LINK
Download 192-5469 - RS Components Ultimaker 3D Printer - DATA SHEET.pdf

Critical
Visually inspect the printer and ensure that servicing is up-to-date (including PAT testing and regular maintenance; guidance is available at Ultimaker Support - Ultimaker 3 Maintenance Schedule).
3m
Plug in and turn on the 3D printer.
2m
Ensure that print filament has been loaded in both Bowden tubes, and that spools have not been kept outside air-tight storage containers for more than 4 weeks. This is a common point of failure, especially during long prints, as materials which have been exposed to ambient conditions for longer than this can flood and irrevocably damage the print head. Change filament spools if unsure of storage conditions (instructions regarding how to do so are available at Ultimaker Support - How to Change Filament).
Equipment
ABS Black 3D Printing Filament
NAME
3D printing filament
TYPE
Ultimaker
BRAND
1621
SKU
LINK
Download 1621- Farnell Ultimaker 3D Printing Material ABS Black - IMAGE.png

Equipment
PVA Natural 3D Printing Filament
NAME
3D printing filament
TYPE
Ultimaker
BRAND
9731
SKU
LINK
Download 9731 - Farnell Ultimaker 3D Printing Material PVA Natural - IMAGE.png

5m
Download the provided .ufp print file to a USB key.
Equipment
Lexar USB Drive
NAME
USB drive
TYPE
Lexar
BRAND
230-4402
SKU
LINK
Download 230-4402 - RS Components Lexar USB Flash Drive - DATA SHEET.pdf

3m
Print the SnackerTracker chassis.
Critical
To print from USB, follow the instructions on the printer. Go to the printer icon, select 'Print from USB', and select the file you wish to print. Ensure that there is sufficient material on spools for the print (which can be checked in print and printer settings). Additional details and instructions are available at Ultimaker Support - Start a Print on the Ultimaker 3).

Remember to add a thin layer of glue to the glass plate, lightly brushing with water to create a thin, slightly liquid protective coating over the surface.

1m
Select 'Print'.
1m
Supervise the printing process at least until the brim has been laid and PVA extrusion has begun (if using dual-extrusion).
15m
Toxic
Wait for the print to finish. Check on the status of the print periodically.
1d 0h 44m
Toxic
Overnight
Remove and clean the print.
Once printing has finished, remove the chassis from the build plate (be sure to clean the build plate and return it to the printer). Separate each individual chassis component and manually remove as much PVA support material as possible without damaging the chassis.

Wire cutters or an alternative tool (e.g., long nose pliers) may be helpful during this process.

10m
Remove remaining PVA by dissolution. PVA is water-soluble, yet the process can take days if simply submerged in a room-temperature water bath. To expedite this process, one should 1) manually remove as much PVA as possible without damaging the chassis, 2) use warm, fresh water (i.e., 30-40°C, replacing murky water as needed), and 3) promote water circulation within the bath (e.g., using a stir rod or air bubble brick). Once complete, either dry chassis elements with a towel or leave to air-dry.
8h
Temperature
After support removal, articulating surfaces (i.e., the case cover-body interface and food holder-mount plate interface) may be filed and/or brushed with acetone to improve fit and reduce friction. This may be done using a metal file and an old towel (or paper towel) with appropriate PPE.
Equipment
Acetone
NAME
Acetone
TYPE
Thermo Scientific
BRAND
10666182
SKU
LINK
Download 10666182 - Fisher Scientific Thermo Scientific Chassis Care Acetone - DATA SHEET.pdf

7m
Optional
Toxic
Microcontroller Assembly
Microcontroller Assembly
1h
1h
Assemble and solder the load cell and HX711 adapter to the Arduino shield.

This introductory video explaining How to Solder provides useful tips for anyone looking to learn or improve soldering technique. Be sure to use lead-free solder.


Critical
Toxic
Insert one row of 4x M-M pin headers into E+/E-/A-/A+ through-holes on the HX711 signal amplifier, with the shorter ends ('tails') protruding through the HX711 from the bottom-up. Solder load cell (LC) wires to these four holes as follows: red -> E+; black -> E-; white -> A-; and green -> A+.

You will need to cut the row of M-M pin headers so that they are connected in sets of 4. The wire cutter or an alternative tool may be helpful in doing so.
6m
Insert a second row of 4x M-M pin headers into GND/DT/SCK/VCC through-holes on the opposite side of the HX711, again with the tails protruding through the HX711 from the bottom-up. Do not yet solder this in place, as doing so may make it difficult to proceed with step 6.3 (i.e., inserting into the prototyping area)...

Be sure to order the micro HX711 adapter. This is smaller than the standard make/model and is necessary to fit on the Arduino MKR MEM prototype area (otherwise functionally identical).
Equipment
M-M Pin Headers
NAME
Pin headers
TYPE
Molex
BRAND
90120-0761
SKU
LINK
Download 90120-0761 - RS Components Molex Pin Headers M-M - DATA SHEET.pdf

Equipment
HX711
NAME
Adapter
TYPE
Zee Electronics
BRAND
SKUHX711
SKU
LINK
Download 126663068 - Radwell HX711 Amplifier - DATA SHEET.pdf


4m
Altogether, insert the 8 longer metal ('mating') ends of the pin-headers extending from the underside of the HX711 into the Arduino MKR MEM prototyping area. With the topside of both the Arduino MKR MEM shield and HX711 facing upwards on a flat surface, with the microSD insert on the MEM shield pointing towards the right, insert the HX711-attached pin headers as follows (see below for pinhole-naming conventions): E+ -> B1; E- -> C1; A- -> D1; A+ -> E1; GND -> C9; DT -> D9; SCK -> E9; and VCC -> F9.

The prototyping area on the Arduino MKR MEM shield consists of 7x14 (rows x columns) pin holes. These will be hereafter termed rows A-G and columns 1-14, where if the shield is placed on a flat surface with the microSD insert upwards and pointing towards the right, A1 is in the top-left corner (furthest from the microSD insert and directly below the #5 digital I/O pin) and G14 is in the bottom-right corner (closest to the 'CE' compliance inscription).
Equipment
Arduino MKR MEM Shield
NAME
Memory IC development tool
TYPE
Arduino
BRAND
ASX00008
SKU
LINK
Download ABX00008 - Mouser Arduino SRL MKR MEM Shield - DATA SHEET.pdf

6m
Being careful to hold/clip the assembly together, flip the HX711/MEM chip over and solder each pin to its corresponding hole on the underside.
6m
Flip the now-soldered assembly upright (i.e., with the HX711 and microSD insert facing upwards on a flat surface). Solder the tails of the pin headers protruding through GND/DT/SCK/VCC holes to secure the chip assembly.
2m
Solder the resistor to the MEM shield prototyping area.
Critical
Bend the wires on either side of the 10kΩ resistor to an approximately 90-degree angle such that the resistor/wires are roughly U-shaped. Looking at the upperside of the MEM shield/HX711, insert resistor wires through holes A11 and A13 (directly below pins A2 and A0, respectively). The orientation/direction of the resistor does not matter (i.e., pointing from A11-13 or A13-11).
Equipment
Resistor
NAME
Resistor
TYPE
Distrelec
BRAND
707-8300
SKU
LINK
Download 707-8300 - RS Components RS PRO Resistor - DATA SHEET.pdf

1m
From the underside (flipping the chip assembly over with the inserted resistor), pull the resistor wires through as far as possible without using unnecessary force. Bend the wires towards the prototyping area, while on the upperside pushing the resistor further into the holes and along the surface of the chip, such that it is relatively fixed in place (i.e., will not slide out if flipped over).
2m
From the underside, solder resistor wires to holes A11 and A13. Trim excess protruding wire with a wire cutter.
2m
Solder M-F pin headers to the MEM shield prototyping area.
Critical
In a similar style to step 7 with the resistor, also from the upperside, insert a row of 3x M-F pin headers into holes C11-13.

You will need to cut the row of pin headers into a row of 3 for this step and can use the wire cutters (or another suitable tool) to do so.
Equipment
M-F Pin Headers
NAME
Pin headers
TYPE
Harwin
BRAND
M20-7821146
SKU
LINK
Download M20-7821146 - Mouser Harwin Pin Headers M-F - DATA SHEET.pdf

1m
Flip the chip assembly over with the inserted pin headers, being careful to not let these fall out by holding or clipping in place.
1m
From the underside, solder the protruding pin header tails to holes C11-13.
2m
Solder 5x U-shaped jumper wires of appropriate lengths to the MEM shield prototyping area.

For this step, remain working on the underside of the MEM prototyping area. Place the assembly on a flat surface with the microSD insert pointing towards the right. Note that hole IDs/references are inverted; A1 is at the bottom-left directly above the #5 digital I/O pin, and G14 is in the top-right corner closest to the 'S' in the 'SHIELD' inscription.

After completing all soldering on the underside of the prototype area, it is recommended to test each electrical connection using a multimeter.

Equipment
Multimeter
NAME
Multimeter
TYPE
DURATOOL
BRAND
D03047
SKU
LINK
Download D03047 - Farnell DURATOOL Multimeter - DATA SHEET.pdf

Critical
Remaining on the underside, insert the ends of the smallest jumper wire (~2-5mm insulated) into C14 and F14. Push wire ends through the holes in a similar manner as with the resistor in step 7.1. Solder in place. Create a bridge of solder connecting holes C14 to C13 (C13 should be occupied with one of the three soldered M-F pin header tails - the one closest to the microSD insert); see the video below for a visual aid and techniques on how to connect holes/leads.

This video on Using Perfboard | Soldering Basics provides useful tips on how to connect holes/leads using solder (recommended start time - 1:30).
3m
Insert the ends of the small jumper wire (~5-7mm insulated) into F10 and G14. Push wire leads through the holes and solder in place. Create two bridges of solder: the first connecting F14, G14, and the 5V pin; and the second connecting F10 and F9 (F9 should be occupied by the soldered VCC HX711 pin extension). Use the same technique as recommended in step 9.1.
3m
Insert the ends of a medium jumper wire (~12-15mm insulated) into A4 and E8. Push wire leads through the holes and solder in place. Create two bridges of solder: the first connecting A4 and the #2 digital I/O pin; and the second connecting E8 and E9 (E9 should be occupied by the soldered SCK HX711 pin extension).
4m
Insert the ends of a medium jumper wire (~12-15mm insulated) into A3 and D8 such that it is resting atop the body/insulation of the previous jumper wire from step 9.3. Push wire leads through the holes and solder in place. Create two bridges of solder: the first connecting A3 and the #3 digital I/O pin; and the second connecting D8 and D9 (D9 should be occupied by the soldered DT HX711 pin extension).
5m
Insert the ends of the large jumper wire (~17-20mm insulated) into C8 and G11 such that it is resting atop the body/insulation of the previous jumpers wire from steps 9.3-4. Push wire leads through the holes and solder in place. Create two bridges of solder: the first connecting C8 and C9 (C9 should be occupied by the soldered GND HX711 pin extension); and the second connecting G11 and the 5V pin.
5m
Create an additional solder bridge connecting C8-12. These should be occupied as follows: C8 = one end of the large jumper wire; C9 = GND HX711 pin extension; C10 = otherwise empty; C11 = one of the three soldered M-F pin header tails (furthest from the microSD insert); and C12 = middle M-F pin header tail.
3m
Create two final solder bridges for the resistor: one connecting A13 and the DAC0/A0 pin; and the other connecting A11 and C11. These should be occupied as follows: A11 = the innermost soldered end of the resistor; and C11 = the innermost M-F pin header tail, creating a T-shape with the 5-hole-long solder bridge from step 9.6.

Then, it is recommended to flip the MEM chip assembly over and trim any excess wire (namely resulting from insertion of the jumper wires) from the upperside using thin wire cutters.
3m
Stack the Arduino MKR MEM shield assembly (complete with the HX711 adapter, load cell, reistor, pin headers, and soldered jumper wire configurations) directly atop the Arduino MKR WiFi 1010 microcontroller. Pins and pin headers should align exactly between these two Arduino chips. Push together firmly.

Note that this configuration was designed such that it is easy to insert and remove the MEM assembly from the MKR 1010 Wi-Fi microcontroller for 1) later ease-of-mounting and 2) troubleshooting, repairs, and upgrades if needed.

1m
Critical
Peripheral Inputs and Wiring
Peripheral Inputs and Wiring
40m
40m
Prepare wire connectors for switches.

After completing all soldered junctions, it is recommended to test each electrical connection using a multimeter.
Critical
Cut four hook-up wires (0.2mm2, 24 AWG, 7/0.2mm) to 10cm using wire cutters, and strip 1cm of the encompassing PVC insulation at each end using wire strippers.
Equipment
Hook-Up Wire - 24AWG, 7/0.2 mm
NAME
Wires
TYPE
RS PRO
BRAND
196-4211
SKU
LINK
Download 196-4211 - RS Components RS PRO Peripheral Connector Wires Brown-Black - DATA SHEET.pdf


2m
Crimp one bare end of each wire within the thin end of a female receptacle spade connector. Firmly press the other end of the spade connector around a contacts on each of two panel-mount toggle switches. That is, there should be two wires/crimp connectors attached to each of two toggle switches.
Equipment
Crimper
NAME
Crimper
TYPE
CK TOOLS
BRAND
430024
SKU
LINK
Download 430024 - Farnell CK TOOLS Crimper 4-in-1 for Push Plugs - DATA SHEET.pdf

Equipment
Female Spade Connector
NAME
Female spade connector
TYPE
RS PRO
BRAND
534-351
SKU
LINK
Download 534-418 - RS Components RS PRO Wire Crimp Push Connector for Switches - DATA SHEET.pdf


3m
Solder the other bare end of each hook-up wire to the tail (shorter end) of single M-M pin headers.

This video on how to Solder a Pin-Header to a Wire demonstrates a useful technique which can be used to achieve this.
3m
Cut 4x 1cm segments of 3mm-diameter heat shrink wrap. Slide these over the newly-soldered wire-pin header connections from step 11.3.
Equipment
Heat Shrink Wrap
NAME
Heat shrink wrap
TYPE
Distrelec
BRAND
700-4532
SKU
LINK
Download 700-4532 - RS Components RS PRO Heat Shrink Wrap - IMAGE.png

2m
Use a heat gun to shrink the wrap from step 11.4 and protect the underlying electrical connection.

1m
Temperature
Prepare wire connections for the light dependent resistor (LDR).
Equipment
Light-Dependent Resistor
NAME
Light-dependent resistor
TYPE
LPRS
BRAND
N5AC501085
SKU
LINK
Download N5AC501085 - Farnell LPRS LDR - DATA SHEET.pdf

Critical
As in step 11.1, cut two more hook-up wires to 10cm using wire cutters, and strip 1cm of the encompassing PVC insulation at each end using wire strippers.
2m
Solder each bare end of hook-up wires to the tail (shorter end) of single M-M pin headers as in step 11.3 (using the same technique recommended).
3m
As in step 11.4-5, cut 4x1cm segments of 3mm-diameter heat shrink wrap. Slide these over the newly-soldered wire-pin header connections, and shrink using a heat gun to protect the new electrical connection.
4m
Prepare the LDR and mountable protoboard.
Critical
Obtain a LDR, and press each extending wire through a 1in2 accessory protoboard from the back- to front-side. That is, the resistor itself should be mounted on the side of the accessory protobord which does not feature circular pads around each metal hole. If using the same materials as listed in the Materials tab of this protocol, this side will be coloured beige rather than green. It is recommended to push both wire ends through holes along the midline of the protoboard (2 and 3 holes below the large mounting opening). On the opposite side (green, with metal pads around each hole), pull the LDR as close to the protoboard as possible. As was done with the resistor on the MKR MEM shield, bend the LDR wires towards the prototyping area such that it becomes relatively fixed in place (i.e., will not slide out if flipped over).
Equipment
Accessory Protoboard
NAME
Accessory protoboard
TYPE
SparkFun
BRAND
PRT-08808
SKU
LINK
Download PRT-08808 - Mouser SparkFun Protoboard - LDR Mount - IMAGE.png

3m
Press the tailes of two M-F pin headers into the backside of the protoboard, within the same holes which the LDR wires have been pressed through. That is, each LDR wire extension should share a hole with a M-F pin header, each attaching from opposite sides of the protoboard.
2m
Solder both holes to secure the LDR and pin headers to each other and to the protoboard. Trim excess wire using the wire cutters.
5m
Prepare the lithium polymer (Li-Po) battery. If possible, order a battery which already comes with a JST pin head connection. If this is the case, skip the rest of this step. If the product ordered does not already feature a JST connection (i.e., only bare wires extend from the Li-Po battery), wires must be manually crimped and inserted into corresponding JST housing.

This video on JST Connector Crimping explains and demonstrates how this can be done.

Equipment
JST Female Connector Housing
NAME
JST female connector housing
TYPE
JST
BRAND
820-1466
SKU
LINK
Download 820-1466 - RS Components JST Wire Connector Housing for Battery - DATA SHEET.pdf

Equipment
JST PH Crimp Terminal
NAME
JST PH crimp terminal
TYPE
JST
BRAND
820-1456
SKU
LINK
Download 820-1456 - RS Components JST Wire Crimp Connector for Battery - DATA SHEET.pdf


10m
Optional
Critical
Electronics and Accessory Mounting
Electronics and Accessory Mounting
1h
1h
Insert a glass coverslip into the thin slot within the upper part of the chassis body wall (i.e., covering the opening where the LDR will later reside).

Position the SnackerTracker chassis body such that it is sitting on a flat surface, with the interior electronics holding space easily accessible and the support legs extending away from the working individual. This will be hereafter termed 'base' orientation. From this view, the slot for the glass coverslip should be on the upper-right-side of the chassis body wall.
Equipment
Glass Cover Slip
NAME
Glass cover slip
TYPE
ACADEMY
BRAND
MIC2162
SKU
LINK
Download MIC2162 - SLS Glass Cover Slides - DATA SHEET.pdf

1m
Affix standoffs to the chassis body using cyanoacrylate glue (or equivalent) and mount the microchip assembly.

Glue the F-end of each of four 10 + 5mm M2 F-M hex standoffs to the interior wall of the chassis body (on the side opposite to the full openings for toggle switches and the LDR).
Equipment
Standoffs - M2 10+5mm
NAME
Standoffs
TYPE
Mac 8
BRAND
500-6621
SKU
LINK
Download 500-6621 - RS Components Mac 8 Hex Standoff M-F Microchip Mount - DATA SHEET.pdf

2m
Imediately after doing so, and while the glue is still wet, ensure the chassis is turned on its side (such that the M-ends are pointing upwards) and mount the Arduino MKR WiFi 1010 microchip (with the stacked MEM configuration) to these four standoffs through the four holes at each corner of the Arduino MKR WiFi 1010 chip.

If you do not do this, the standoffs might be secured with glue at an angle which, if ever so slightly mis-aligned with holes on the Arduino MKR WiFi 1010, will result in it being impossible to mount the microchip assembly.
2m
Critical
Secure the microchip assembly to the standoffs using M2 hex nuts. Once finished, add extra glue to the base of the female end of each standoff (i.e., placed within the chassis) if needed for etra support. Set this aside to dry.

It will be easier to simply secure the Arduino MKR WiFi 1010 chip to the standoffs in the first instance without the stacked MEM chip assembly. The configuration was designed such that 1) it is easier to screw the MKR Wi-Fi 1010 chip to the standoffs without needing to navigate the MEM assembly in a confined space, and 2) the MEM assembly can be easily removed for later repairs/upgrades if needed.

Do not continue to step 17 until the glue has dried and the microchip assembly is securely affixed to the chassis wall.
Equipment
Hex Nuts - M2
NAME
Hex nuts
TYPE
RS PRO
BRAND
483-0316
SKU
LINK
Download 483-0316 - RS Components RS PRO Hex Nut Microchip Mount - DATA SHEET.pdf

6m
Critical
Pause
Re-position the SnackerTracker to base orientation, and affix additional sets of hex nuts to the chassis and mount plate (again using cyanoacrylate glue or an equivalent product).
Critical
Glue one 5mm M2.5 F-F hex standoff (or, if using the products listed in the Materials tab, a 10mm hex standoff cut in half to 5mm using wire cutters or an equivalent tool) within the chassis body wall above the LDR opening.

Push the standoff through this opening while looking from above such that it does not obstruct the coverslip slot (step 15) if in the future the coverslip might need to be replaced.


2m
Glue two M5 hex nuts to the bridge featured within the chassis body interior.
Equipment
Hex Nuts - M5
NAME
Hex nuts
TYPE
RS PRO
BRAND
232-6976
SKU
LINK
Download 232-6976 - RS Components RS Pro Hex Nut Load Cell Interior - DATA SHEET.pdf

2m
Glue 4x 6mm M4 hex standoffs/nuts within the corresponding openings on the mount plate (prominently visible - two on one side towards the midline, and two which penetrate from one side to the other).

To ensure good fit/alignment with the food holder, it is recommended to slide the food holder onto the mount plate and turn screws all the way through the food holder/mount plate assembly as the glue on the mount plate hex nuts are drying. Be careful to not touch the glue with screws or hands/fingers. Ensure the hex nuts have fully dried (this should take ~3 minutes) before proceeding with any steps involving the mount plate and/or food holder. After this, the food holder can be removed. Glue should again be carefully applied to the hex nut-mount plate interface for additional support (being sure that glue does not leak into the interior thread region of the hex nuts themselves).
Equipment
Hex Nuts - M4
NAME
Hex nuts
TYPE
Essentra
BRAND
102-6429
SKU
LINK
Download 102-6429 - RS Components Essentra Hex Nut Food Mount Plate - DATA SHEET.pdf

5m
Pause
Attach the load cell to the chassis body and mount plate.

If the Arduino MKR MEM shield assembly (complete with the HX711 adapter, load cell, reistor, pin headers, and soldered jumper wire configurations) is not currently stacked atop the Arduino MKR WiFi 1010 microcontroller, do this now. Again, pins and pin headers on these two Arduino chips should align. Push together firmly.
Critical
From base orientation, slide one end of the load cell into, up, and through the right -side hole created by the interior bridge (which is parallel to the working surface).
1m
The load cell should then be twisted and positioned such that its long end 1) lies parallel to the working surface, and 2) is protruding through the load cell opening in the chassis body with the plasticine-covered wires extending into the chassis body from the right-face of the load cell (i.e., perpendicular to the working surface). M5 screw-holes on the load cell should be directly positioned overtop the two M5 hex nuts. If using the recommended load cell product, the '1kg' sticker should be outside the chassis body with the arrow pointing downwards.

If using the same products as recommended in the Materials tab, the two pairs of load cell screw holes will be of different sizes: M4 and M5. This will help with the orientiation of the load cell in that it can only be properly affixed to the interior chassis with the M5-end within the body of the SnackerTracker. However, other products feature load cell screw holes that are the same size (e.g., both M4). To adapt to this, the 3D model could be adjusted to accommodate M4 rather than M5 hex nuts in the body bridge rather, or spacers could be glued within the gap created by placing M4 hex nuts into a space presently designed for M5 counterparts.
1m
Carefully position two M5 washers over each M5 hex nut and in line with load cell openings.

This step can be difficult, and could be improved by 1) using a thicker hex nut, 2) using one thicker washer and/or gluing washers to each other and the bridge, or 3) decreasing the depth of the hex nut hole in the 3D model prior to printing.
Equipment
Washers - M5
NAME
Washers
TYPE
RS PRO
BRAND
232-6959
SKU
LINK
Download 232-6959 - RS Components RS PRO Washers Load Cell Interior - DATA SHEET.pdf

2m
Securely screw the load cell to the bridge of the chassis body interior using two 20mm M5 screws (trimmed as needing, again using wire cutters or an equivalent tool).
Equipment
Screws - M5 Nylon
NAME
Screws
TYPE
MULTICOMP PRO
BRAND
MP008089
SKU
LINK
Download MP008089 - Farnell MULTICOMP PRO Screws Load Cell Interior - DATA SHEET.pdf

Equipment
Screwdriver - Small
NAME
Screwdriver
TYPE
WERA
BRAND
05118014001
SKU
LINK
Download 05118014001 - Farnell WERA Screw Driver - DATA SHEET.pdf

2m
Then, on the opposite side of the load cell which should now be protruding through the opening in the chassis wall (extending in the same direction as the suport legs), insert two trimmed 10mm M4 screws into the exterior load cell holes from the bottom-up. Screw these through the load cell holes and, when they have just breached the topside of the load cell, place the two hex nuts embedded within the midline of the mount plate directly above. Continue tightening both screws until they each grip and firmly secure the mount plate to the load cell.

Note that the mount plate should be aligned such that the midline hex nuts are facing the working surface (i.e., downwards), and the two now-upwards-facing hex nuts are furthest from the chassis body. If attached incorrectly (i.e., rotated 180° parallel to the working surface), the food holder will not fit. The mount plate must then be unscrewed, turned around, and re-attached.
Equipment
Screws - M4 Nylon
NAME
Screws
TYPE
TR FASTENINGS
BRAND
TRNSE-1207-M4-10
SKU
LINK
Download TRNSE-1207-M4-10 - Farnell TR Fastenings Screws - Food Mount Plate - DATA SHEET.pdf

2m
Insert and secure the load cell within the chassis interior.
Critical
Cut 3cm-long segments of 20mm hook-and-loop Velcro tape (one 'hook', and one 'loop').



Equipment
Hook Tape
NAME
Hook tape
TYPE
Distrelec
BRAND
890-4161
SKU
LINK
Download 890-4161 - RS Components RS PRO Velcro Hook Tape for Battery Mount - DATA SHEET.pdf

1m
Remove the sticky protective covering, and adhere a piece of the 'hook' strip (cut to approximately 3cm) to the base of the chassis (within the interior and closer to the right side if observing from base orientation). Adhere the 'loop' strip (also cut to approximately 3cm) to the base of the Li-Po battery such that, with the 'loop' strip on the underside and looking at the battery from the topside, wires extend to the bottom-left (also see step 19.3 regarding why this orientation is necessary).
1m
Neatly slide the battery into the chassis interior, and attach the 'loop' strip on the battery to the 'hook' strip within the chassis such that the wire leads emerge nearest (and directly underneath) the Arduino MKR WiFi 1010’s JST port.
1m
Mount the LDR-protoboard assembly within the chassis interior.
Critical
Screw the LDR-protoboard assembly to the right-side wall of the chassis interior (observing from the base orientation) using a trimmed 10mm M2.5 screw. The LDR should point to the right such that it occupies the hole in the chassis wall (i.e., is visible from the chassis exterior through the window protected by the coverslip). The M2.5 screw should be tightened securely, extending through the coverslip slot in the chassis wall such that it spans the slot and presses firmly against the adjacent chassis wall.

By tightening the M2.5 screw in this manner, the glass coverslip will not fall out if the SnackerTracker is flipped upside-down. Yet, the coverslip remains accessible (if the screw is removed) if it requires cleaning, repair, or replacement.
Equipment
Screws - M2.5 Nylon
NAME
Screws
TYPE
TR FASTENINGS
BRAND
TRNSE-1207-M2.5-10
SKU
LINK
Download TRNSE-1207-M2.5-10 - Farnell TR Fastenings Screws LDR Mount - DATA SHEET.pdf

3m
Plug one end of each of the two wires with M-pins at each end (the product of step 12) into the F-pin headers on the LDR-mounted protoboard.
1m
Bending the wires as necessary, plug the opposite end of one wire into the outermost F-pin header on the Arduino MKR MEM protoboard (i.e., closest to the microSD insert). Plug the end of the other wire into the Arduino MKR MEM’s DAC0/A0 pin.
3m
Attach toggle switches.
Critical
Push both toggle switches (with 2x wires attached to each as the product of step 11) through each of the two rectangular through-holes (below the LDR window) from the outside of the chassis towards the interior.

Lead with the wires, such that these are threaded through the rectangular holes before the toggle switch itself is pressed into the chassis wall.
2m
Insert one M-pin extending from each switch to one of the two remaining F-pin headers (soldered nearest the HX711 on the Arduino MKR MEM protoboard; the one closest to the microSD insert should be occupied by the LDR wire following step 20). The pin being inserted should belong to the wire extending from the side of the toggle switch bearing the "|" marking (i.e., not "O"). The top toggle switch should be inserted into the middle F-pin header, and the bottom toggle switch into the innermost F-pin header.

This can be difficult unless one has very small fingers and good manual dexterity. Consider using the flat/thin end of the wire cutter (without cutting wires) or an equivalent tool such as long nose pliers to assist with pin insertion.
3m
Insert the other M-pin extensions (i.e., belonging to the wire extending from the side of the toggle switch bearing the "O" marking) intp I/O pins on the Arduino MKR MEM shield. Plug the wire from the top toggle switch into pin 6 ("switch 1" for later reference), and the wire from the bottom toggle switch into pin 7 ("switch 2" for later reference).
3m
Affix the food holder to the mount plate using four 10mm M4 screws (the same as from step 18.5). The food holder should slide atop the mount plate easily, with screw holes and hex nuts aligned well (if step 17.3 was completed successfully).
3m
Insert the microSD card.
Critical
Obtain a microSD card. If using the product recommended in the Materials tab, this will be a U3 micro-SDXC card (see the provided spreadsheet for more details). For compatibility with the SnackerTracker's microcontrollers, the microSD card must be formatted to FAT-32. If using an alternative product, this may already be the case, however the presently-listed microSD card is formatted as exFAT and requires conversion.

The following step 23.2 is listed as optional, as it is only necessary if the microSD card is not of the FAT-32 format, yet it is still useful in checking/confirming the present formatting status of a microSD card.
Equipment
Micro SDXC Card
NAME
Micro SDXC card
TYPE
INTEGRAL
BRAND
INMSDX64G10-90U1
SKU
LINK
Download INMSDX64G10-90U1 - Farnell Integral Micro SD Card - DATA SHEET.pdf


Check the format of the microSD card. If necessary, re-format from its existing state (e.g., exFAT) to FAT-32 for SnackerTracker compatibility. During this step, it is recommended to assign the microSD card an identifier (e.g., SnackerTracker-01) such that, during later steps, it is easier to keep track of which microSD card belongs to which SnackerTracker (especially during large experiments involving many devices and moving pieces).

Freely-available software such as the MiniTool Partition Wizard (v12.7 at the time of original construction) can be used as a helpful reformatting tool.
Software
MiniTool Partition Wizard
NAME
MiniTool
DEVELOPER

7m
Insert the microSD card into the corresponding slot on the Arduino MKR MEM shield. To do so, from the base orientation, position the microSD card such that the gold strips are pointing down and to the left before pressing firmly into the slot.

Note that inserting and removing the microSD card will be difficult at first until doing so several times (i.e., it must be 'worn in'). It may prove difficult to do with one's fingers, in which case using the wire cutter (with a loose grip) or alternatively long nose pliers may be helpful.
1m
Plug two cable retention grommets into the case cover from the outside-in. Slide the case cover into the chassis body. Take care to not pinch wires and to neatly tuck any excess length inside the chassis interior.

Note that all wires should be plugged in except for the battery, which should only be inserted when ready to begin recordings. When the SnackerTracker is not in use, simply tuck the JST battery plug inside the chassis interior such that it does not interfere with insertion and removal of the case cover.

1m
Finally, add an ID tag to the assembled SnackerTracker. This could come in the form of, for example, a printed label or piece of masking tape affixed to the base of the chassis with an identifier (e.g., SnackerTracker-01, matching the ID assigned to the microSD card in step 23.2).
2m
Software Upload
Software Upload
25m
25m
Download Arduino software and create user accounts.
Software
Arduino Editor
NAME
Arduino
DEVELOPER
SOURCE LINK

Critical
If not already existent, create an Arduino account and follow the instructions as prompted.
7m
Download the Arduino Cloud Agent and follow the steps as prompted (if the Agent has not been previously installed on a given laptop/PC).
Software
Arduino Cloud Agent
NAME
Arduino
DEVELOPER
SOURCE LINK

5m
Critical
Log in to the Arduino Cloud Editor.

The Arduino Cloud Editor is an online cloud-based version of the Arduino IDE (Integrated Development Environment), which is a downloadable version that can be run on a Mac or Windows operating system. If familiar with the IDE, feel free to operate in this environment, however for SnackerTracker application and ease-of-use it is recommended to simply remain within the Cloud Editor.

Arduino's Using the Arduino Cloud Editor page is a useful resource when learning how to navigate and use the Editor. It also contains helpful details when getting started with the Cloud Agent and creating a user account.
2m
Download, open, and save the SnackerTracker's operational code ("sketch").
Critical
Click the following link to open the most recent version of the SnackerTracker's operational sketch:


The script contains a setup() function for device initialisation, and a loop() function for data recording, both of which will be referenced during steps involved with device initialisation and data collection. Note that a 'sketch' is simply an Arduino synonym for 'code' or 'script'.
1m
Open this sketch in the Arduino Editor (there should be a button in the top right corner of the screen which leads to this and step 26.3)...
1m
Save the sketch to the user's library for future reference.

At any time, this operational code can be accessed via the link above. However, if saved to a user's library, it may be more convenient to then access at any time without needing to search for the link.
3m
Upload the SnackerTracker's operational sketch to the SnackerTracker itself.
Critical
Pause
Before proceeding, ensure that the Arduino Cloud Agent is running in the background (product of step 26.2).

The Cloud Agent must be running for any communication to occur between a laptop/PC and an Arduino chip connected via USB. In the Arduino Editor (in future steps), an error notification will remind a user to run the Agent if the user forgets to do so.
1m
Remove the case cover from the chassis body and plug in the Li-Po battery. With SnackerTracker_V11 open in the Arduino editor, connect the SnackerTracker to the laptop/PC using a USB A/microB adapter cable (the length does not particularly matter, here anywhere from 1.8 to 3m is recommended depending on one's cage/laptop/PC configuration). This can be done by plugging the USB micro-B end of the connecting cable to the Arduino MKR WiFi 1010's USB port, then plugging the other USB A end into the laptop/PC.

Ensure that the battery is plugged in fully - there are two 'stops', the second of which requires more force than one may think necessary. Handling the JST connection may again be practically difficult, and use of loosely-gripped wire cutters or an equivalent tool may be helpful. A green light should appear on the Arduino MKR WiFi 1010 near the microSD insert whenever power is being supplied.

It may take some time for this connection to establish in the first instance. Eventually, the icon in the top left area of the editor next to the 'check' and 'arrow' buttons should indicate that the Arduino MKR WiFi 1010 has been connected. A successful connection is indicated either by a red circle around the number '1' or a green circle around a check-mark. Once established, the 'arrow' button should change shade such that it can next be clicked...
Equipment
Cable - Male USB A to Male Micro USB B, 1.8-3.0m
NAME
Cable
TYPE
RS PRO
BRAND
182-8872
SKU
LINK
Download 3023017-02M - Qualtek Electronics Farnell USB Cable 3.0 Plug A to Micro B 3m - DATA SHEET.pdf

2m
Upload software by clicking the 'arrow' button next to the device indicator icon from step 27.2.

The Editor should then proceed with the upload and initialisation process, showing a series of green text in the bottom Console area. It should indicate once the upload is complete. Now, one could either unplug the device from the laptop/PC and unplug the battery such that the SnackerTracker can be used at a later date, or (if the SnackerTracker is ready for immediate use) proceed to step 28.
3m
Decide whether wired SnackerTracker recordings (i.e., connected to an external power supply) or wireless SnackerTracker recordings will be used for data collection:
1m
Critical
Step case

Wired Recordings with External Power Supply
32 steps

Follow these steps if recordings are to be conducted while the SnackerTracker is connected to an external power supply. This is useful if longer recordings are desired (i.e., exceeding 48h, which is the approximate recording limit for wireless data collection).
Open a documentation spreadsheet or notebook to collect key experimental information, which will be needed for recordkeeping and data analysis. Enter the relevant animal/experiment information in the grey fields (columns A-F).

A sample Excel sheet is provided as an attachment below and in the Description tab entitled "SnackerTracker - Initialisation and Data Collection - SAMPLE". All subsequent steps will be described as though the operator is using this spreadsheet as a template for a new experiment (referencing columns/fields as they appear in this spreadsheet).

Note that, in this sample spreadsheet, columns are colour-coded such that general animal/experiment information is shaded grey, information needing to be entered during device initialisation is shaded yellow, information needing to be entered when terminating recordings is shaded blue, and any automatially-calculated fields (i.e., requiring no user modification if all other information is entered correctly) is shaded green.
7m
Confirm the ID of the SnackerTracker to be used (i.e., looking at the ID label added in step 25) and record this in the documentation spreadsheet in column G ("SnackerTracker Device ID", shaded yellow).
1m
Critical
Weigh the SnackerTracker to be used, which should have all components intact (the case cover slid into the chassis body and the food holder loosely screwed onto the mount plate) but no food in the holder. Record this mass in the documentation spreadsheet in column H ("Device Mass (Alone, g)", shaded yellow).

1m
Critical
Consider removing the animal from its home cage into a 'holding cage' during SnackerTracker initialisation. This is recommended as the process of placing the SnackerTracker and connecting wires into the animal's space may cause more stress than temporary relocation. Always consult animal technicians/experts, gain necessary approivals, and use informed judgement when determining how to best conduct these steps.
3m
Optional
Prepare the recording area for wired data collection.
Critical
If using the products recommended in the spreadsheet provided in the Materials tab, connect the 10-port USB hub to a power supply using the provided USB adapter wire and wall plug (USB/UK). Blue lights on the USB hub indicate successful connection.

Consider covering lights on the USB hub with opaque tape (e.g., black electrical tape) if, for example, the SnackerTrackers are being used in open-top animal cages and the presence of blue lights would thereby alter the animal's home cage environment.


Equipment
Electrical Tape
NAME
Electrical tape
TYPE
MULTICOMP PRO
BRAND
MP003360
SKU
LINK
Download MP003360 - Farnell Multicomp Electrical Tape - DATA SHEET.pdf

2m
For each SnackerTracker being initialised, connect one USB A/micro-B adapter cable to the USB hub (the same as in step 28.2, wherein different cable lengths can be ordered according to study needs).

These cables should be long enough such that they can reach the animal cages where the SnackerTrackers to which they will be supplying power will be residing. Cable length will vary depending on experimental needs, with a sample length being 1.8-3.0m (the product listed in the spreadsheet included in the Materials tab).

The USB micro-B end of the cable will extend into the animal cage and ultimately connect to the Arduino MKR WiFi 1010's USB port through the grommet in the case cover. It is recommended to wrap additional electrical tape around any wires which would be exposed to the animal (i.e., between the grommet and the cage exit-point) to prevent the possibility of wire-chewing, which could be a dangerous hazard to the animal. During experiments, this wire should be checked daily for signs of chewing. Throughout pilot tests and validations, using dozens of animals for over a year, chewing only happened once; a mouse knawed through the tape protecting the wire, but luckily not into the wire itself due to researcher attentiveness and intervention.
1m
Insert the USB micro-B end of the cable into the animal cage (to the location where the SnackerTracker will be placed once recordings begin). Remove the grommet from the SnackerTracker case cover which covers the destination USB port. Bring this into the animal cage, and push the USB micro-B cable end through the grommet to prepare for connection to the SnackerTracker.

Connecting the grommet to the USB micro-B cable end in advance will make it such that, once the SnackerTracker has been initialised and recordings have started, the user will simply need to plug the USB cable into the Arduino MKR WiFi 1010's USB slot through the unobstructed hole in the case cover (step 39). One can then slide the already-in-place grommet downwards to seal the case cover opening and secure the connection.
1m
Prepare the pellets and document the corresponding calibration mass.
Critical
Obtain up to 11 food pellets (ideally from the food hopper of the cage where the SnackerTracker will soon be placed). Larger pellets are ideal, however not so large that they cannot be inserted into the food holder (step 33.3; this will come with practice).

Be sure to add enough pellets to last the entire duration of the intended recording period. Pilot tests should be conducted in advance to estimate the expected mass of food consumption per day (which, for example during SnackerTracker development, seemed to be approximately 4-6g per day in adult wild-type mice). During any experiment, animals should be checked daily to ensure that there remains a sufficient pellet supply in the food holder. The SnackerTracker can currently hold 11 pellets, however the food holder can be adjusted to accommodate more depending on future experimental needs.
2m
Add tape to one end of each pellet such that the sticky side is both affixed to the pellet itself and facing outwards.

Taping the pellets can be tricky, yet again comes with practice. Some practical tips involve 1) folding the tape over on itself like a hot dog bun (i.e., with the sticky surface facing outwards on both sides), 2) wrapping the tape around the tip of the pellet along the smooth cylindrical surface (i.e., not the circular head of the pellet) with the folded tape crease pointing towards the portion of the pellet extending below the taped tip, and 3) sticking/pressing excess tape atop the circular head of the pellet.
Equipment
Masking Tape - Pellets
NAME
Masking tape
TYPE
Thorlabs
BRAND
T743-1.0
SKU
LINK
Download T743-1 - Thorlabs Black Masking Tape  - DATA SHEET.pdf

2m
Weigh all pellets which are to be inserted into the food holder, and record this mass in column I of the documentation spreadsheet ("Calibration Mass (g)", shaded yellow).

Actively remember this number if possible - it will be needed in step 36.3.
1m
Calibrate and initialise the SnackerTracker.
Critical
As in step 28.2, remove the case cover from the SnackerTracker chassis body and plug the Li-Po battery into the Arduino MKR WiFi 1010's JST port. Ensure that the food holder is empty and placed on the mount plate, with screws in place but not fully tightened.

As with step 28.2, ensure that the battery is plugged in fully - there are two 'stops', the second of which requires more force than one may think necessary. Handling the JST connection may again be practically difficult, and use of long nose pliers or an equivalent tool may be helpful. Do not forget to plug in the battery (a green light should come on if successfully connected) - this seems to be the most common error during device initialisation).
1m
Critical
With SnackerTracker_V11 open in the Arduino editor, connect the SnackerTracker to the laptop/PC using another USB A/microB adapter cable (separate to the one which is plugged into the USB hub and already in the animal cage). This can be done by plugging the USB A end into the laptop/PC, then the other USB micro-B end of the connecting cable into the Arduino MKR WiFi 1010's USB port.

A dark orange light should appear on the Arduino MKR WiFi 1010 chip near the green light (which should have turned on after pluggin the battery in), with the dark orange light indicating that the SnackerTracker is communicating (or attempting to communicate) with the laptop/PC. There is another lighter orange/yellow light which may appear deeper towards the middle of the Arduino MKR WiFi 1010 chip; ignore this - it is the dark orange light which requires careful monitoring in subsequent steps.

Confirm laptop/PC-SnackerTracker connection by (as in step 28.2) observing the icon in the top left area of the editor next to the 'check' and 'arrow' buttons. A successful connection is indicated either by a red circle around the number '1' or a green circle around a check-mark.

Remember to have the Arduino Cloud Agent running in the background, otherwise connections between the SnackerTracker and laptop/PC cannot be established. The Editor will provide an error message if this has not been done.
1m
Critical
Once a connection has been established, click the icon in the upper-right corner reading "Serial Monitor". A pop-up window will appear with a prompt to "Enter the calibration mass (e.g., for 24.08 g, enter '<24.08,g>')". In the input area at the bottom of this pop-up window, enter the pellet calibration mass recorded in step 35.3 (which should also be recorded in column I of the documentation spreadsheet) by clicking the 'arrow' icon in the Serial Monitor or 'enter' on the PC/laptop keyboard. Prepare to move quickly to step 36.4...

Be sure to adhere to the entry-formatting requirements (i.e., use a comma to separate the calibration mass from its units, and use '<' and '>' at the beginning and end of the entry as illustrated in the prompt). Calibration will fail if this format is not followed.

The operational sketch includes device calibration as a mandatory part of SnackerTracker initialisation for quality control (i.e., to prevent conceivable drift over time).
1m
Critical
After entering this calibration mass, another prompt will appear in the serial monitor instructing the user to "Add calibrated mass...". Then, the user has 3 minutes to add taped pellets to the food holder, slide the food holder onto the mount plate, and screw the assembly in place. If no additional prompts have appeared in the Serial Monitor after pellets have been inserted and the food holder affixed to the mount plate (i.e., "Add calibrated mass..." is the most recent text window), this step should be successfully complete. Wait until further text appears before moving to step 36.5...

With practice, this amount of time is quite comfortable, but when learning it may be difficult to finish in 3 minutes. The 3-minute timeframe can be adjusted within the sketch if needed (i.e., line 44 - substitute '18000' for 6000*(# of minutes desired)).

When inserting pellets, it is recommended to fill pellet holes/openings from the outside-in (i.e., starting with the holes closest to the curved edge of the food holder). Hold pellets from the taped-end, and insert at an angle such that the non-taped end can be threaded through each hole. If tape has been applied correctly, the sticky end should prevent the pellet from sliding through the hole. Pressing the taped end firmly within the food holder interior should secure the pellet in place, making it difficult to pull out from the base/exterior. This is to ensure that the animal can eat then-suspended pellets, but not pull entire pellets out of the food holder (this would jeopardise recordings).

Screws can be inserted and tightened either using fingers or a screwdriver if experiencing difficulties.

After the calibration mass has been added and 3 minutes has elapsed, the setup() function within the sketch 1) tares and calibrates the SnackerTracker, 2) connects to on-chip LED lights, 3) checks that an SD card is present, 4) creates an output .csv file on the microSD card, then 5) passes control to the loop() function for data recording. An error message will be returned if there are issues with any of these processes.

It is essential that the user does not touch or bump the SnackerTracker and connecting cables during this process, but is rather patient until new text appears in the Serial Monitor indicating that these tasks have been completed successfully...
4m
After successful calibration, additional text will suddenly appear in the Serial Monitor as follows:

"Calibration Complete"
"Initializing SD card..."
"Card initialized." OR "Card failed, or not present." (the latter requires the user to restart from step 35)
"'skrtkr.txt' detected and cleared from the SD card." (if a file was detected on the microSD card)
"Begin recording."

"Begin recording." indicates that SnackerTracker initialisation is complete. Record the time at which this message appears in the documentation spreadsheet in column J ("Recording Start Date/Time (DD/MM/YY 24:00)", shaded yellow). The USB micro-B cable can then be carefully disconnected from the Arduino MKR WiFi 1010 port, which should result in the dark orange light from step 36.2 turning off but the green power light from step 36.1 remining on.

Ensuring that the dark orange light turns off but the green light remains on is very important. The green light indicates that power is still being supplied to the SnackerTracker and that recordings are continuing. If the green light turns off with the dark orange light when the USB micro-B cable is disconnected, power has been lost (e.g., due to a fault with the battery or if one forgot to plug the battery in before proceeding with calibration) and no data will be collected. The user must then start over from step 35.
1m
Slowly slide the case cover (which will be missing one grommet from step 34.3) into the chassis body, being careful to keep wires tucked inside the chassis interior.

While doing so, keep a close eye on the green light, being sure that it does not even momentarily turn off. If it does, and as in step 36.5, power has been lost and no further data will be collected (requing the user to restart from step 35).
1m
Critical
Transfer the SnackerTracker to the mouse cage and place in the location where it is to reside throughout the duration of experimental recordings.

USB-Li-Po power-switching occurs automatically for the Arduino MKR Wifi 1010. This means that USB-supplied power runs the device and charges the Li-Po battery when connected, and the Li-Po-battery runs the device in the absence of a USB supply. This way, when in transit between the initialising USB-laptop/PC connection and the USB-power supply in the home cage, the Li-Po battery provides a bridging power supply. Otherwise, recordings would stop.
2m
Critical
Within the animal home cage, plug the USB micro-B cable end into the Arduino MKR WiFi 1010's USB slot through the unobstructed hole in the case cover (refer to step 34.3). Through the hole, the dark orange light should visibly turn on which indicates that additional power is being successfully supplied via USB. Then, slide the already-positioned grommet downwards to seal the case cover opening and secure the connection.

Again, during this process, observe the green light and ensure that it does not turn off. If it does, and as in prior steps, this means that power has been lost and no further data will be collected (requing the user to start over from step 35).

The loop() function repeats and writes input load cell, LDR, and RTC data to the output .csv file at the sketch-defined frequency, which can be adjusted on line 74 according to user-specifications prior to initialisation and calibration. Frequency (f) in Hz can be calculated as follows: . Any changes to the sketch must be re-uploaded to the SnackerTracker to take effect (i.e., from step 28 onward).

Recordings continue irrespective of power supply (i.e., whether from the USB port or battery) until components are disconnected or power is lost (e.g., disconnecting both the USB and Li-Po battery).
5m
Critical
If the animal was optionally relocated (step 33) during initialisation steps, re-introduce the animal into its home cage with the SnackerTracker. Close cage/chamber lids/doors. Leave the SnackerTracker to record animal food intake and food-seeking behaviour, check the animal daily for welfare monitoring (paying attention to the quantity of pellets in the food holder and any signs of wire-chewing), and otherwise wait until the end of the desired experimental recording timeframe.

Users are encouraged to document the mass of an animal before, periodically during, and after recordings for welfare monitoring (again, always consulting animal technicians/experts as needed).
2m
Critical
Pause
Overnight
Recording Termination and Data Processing
Recording Termination and Data Processing
15m
15m
At the end of the experimental recording timeframe, open the cage and again consider temporarily relocating the animal into a 'holding cage' during SnackerTracker removal.

Again, always consult animal technicians/experts, gain necessary approivals, and use informed judgement when determining how to best conduct these steps.
2m
Optional
Together with the grommet, carefully unplug the micro-B USB cable from the SnackerTracker. Pull the grommet off the end of the USB micro-B cable end, and (without the cable) return the grommet to the case cover by pressing it into place. Remove the micro-B cable from the animal cage, unplug it from the USB hub (and the USB hub from the wall power source), and safely store all wires/hubs/adapters until future use.

Check that the green light is still on. If it is not, this means that recordings did not continue throughout the duration of the experimental timeframe. This should be noted in column P of the documentation spreadsheet ("Notes", shaded grey) as the data collected is most likely unusable. Also check whether any pellets have been entirely removed from the food holder and likewise document in column P. This is unlikely, and only happened twice in over a year of recordings with dozens of animals.
3m
Critical
Weigh the SnackerTracker, with everything intact including both grommets and the remaining pellets. Record this mass in column L of the documentation spreadsheet ("Device Mass (End, total, g)", shaded blue).
1m
Critical
Remove the case cover, and carefully unplug the Li-Po battery. Record the time at which this was done in column M of the documentation spreadsheet ("Recording End Date/Time (DD/MM/YY 24:00)", which is also shaded blue).

Unplugging the battery can be quite difficult. Consider using long nose pliers to do so, being careful to not pinch, cut, or otherwise damage the JST connection and one's fingers.

Note that all columns in the documentation spreadsheet should now be populated for this recording. Some fields will be mandatory for data analysis, while others are useful for general recordkeeping.
2m
Critical
Remove the microSD card from the Arduino MKR WiFi 1010's USB slot. Plug the microSD card into an adapter (e.g., the USB memory card reader if using products listed in the spreadsheet in the Materials tab), and insert the adapter (USB) into a laptop/PC for data transfer.

2m
On the laptop/PC, select and open the microSD card, which should appear in the file browser/explorer with the name which was assigned as ID in step 23.2.
1m
Cut and paste the data file on the microSD card (automatically named SKRTKR.csv) into the destination folder on the laptop/PC for storage. Rename the file such that it uniquely identifies the animal and relevant experiment/trial information for recordkeeping and later data processing purposes as required.

Note that, if one does not remove the .csv file from the SnackerTracker's microSD card before beginning the next recording, the operational sketch will overwrite existing data (which will then be non-recoverable). Therefore, it is crucial that any data recordings are immediately downloaded and stored.
2m
Critical
Eject the USB adapter and microSD card, and return the microSD card to the SnackerTracker. Return the case cover to the chassis body, keeping the Li-Po battery unplugged and wires tucked neatly inside the chassis interior, and safely store the SnackerTracker for future use.
2m
Data files can be pre-processed using custom analysis scripts. These were written in MATLAB (vR2017b, RRID:SCR_001622) and are available at GitHub, Figshare, and Zenodo.

A processing platform and PC-app interface is currently being developed to analyse SnackerTracker data based on this first version of the underlying code.
Analyze
Processed outputs can be exported into a preferred graphing programme of choice for further visualisation, comparison, and statistical analysis.

A separate MATLAB post-processing script, which is also currently under development, consolidates multiple data files according to SnackerTracker-specific output file formatting for ease of data visualisation and statistical analysis.
Analyze
Protocol references
Zenodo (main versioned software reference): https://zenodo.org/records/14633000
GitHub (software working library): https://github.com/marhmue/2024_SnackerTracker_Code
Figshare (collection, with the files below contained within this collection): https://doi.org/10.6084/m9.figshare.c.7622126.v1
Figshare (reporting guidelines): https://figshare.com/s/f29fd551828c918cc473
Figshare (underlying data): https://figshare.com/s/687765cd59c195ac25bf
Figshare (linked code, identical to what is provided in GitHub and Zenodo): https://doi.org/10.6084/m9.figshare.28189805.v1
NIH 3D Model (3D model provision and specifications): https://3d.nih.gov/entries/3DPX-021724
NIH 3D Build (contains the 3D model above with additional construction details): https://3d.nih.gov/builds/657
Acknowledgements
We would like to thank members of the Peirson, Vyazovskiy, and Molnár laboratories for helpful discussions during SnackerTracker development. We would also like to thank staff at the University of Oxford’s Biological Sciences Building for their animal welfare oversight and support. We would finally like to thank Arduino and MathWorks community forums for guidance threads and code which informed operational and analysis scripts.