You are not logged in.

#1 2016-05-11 19:29:59

backXslash
Member
Registered: 2016-03-25
Posts: 151

NanoDLP & GRBL Top Down G-Code Guide

So the built in NanoDLP G-Code guide is ok, but I had to spend a TON of time figuring out how the interface actually works. My printer is a VERY simple clone of the Chimera printer on Instructables. The set up is GRBL 0.9j with the SolidRay patches running on a chinese Arduino Nano clone and an EasyStepper v4.4 driver driving the carriage from a PlayStation 3 Blu-Ray drive. My build platform is perfboard, my vat is a glass cup.

To save others the trouble, this is a quick run through of what worked for me. I've tried to annotate the G-Code as much as possible, so each function is clear. I'm happy to clarify if anyone needs it.

**G-Code - Bootup :**

None

**G-Code - Start Of Print:**

$X ; Unlock GRBL in case we're in an alarm state
G90 ; Put GRBL in absolute mode
$H ; Home GRBL so we can start from a known place
G4 P0.1 ; SolidRay movement sync
[[WaitForDoneMessage]] ; Wait done message
G92 X0 Y0 Z0 ; Set our new homed position as the origin
[[PositionSet 0]] ; Set the current position as 0 in NanoDLP


**G-Code - Before Each Layer:**

G01 Z[[LayerPosition]] F100 ; Move to the correct layer height
G4 P0.1 ; SolidRay movement sync
[[WaitForDoneMessage]] ; Wait done message
[[PositionSet [[LayerPosition]]]] ; Save the current position in NanoDLP


**G-Code - After Each Layer:**

[[Delay 1]] ; Wait 1 second for the resin to “settle”
G01 Z{[[LayerPosition]] + [[ZLiftDistance]]} F100 ; Dip the platform by the lift distance
G4 P0.1 ; SolidRay movement sync
[[WaitForDoneMessage]] ; Wait done message
[[Delay 3]] ; Wait 3 seconds for the resin to settle and air bubbles to pass
[[PositionChange [[ZLiftDistance]]]] ; Again update position


**G-Code - End Of Print:**

$X ; Unlock GRBL just in case
G01 Z0 F100 ; Bring the platform above the resin level


**G-Code - Resume Print:**

$X ; Unlock GRBL in case we're in an alarm state
G90 ; Put positioning in absolute mode
G92 Z[[CurrentPosition]] Y0 X0 ; System crashed so we need to recover current position from NanoDLP and set it in GRBL
G1 Z[[LayerPosition]] F100; Move to layer position
G4 P0.1 ; SolidRay movement sync
[[WaitForDoneMessage]] ; Wait done message

---------------------------------------------------------------

Because my set up is so simple, the build platform is attached to the drive sled with a rare earth magnet, it's leveled by bending its attachment post. The resin is poured to be just barely BELOW the homed position of the build platform, and all of my models include a "raft" like structure at their base so that even if the printer "misses" a few layers it'll still start with a non-critical part. To start a print, I manually push the build platform to near the bottom of the resin tank. This is because the G-Code is going to home the platform anyway, and it ensures that there's a very thin layer of resin on the platform.  Because the platform starts technically above the resin level the final end of print G-Code returns the platform to 0 and the printed piece rises from the resin, ready for post curing.

I've had a number of excellent prints with this current set up, my only issues are 100% software based. I still need to tweak the cure time, as well as the amount of time to let the resin settle. I'll post pictures of some prints, as well as the castings they'll be turned into soon.

Offline

#2 2016-05-11 19:45:10

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,541

Re: NanoDLP & GRBL Top Down G-Code Guide

Do you have any suggest to make interface clear?

Offline

#3 2016-05-12 07:18:50

backXslash
Member
Registered: 2016-03-25
Posts: 151

Re: NanoDLP & GRBL Top Down G-Code Guide

Shahin wrote:

Do you have any suggest to make interface clear?

Kinda, actually.

What helped me was breaking the print process down in its constituent parts, then putting it back together like legos. I think some kind of if-this-then-that style interface where users can snap their build process together like legos might be more useful.

As a for instance, my printer is top down, and HELLA simple. I need to display the current layer, dip 6mm, wait 2 seconds, send the platform to the correct height for the next layer, wait 6 seconds, display the current layer.

The "snap" process might look something like START > [Action Block] > [Action Block] > ... > [Action Block] > END with each action block containing its own modifiable parameters rather than having them separate from the G-Code text boxes.

Example:

START > [Display Layer] > [Wait (X) Seconds] > [Move Z Axis (Up | Down) By (X) mm OR Move To (Current | Next) Layer] > [Wait (X) Seconds] > [Move Z Axis (Up | Down) By (X) mm OR Move To (Current | Next) Layer] > [Loop Till Done]

The Printer Profile tab would then be switched to a flowchart style interface with a "toolbox" of sorts containing the 6 or so unique "blocks", drag and drop as needed, each block contains its own modifier settings.

Should be universally understandable and easy to use for novice and expert users alike.

Offline

#4 2016-05-12 16:24:21

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,541

Re: NanoDLP & GRBL Top Down G-Code Guide

Nice idea. I like MIT scratch which use same kind of interface.

It requires lots of time to develop, which I do not have. Hopefully somebody could contribute this to nanodlp ui github.

Offline

#5 2016-05-13 00:59:50

backXslash
Member
Registered: 2016-03-25
Posts: 151

