Skip to the content
PCBKitNew board
2 layers222.3 × 73.7 mmController, the printed circuit board in 3D

New behavioral paradigm for multisensory stimulation. Modified from SpatialSparrow paradigm.

Size
222.3 × 73.7 mm
Copper layers
2
Thickness
1.6 mm
Parts
38
Nets
95
Pads
223
Tracks, vias
542, 33
Pours
1
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
15 Sep 2021
Updated
21 May 2026

Overview

Controller is an open-source printed circuit board by musallGroup, from the musallGroup/PuffyPenguin repository on GitHub. It is a 2-layer board of 222.3 × 73.7 mm with 38 parts on 95 nets, routed with 542 tracks and 33 vias.

It is built around the MAX98306 and RJ45. Its parts include 4 capacitors, 3 switches, 2 ICs and 1 connector. It belongs with the NXP (LPC, Kinetis, i.MX RT) boards of this library.

Main components

2

README

README.md

SpatialSparrow

Multimodal rate discriminaton behavioral task for mice.

Description of the setup

This should show a labeled picture of the setup.

Data saving and automatic copy

This should say what gets saved where and what is automatically copied and when.

The TouchShaker teensy module reports lick and handle touch times, these get communicated and logged by Bpod.

SessionData.RawEvents

Event list correspondence :

TouchShaker byteEvent
TouchShaker1_1left_spout_touch
TouchShaker1_2right_spout_touch
TouchShaker1_3left_spout_release
TouchShaker1_4right_spout_release
TouchShaker1_5left_handle_touch
TouchShaker1_6right_handle_touch
TouchShaker1_7both_handle_touch
TouchShaker1_8left_handle_release
TouchShaker1_9right_handle_release
TouchShaker1_14acknowledge
TouchShaker1_15error

State list correspondence:

Settings and description

Settings can be set from Bpod (mat files in Bpod Local/Settings). Default settings are in SpatialSparrow.m

Settings for training control:

SettingDefaultDescription
SubjectNameName of the mouse
RewardedModalityAudioVisual'Vision', 'Audio', Somatossensory, 'AudioVisual', 'Mixed'
leftRewardVolume2 ulAmount of water per left reward
rightRewardVolume2 ulAmount of water per right reward
AutoRewardOFFPre-load rewarded spout
TrainingModeOFFMove spouts to the correct side
autoRewardVision1Fraction of self-performed trials (Vision)
autoRewardAudio1Fraction of self-performed trials (Auditory)
autoRewardPiezo1Fraction of self-performed trials (Somatossensory)
autoRewardMixed1Fraction of self-performed trials (Mixed)
LeverSoundtruePlay a sound when the mouse touches the handles
RegularStimfalseProduce regular stimuli sequences
biasSeqLength3nr of trials on one side after which the oposite side is switched with 50% probability

Settings for trial timing :

SettingDefaultDescription
preStimDelay1 (s)time on handle before stimuli presentation
StimDuration1 (s)duration of the stimulus
happyTime0.5 (s)duration of the last state (gives time to collect reward)
varStimDur0 (s)variable stim duration (StimDuration + varStimDur) is the actual stim duration
optoDur0.5 (s)duration of the optogenetics stimuli
optoRmp0.2 (s)duration of the optogenetics ramp down (optoDur = 0.5 and optoRamp = 0.2 makes a 500ms stimulus that ramps down after 300ms) ???????
minITI1 (s)min inter trial interval (additional)
maxITI2 (s)max inter trial interval (additional)
ITIlambda10 (AU)bariability between minITI and maxITI. High lambda -> closer to minITI
WaitingTime1 (s)minimum waiting time before a response can be made, early licks are ignored
TimeToChoose3 (s)how long to wait for choice report
TimeToConfirm0.5 (s)how long to wait for a 2nd (confirmation) lick
Timeout3 (s)timeout to punish wrong responses
LeverWait10 (s)time to wait for handle grasp
MoveLeverTRUEmove levers or not (set to FALSE during habituation)
UseBothLeversFALSEWhether both handles need to be touched to initiate trials
WaitBeforeLever1 (s)Wait time before handles are moved in after trial onset

Settings for stimuli parameters :

