Skip to content

AllenNeuralDynamics/mis-focus-controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mis-focus-controller

A device for controlling the focus on the camera modules of the Modular Insertion System.

(previously named mis-cafomoco)

This board uses a Raspberry Pi Pico as a USB-to-PWM interface for the 3x BD65496MUV motor drivers onboard. The boards are stackable so that a stack of two can be used to drive 6 focus motors with one USB connection. This device was designed to be used with the 12V micro-metal gearmotors from Pololu, with the magnetic encoder add-ons for closed-loop control.

Usage

Below is a list of serial commands supported by the device. Most commands can refer to several motors at once with unique arguments. Motor lists are separated by commas; argument lists are separated by commas.

Command Example Description
is_busy\r\n is_busy\r\n Returns True\r\n if any motor is moving. returns False\r\n when the device is not busy;
SET_SPEED <motor_0>,<motor_1> <m0_percent>,<m1_percent>\r\n SET_SPEED 3,2,4 50,50,60\r\n Set the speed of motors 3, 2, and 4 to 50%, 50%, and 60% repsectively.
TIME_MOVE <motor_0>,<motor_1> <clockwise>,<clockwise> <ms>,<ms>\r\n TIME_MOVE 0,1 1,1 3000,3000\r\n Rotate selected cameras (0 and 1) clockwise (if 1, otherwise ccw) for specified time (in milliseconds).

See the mis-focus-controller-sw for a pip-installable python driver.