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.
- 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 motors.
- 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 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.
- 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.
- 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
- Upload the firmware to your board using avrdude.
- Connect the board to your computer using the USB cable.
- Open a terminal (
Alt+t) and navigate to the directory you downloaded the hex file to.
- Run this avrdude command (without line breaks):
avrdude -p atmega2560 -c stk500v2 -b 115200 -P /dev/ttyACM0 -D -U flash:w:marlinForMonkeyprint.hex -v -v -v
- After the firmware has been uploaded to the Arduino your board should be ready to go!
Configure Monkeyprint to use G-code
- Now it’s time to get a fresh copy of Monkeyprint DLP from my Github. See the installation instructions for help with this.
- Once you have Monkeyprint DLP running, access the Settings menu and activate the G-Code board radio button.
- In the Connections tab enter the port (should be
/dev/ttyACM0) and the baud rate of 115200.
- 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 Edit button allows for renaming and changing the module’s G-Code.
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…
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…
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!