Oct 22, 2025

Public workspaceSolenoid Valve Calibration for Behavior Rigs Utilizing Water Reward

Solenoid Valve Calibration for Behavior Rigs Utilizing Water Reward
  • Ella Hilton-VanOsdall1,
  • Heston Smith1
  • 1Allen Institute for Neural Dynamics
  • Allen Institute for Neural Dynamics
Icon indicating open access to content
QR code linking to this content
Protocol Citation: Ella Hilton-VanOsdall, Heston Smith 2025. Solenoid Valve Calibration for Behavior Rigs Utilizing Water Reward. protocols.io https://dx.doi.org/10.17504/protocols.io.261gerq7dl47/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: March 13, 2025
Last Modified: October 22, 2025
Protocol Integer ID: 124278
Keywords: Water Calibration, Solenoid Calibration, Hardware Maintenance, utilizing water reward solenoid valve calibration, water reward solenoid valve calibration, solenoid valve calibration for behavior rig, solenoid valve calibration, water calibration, frequency of water calibration, necessary valve open time, calibration curve, set valve, calibration curve result, valve open time, dynamic foraging gui, necessary valve, calibration, desired water drop size, behavior rig, water drop size, fit curve, spot check, experiment
Abstract
Solenoid valve calibration is an important maintenance step to perform on behavior rigs that use water as a reward to ensure that reward volumes remain consistent over time. Calibration is the process by which the linear relationship between valve open time and drop size is defined for each lickspout. This process produces a linear best-fit curve of two points by recording drop sizes at set valve open times. Spot checks serve to verify that the open time calculated by the calibration curve results in a drop size that is within the acceptable range of the desired drop size (+/- 15%). The Dynamic Foraging GUI uses the calibration curve to estimate the necessary valve open time to deliver the desired water drop size (reward) during experiments. This protocol outlines the parameters, steps, and frequency of water calibration and spot checks.
Guidelines
This protocol is used for behavior rigs with a water system. Software can be used (such as the Dynamic Foraging GUI) to easily calculate values that are out of range and track historic calibrations, but all calculations can be done by hand.
Materials
Materials - Hardware
MaterialManufacturerModel Number
Ohaus® Scout® Balance ScaleOhausH-9596
Polystyrene Weighing DishVWR10770-408
Behavior Box with Water Delivery System (lickspout connected via tubing to a solenoid)Built in-house-
Materials - Software

Note
This software setup is not required for performing calibration, all calculations can be performed independently. The GUI in the repository above provides a simple way to perform calibration, with text boxes for weight measurements and automatic calculation of acceptable values. These calculations are centered around a desired drop size of 0.002mL - for other desired drop sizes, valve open times must be adjusted.

Figure 1: Dual lickspout water delivery diagram. A, B, and C represent tubing that connects the water reservoir to the solenoids and the lickspouts.

Figure 2: Single lickspout water delivery diagram. A and B represent tubing that connects the water reservoir to the solenoids and the lickspout.



Troubleshooting
Before start
Frequency of Maintenance
Calibration:
  • On delivery of new rig 
  • Following relocation of an existing rig 
  • Following a long period of inactivity ( > 1 month) of an existing rig 
  • Following a failed spot check 

Spot Check:
  • Weekly on active pipeline rigs  
  • Following calibration on delivery of a new rig 
  • Following calibration on relocation of a new rig 
  • Following calibration after a long period of inactivity ( > 1 month) of an existing rig 

Parameters
Calibration:
  • Desired drop size: 0.002mL 
  • Number of calibration points: 2 
  • Number of drops per calibration point: 1000 
  • Calibration point #1 – open time: 20ms (0.020s) 
  • Calibration point #2 – open time: 30ms (0.030s) 
  • Calibration points #1 and #2 – time between openings: 100ms (0.1s) 
  • Best-fit curve equation order: first (linear) 

Spot Check:
  • Desired drop size: 0.002mL 
  • Number of drops per spot check: 200 
  • Desired overall weight: 0.4g (400 mg) 
  • Lower acceptable bound: -15% 
  • Upper acceptable bound: +15% 
  • Lowest acceptable overall weight: 0.34g (340mg) 
  • Highest acceptable overall weight: 0.46g (460mg) 

Note
This protocol assumes a desired drop size of 0.002mL since this is the reward volume used in the dynamic foraging task. To accommodate different reward sizes in different tasks and rigs, adjustments in valve open times can be made to increase or decrease the calibration drop volume.

Water Calibration
Clear each water line by free-running at least Amount10 mL of water through them. For setups with one lickspout, clear the single water line.

Note
If using the Dynamic Foraging GUI, this can be done easily through the water calibration window (Open left/right Amount5 mL ).

This step ensures that all air bubbles are cleared from the lines.

