Categories

Monkeyprint DLP printer software now speaks G-Code

A big factor that kept people from using my Monkeyprint DLP printer software was the necessity to build the custom Monkeyprint electronics board that drives the actuators. To make Monkeyprint DLP more attractive for DLP printer builders I have made a big leap forward: Monkeyprint DLP is now able to send G-code. Finally!

Yes, this means that you are able to use almost any G-code-based driver board you like!
And what’s more: I have redone the whole print process engine. The print process is now totally configurable (including custom G-code commands), giving you an unprecedented degree of control over almost everything.
Want an extra tilt, a pause after exposure or a wiper for a top down printer? Just alter the pre-configured print process to your needs. This also means that you can use servos for tilting (a feature that has been requested) or even make your board beep a tune (if supported).

What do you need?

To get your printer running on G-Code you need the following items:

A G-code based stepper controller board. For testing I used a RAMPS 1.4 board with an Arduino Mega 2560.

G-code firmware. I use Marlin. It has to be configured and compiled for your board.

Actuators of your choice (steppers, servos, etc.)

Basic understanding of G-Code. Monkeyprint DLP provides basic G-code commands assembled into a pre-made print process, but tweaking might be necessary. A good introduction can be found in the Reprap G-code Wiki.

Set up the hardware

First, you’ll need to set up your hardware. I assume that most people will have that already so I’ll make this very short using the RAMPS 1.4 board as an example. You can get more info in the Reprap Wiki. If you already have a working setup you can skip this section.

Get yourself a board. You can get RAMPS 1.4 boards including the Arduino, steppers drivers, end stops and what not for low prices on eBay or amazon. However, consider to buy the original as the cheap ones are often poorly made.

Make the hardware connections.

Choose which actuators to use for which print mechanism. I use the X axis stepper for tilting and the Z axis stepper for the build platform. You can also use a servo for tilting.

If you use steppers, set the micro-stepping jumpers for the axes you want to use. Connect all three for 1/16th micro stepping.

Set the micro stepping jumpers for the axes that you want to use. All jumpers set is 1/16th micro stepping if you use A4988 drivers.

Plug in the stepper drivers. Make sure to plug them in the right way. Also, don’t forget the heat sinks. Turn the current potentiometer on the drivers to the minimum (counter-clockwise) and then up by about 20% (mine were at 50% on arrival). You can crank them up again if your steppers need more current, but it’s safer to start low. Alternatively, look up your stepper drivers description to set the right current using the reference voltage pin.

Plug in the stepper drivers and turn the current setting to lowest position. That’s with the smaller flat side in an 8 o’clock position like in the picture. From there you can slowly increase it to get your motors going.

Plug in the stepper motors.

Plug in the stepper motors like so.

Plug in the end switches corresponding to the stepper axes that you want to use. Don’t go without these, especially for the build platform axis. The set up for optical as well as mechanical end stops can be found here.

Plug in the servos in case you want to use any.

Plug in the servos. Make sure to plug them in the right way with the red wire going onto the + pin.

Plug in the power supply. The Arduino on the RAMPS 1.4 can only take 12 V, so don’t use more. Use the power connector that’s directly on the corner (the one just next to it is for the heated bed in an FDM printer). Don’t reverse voltage the power supply as this might blow up your board.

Plug in the power supply using the outer connector. Pay attention to get the polarity right. Do not exceed 12 V on the RAMPS 1.4.

Mount a 100k resistor to the extruder 0 thermal sensor input (T0). This will make the board believe that there’s a temperature sensor connected.

The RAMPS 1.4 board is made for FDM printers and therefore the Marlin firmware needs at least one temperature sensor connected. That often is a 100k thermistor. We can make the firmware believe it reads a sensor using a 100k resistor. The temperature reader will be about room temperature and the firmware will be satisfied.

Plug in the Arduino Mega. Be careful not to bend or break any of the headers.

Configure and compile the firmware

Before doing this, you need to calculate the steps/mm, i.e. the number of steps that is needed to move an axis (for example your build platform) by one mm. If for example your build platform has a lead screw with 5 mm lead and your stepper has 1.8° step angle, the distance per step would be (360°/1.8°) / 5 mm = 40 steps/mm. For a layer height of 0.1 mm this would make 4 steps.

Now, follow these steps:

Visit the Marlin builder and configure Marlin according to the following parameters.

Baud rate 115200 (important).

Max Feed Rate to 100 mm/s for Z-axis.

Disable axes that are not used (Y and E in my case).