SettingDefaultDescription
TargRate10 (Hz)Rate of the target sequence
ProbRight0.5Fraction of targets on the right
DistFractions0Distractor pulses (fraction of the target sequence). Can be a scalar [0-1] or a vector
DistProb0Probability of presenting a distractor
TestModality0Modality to be used with discrimination (1=vis, 2=aud, 4=ss). Zero is inactive. Other values are detection only
BinSize50 (ms)Stimuli refractory period (min interval between pulses)
StimCoherenceTRUEDetermines whether multisensory stimuli are correlated
UseNoiseFALSEUse noise burst (TRUE) of clicks (FALSE) as auditory stimuli
varStimOn[0 0.125 0.25] (s)Variable onset time for stimulus after lever grab in s. This can be a vector of values. Have to be 0 and higher.
StimGap0 (s)Duration of the gap in the middle of stimulus presentation in s; if >0 the stim duration is of stimDuration*2 + stimGap long
DecisionGap[0.3 1.5] (s)Range of the interval between the stimulus and the decision period
BeepDuration20 (ms)Beep (auditory) duration
StimLoudness0.5Strength of auditory stimuli
FlashDuration20 (ms)Flash (visual) duration
StimBrightness20Brightness of flashes. Multiplier of the base frequency, default is 100Hz (????)
BuzzDuration20 (ms)Buzz (somatossensory) duration
BuzzStrength1Strength of buzzes
ProbAudio0Probability of presenting an auditory-only trial (for multimodal)
ProbVisual0Probability of presenting a visual-only trial (for multimodal)
ProbPiezo0Probability of presenting a somatossensory-only trial (for multimodal)
sRate20000Sampling rate of the AnalogOutput module
PunishSoundDur0 (s)Duration of the white noise punishment sound
optoProb0Fraction of optogenetics trials
optoTimesStimulus/DelayPart of the trial where optogenetic stimulus should be presented
optoRight0.5Probability for occurence of an optogenetic stimulus on the right
optoBoth1Probability for occurence of an optogenetic stimulus on both sides. This comes after determining a single HS target ???
optoPower5Fraction of optogenetics stimuli

Settings for hardware control and sync :

SettingDefaultDescription
SpoutSpeed25 (ms)Duration of spout movement
rMaxSpoutIn30Right spout inner position (value between 0 and 100)
lMaxSpoutIn30Left spout outer position (value between 0 and 100)
spoutOffset10Distance from inner spout position
lOuterLim3.5Left spout outer position (value between 0 and 100)
LeverSpeed150 (ms)Duration of handle movement (ms)
LeverIn20Inner position of the handles
LeverOut0Position of handle out of reach
TouchThresh5 (SDUs)Threshold for capacitive touch lines
WaitForCamfalseTrials wait for a camera trigger to start.

To check: rInnerLim, lInnerLim, rOuterLim, lOuterLim

Settings for paths and data copy :

SettingDefaultDescription
widefieldPath...path to widefield data on server
serverPath...path to behavioral data on server
videoDriveC:path to behavioral data on server
bonsaiEXE...path to bonsai.exe
bonsaiParadim...path to the bonsai workflow ('' to skip bonsai)
labcamsAddresslocalhost:9999address to connect to labcams for video acquisition (leave empty to skip)
wavePortCOM18COM port of the AnalogOutput Module

Plot settings:

VariableDefaultDescription
PerformanceSwitchPerformedShow performance over all trials or only self-performed trials
DoFitfalseShow curve fitting in the performance plot
modSelectorCombinedWhich data to show in the performance plot

Operational variables:

VariableDefaultDescription
SaveSettingsfalseSaves the current settings
AdjustSpouts0Pause for spout adjustment
StartTime?Start time of the current session
cTrialNumber of the current trial
runTimeDuration of the current session
servoPos[0 0]position of left and right spout, relative to their inner limit. these values will be changed by anti-bias correction to correct spout position

Instalation and build instructions

Clone the repository to Bpod Local/Protocols. If you make changes; create a branch and remember to commit changes regularly.

Build instructions coming here soon.

Video

There are 2 options for recording video with SpatialSparrow: using Bonsai or using labcams. This readme should show you how to sync the cameras to the BPod (work in progress).

Parts

