Fab Academy 2016 您所在的位置:网站首页 电脑c盘没有内存怎么办 Fab Academy 2016

Fab Academy 2016

2023-09-09 14:01| 来源: 网络整理| 查看: 265

Exercise 10 Machine design

Requirement Group assignment - make a machine, including the end effector, build the passive parts and operate it manually Group assignment - automate your machine Document the group project and your individual contribution Workload Distribution

As this is a group project spread over 2 weeks (30 Mar - 13 Apr 2016), we have decided to split up the workload as such:

Designing of the housing using AutoCAD - Tham CNC Routing of plywood stoppers using StarCAM 2D router - Tham Lasercutting the design using Epilog Fusion M2 40 - Kaichi Assembly of the stepper motor housing - Kaichi & Tham Programming on Mac platform - Mark Programming on Windows platform - Siew Chin Modifying GUI codes of wxGestalt IDE - Mark Designing and making a "gun" which can load rubberbands - Mark Milling of FTDI board - Siew Chin Soldering of FTDI board - Kaichi & Mark Video-editing - Siew Chin Documentation and update of group page - Siew Chin

Links to my team-mates' contribution:

Tham Kai Chi Mark My contribution

In this group project, I was involved in the following specific areas:

Programming on Windows platform Milling of FTDI board Video filming and Video-editing Documentation and update of group page The Gestalt Framework

Gestalt is a framework for rapidly building controllers for automated machinery. The Gestalt means “an organized whole that is perceived as more than the sum of its parts” (Oxford Dictionaries), which describes Gestalt’s modular yet cohesive approach towards structuring the architecture of machine controllers. The Gestalt framework is comprised of an extensible collection of software modules that can be combined in many ways to quickly realize machine controllers. A physical machine is comprised in part by a number of electronic and electromechanical hardware components. A series of physical control nodes provide low-level control of the machine components, and connect to the Gestalt virtual machine via either a direct connection or a network bus. Each physical control node is matched by a virtual node that exposes to the virtual machine the functions needed to control its specific hardware. The virtual machine additionally might contain kinematic definitions, memory of state (i.e. position), machine-level functions (e.g. to move the machine) and external interfaces through which user applications can control the machine.

Components of the Gestalt Framework Nearly endless kinematic options from simple parts Necessary parts for one cardboard linear stage Gestalt workflow

Communicating with the stepper motors

Modifying the example files found in ~\pygestalt-master\examples\machines\htmaa\, I was able to test the system, and ensure that my computer is able to talk to the machine. These are the changes I've made:

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 = 'COM3')) moves = [[-30,-30],[30,30],[0,0]] Programming Syntax

Based on the example files found in ~\pygestalt-master\examples\machines\htmaa\, I tried to understand the various functions of the programme.

initInterfaces sets up the communication between the software virtual machine and the serial bus. initControllers sets up software to control the two nodes for each axis, using the communication protocols defined in 086-005a.py. initCoordinates stores the initial coordinates of the machine. initKinematics specifies the motor stepping, the number of turns on the leadscrew, and the screw handedness. This appears to be different from the code in 086-005a.py which issues lower level motor commands over the bus. initFunctions specifies the operations that can be run on the virtual machine, which current consist of just the move operation—simultaneously moving the x and y axis nodes. There appears to be a stub for a jog function, which will presumably move the motors more quickly. Stage 1: Drawing Machine

Mapping the Portname - Windows environment

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 = 'COM3'))

Mapping the Portname - Mac environment

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/tty.usbserial-FTXW6Q4L'))

To draw a Square

moves = [[0,0],[-40,0],[-40,40],[0,40],[0,0]]

To draw a Triangle

moves = [[0,0],[10,20],[30,0],[0,0]] Exploring GUI control

We referred to a past project that was similar to us. Credits goes to Asako from Kamakura. We explored and tried to learn their method by modifying their Tkinter module. This is the standard Python interface to TK GUI toolkit from Scriptics.

Commanding a mouse movement to draw something

To command a mouse movement to draw something:

class Draw: def on_pressed(self, event): self.sx = event.x self.sy = event.y self.canvas.create_oval(self.sx, self.sy, event.x, event.y, outline = "black", width = 2) def on_dragged(self, event): self.canvas.create_line(self.sx, self.sy, event.x, event.y, fill = "black", width = 2) self.sx = event.x self.sy = event.y self.xx = self.sx/1.5 self.yy = self.sy/1.5 #print self.sx moves = [[self.xx,self.yy]] # Move! for move in moves: stages.move(move, 0) status = stages.xAxisNode.spinStatusRequest() # This checks to see if the move is done. while status['stepsRemaining'] > 0: time.sleep(0.001) status = stages.xAxisNode.spinStatusRequest() def __init__(self): window = Tkinter.Tk() self.canvas = Tkinter.Canvas(window, bg = "white", width = 150, height = 150) self.canvas.pack() quit_button = Tkinter.Button(window, text = "Exit", command = window.quit) quit_button.pack(side = Tkinter.RIGHT) self.canvas.bind("", self.on_pressed) self.canvas.bind("", self.on_dragged) window.mainloop() Draw() Outcome Commanding the machine to draw something

FTDI Interface Board

We milled the fdti interface board using this design onTutorial page. Our challenge was to mill the board by importing a png file, instead of what we've previously learned, which was making from scratch using the eagle schematic to board file to gcode to etch file.

To mill PCB board via "Import Image 2D" on CNC USB Software:

File > Open > Import Image 2D Adjust Image Parameters accordingly, in this case: Despecle level: 6 Filter Iterations: 4 Calibrate XYZ axis If cuts are not deep enough, perform a second pass. Set Z-axis 0.05mm deeper. Bring XY back to zero by selecting Machine > Go To > Zero XY The areas marked by red was not imported correctly and was unacceptable

Cleaned up the image using Coreldraw and tweaked the import parameters

Difference in toolpaths after adjusting the parameters

Learning point

I made a noob mistake. Packing the board next to the motor steppers resulted in a disaster of damaging 2 boards because the board short-circuited on contact with metal. One colleague suggested to use electrical tape to protect the base from accidental short in future. Indeed, "Failures are the beginning of success", said one colleague. She will remember this lesson for good thanks to this mistake. Thanks to Steven who took the challenge to troubleshoot the boards, and managed to revived them. Basically he removed and replaced the damaged chip with an xmega328 board, downloaded the firmware from imoyer github and burned the firmware into the new MCU. Indeed we can learn something new with every problem we encounter.

Gestalt boards were short-circuited.

Future improvement

There surely are opportunities for improvements with this design, but those will have to be on hold until we are able to work on this project again.

Add z axis (to lift up the pen when not drawing). Add limit switch so that power will be cut off when stepper motor moves to the end of its range. Better design for the end effector, instead of a cable tie. Conceal the gestalt boards in the housing, the right way!

For a more detailed documentation of our group project, check out the group page.

MTM Group Page »

Download workfiles xy_triangle.py xy_square.py our_mouse.py References [m]MTM Machines that Make: Reconfigurable Stages [modular] Machines that make: cardboard stages A Gestalt Framework for Virtual Machine Control of Automated Tools Stepper Motor - How It Works Gestalt’s documentation Andrew Mao's documentation

Theme: Fab Academy Template by Massimo Menichinelli Based on Twitter Bootstrap+JQuery+google-code-prettify+GitHub theme for google-code-prettify+JSC3D+jquery.ganttView.



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有