Skip to the content
4 layers24.5 × 9 mmCable buffer board, the printed circuit board in 3D

0360: an ephys-compliant capacitive lick detector

Size
24.5 × 9 mm
Copper layers
4
Thickness
1.57 mm
Parts
13
Nets
10
Pads
40
Tracks, vias
47, 25
Pours
9
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
16 May 2023
Updated
4 Aug 2026

Overview

Cable buffer board is an open-source printed circuit board by AllenNeuralDynamics, from the AllenNeuralDynamics/harp.device.lickety-split repository on GitHub, published under the MIT licence. It is a 4-layer board of 24.5 × 9 mm with 13 parts on 10 nets, routed with 47 tracks and 25 vias.

Its parts include 5 capacitors, 2 resistors, 2 connectors and 1 IC.

README

README.md

An ephys-compliant lick detector based on measured change in capacitance.

Features 💧💧💧🐁 ⎍⎍⎍

  • High Frequency (100 or 125 [KHz]), low current (200[nA]) excitation signal makes this device invisible to Neuropixel Probes used in electrophysiology recordings.
  • Fast. < 1[ms] response time.
  • Contact-based. Device triggers when mouse tongue contacts either the dispensing tube or dangling reward liquid.
  • TTL output triggers when a lick is detected.
  • Harp-protocol compliant (serial num: 0x0578). Also dispatches timestamped Harp messages when lick state change has changed.
  • Fully supported in Bonsai with a dedicated Bonsai package

Extra Features

  • 6-20VDC input (2.1 x 5.5mm barrel jack, positive center)
  • reverse-polarity protected
  • isolated USB to prevent ground loops with the PC.
  • Two frequency options: 100 and 125[KHz] signal frequency to eliminate crosstalk between two closely-spaced lick tubes.
  • Two amplitude options:
    • The 0.02[Vpp] option with proper grounding is intended for Ephys recordings as it introduces negligible noise artifacts.
    • The 2[Vpp] option can be used outside of an Ephys context without a ground connection

Ordering ➡ 💸

You can now order V1.0.0 from PCBWay:

These printed circuit boards are made on-demand.

You will also need:

Once you receive boards, you will need to upload the firmware from the latest release.

Device Pinout

Pinout

Switch Settings

This device has two settings (frequency and amplitude) that are independent of each other. These settings can be set by external switches to designate the state of the board upon power-up.

[!WARNING] Settings can be overwritten through software commands over the Harp interface after the board powers up.

Low-Amplitude (Ephys) Setting

This setting uses the low-amplitude option of the signal.

It is necessary to use this setting when interacting with a mouse in an electrophysiology context (i.e: probes inserted in its brain).

Note that this setting, just like Neurpixels Probes, is highly susceptible to noise. Good wiring hygiene (see below) is necessary to eliminate false positives from external noise sources.

High Amplitude (Behavior) Setting

