Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lcd and pinout changes #10

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
202d14e
Update README.md
freakyattic Mar 2, 2016
889c18d
Update README.md
freakyattic Mar 2, 2016
6172a5c
Added files via upload
freakyattic Mar 2, 2016
64092b8
Update README.md
freakyattic Mar 2, 2016
e7a9797
Re-structure of project for netbeans
freakyattic Mar 2, 2016
5852968
Modified the start screen and status screen
freakyattic Mar 2, 2016
1a59563
Status screen modifications
freakyattic Mar 3, 2016
38b14a7
Restore a few folders
freakyattic Mar 3, 2016
d642733
--- JTech Photonics laser current sensing functions ---
freakyattic Mar 3, 2016
9438af5
Working get Laser Temperature T0, Voltage1, Voltage2 and display in s…
freakyattic Mar 3, 2016
cd5c9a7
Manual Tests OK: laser functions working, display menus working
freakyattic Mar 4, 2016
c0dafd2
Update README.md
freakyattic Mar 4, 2016
eb25acf
Update HARDWARE.md
freakyattic Mar 4, 2016
6b6a2ac
Update README.md
freakyattic Mar 4, 2016
91d3b5a
Update README.md
freakyattic Mar 7, 2016
43008ac
Update README.md
freakyattic Mar 7, 2016
d680c14
Update README.md
freakyattic Mar 7, 2016
9fad300
Commit unsave changes
freakyattic Mar 8, 2016
1c84654
Merge branch 'master' of https://github.com/freakyattic/Firmware-Lase…
freakyattic Mar 8, 2016
6a16c72
Enable LCD menu to change Laser fire on G1, M3 M5 or E movements.
freakyattic Mar 8, 2016
3a937af
Update README.md
freakyattic Mar 9, 2016
bcfb3e1
Added files via upload
freakyattic Mar 9, 2016
9af13fb
Update README.md
freakyattic Mar 9, 2016
18532f4
Added Max Laser Temperature error that disables laser.
freakyattic Mar 12, 2016
1b8d8ff
Update HARDWARE.md
freakyattic Mar 12, 2016
57fc49d
Minor document modifications
freakyattic Mar 12, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file added ArduinoAddons/Thumbs.db
Binary file not shown.
Binary file added ArduinoAddons/ramps.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
269 changes: 269 additions & 0 deletions BoxGradien_3DRaster_Example.gcode

Large diffs are not rendered by default.

Binary file added Documents/16405-200.bmp
Binary file not shown.
Binary file added Documents/LCDAssistant.exe
Binary file not shown.
Binary file added Documents/MarlinLaser_MainScreen.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documents/MarlinLaser_StatusScreen.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documents/MarlinLaser_test1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documents/VideoScreenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
124 changes: 124 additions & 0 deletions FIRMWARE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
FIRMWARE - RepRap Laser firmware
==========================================

-Firmware forked from original repository https://github.com/lansing-makers-network/buildlog-lasercutter-marlin
-Based off Marlin for 3D printers, for more info see https://github.com/MarlinFirmware/Marlin
-It includes the Graphic Libraries U8glib source code from http://code.google.com/p/u8glib/wiki/u8glib

