About this Guide

After reading this guide you will,

Recommended reading after this guide:

What's new in Cyclops 3.6

The new Cyclops is now controlled by Teensy 3.2, a powerful 32 bit ARM Cortex M4 CPU. The primary reason for choosing a Teensy over an Arduino was its superior clock speed and peripheral options. A more detailed discussion can be found in this GitHub issue.

Requirements

  1. Assembled Cyclops rev. 3.6 board(s) with a Teensy 3.2
  2. (Optional) Oscilloscope

The Teensy is flashed/programmed using the Teensyduino add-on for Arduino IDE. The Open-Ephys GUI can also flash programs (that it auto-generates) into the Teensy.

Installation

  1. Strictly follow this guide to install the Arduino IDE and Teensyduino. Also read the "Known Issues" section on the bottom of that page.
  2. Go through the "Getting Started" page to check if your software is setup correctly and that the Teensy works. You don't have to power up the Cyclops for this.
  3. To read the developer documentation locally, install doxygen for your PC.
  4. Make sure you have python installed (preferably python 3.X). Also install:

All Teensy boards packaged with Cyclops have been tested.
Doxygen is an automatic documentation generator, which will build the documentation (we wrote) for you and place it in /docs/teensy.

Intended Usage

In all feedback loop systems, the stimulus is governed by a set of feedback transformation rules. These rules translate the observed phenomenon (or, behaviour) of the system (being stimulated), into modifications of the stimulus signal (hence providing feedback).

The Cyclops device only guarantees efficient delivery and modification of the stimulus signals, and since it cannot "monitor" neuronal circuits, it cannot "close" the feedback loop.

That means, system monitoring and analysis of the various monitored signals, as well as applying the feedback transformation rules to generate modifications of the stimulus, must happen elsewhere like the Open Ephys GUI, or some custom script that you write. These modifications must be forwarded to the Cyclops, in real-time.

For this, the Cyclops Library provides an RPC (Remote Procedure Call) interface over USB to communicate with the Teensy. It can be used to alter almost all aspects of the signal and its delivery in real-time for any number of Teensy boards (and hence any number of Cyclops Boards)!

Hence, there are 2 ways to use this library's RPC interface.

  1. Open Ephys GUI
  2. Baremetal

is a flexible use-case and designed to support almost all kinds of Optogenetic experiments, and it lets you focus on your experiment and its results, rather than the nitty-gritty details of the Cyclops library.

If your use case requires more customisation, you might want to tweak the Cyclops Library. You can always request a feature, or help us build it!

Teensy programming

If you've already explored (hobbyist) embedded programming (of any kind) on any platform, you'll find the Teensy to be similar. There are some differences from an Arduino, chiefly the architecture. Teensy is based on ARM Cortex M4 while the Arduino is AVR based.

The Teensy device documentation is your best resource, second to the very mature Teensy forums.

To get started with Teensy programming, go though the simple Tutorials first.

Also see this experimental feature guide, which explains how to tweak the OE code generation module.

Components of Cyclops

Optogenetic Stimulation involves delivery of optical signals.

So, for any experiment, you must specify the set of signals that may be delivered. &gtCyclops supports delivery of arbitrary signals.

Each Cyclops Control program is composed of (atleast) 3 objects:

Thus, a Cyclops program only contains information about the Signals that might be used, using a global list of Source objects.

The Waveform object defines powerful methods to control everthing about the delivery of signals. It can even be used to change the output channel (LED) at runtime.

All the objects and their interconnections can be created and modified at runtime.

The Cyclops programs are interrupt driven, and if you want to edit or write programs that use Cyclops Objects, please read the developer documentation so that you can write safe programs which are protected from subtle Context Switch Bugs.

Next up: General Program Structure

A surface level walkthrough of an example.