Outside of an electrophysiology context, this setting can be used. It makes the lick detector more immune to most common sources of EMI (valves, etc) because the signal is so much larger in comparison to the noise. This signal can also be run over a much longer cable. (We've used up to 2m!)

Ephys Wiring Diagram

There are 3 configurations that will produce valid lick detection readings:

Option A works well if your rig does not have large sources of 60Hz noise.

SetupA

Option B works well if your rig does have large sources of 60Hz noise.

SetupB

Option C works well if your rig does have large sources of 60Hz noise, but you cannot earth ground it.

SetupC

Warnings

Electrical Setup

It is critical that (1) both the device and mouse under test are grounded to a common ground and (2) the rig is earth-grounded (i.e: any exposed metal components are connected to earth ground). Otherwise, the device may introduce noise on the Neuropixel probes or produce spurious licks from outside electromagnetic interference.

Multiple-Lick-Detector Crosstalk

Multiple lick detectors can be used in the same setup provided that (1) they are grounded correctly (see Electrical Setup), (2) the lick tubes are electrically insulated relative to each other, and (3) the spacing between exposed lick tubes exceeds 4mm. If the spacing between exposed metal lick tubes is less than 4mm, then the antenna noise from one lick detector may affect the other. This phenomenon is called crosstalk, and it can appear in 2 ways.

  1. Lick signals that appear on one detector may show up on both detectors. The system is useable in this case, but the data may need to be cleaned up in post-processing where the shorter "simultaneously" detected lick is thrown out.
  2. The amplitudes of the two AC signals will constructively interfere with each other, causing the excitation signals to saturate to their maximum values. The system cannot be used to detect licks this way.

To fix this issue,

  1. Put each lick detector on a different frequency (100KHz and 125KHz).
  2. Space the lick detection tubes farther apart.
  3. Reduce the length of exposed metal on the lick tube.

Theory of Operation

This device detects a threshold change in capacitance. A 100KHz, 10mVpp AC sine wave is played on the tip of a conductive lick spout, (such as McMaster-Carr pn: 89875K271), and the amplitude of the returned waveform is measured every period.

A mouse sharing a ground with this device presents itself as a series resitive and capacitive load. When the mouse's tongue touches the metal tube (or water on the tip of the metal tube), the AC signal passes through the mouse to ground, lowering the amplitude of the returned sine wave below its trigger value, which triggers a lick to be detected. This detection signal is bandpassed in hardware (4th order Butterworth) and the resulting detection signal is lowpassed and compared against a threshold value in firmware to produce a lick/no-lick external trigger output. Overall propagation time through the entire signal chain is less than 1 millisecond.

The detection signal is AC such that repeated contact with the lick tube does not slowly charge the mouse.

Tuning Parameters

Warning: changing the values of these tuning parameters may produce a detection signal that exceeds the <1[ms] detection time guarantee. We suggest ensuring that your setup is electrically grounded correctly first before changing these values.

There are three parameters that can be adjusted related to tuning the lick detection sensitivity. While the starting values should be sufficient for almost all setups, it is (unlikely but) possible that these knobs may need to be adjusted for a particular setup. The four parameters are:

  • "fast moving average" window size
    • the last N raw signal amplitude values are averaged and sent to the consensus filter.
    • This filter smooths out high frequency amplitude changes by averaging the last few values together.
    • constraint: N must be a power of 2 (i.e: 2, 4, 8, 16, ...).
  • "consensus" filter window size
    • the last N values must all be below the lick-detection start threshold to trigger a detected lick.
    • This filter increases the system's ability to reject intermittent (most likely inductive) noise sources that shrink the signal amplitude for a small period of time and may appear as a lick. Noise sources include fans, valves, and other lick detection tubes placed closer than 4mm apart.
    • Increasing this value will improve the system's ability to reject outside inductive noise, but will slow down the detection time.
    • constraint: N must be a power of 2.
  • lick-detection "start" threshold
    • a signal value below this threshold will trigger a detected lick (i.e: the output signal will be set to 5V.)
    • constraint: "start" < "stop" threshold
  • lick-detection "stop" threshold
    • a signal value above threshold will untrigger a detected lick (i.e: the output signal will be set to 0V.)
    • constraint: "start" < "stop" threshold

Parts

13
QtyValueFootprintReferences
2,
2100nFCapacitor_SMD:C_0402_1005MetricC1, C2
210uFCapacitor_SMD:C_0805_2012MetricC3, C4
1100Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolderR3
1100KResistor_SMD:R_0402_1005MetricR1
110nFCapacitor_SMD:C_0402_1005Metric_Pad0.74x0.62mm_HandSolderC5
1Conn_01x01_SocketMountingHole:MountingHole_3.2mm_M3_Pad_TopOnlyJ1
1Conn_01x06_FemaleConnector_JST:JST_SH_SM06B-SRSS-TB_1x06-1MP_P1.00mm_HorizontalJ2
1LTC6269xMS8EPackage_SO:MSOP-8-1EP_3x3mm_P0.65mm_EP1.68x1.88mmU2

The 12 most common of 13 parts.

More from AllenNeuralDynamics/harp.device.lickety-split

2
  • 4 layers80 × 50 mmHarp.device.lickety split, the printed circuit board in 3D

    Harp.device.lickety split

    AllenNeuralDynamics/harp.device.lickety-split

    0360: an ephys-compliant capacitive lick detector

    193 parts5MIT
  • 4 layers61.5 × 21 mmAnalog front end, the printed circuit board in 3D

    Analog front end

    AllenNeuralDynamics/harp.device.lickety-split

    0360: an ephys-compliant capacitive lick detector

    55 parts5MIT

Similar boards

  • 4 layers31.6 × 84.1 mmMCL68, the printed circuit board in 3D

    MCL68

    MicroCoreLabs/Projects

    Ted Fried's MicroCore Labs Projects - FPGA CPU cores and emulators for the 8088, 8086, 8051, 6502, 68000, Z80, Risc-V, and also Typewriter and EPROM Emulator projects.

    13 parts534
  • 4 layers33 × 32 mmDoorman slot programmer, the printed circuit board in 3D

    Doorman slot programmer

    AzonInc/Doorman

    ESP32-S3 based Intercom Gateway (TCS / Koch / Niko / Scantron / Analogue Systems)

    13 parts252GPL-3.0
  • 4 layers25 × 20.5 mmRefclk breakout, the printed circuit board in 3D

    Refclk breakout

    loxodes/vna

    Under development open hardware microwave vector network analyzer

    13 parts205
  • 4 layers59 × 20 mmPmod mmcx, the printed circuit board in 3D

    Pmod mmcx

    azonenberg/starshipraider

    Open hardware test equipment

    13 parts193BSD-3-Clause
  • 4 layers14 × 23.2 mmQspimux2, the printed circuit board in 3D

    Qspimux2

    felixheld/qspimux

    QSPI flash multiplexer - connect a SPI NOR flash to either an embedded system or a programmer for remote firmware tests

    13 parts57CC-BY-SA-4.0
  • 4 layers18 × 16.5 mmUDB, the printed circuit board in 3D

    UDB

    Unified-Daughterboard/UDB-C-EZM

    For more details on the Unified Daughterboard project, see the main website.

    13 parts45MIT

Questions

How big is the Cable buffer board PCB?

It measures 24.5 × 9 mm and has 4 copper layers, 1.57 mm thick.

What parts does the Cable buffer board use?

13 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Cable buffer board KiCad files?

From the AllenNeuralDynamics/harp.device.lickety-split repository on GitHub, at the commit this page was made from: the board is hardware/board/cable_buffer_board/cable_buffer_board/cable_buffer_board.kicad_pcb and its schematic hardware/board/cable_buffer_board/cable_buffer_board/cable_buffer_board.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Cable buffer board design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).