Interesting Tech Projects
Posts tagged reprap
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.
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!