The wide-spread availability of 6 degree of freedom pose tracking using internal-measurement units (IMUs) allows continuous monitoring of an animal's rotational state in an environment. This obviates the need for tether torque measurements to drive an active commutator since the rotational state of the animal is known in real-time, and the commutator can simply follow along. This permits the use of extremely thin coaxial tethers that cannot function with a standard active commutator because they are too flexible to translate rotational torque.
This commutator functions with headstages and miniscopes that provide provide appropriate rotational tracking information. Currently supported devices are next-generation, serialized headstages and miniscopes such as ONIX headstages, and UCLA Miniscope 4.0, and Open Ephys 3D low-profile SPI headstages. However, this device operations completely independently from the headstage itself, so can be used with any device that provides accurate, drift-free rotational state. It can even be used without an IMU, e.g. using video-based rotation tracking since its remote control interface is agnostic to how rotational measurements are taken.
Note: A high-quality, within-spec micro USB cable must be used when connecting the commutator to the host computer.
The LED tells you about the commutator state:
The front panel has four buttons.
Enable/Disable: toggle commutator enable/disable.
Directional (2x): Manually control the motor rotation in the direction indicated on each button when the commutator is Enabled. These inputs take precedence over and override ongoing remote motor control. When pressed, all target turns provided via remote control will be cleared, such that releasing them will not result in the commutator re-engaging an old target position. Remote commands sent when a button is being pressed are ignored.
LED: pressing the LED will toggled on and off (e.g for cases where it presents an unwanted visual stimulus).
When manual buttons are not being pressed, the commutator accepts JSON-encoded commands over its serial interface. Here are examples of all commands that can be sent:
{enable : true} // Enable commutator (default = false)
{led : false} // Turn off RGB LED (default = true)
{speed : 250} // Set turn speed to 250 RPM (default = 50 RPM, valid ∈ (0, 500] RPM)
{turn : 1.1} // 1.1 turns CW
{turn : -1.1} // 1.1 turns CCW
// Example multi-command. Any combo can be used.
// In this case:
// 1. Turn LED off
// 1. Set speed to 25 RPM
// 2. Excecute 1.1 turns CC
// Ordering of commands does not matter, it is determined by the firmware
{led: false, speed: 25, turn : -1.1}
The communator state can be read using the {print:}
command which will
return a JSON object containing version, state, and motor parameters.
All control and speed parameters, whether changed via the remote or manual interface, are saved in non-volatile memory each time they are changed. The device will start in the same state it was last used.
The controller firmware is located here. It runs on a Teensy lc. To compile this firmware and program the microcontroller, you need the following dependencies:
The firmware can be uploaded to the device using the Arduino
IDE. Note that you will need to add
the Teensyduino add-on to to
the Arduino IDE to program the Teensy. When installing Teensyduino, you should
opt to install all of the bundled libraries as well. This takes care of
installing AccelStepper
library rather than having to install it manually.
ArduinoJSON can be installed through the Arduino IDE's package manager.
The BOM is located here.
The mechanical component of the commutator are as follows:
Mechanical designs are located here. STL files for 3D printing
are located in the stl
subdirectory. Links to purchase each of these
components, including 3D-printed parts, can be found on the BOM.
The board used to control the commutator consists of the following elements:
Board designs and manufacturing files are located here.
This license pertains to documents in the control-board
, mechanical
, and
resources
subdirectory.
This work is licensed to Jonathan P. Newman and Jakob Voigts under CC BY-NC-SA 4.0. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/4.0
The creation of commercial products using the hardware documentation in this repository is not permitted without an explicit, supplementary agreement between the Licensor and the Licensee. Please get in touch if you are interested in commercially distributing this tool.
This license pertains to documents in the source code in the firmware
subdirectory.
Copyright Jonathan P. Newman
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.