Hydra-MMM Software and Firmware

From RepRap
Revision as of 17:54, 1 March 2010 by Cpwebste (talk | contribs) (Credits)
Jump to: navigation, search

This page is a development stub. Please enhance this page by adding information, cad files, nice big images, and well structured data!

Crystal Clear action run.png
Hydra-MMM Software/Firmware Releases

Release status: unknown

Hydra-MMM logo.jpg
Description
Java host software with Arduino firmware
License
Author
Contributors
Based-on
[[]]
Categories
CAD Models
External Link


Project Background

Hydra is a multi-headed manufacturing machine that is originally being designed and built for ME463 (senior design) at Purdue University. The general idea is to make a personal manufacturing machine that will be able to perform multiple, simultaneous operations such as milling, additive prototyping, pcb fabrication, laser etching, etc. For the most part, current industrial workplaces have dedicated machines for each one of these functions. By having multiple independent toolheads on the machine, Hydra will be able to perform compound operations that are not possible on dedicated machines (ie FDM rapid prototyping and milling for more accurate part outlines). Hopefully the project will lead to potential discoveries of new manufacturing techniques through the use of compound operations, as well as create a very cost effective product for small business or educational institutions who cannot afford current commercial machines.

The Sourceforge project will contain the microcontroller firmware and host software for the machine. The firmware was written in the Arduino development environment (http://www.arduino.cc/) and is currently being used on an Arduino Mega microcontroller. The software is written in the Processing development environment (http://processing.org/) and is written in Java. Because of this the host software can be run on Windows, Mac OS, and Linux operating systems. The software and firmware communicate via a serial interface. Standard machine language (Gcode) as well as custom M codes are being used for communication.

Please see: http://cpwebste.blogspot.com/ for more information about the build or https://sourceforge.net/projects/hydra-mmm/ for all future software and firmware releases

A reprap wiki development page for the details of the machine has also been created here Hydra-MMM_Prototype

A screenshot of the GUI is below:

Hydra-MMM v1 0 screenshot.jpg

Installation

Firmware: After downloading the latest release please copy the Arduino libraries (cpwStepper and PID_Beta6) to the Arduino Sketch Folder/libraries/. The Arduino sketch folder can be changed from the Arduino preferences menu. If the libraries folder does not current exist, please create it and copy the files there. Next, use the Arduino software to open the Arduino .pde sketch in the editor. Look through the top of the code and change the necessary pin declarations and variables. This includes selecting if you will use step/dir control (for external motor drivers) as well as defining the pin locations for these drivers. Please double check these to ensure they match your setup before proceeding. Once all your variables have been defined, click the upload button to send the sketch to your Arduino compatible microcontroller!

Software: The host software can be run from the /Processing/*release*/application.your_operating_system folder. The Processing .de sketch can also be placing in the Processing application and compiled and run from there. A USB serial connection must be established between your computer and the microcontroller before running the software. Please see the Arduino and Processing websites and forums if you have any trouble with USB serial drivers. Once the software starts, click the "Connect" button to get going and follow the onscreen prompts.

Gcode File Preview: The file preview function can be used without connecting an Arduino to the serial interface. Just run the processing program and you press the "File Preview" button to preview a gcode file.

Communication Protocol

Standard machine language (gcodes) were used to communicate to the machine. A listing of the currently available G and M codes are below.

Gcode References

G0 - rapid positioning, input X Y Z, syntax: G0 X1.25 Y0.025 Z0.0

G1 - linear interpolation, input X Y Z F(feedrate in inch/min or mm/min depending on unit sys), syntax: G1 X1.5 Y0.5 Z0.0 F10.0

G4 - dwell, input P(dwell time in seconds), syntax: G4 P3.0

G20 - inch unit system

G21 - millimeter unit system

G30 - set reference point 1

G31 - return to reference point 1

G32 - set reference point 2

G33 - return to reference point 2

G90 - absolute coordinate system

G91 - incremental coordinate system

G92 - set current position as absolute zero/home


Mcode Reference

M2 - stop program

M3 - spindle on, CW

M4 - spindle on, CCW

M5 - spindle off

M46 - enable software endstops

M47 - disable software endstops

M48 - max speed override, input F(new max feedrate), syntax: M48 F100.0

M49 - disable speed override

M50 - change step mode, input X Y Z, syntax: M50 X1 Y1 Z4 (set x and y axes to full torque and use 4x microstepping on z)

M101 - extruder on, forward

M102 - extruder on, backward

M103 - extruder off

M104 - set extruder temperature, input S, syntax: M104 S200 (set target temp to 200 deg C)

M106 - turn fan on

M107 - turn fan off

M201 - turn light on

M202 - turn light off

Credits

Purdue University for supporting and inspiring the original machine. Original design team consisted of 6 members who may or may not want their names released to the public.

The Reprap project for much of the inspiration for the original machine.

Arduino and Processing development environments for making a great piece of software that is very versatile and easy to use.

The very easy to use controlP5 library written by Andreas Schlegel (http://www.sojamo.de/libraries/controlP5/)

Brett Beauregard for the PID Library for the Arduino Playground that is used for temperature control (http://www.arduino.cc/playground/Code/PIDLibrary)

Updates

v1.2

- Added automated port selection and authentication sequence, now there is no need to manually select what COM port to use, it will find the correct one automatically!

- Added mouse manipulation support for gcode preview window, L mouse moves offset, R mouse up/down changes zoom

- Significantly reduced CPU intensity for file preview window. Scaling and moving parts after >5000 lines have been drawn is still somewhat slow on my old computer though so it would probably be a good idea to position the screen at the beginning of a large build and then leave it. Playback with large builds is very fast, it is just the scaling and moving that takes CPU cycles

- File preview window for sending gcode files has dynamic color updating to give maximum 3D representation on a 2D plane

- Changed G92 command to accept desired set position instead of just set current position as 0,0,0

- Bug fix for how preview window deals with negative coordinates

- G4 delay time was changed to use milliseconds (Reprap standard) as opposed to seconds (CNC standard) by request. If you want it to be seconds just add a *1000 in the delay command


v1.1

- Extruder support added that automatically determines correct extruder speed based on XYZ specified federate

- Support for external motor drivers added, the option is now at the top of the firmware to choose to use dir/step method (for external driver) or defining each coil and using MOSFET transistors or something of that nature (see below)

- Wiring diagram added by request to show how to hook up a stepper motor without an external motor driver

- Made preview window larger and added ability to change the size easily in the Processing sketch (variables pw_width and pw_height)

- Sample gcode file added by request


v1.0

- First release on sourceforge!

- GUI now includes ability to preview gcode files as well as a realtime viewer for showing what commands are currently being sent to the machine

- Ability to send and control temperature via PID control has been added

- Custom microstepping library was written to allow for simplified control of stepper motors

- Stepping mode can be changed on the fly (includes wave drive, full torque, half stepping, and microstepping from 4x-64x)