LED board is an open-source printed circuit board by SaleemLab, from the SaleemLab/LEDStimulation repository on GitHub. It is a 2-layer board of 90 × 60 mm with 20 parts on 16 nets, routed with 39 tracks and 0 vias.
Its parts include 12 diodes and 4 connectors.
README
README.md
Full-Field LED Visual Stimulator
An open-source, high-precision visual stimulation platform designed for visual neuroscience, sensory physiology, and human psychophysics. The system delivers temporally agile, multi-chromatic optical stimulation (e.g., Green for M-cones/rods and UV for S-cones, or custom multi-spectral arrays) with sub-millisecond precision.
Example stimulus: 2 Hz antiphase (Green / UV) sinusoidal flicker.
Key Capabilities
High-Resolution Temporal Modulation: 16-bit Phase-Correct carrier PWM (~7.68–10 kHz) combined with hardware-interrupt pacing (Timer3 CTC ISR) eliminates visible digital stepping and software loop jitter.
Rich Stimulus Battery: Native microsecond-timed generation of sinusoidal flickers, Gaussian white noise (with Central Limit Theorem PRNG), contrast-switching adaptation sequences, exponential frequency chirps, and stepped luminance pulses.
Quantitative Radiometric Calibration: End-to-end MATLAB calibration pipeline mapping raw duty cycles to linearized lookup tables (LUTs) and calculating exact photoreceptor isomerisation rates ($R^*/\text{photoreceptor/s}$).
Flexible Form Factors: Supports both 200mm full-field panel enclosures (with magnetic diffusion clamping) and miniature wearable mounts for Pupil Labs Neon eye-tracking glasses.
Reactive Experiment Orchestration: Full integration with Bonsai for closed-loop, state-dependent, adaptive psychometric staircase, and LabStreamingLayer (LSL) multi-modal recording.
System Architecture
mermaid
graph LR
subgraph Host Software
Bonsai[Bonsai Reactive Workflows]
LSL[LabStreamingLayer / LabRecorder]
MATLAB[MATLAB Calibration Suite]
end
subgraph Microcontroller Firmware
MCU[Arduino Leonardo / Teensy 4.1]
T1[Timer1: 16-bit PWM]
T3[Timer3: CTC Interrupt Pacing]
LUT[PROGMEM Gamma LUT]
end
subgraph Hardware & Optics
Driver[Multi-Channel Driver Stage]
LEDs[Dual-Channel LED Arrays]
Enclosure[Magnetic Diffusion Enclosure / Glasses]
Sensors[Photodiode / Power Meter / Eye Tracker]
end
Bonsai -- Serial ASCII (115200) --> MCU
MATLAB -. Offline Calibration .-> LUT
MCU --> T1 & T3
Quickstart Guide
1. Flash the Firmware
Open ArduinoCode/StimulusControlViaSerial_Leonardo_v8/StimulusControlViaSerial_Leonardo_v8.ino [blocked] in the Arduino IDE.
Select Arduino Leonardo as your board and choose the corresponding COM port.
Click Upload.
2. Connect Hardware & Verify
Connect your LED driver to the designated MCU pins (PWM: Pins 9 & 10; Indicators: Pins 4 & 5).
Open the Serial Monitor at 115200 baud.
Send a test sinusoidal flicker:
text
s, 3000, 2.0, 0.0, 0.5, 0.8, 0.8
(Runs a 3-second, 2 Hz antiphase flicker on Channels A and B at 80% contrast).
3. Launch Experimental Workflows
Open Bonsai and load one of the pre-built visual stimulation workflows from BonsaiCode/ [blocked] (e.g., LEDstimulation_normal.bonsai or ManualMethodOfAdjustment.bonsai).
Documentation Index
Comprehensive guides, schematics, and technical specifications are available in the docs/ directory:
Design circuit boards with code! ✨ Get software-like design reuse 🚀, validation, version control and collaboration in hardware; starting with electronics ⚡️
It measures 90 × 60 mm and has 2 copper layers, 1.6 mm thick.
What parts does the LED board use?
20 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 LED board KiCad files?
From the SaleemLab/LEDStimulation repository on GitHub, at the commit this page was made from: the board is Hardware/LED_board/LED_board.kicad_pcb and its schematic Hardware/Constant_current_driver/Constant_current_driver.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the LED board design in my own project?
Its repository states no licence, so its author keeps all rights: ask SaleemLab before reusing the design.