Figure 1: Water calibration window in the Dynamic Foraging GUI


Refill the water reservoirs to Amount50 mL .

Zero a scale of Amount0.001 g precision.

Retrieve a weigh boat, weigh it on the scale, and note the weight.
Note
If using the dynamic foraging GUI, all weights can be noted in their corresponding text boxes, for example: Calibrate left, weight before (g) (see Figure 2). The GUI will automatically do all calculations for you.


Figure 2: Multi-valve calibration section of the Dynamic Foraging GUI

Place the weigh boat beneath the lickspouts.
Start the calibration (for rigs with two lickspouts, start the left side calibration) with the first calibration point (1000 drops at 20ms valve open time).

Note
If using the Dynamic Foraging GUI, confirm that valve open time is 20s in the dropdown menu for open time (s). See Figure 2.

Remove the weigh boat once 1000 drops have been delivered. Ensure to gently swipe any remaining water on the lickspout tip into the weigh boat.
Weigh the weigh boat on the scale and record the weight.
Note
If using the Dynamic Foraging GUI, record weight in the multi-valve calibration weight after (g) popup. See Figure 2.

Empty the weigh boat.
Note
If using the Dynamic Foraging GUI, select Continue. See Figure 2.

If any mistakes are made during measurements, the user can select Repeat to repeat the previous calibration point.

Weigh the empty weigh boat and note the new starting weight.
Note
If using the Dynamic Foraging GUI, enter the new starting weight in the multi-valve calibration weight before (g) popup. See Figure 2.

Place the weigh boat beneath the lickspouts.
Proceed with the second calibration point (1000 drops at 30ms valve open time).
Note
If using the Dynamic Foraging GUI, confirm that valve open time is 30s in the dropdown menu for open time (s). See Figure 2.

Repeat Go to - 9 .

Refill the water reservoir to the Amount50 mL mark.

For rigs with a single lickspout, calibration is complete.
For rigs with two lickspouts, Go to - 13 for the right side.
Calibration is complete, press Finished. Calibration should yield a curve similar to the linear expression below. Proceed to spot check.
Note
The calibration curve is computed by performing a linear regression where X is open time and Y is average volume of one drop.

Figure 3: Calibration curve in the Dynamic Foraging GUI (includes spot checks)


Spot Check
Clear each water line by free-running at least Amount10 mL of water through them.

Note
If using the Dynamic Foraging GUI, this can be done easily through the water calibration window (Open left/right Amount5 mL ).

This step ensures that all air bubbles are cleared from the lines.


Refill the water reservoirs to the Amount50 mL mark.

Zero a scale of Amount0.001 g precision.

Retrieve a weigh boat, weigh it on the scale, and note the weight.
Note
If using the dynamic foraging GUI, all weights can be noted in their corresponding text boxes, for example: Check left, weight before (g) (see Figure 4). The GUI will automatically do all calculations for you.


Figure 4: Spot check section of the Dynamic Foraging GUI

Start the spot check (for rigs with two lickspouts, run the left side spot check), with 200 drops at 20ms valve open time.
Remove the weigh boat once 200 drops have been delivered. Ensure to gently swipe any remaining water on the lickspout tip into the weigh boat.
Weigh the weigh boat on the scale and record the weight.
Note
If using the Dynamic Foraging GUI, record weight in the check left weight after (g) popup. See Figure 4.

Empty the weigh boat.
Weigh the empty weigh boat and note the new starting weight.
Note
If using the Dynamic Foraging GUI, enter the new starting weight in the spot check weight before (g) popup. See Figure 4.

Place the weigh boat beneath the lickspouts.
For rigs with two lickspouts, run a spot check on the right side (Go to ) . For rigs with a single lickspout, spot check is complete, Go to .

Make note of any spot check reports that are outside of the acceptable range during this process.
Note
Full water calibration (steps 1 - 17) calculates a linear expression (see Figure 1) with the lower and upper acceptable bounds of -15% and +15%. If a spot check falls outside of this range, a full calibration must be performed for that valve. See calculations below:

Average volume per drop = ((final tube weight - empty tube weight (g))/number of water drops * 1000)
Difference = average volume per water drop (g) - supposed volume**
Tolerance = average volume per drop (g) * 0.15
If difference > tolerance, spot check fails

**specified by GUI, 0.002mL


If a spot check fails, Go to and run through the entire calibration regimen again for that lickspout and repeat the spot check. If all spot checks pass, Go to .
Note
If a spot check fails immediately following a re-calibration, or if > 2 spot checks fail within 30 days, the solenoid must be replaced and the box in question should not be used until it can pass a spot check again.


Empty the weigh boat.
Refill the water reservoir to the Amount50 mL mark.

Close the GUI.