Re: NanoDLP & GRBL Top Down G-Code Guide

It's mostly done here: http://sitecake.com/

Really, that library + a little data formatting a clever use of a json or something ought to do it I think.

If the sitecake interface can be set up to essentially generate a json file for the printer profile, I guess it's just a matter of parsing that file to inform NanoDLP of the G-Code it actually needs to use.

Offline

#6 2016-06-11 16:03:51

sebste
Member
Registered: 2016-05-26
Posts: 13

Re: NanoDLP & GRBL Top Down G-Code Guide

Thanks backXslash,
This post was extremely helpful to me!

Offline

#7 2016-06-12 04:17:51

backXslash
Member
Registered: 2016-03-25
Posts: 151

Re: NanoDLP & GRBL Top Down G-Code Guide

sebste wrote:

Thanks backXslash,
This post was extremely helpful to me!

Any time! Always happy to help.

Offline

#8 2017-04-19 09:05:53

Yianni-VJ
Member
Registered: 2016-05-24
Posts: 95

Re: NanoDLP & GRBL Top Down G-Code Guide

Nice guide!
I would like to give Sollidray's patched firmware a try but I can't find it anywhere online.
Any leads?

Offline

#9 2017-04-19 12:08:05

backXslash
Member
Registered: 2016-03-25
Posts: 151

Re: NanoDLP & GRBL Top Down G-Code Guide

Yianni-VJ wrote:

Nice guide!
I would like to give Sollidray's patched firmware a try but I can't find it anywhere online.
Any leads?

It's on GitHub I believe. Shahin linked it in a few posts I think.

Offline

#10 2017-11-23 00:50:37

bnjman
Member
Registered: 2017-11-23
Posts: 1

Re: NanoDLP & GRBL Top Down G-Code Guide

Where does one specify the Gcode to use before after layers?

In my setup menu, I only have: "Bootup Gcode", "Start of Print Gcode", "Resume Print Gcode", "Print Stop Gcode", "Shutter Open Gcode", "Shutter Close Gcode", and "Manual Movement Gcode Template".

Offline

#11 2018-01-01 00:23:05

archy587
Member
Registered: 2017-02-18
Posts: 11

Re: NanoDLP & GRBL Top Down G-Code Guide

bnjman wrote:

Where does one specify the Gcode to use before after layers?

you can specify that under each resin profile...

Offline

#12 2018-01-23 17:11:59

bridge2nowhere
Member
Registered: 2017-12-07
Posts: 5

Re: NanoDLP & GRBL Top Down G-Code Guide

I also scratch built my Top Down DLP to the Chimera design. I have an Arduino UNO and a TB6560 3A Stepper Motor Driver being. The Arduino is running straight GRBL. The motor works under manual control, and the projector also works fine.

I'm trying to get my GCODE profile setup, and I'm a little lost. Where are the variables coming from, are those NanoDLP or GRBL? I don't have SolidRay patches, can I just use a Delay command? What would your sample Before Each Layer GCODE look like without the SOLIDRAY codes?

Offline

#13 2018-06-05 12:53:48

bootdsc
Member
Registered: 2018-06-05
Posts: 11

Re: NanoDLP & GRBL Top Down G-Code Guide

Thank you for posting this, your Gcode is what got my bottom up lcd printer working. Made a few changes to work with stock grbl 0.9f, added some delays instead of the sync to make sure the movements have completed before the next exposure.

For anyone who might need this Gcode it works as is but you have to manually home Z to your starting position before you start a print. The control board (woodpecker GRBL 0.9) has some issues with using a endstop. Set the home position before powering on the control board by manually turning the Z rod, it's easy if you put a knob on the free end. My printer setup is - raspi 2, woodpecker GRBL 0.9f controller, 5" 800x480 hdmi LCD, relay board with opto isolation for "shutter control" ie UV back light on/off, 9x3 watt 405nm LED grid(I need to double this) and a standard 2x2 extruded alu frame and Z axis. The other odds and ends are FDM printed.

**Setup**

Gcode before each layer:
G1 Z[[LayerPosition]] F100 ; Move to the correct layer height
[[Delay 4]]
[[PositionSet [[LayerPosition]]]] ; Save the current position

Gcode after each layer:
[[Delay 2]] ; Wait for the resin to settle
G1 Z{[[LayerPosition]] + [[ZLiftDistance]]} F100 ; Dip platform
[[Delay 4]] ; delay next move
[[PositionChange [[ZLiftDistance]]]] ; update position

Resume print gcode:
$X ; Unlock GRBL
G90 ; absolute mode
G92 Z[[CurrentPosition]] Y0 X0 ; System crashed recover current position
G1 Z[[LayerPosition]] F100; Move to layer position
[[Delay 25]] ; Gives enough time in case of a long travel move

**Resin profile**

Gcode before each layer:
G1 Z[[LayerPosition]] F100 ; Move to the correct layer height
[[Delay 4]]
[[PositionSet [[LayerPosition]]]] ; Save the current position

Gcode after each layer:
[[Delay 4]] ; Wait for the resin to settle
G1 Z{[[LayerPosition]] + [[ZLiftDistance]]} F100 ; Dip platform
[[Delay 4]] ; delay next move
[[PositionChange [[ZLiftDistance]]]] ; update position

Last edited by bootdsc (2018-06-05 12:55:19)

Offline

Board footer

Powered by FluxBB