Interesting Tech Projects
3D Printing
Using Alibre Design for 3D Printing of Multi-Part Projects
Mar 13th
The easiest way to design projects that involve multiple parts in Alibre Design is to create and edit parts inside an assembly workspace. This allows the edges and cross-sections of one part to be reused in another part which is very useful.
However for 3D printing there is a downside – creating a part inside an assembly results in that part being orientated the same way in the part workspace as it in the assembly workspace. For 3D printing we want a specific side face down on the XY plane. That choice of side depends on the part.
So we have taken advantage of the tools and features that Alibre Design offers but we now have parts that are not orientated correctly for printing. They can be rotated in Alibre Design by creating a new assembly just for that part but there must be an easier way.
The following screenshot illustrates the problem. The circular panel is in an assembly and orientated the way we need it to check that everything fits together.
Opening the part in it’s own workspace shows the orientation.
Exporting and slicing this part as it is results in the following g-code.
So how can we make this easier, especially if we have an assembly with lots of parts? By using an add-on for Alibre Design.
I’ve updated my AD Assembly Exporter utility that I have previously written about. It can now automatically rotate STLs when they are exported so that the desired face is aligned with the XY plane.
First you must choose the face that will be placed on the print bed.
- Edit the part
- Right-click on the face and choose Insert Plane..
.
- Click on OK
- In the Design Explorer right-click on the new plane and choose Rename
- Enter the name “Bottom”
Now save the part and open the assembly containing it, if it wasn’t already open. Repeat this for all parts in the assembly that will be printed.
Run AD Assembly Exporter, click on the STL tab and choose the option to rotate using the “Bottom” plane.
Then click on Generate STLs. Here is the new g-code output:
Leveling a RepRap Bed with Three Screws
Mar 3rd
The majority of beds on RepRap 3D printers are leveled using four adjustment screws, one at each corner, and therefore most if not all leveling instructions are for that situation. The RepRapPro printers are different in that they have only three screws and there is little detailed information on how to use them to level the bed. Here are the steps I use.
This is a view of the bed looking from above and standing at the front of the printer.
The home position of X = 0, Y = 0 is at the bottom left. Green dots indicate the positions of the adjustment screws for leveling the bed. Red dots indicate the measurement positions of the hotend (the nozzle). It is important to note that when at normal operating temperature the bed and hotend move closer together through expansion from the heat. Therefore leveling must be performed while hot.
- Set the bed to 60C and the hotend to 150C. I use a slightly lower temperature on the hotend to stop oozing of filament during the process. You can optionally retract or remove the filament if you prefer
- Loosen all three adjustment screws, S1, S2 and S3. I.e. the bed is raised to it’s maximum height while still being securely attached to the Y axis.
- Move the Z endstop thumbwheel to a conservative position so that when Z is homed the hotend won’t crash into the bed.
- Move hotend to position P1 (X = 200, Y = 100)
- Repeatedly adjust the Z endstop thumbwheel and home the Z axis until the hotend is the thickness of a piece of paper above the bed.
- Move hotend to position P2 (X = 0, Y = 100) and home Z
- We now need to adjust the height of the bed so that the hotend is the thickness of a piece of paper above the bed. The left side of the bed can be raised and lowered by adjusting screws S2 and S3 in parallel – i.e. turning them both in the same direction and by the same amount.
- At this point the hotend should now be perfectly aligned with the bed along the horizontal red line shown in the diagram. What we still don’t know is if the bed is tilted towards the front or back, which we will now check.
- Move the hotend to position P3 (X = 200, Y = 0) and home Z
- Adjust the height of the front right corner of the bed so that the hotend is the thickness of a piece of paper above the bed. This corner can be adjusted by using screw S2 only. For example, if we turn S2 clockwise we will lower the rear left corner which will raise the front right corner, moving it closer to the hotend.
- Move the hotend to position P4 (X = 200, Y = 200) and home Z
- Adjust the height of the rear right corner of the bed so that the hotend is the thickness of a piece of paper above the bed. This corner can be adjusted by using screw S3 only. For example, if we turn S3 clockwise we will lower the front left corner which will raise the rear right corner, moving it closer to the hotend.
- At this point the hotend should now be perfectly aligned with the bed along the vertical red line shown in the diagram. Alignment in two directions means that the entire bed should be level. The problem with the two previous adjustments is that they slightly affect other areas of the bed at the same time, which we don’t want. The way to minimize this is to now repeat the process again by going back to step 4.
- Finally double-check the height of the hotend above the bed at the center (X = 100, Y = 100). It should be the thickness of a piece of paper.
Using Alibre Design for Multi-color and Multi-material 3D Printing Part II
Feb 27th
Previously I wrote about my little utility that allows exporting properly positioned STLs from Alibre Design so they can be imported into a slicing program for multi-color printing. This is fine for use with the RepRapPro slicer but perhaps not with other slicers.
Slic3r is a very popular, fast and flexible slicing program and now it also supports printing multi-color objects. The file format chosen by it’s author is AMF – Additive Manufacturing File. It is essentially a way to group STL files together into a single object and specify different colors or materials for various parts.
I’ve now updated my exporter utility to support saving Alibre Design assemblies directly to this format:
When an assembly is opened the application obtains the colors used by the parts in the assembly. It is then possible to assign the colors to extruders on the 3D printer. For example in this image black is the body of the object and has been assigned to the primary extruder. It’s necessary to choose which slicing program is being used as there isn’t a standard way of mapping colors to extruders. In particular Slic3r currently has several limitations so by choosing Slic3r the application will stop you from making invalid choices.
Once generated the AMF file can be loaded directly into Slic3r and sliced. Here is the g-code output shown in Repeiter-Host:
Note that the colors don’t match the Alibre Design assembly because Repetier-Host uses it’s own coloring scheme to represent the different extruders. For example blue is always the first extruder.
Now the object is ready to be printed. The estimated print time for this example is five hours and 45 minutes.
Using Alibre Design for Multi-color and Multi-material 3D Printing
Feb 14th
When you wish to print out a part on a 3D printer the workflow is simple – design the part, export to STL and print it. This is fine when you are only printing with a single material or color. Becoming increasingly popular and affordable are 3D printers that support printing with two or three colors/materials at once, such as the Prusa Mendel from RepRapPro. How can Alibre Design be used for this scenario?
In general the easiest way to allocate different colors/materials to a part is to design that part using multiple smaller pieces. Each piece is assigned a color/material for printing. Alibre Design has a very flexible and easy to use way of grouping parts together called an assembly. What we would need therefore is a way of exporting multiple STLs from an assembly preserving their relationships to one another.
For example, suppose we have a cube and a pyramid and we wanted to place the pyramid on top of the cube and print it in a different color to the cube. We would design the cube and pyramid as two parts then use an assembly to stack the pyramid on top of the cube. Now we need to export the two STLs preserving their position relative to the same origin. This would allow the 3D slicing software to know to stack the pyramid on top of the cube. This is where the problems start.
Alibre Design supports exporting an assembly to a single STL. It merges all the parts together and produces a single object. Information about the individual parts is lost, so this is not usable for our purposes. If you export an individual part or you hide/suppress parts in an assembly then Alibre Design exports the STL using the position and origin in the part file not the assembly, causing the position information to be lost.
An additional problem is the units used in STL files are not defined. If you create a part using centimeters then Alibre Design exports an STL that uses centimeters. Likewise if you create a part using inches then the STL uses inches. The problem is that most, if not all, 3D slicing software assumes the units are millimeters. Solving this for a single part is easy – simply change the units used to millimeters before exporting. However an assembly can be made from multiple parts that all use different units. Regardless of the units chosen for the assembly the STL export will always use the units the part was designed with.
There is one more issue that needs to be addressed. When creating an assembly parts become rotated but the final positions may not be the best for 3D printing. Consider the lid for a box. When creating the assembly it will be rotated so the top is facing upwards but the optimal orientation for printing is probably for the top to be facing downwards onto the build surface. Currently the easiest way to rotate an assembly is to place it into a new assembly as a sub-assembly. This creates an unnecessary extra file and step to perform.
Fortunately Alibre Design has an easy to use API that allows these problems to be solved and I present here my free utility with an exciting name: AD Assembly Exporter.
To use start the application and Alibre Design and open an assembly. In the assembly you can optionally hide/suppress parts you do not want to export. The name of the assembly will be shown in the title bar of the AD Assembly Exporter application. Enter the desired settings and click on the Generate STLs button.
The utility supports forcing the units in STLs to millimeters and rotation around an axis. The STL export options match those found in Alibre Design so please see the Alibre Design manual for a description of what they do. Sub-assembly nesting is supported.
Only open one assembly at a time when using the utility. It will export the first assembly found from your open Alibre Design sessions.
Please note that this software is provided “as-is”. More details can be found in the license shown during installation.
Click here to download AD Assembly Exporter (now called WizoPrint)
Improved RepRapPro Mendel Cooling Fan Bracket
Oct 15th
Previously I wrote about a bracket I designed to attach a 40mm chipset fan to a RepRapPro Mendel. Here I present an improved version.
This version attaches to the X carriage which means the fan is closer to the hotend. With this I was able to print out a tree frog with no support structure.
Details and the STL files can be found on Thingiverse.
Setting up Raspberry Pi for 3D Printing with RepRap
Sep 29th
Having a 3D printer is cool, but requires a PC to be attached to it for control and monitoring (things like jogging, setting temperatures and even sending the gcode). Wouldn’t it be nice if the PC was a small circuit board attached to the printer making it a compact all-in-one solution? Here is how to use a Raspberry Pi $25 PC to do exactly that!
Goals:
- Use VNC to remotely view the desktop on the Raspberry Pi
- There are two scripts on the desktop – starting pronterface and shutting down.
- gcode files on a server are automatically available on every boot
- 250000 baud works fine
- Set up without connecting a TV, keyboard or mouse
1. Download the current version of Raspian. Beginning sometime in September an important USB problem was solved. I used the September 18th version and it works fine.
2. Download an application to copy the image file to an SD card. I used Win32DiskImager along with an 8GB SDHC SanDisk card. A fast card is important.
3. Insert the SD card into the Raspberry Pi, attach to a wall-wart USB power source, connect an ethernet cable and turn on the power.
The LEDs will turn on and flash a lot. The boot process should finish after a couple of minutes.
Now you have to find out the IP address that has been assigned to the Raspberry Pi. Probably the easiest way is to log into your router and look at the connected devices. If your router is like mine then it shows “raspberry pi” as the device name and clicking on it gives the IP address.
Next connect using a SSH terminal application. I recommend PuTTY. Enter the IP address and log in with username “pi” and password “raspberry”. Then enter:
sudo apt-get update sudo apt-get dist-upgrade sudo apt-get install git-core sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update sudo rpi-update sudo reboot
After the reboot log back in and:
sudo apt-get install tightvncserver tightvncserver vncserver :1 -geometry 1024x728 -depth 24
When prompted for a password enter what you want to use to protect access to the printer. For example I used “reprap”.
Test you can connect and view the desktop by installing TightVNC on your PC and connecting using the IP address with “:1” after it. For example my Raspberry Pi was at 192.168.1.150:1.
Follow the instructions given here to assign a static IP address and start the TightVNC server on boot. Test by rebooting and connecting using TightVNC.
You can edit /etc/hostname and /etc/hosts to change the name from raspberrypi to something like reprap, if you desire.
Create a script on the desktop to shut down the Raspberry Pi when it is double-clicked:
cd ~/Desktop touch Shutdown.sh chmod 777 Shutdown.sh nano -w Shutdown.sh
Enter into it:
#!/bin/bash shutdown -h now
Test that double-clicking on the file and choosing “Execute” causes the Raspberry Pi to shut down.
Add the user pi to the dialout group so that the USB serial ports can be used:
sudo usermod -G dialout pi
Expand the filesystem to use the entire SD card:
sudo raspi-config
Choose the item from the menu to expand the root partition.
Run raspi-config again and choose the overclocking option and select a faster speed. Currently I’m not sure which are unreliable (if any!).
Download printrun and put it somewhere useful, for example /home/pi/3DPrinting.
Install the dependencies for printrun:
sudo apt-get install python-serial python-wxgtk2.8 python-tk git-core
Create a script on the desktop to run pronterface when it is double-clicked:
cd ~/Desktop touch 3DPrinter.sh chmod 777 3DPrinter.sh nano -w 3DPrinter.sh
Enter into it:
#!/bin/bash cd ~/3DPrinting ./pronterface.py
Test it by double-clicking on the file.
Follow these instructions to remove the graphical display from pronterface.py so it uses less CPU time.
I wanted to be able to put gcode files on my server and immediately have access to them on the Raspberry Pi. This avoids the need to copy files around. I achieved that by mounting a Samba share on the Raspberry Pi on every boot. This is mostly cribbed from here.
sudo mkdir /etc/sambapasswords sudo chmod 700 /etc/sambapasswords sudo nano /etc/sambapasswords/myserver
Enter into the file:
username=windowsusername password=mypassword
Save and then:
sudo chmod 600 /etc/sambapasswords/myserver sudo mkdir /mnt/myserver sudo nano -w /etc/fstab
Enter a new last line with (change the IP address to that of your server):
//192.168.1.52/3DPrintingFiles /mnt/myserver cifs credentials=/etc/sambapasswords/myserver 0 0
Test with:
sudo mount -a
That’s it!
RepRap Cheap Spool Solution
Sep 16th
Faberdashery supplies very nice 1.75mm PLA however it doesn’t come on a spool. This is annoying. Having to sit at my 3D printer and constantly untangle filament is not my idea of fun so I desperately needed a spool solution. The default response from RepRappers seems to be “print one” so I worked on a design. The total cost of the plastic was a staggering £11.30. That is a crazy price, especially considering I wanted several spools. Also printing out a spool would take hours of having to sit and untangle filament.
After a couple of hours with a scrollsaw (fretsaw) and some 3mm MDF I had a spool that cost about £1.
The next problem was to create a spool holder. These can be found on Thingiverse in different types and styles however the cleverest (and ones with the least amount of plastic) involved sitting the spool on four bearings. This is a great idea because the spool holder can be easily resized for different spool sizes and trivially scaled to hold multiple spools at the same time.
Spool (files on Thingiverse)
Cut out two of the plates and two of the ends. If your wood is thicker than 3mm then increase the width of the holes in the ends and the length of the tabs on the plates to match.
Drill two 2.5mm holes near the center of one of the ends to hold the start of the filament. Drill some 2.5mm holes near the outside edge to hold the end of the filament when storing it.
Glue the parts together to make the spool. The diameter is 160mm and the width is 90mm. It easily holds 100m of 1.75mm PLA and should hold 300m.
Holder (files on Thingiverse)
Print out four of the foot parts. Cut some M8 threaded rod into four 150mm lengths.
Assemble the two crossbeams as follows (all parts are M8):
nut, lock washer, plastic part, lock washer, mudguard washer, washer, 608ZZ bearing, washer, mudguard washer, lock washer, nut, nut, lock washer, mudguard washer, washer, 608ZZ bearing, washer, mudguard washer, lock washer, plastic part, lock washer, nut
Assemble the two front-back beams as follows:
nut, lock washer, plastic part, lock washer, nut, nut, lock washer, plastic part, lock washer, nut
Cooling Fan Bracket for RepRapPro Mendel
Aug 27th
Update: I’ve created a new version of the bracket
My RepRap printer is a Mendel kit from RepRapPro. One of the limitations is that it can’t cool layers as they are being printed. If a layer is too small (a small part or a small cross-section) then the layer can’t cool enough before the next layer is deposited on top.
One of the first modifications everyone makes to their 3D printer is to add a cooling fan and here I present my solution. It’s a small bracket that attaches to a spare M3 hole on the end of the X-Axis gantry and allows attachment of a 40mm chipset fan.
Instructions:
- Print out the part. I used PLA with 25% fill density. I recommend printing out two or three at once to get a good mounting hole on the vertical section.
- Attach the fan using two M3x20 bolts with two M3 nuts and two M3 washers.
- Attach the bracket using a M3x25 bolt, one M3 nut and two M3 washers.
- Angle the fan so it is pointing at the print head.
- Mark which fan wire is negative and positive then cut off the connector.
- Solder on extension wires and use heatshrink to cover the solder joints.
- Connect the wires to the spare connector on the Melzi board.
Slic3r has a Cooling section under the Filament settings. Use this to turn on the fan after the first one or two layers.
I bought an Akasa Blue LED chipset fan that matches exactly the fan that comes with the printer. Small quantities of M3 cap screws can be bought from ModelFixings if you don’t have any left over from building your printer.
The STL file is available on Thingiverse, including the Alibre Design source file.
RepRapPro Mendel Instructions for July 2012
Jul 10th
The instructions for building a RepRapPro Mendel 3D printer are supplied solely on a wiki. The problem with this approach is that the wiki is continually being updated as the machines are updated, however my machine that was purchased in July 2012 is essentially frozen in time.
To solve this I have converted the instructions to PDF format and archived them here (26MB, 140 pages). They are distributed under the GNU Free Documentation License, the same as the wiki-based version.
Configuring Blender for CAD
Jul 1st
Blender is a powerful, flexible and free 3D design tool. Initially it appears to be lacking the tools for CAD however with some configuration it’s possible to use precise positioning and rotation along with measuring distances. This article is written for Blender 2.63. Keyboard shortcuts are in parentheses. If you are brand new to Blender I highly recommend the series of tutorials by cgboorman on YouTube and this article assumes you have gone through his tutorials one to six which introduce the basics of Blender.
Start blender and choose View -> Top (numpad 7) and View -> Ortho (numpad 5).
Choose View -> Properties (N) to open the properties panel.
Expand the Display section. Click on “Z” to show the Z-axis and increase the number of grid lines from 16 to increase the size of the grid.
In the Properties window (not the properties panel) – which is by default shown on the right – click on the Scene tab.
Under Units click on Metric and for the scale enter “0.001”.
Choose File -> User Preferences and click on Addons.
Click on 3D View on the left then expand the 3D View: Measure Panel item.
Check the checkbox at the top right to enable the measure panel addon then close the preferences.
Close the timeline window by merging the 3D View with the timeline.
In the information bar at the top create a new screen layout by clicking on the + and enter the name CAD.
Choose File -> Save User Settings.
Back in the properties panel (N) scroll down to the bottom and a new section called Measure has been added. Click on the Activate button and expand the section.
At this point the measurement from the origin of the current object to the 3D cursor is shown. These measurements are updated as you move the 3D cursor and when you move the selected object.
In the properties panel (N) it is now possible to precisely position an object by directly entering the X, Y and Z values in metric units. For example you can enter “2mm”, “4.2cm” or “6.33m”. It is also possible to set the dimensions in metric units and the rotation in degrees. The position of the 3D cursor can be precisely set in metric units as well.
When you restart blender this CAD-friendly configuration will be restored. The measure tool has to be activated each time but that is just a case of scrolling down to the bottom of the properties panel and clicking on the Activate button.
Having measurements for a cube based on the center is not too user friendly for CAD. It can be moved to a corner with the following steps:
Assuming you have the default cube which is 2mm in size and the location of the cube is 0mm, 0mm, 0mm, open the properties panel (N) and move the 3D cursor to -1mm, -1mm, -1mm. This puts the 3D cursor on the bottom left vertex of the cube.
Choose Object -> Transform -> Origin to 3D Cursor
The small dot that denotes the object origin will move to the vertex. The properties panel (N) will now show the location of the cube to be -1mm, -1mm, -1mm.
Finally grid snapping can be turned on by clicking on the magnet icon at the bottom of the 3D view.
Once enabled moving or resizing an object will snap it to the 1mm grid.
View an excellent series of tutorials on using Blender for CAD (although it is the 2.4 series).