# Compile and Upload.
You can use the Arduino IDE or Netbeans with [Arduino Pluging](https://github.com/freakyattic/Firmware-LaserCutter-Marlin/blob/master/Netbeans_Arduino_Install.pdf) to compile and upload the firmware to your hardware.

# Added Laser G/M Codes to Marlin Firmware:
```javascript
G0 - G1 Similar
G1 - Coordinated Movement X Y Z E F
Sxx - Laser Power 0-100
Lxx - Laser Duration (microseconds)
Pxx - Laser PPM (pulses per millimeter) for pulsed firing mode
Bxx - Laser Mode 0:CONTINUOUS, 1:PULSED, 2:RASTER
Dxx - Laser Serial Debug, 0:off 1:on
G2 - CW ARC
Sxx - Laser Power 0-100
Lxx - Laser Duration (microseconds)
Pxx - Laser PPM (pulses per millimeter) for pulsed firing mode
Bxx - Laser Mode 0:CONTINUOUS, 1:PULSED, 2:RASTER
Dxx - Laser Serial Debug, 0:off 1:on
G3 - CCW ARC
Sxx - Laser Power 0-100
Lxx - Laser Duration (microseconds)
Pxx - Laser PPM (pulses per millimeter) for pulsed firing mode
Bxx - Laser Mode 0:CONTINUOUS, 1:PULSED, 2:RASTER
Dxx - Laser Serial Debug, 0:off 1:on
G4 - Dwell S<seconds> or P<milliseconds>
G5 - Bezier curve - from http:forums.reprap.org/read.php?147,93577
G7 - Execute Laser Raster line - Base64
Lxx - Number of pixels
$x - Raseter direction 0:toRight, 1:toLeft
Dxxxxx - Base64 pixel encoding

M80 - Turn on Power Supply
M81 - Turn off Power Supply
M104 - Set TE Cooling target temp, if enabled. Sxx:Temp
M106 - Fan on
M107 - Fan off
M649 - Set laser options -- USED???????????????????????
Sxx - Laser Power Intensity 0-100
Lxx - Laser Duration (microseconds)
Pxx - Laser PPM (pulses per millimeter) for pulsed firing mode
Bxx - Laser Mode 0:CONTINUOUS, 1:PULSED, 2:RASTER
Dxx - Laser Serial Debug, 0:off 1:on
Rxx - Laser raster mm per pulse
Fxx - Feed rate
M650 - Set peel distance -- USED???????????????????????
Dxx - Peel Distance
Sxx - Peel Speed
Pxx - Peel Pause
M651 - Run peel move
```

# Firmware Configuration

In the repository, find the configuration.h in order to configure your hardware. At the end of the document you can find the configuration for the laser. You will need a basic understanding of the Marlin firmware in order to configure the hardware, if not you can ask me. The code it is commented for a better understanding.

```javascript
//===========================================================================
//============================= Laser Settings ==============================
//===========================================================================

// Laser control is used by the Muve1 3D printer and the Buildlog.net laser cutter
// Uncomment to disable it.
#define LASER
#define LASER_JTECHPHOT // Attached to a JTech Phonotincs Laser board - Measure laser current.

// Stepper motors Step pulse width increment
#define STEPPERS_STEPWIDTH_INCREASE //Uncomment to increase the step signal width, commend for standar stepper motor controller.

// The following define selects how to control the laser. Please choose the one that matches your setup.
// NOTE: check <pins.h> for the pin numbers of LASER_FIRING_PIN and LASER_INTENSITY_PIN for your board.
// 1 = Single pin control - LOW when off, HIGH when on, PWM to adjust intensity. Only used pin LASER_FIRING_PIN
// 2 = Two pin control - A firing pin for which LOW = off, HIGH = on, and a seperate intensity pin which carries a constant PWM signal and adjusts duty cycle to control intensity
#define LASER_CONTROL 1

// Laser temperature control.
#define LASER_MAX_TEMP 40 // Max allowed laser case temp. Uncomment to disable error display.

// Active laser cooling using Termical Electric Cooling (TEC)
//#define LASER_ENABLE_TECOOLING // Enable Termical Electric Cooling (TEC) to cooldown laser head. Using Temp T0 and Heater0 output. Comment to disable
//NOTE: recommended not to use it, it has not been tested fully. Use it under your responsability.
#define LASER_TECOOLING_TEMP 24 // Termical Electric Cooling (TEC) to cooldown laser head. Using Temp T0 and Heater0 output

// Default values : defines select which G codes tell the laser to fire. It's OK to uncomment more than one.
#define LASER_FIREON_G1 0 // Fire laser on G1 moves. 0:Disable 1:Enable
#define LASER_FIREON_SPINDLE 1 // Fire laser on M3 M5 commands. 0:Disable 1:Enable
#define LASER_FIREON_E 0 // Fire laser on E moves. 0:Disable 1:Enable

// Raster mode enables the laser to etch bitmap data at high speeds. Increases command buffer size substantially.
// Comment to disable raster.
#define LASER_RASTER
#define LASER_MAX_RASTER_LINE 68 // maximum number of base64 encoded pixels per raster gcode command
#define LASER_RASTER_ASPECT_RATIO 1 // pixels aren't square on most displays, 1.33 == 4:3 aspect ratio
#define LASER_RASTER_MM_PER_PULSE 0.2 //Can be overridden by providing an R value in M649 command : M649 S17 B2 D0 R0.1 F4000

// Uncomment the following if the laser cutter is equipped with a peripheral relay board
// to control power to an exhaust fan, water pump, laser power supply, etc.
//#define LASER_PERIPHERALS
//#define LASER_PERIPHERALS_TIMEOUT 30000 // Number of milliseconds to wait for status signal from peripheral control board

//// Uncomment the following line to enable cubic bezier curve movement with the G5 code
// #define G5_BEZIER

// Laser driver configurations - Change it for your laser.
#ifdef LASER_JTECHPHOT
#define LASER_PWM 5000 // hertz - PWM control freq.
#define LASER_POWER 2.5 // Laser Power
#define LASER_FOCAL_HEIGHT 0 // z axis position at which the laser is focused
#else
//Generic Laser.
#define LASER_POWER 40 // Laser Power
#define LASER_PWM 25000 // hertz - PWM control freq.
#define LASER_FOCAL_HEIGHT 74.50 // z axis position at which the laser is focused
#endif

//===========================================================================
```

24 changes: 24 additions & 0 deletions HARDWARE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
HARDWARE - RepRap Laser firmware
==========================================
The firmware has been tested and configured for the RAMPS 1.4 + Arduino Mega + Smart LCD controller.
It could work on any other RepRap compatible hardware, you will need to modify the pins.h definitions for your board.

The firmware has been configure to be connected using the following pin connections.

![](https://github.com/freakyattic/Firmware-LaserCutter-Marlin/blob/master/Documents/Ramps_1.4_Freakyattic_MarlinLaser_Connections.png)

![](https://github.com/freakyattic/Firmware-LaserCutter-Marlin/blob/master/ArduinoAddons/ramps.jpg)

# CNC Machine

The RAMPS board controlls a CNC machine model CNC6040, connecting the CNC controller board port to the STEP/DIR pins in the RAMPS board, with the Stepper drivers removed.

# Laser Unit
The low power laser module used it is from [J. Tech. Photonics](http://http://jtechphotonics.com/), the 2.8W Laser and Driver kit that includes

* 2.8W 445nm 9mm Laser Diode Component (with 2.5′ Mini Fit Jr. Connector Cable included)
* 2.5 Amp Adjustable Safety Compliant Laser Diode Driver
* Power Adapter 12V 2.5A, US Style Plug
* Laser Safety Goggles for 445nm Lasers

![](http://jtechphotonics.com/wp-content/uploads/2014/10/Highlight-FDA-Laser-Kit-800.jpg)
5 changes: 5 additions & 0 deletions Marlin/.dep.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This code depends on make tool being used
DEPFILES=$(wildcard $(addsuffix .d, ${OBJECTFILES} ${TESTOBJECTFILES}))
ifneq (${DEPFILES},)
include ${DEPFILES}
endif
Loading