PsyBorg is the contraction of the words "Psyco" and "Cyborg", we called it becouse we have no technical backgroud and we started the Academy from scratch, so building a simple plotter for us means building something very big like a Cyborg. Psyco becouse we got almost crazy building it :-) Download the presentation
Because we started the Academy from scratch we decided to built the simpliest machine as possible, so we started making a simple plotter reproducing the pygestalt's plotter example
First was made a cardboard sample to test manually all the machine's features. Theres's 2 Y1 and Y2 axis each with a motor and 1 X axis witha 1 motor
The was lasered and mounted the wooden machine
We got the documentation of Gestalt from Ilan's thesis: http://www.pygestalt.org/
from Nadya's repo: https://github.com/nadya/pygestalt
and from examples https://github.com/nadya/pygestalt/tree/master/examples/machines
and from and the modular machine page: http://mtm.cba.mit.edu/machines/science/
Testing nodes:
To create new machine you have to import the Gestalt library
from pygestalt import nodes
from pygestalt import interfaces
from pygestalt import machines
from pygestalt import functions
from pygestalt.machines import elements
from pygestalt.machines import kinematics
from pygestalt.machines import state
from pygestalt.utilities import notice
from pygestalt.publish import rpc #remote procedure call dispatcher
import time
import io
then you define the virtual machine class that is a set of functions and parameters that defines the machine (i.e. number of axis, kinematics etc)
from pygestalt import nodes
class virtualMachine(machines.virtualMachine):
then you tell to gestalt how to connect with the nodes. Here is important to change the name of the serial port used:
def initInterfaces(self):
if self.providedInterface: self.fabnet = self.providedInterface #providedInterface is defined in the virtualMachine class.
else: self.fabnet = interfaces.gestaltInterface('FABNET', interfaces.serialInterface(baudRate = 115200, interfaceType = 'ftdi', portName = '/dev/ttyUSB0'))
Now is time to define axis
def initControllers(self):
self.xAxisNode = nodes.networkedGestaltNode('X Axis', self.fabnet, filename = '086-005a.py', persistence = self.persistence)
self.y1AxisNode = nodes.networkedGestaltNode('Y1 Axis', self.fabnet, filename = '086-005a.py', persistence = self.persistence)
self.y2AxisNode = nodes.networkedGestaltNode('Y2 Axis', self.fabnet, filename = '086-005a.py', persistence = self.persistence)
self.xyyNode = nodes.compoundNode(self.xAxisNode, self.y1AxisNode, self.y2AxisNode)
The kinematics properties of the nodes depends on the physical characteristics of the nodes used (step, microstep, pulleys etc). It is very important to correctly set up the parameters or it will result in an incorrect movement
def initKinematics(self):
self.xAxis = elements.elementChain.forward([elements.microstep.forward(4), elements.stepper.forward(1.8), elements.leadscrew.forward(8), elements.invert.forward(True)])
self.y1Axis = elements.elementChain.forward([elements.microstep.forward(4), elements.stepper.forward(1.8), elements.leadscrew.forward(8), elements.invert.forward(False)])
self.y2Axis = elements.elementChain.forward([elements.microstep.forward(4), elements.stepper.forward(1.8), elements.leadscrew.forward(8), elements.invert.forward(False)])
self.stageKinematics = kinematics.direct(3) #direct drive on all axes
we decided to draw a square from the command line hardcoding coordinates inside the python script
moves = [[0,100,100],[100,100,100],[100,0,0],[0,0,0]]
We got helped by the youngest FabLab's member :-)