NeuroStimDuino

An open source neurostimulator for students, researchers, and hobbyists interested in neuroscience

Available for pre-order

View Purchasing Options
Mar 23, 2021

Project update 2 of 11

Pinout Diagram & I²C Library

by Nikunj Bhagat

For my first weekly update, I have prepared a pinout diagram to help clarify how NeuroStimDuino connects to an Arduino MEGA or Due:

(Click to expand)

I would also like to introduce the I²C library that you will use to to configure and control the stimulator.

I²C Library for NeuroStimDuino

NeuroStimDuino can be controlled by an external microcontroller such as Arduino Due or Mega using the I²C interface, with NeuroStimDuino acting as I² peripheral device (default address = 0x1A). A list of Opcode-style commands can be used to configure different parameters of stimulation waveform such as frequency, amplitude, etc. Each I²C message should have following structure:

Instruction Set

InstructionAddressDescriptionAcceptable Range
AMPL0x01Change stimulation amplitude0 - 127 (Digital potentiometer count)
FREQ0x02Change stimulation frequency1 - 100, Unit: Hz
DURN0x03Change pulse-duration of the cathodic pulse.0 - 2000, Unit: uSec.
IDLY0x04Change inter-phase delay0 - 255, Unit: uSec.
DELY0x05Delay to the start of the stimulation pulse in each cycle0 - 1/(stimulation frequency), Unit: mSec.
SYMM0x06Generate symmetrical or asymmetrical stim waveform1 = Symm.; 0 = Asymm.
ADDR0x07Change 7-bit I2C address0x08 - 0x77; 0x80 - 0xFF
SAMP0x08Sample current from active channels-
READ0x09Read value of register-
RSET0x0AReset NeuroStimDuino to default register values-
EOFF0x0FGenerate Emergency Off condition-
STIM0x10Start stimulation on channel 1 or 2 for specified duration0 - 255, Unit: Sec.
STOP0x12Stop stimulation on channel 1 or 2-
ENAB0x14Enable or disable a stim. channel1 = Enable; 0 = Disable
IDLE0x20Idle-

Sign up to receive future updates for NeuroStimDuino.

Subscribe to the Crowd Supply newsletter, highlighting the latest creators and projects