Set software end stop for Z according to your build height.

Configure board type to RAMPS 1.3/1.4 with Power outputs: Extruder/Fan/Fan

Set Extruder Temperature Sensor to 100k thermistor (best choice).

Second Extruder Temperature Sensor to None.

Set the Steps Per Unit that you have calculated before for each axis that you use.

Click “Build It” at the bottom right corner.

The site updates and presents the build results. Download the hex file and save it as marlinForMonkeyprint.hex

Upload the firmware to your board using avrdude.

Connect the board to your computer using the USB cable.

Open a terminal (Strg+Alt+t or Alt+t) and navigate to the directory you downloaded the hex file to.

Configure Monkeyprint to use G-code

Once you have Monkeyprint DLP running, access the Settings menu and activate the G-Code board radio button.

In the settings dialog you can now set Monkeyprint DLP to use G-Code. This will unlock some settings in the Communications, Projector and Print process tabs.

In the Connections tab enter the port (should be /dev/ttyACM0) and the baud rate of 115200.

Set the port that your G-Code board connects to as well as the 115200 baud rate.

Move on to the Print Process tab. Here is where the new print process engine reveals it’s power. Read on to find out!

Configure your G-code DLP print process

In the Print Process tab you’ll find two things: a drop down menu of pre-configured G-code command modules as well as a list view of your print process.
Simply choose the modules you need from the drop down menu and add them to the print process. They’ll appear just below the currently selected item. Use the ↑ and ↓ buttons to move a module up or down.

The Print process tab allows for any combination of G-Code commands defined by the user. Predefined commands can be added from a drop down menu at the bottom. You can also move commands up or down or edit their name and G-Code.

The Edit button allows for renaming and changing the module’s G-Code.

The Edit button allows for any of the G-Code command to be changed.

There are some special command modules:

Expose obviously does the exposure.

Wait simply pauses the process for a given time period. This is useful if, for example, tilting of wiping takes some time and you want to wait for it to complete before carrying on.

Start loop and End loop enclose all modules that you want to act on every layer of your print. Place configuration stuff like setting the units to mm before the Start loop module and post-print stuff like moving the build platform to the top position after the End loop module. A print process must involve exactly one Start loop and End loop module.

Activate / Deactivate Projector allows you to switch on/off your projector if it is connected via serial port and configured in the Projector tab.

Then, there’s the Custom G-Code module. Add it to your print process and edit it to carry out any command your board supports. Isn’t that quite powerful? I thought so…

Next steps

With these new features I hope to bring Monkeyprint DLP to a wider user base.
Obviously, the next steps have to be providing a proper documentation and making Monkeyprint DLP more stable.
I’m also working on my own board and still have the Raspberry Pi integration in the pipeline (it’s working but still unstable), but these will have to wait until Monkeyprint DLP itself is matured and until I find the time to build my own printer…

Get involved!

Do you use a different board? Test it with Monkeyprint DLP and tell me about your experience!
If want to contribute, share your firmware and I’ll be happy to pack it into Monkeyprint DLP.
Post your ideas, feature requests and bugs by opening issues on my Github.
There’s a new project overview as well, so post your thoughts there as well!

I hope this update will help getting more people to try Monkeyprint, which is what really is needed to get this thing up in the air. I’ve read that Creation Workshop isn’t free anymore, so Monkeyprint might be an alternative if it work reliably…

Of course it will help all the poeple out there. Not only CW isn’t free anymore. B9Creator has also a broken link for downloading the firmware of the controller. There are a few on Github but I couldn’t compile it with ARDUINO. B9C is very similar to your software but I’m sure you are about to get the leadership. The only plus for me might be that B9C runs on WINDOWS. I prefer your software anyway.
Btw, did you get my email with the pictures of my mechanics?

thanks 🙂
There will be a new release soon regarding the hollowing feature as I found some bugs there and the slicer takes lots of memory at the moment. Check out the slicerRedesign branch on my github if you can’t wait for the new release…
It should work on Mint, I’m developing on Ubuntu Mate which should be very similar.
If you run into problems, please post them here!

great to see that there is a successor for creation workshop! I will definitely give it a try a soon as i finish my sla…….by the way I noticed you are from Bremen…perhaps we should drink a cup of coffee the next time in Bremen to talk about sla. I live in Emden so…not that far away…
regards

Hi Fernando,
well, you can set the projector resolution and the size of the illuminated area in the settings. This will control the size of your prints. However, an additional feature for fine adjusents to the scale might be useful. What would you suggest?