38
QtyValueFootprintReferences
8Screw_Terminal_01x02teensy:TerminalBlock_TE_282825-2_1x02_P5.08mm_Horizontaldistractor1, J5V1, J5V2, J9V1, J12V1, J12V2, J12V3, J12V4
4100 uFCapacitor_THT:C_Rect_L7.2mm_W7.2mm_P5.00mm_FKS2_FKP2_MKS2_MKP2C1, C2, C3, C4
4Pololu_Breakout_DRV8825Module:Pololu_Breakout-16_15.2x20.3mmMC-LeverL1, MC-LeverR1, MC-SpoutL1, MC-SpoutR1
4Screw_Terminal_01x04teensy:TerminalBlock_TE_282825-4_1x04_P5.08mm_HorizontalHandleL-ToMotor1, HandleR-ToMotor1, SpoutL-ToMotor1, SpoutR-ToMotor1
3Screw_Terminal_01x05teensy:TerminalBlock_TE_282825-5_1x05_P5.08mm_Horizontalsync_trigger_out1, ToHandleL1, ToHandleR1
2MountingHole_3.2mm_M3_PadMountingHole:MountingHole_3.2mm_M3_Padmount1, mount2
2Screw_Terminal_01x06teensy:TerminalBlock_TE_282825-6_1x06_P5.08mm_HorizontalSoundVisionL1, SoundVisionR1
112VConnector_BarrelJack:BarrelJack_Horizontal12V1
15VConnector_BarrelJack:BarrelJack_Horizontal5V1
19VConnector_BarrelJack:BarrelJack_Horizontal9V1
1LOGOteensy:churchland_lab_logoG***
1MAX98306spatialsparrow:MAX98306U2
1RJ45teensy:RJ45_sparkfunJ2
1SW12Vteensy:SW_L102021ML04QSW12
1SW5Vteensy:SW_L102021ML04QSW5
1SW9Vteensy:SW_L102021ML04QSW9
1Teensy3.2teensy:Teensy30_31_32_LCU1
1gnd jumperTestPoint:TestPoint_2Pads_Pitch5.08mm_Drill1.3mmJP1

Questions

How big is the Controller PCB?

It measures 222.3 × 73.7 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Controller use?

38 parts, built around the MAX98306 and RJ45. 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 Controller KiCad files?

From the musallGroup/PuffyPenguin repository on GitHub, at the commit this page was made from: the board is pcb/controller/controller.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Controller design in my own project?

Its repository states no licence, so its author keeps all rights: ask musallGroup before reusing the design.

More from musallGroup/PuffyPenguin

4
  • 2 layers153.7 × 52.1 mmLed panel split, the printed circuit board in 3D

    Led panel split

    musallGroup/PuffyPenguin

    New behavioral paradigm for multisensory stimulation. Modified from SpatialSparrow paradigm.

    64 parts1
  • 2 layers160 × 40.1 mmLed panel, the printed circuit board in 3D

    Led panel

    musallGroup/PuffyPenguin

    New behavioral paradigm for multisensory stimulation. Modified from SpatialSparrow paradigm.

    62 parts1
  • 2 layers52 × 52 mmLed panel left, the printed circuit board in 3D

    Led panel left

    musallGroup/PuffyPenguin

    New behavioral paradigm for multisensory stimulation. Modified from SpatialSparrow paradigm.

    33 parts1
  • 2 layers52 × 52 mmLed panel right, the printed circuit board in 3D

    Led panel right

    musallGroup/PuffyPenguin

    New behavioral paradigm for multisensory stimulation. Modified from SpatialSparrow paradigm.

    33 parts1

Similar boards

  • 2 layers90 × 90 mmPcb test, the printed circuit board in 3D

    Pcb test

    IsuruPabasara/TheConductor

    The instrument is designed to help stroke patients in their recovery journey. It is meant to be used as a motivation to move their impaied arm in certain directions and angles.

    11 parts
  • 2 layers33.7 × 97.8 mmHAN ESP TSS721, the printed circuit board in 3D

    HAN ESP TSS721

    UtilitechAS/amsreader-firmware

    ESP8266 and ESP32 compatible firmware to read, interpret and publish data to MQTT from smart electrical meters, both DLMS and DSMR is supported

    29 parts470
  • 4 layers84 × 82 mmToad, the printed circuit board in 3D

    Toad

    travisgoodspeed/goodfet

    An embedded bus adapter for various microcontrollers and radios.

    241 parts333
  • 2 layers100 × 100 mmCANBuster, the printed circuit board in 3D

    CANBuster

    GBert/misc

    miscellaneous stuff / unsorted

    182 parts99
  • 2 layers50 × 55.4 mmCasserole, the printed circuit board in 3D

    Casserole

    puddly/casserole

    Control GE appliances

    23 parts94Apache-2.0
  • 2 layers67.9 × 47.8 mmPlatine, the printed circuit board in 3D

    Platine

    nv1t/standing-desk-interceptor

    I wanted to intercept the communication between my Flexispot standing desk buttons. This is the progress on the project

    11 parts52CC0-1.0
  • 4 layers90 × 75 mmCM4 2 Backup, the printed circuit board in 3D

    CM4 2 Backup

    olvint/CM4-NAS-MiniPCIE

    Raspberry Pi CM4 based NAS solution board

    21 parts51
  • 4 layers73.9 × 84.5 mmAei, the printed circuit board in 3D

    Aei

    Severson-Group/AMDC-Hardware

    Circuit board designs for controlling advanced motor systems

    54 parts51