Saturday, July 16, 2016

3D Printer Fixed My Paper Shredder

Yay! New 3D printer arrived!

In order to justify the purchase, I need to make sure that the machine actually saves me money in the long run. My paper shredder broke just a week prior to getting the 3D printer and is now a good candidate for the project. I paid $5 for it at a thrift store, but the replacement part costs at least $30 plus shipping.

How did I break it? Well, let's just say the size of the slot where you insert the paper is a bad indicator for how many sheets of paper you should feed it. Long story short, it made a strange noise and the shredding cylinders stopped rotating despite the motor seems to be spinning just find. Taking the shredder apart reveals a broken compound gear. I measured the outside diameter of the gear and calculated the approximate pitch diameter based on the number of teeth and made the gear in CAD, as shown in the picture below.

After a few trial prints (one half-height piece for section of the compound gear) to confirm the fit was good, a full sizes part was then printed. The picture below shows the 3D printed part next to (what was left) of the original part. The final gear geometry deviates a little from the calculated values. Significant adjustment was needed for the smaller portion of the gear. The final gear geometry which yielded a good part is included at the end of this post.
Left - original part (broken); Right - 3D printed replacement
The tolerance of the printed part seems to be pretty good. The shaft measured 0.172", and I made the hold diameter 0.19" in the CAD model. The printed hole size was 0.177", which gave me a pretty nice slip fit. All measurements are taken without considering the first layer of the printed part, where the bead of material is flattened a little more than the rest of the layers thus resulting a slightly wider line. This is easily fixed post printing by pushing a screw driver (with a Phillip tip that's slightly larger than the hole) against the first layer of the hole and giving it a few twists. The pictures below shows the printed part in action.
3D printed part in action
A close up


I just spent an afternoon and saved myself about 30 bucks. If I do this another nine times I might actually recover the cost of the 3D printer. Too bad I don't have anything broken at the moment. The model of the paper shredder is Fellowes P-57Cs. You can find the part here on Thingiverse.



Gear Geometry

FINAL DESIGN VALUES for Large GearFINAL DESIGN VALUES for Small Gear
Outside Diameter (in)2.000Outside Diameter (in)0.750
Num of Teeth40.000Num of Teeth7.000
Height (in)0.475Height (in)0.550
Diametral Pitch (teeth/in) (approx)21.000Diametral Pitch (teeth/in) (approx)12.663
Pitch Diameter (in)1.905Pitch Diameter (in)0.553
Clearance (in)0.010Clearance (in)0.020
Hole Dia (in)0.195Hole Dia (in)0.195
Pressure Angle (deg)14.5Pressure Angle (deg)20.0

Monday, August 22, 2011

Installing MITSIMLab on Ubuntu 8.10


Captain’s Log, Stardate 65097.3

The mission was to find out how earthlings react to external visual stimuli while operating their motorized ground transportation devices. Doing a simulation would help, I thought. So I hunted around for an open source (read: free) traffic simulation softwares, since my spending limit was as low as a Ferengi pirate's moral standards.

MITSIMLab looked like a good candidate. It is an open source microscopic traffic simulator developed by the brains at MIT sometime in the late 90's or early this century. You can download it here. It took me almost two weeks to get it to work on my computer running Ubuntu 8.10. I'm running 8.10 because the instruction that comes with the downloaded files was written for this particular release. Keep in mind that I can count single handedly how many times I've used Linux before this mission, so it'll probably take you much less time.

I've summarized what I did and hopefully this can help those of you out there pulling your hair out trying to get it to run. The way I did it may not be the most efficient. If you think you can make the process better, please don't hesitate to make suggestions.

Part 1: Prepare your computer

If you are running Ubuntu 8.10, you'll probably want to make a few changes to the sources.list file so you can download the needed packages. This can be done using the following command (it’ll ask you for your password):

$ sudo gedit /etc/apt/sources.list

Then replace us.archive.ubuntu.com, and security.ubuntu.com with old-releases.ubuntu.com. I like to use gedit because I'm still struggling with editors w/o a GUI such as Vim or Emacs. After replacing the text, save the file and run

$ sudo apt-get update

to update your sources for apt-get. When the update is finished, follow the list below to proceed with the installation.



1.   Check your gcc version to see if it’s compatible with 4.3. Mine was 4.3.2.

$ gcc –version



 
2.   Check if you have PVM installed already

$ dpkg --get-selections | grep pvm

If your terminal returns nothing, install PVM

$ sudo apt-get install pvm

3.   Install the following packages with apt-get:

g++
autoconf
automake
make
libmotif3
libmotif-dev
libxt-dev
x11proto-print-dev
libxpm-dev
libXext-dev
patch
xmkmf
libxmu-dev

with command

$ sudo apt-get install ‘package name here’

4.   Download the package
libstdc++2.10-glibc2.2_2.95.4-24_i385.deb
from
if this mirror doesn’t work, go to here and pick one that works. Chances are most of them doesn’t work anymore, but you might be able to find one if you are lucky.
After download is finished, browse to the downloaded file and double click to install it using Package Installer.

Part 2: Install MITSIMLab

1.   Download the MITSIMLab.tar.gz file found here to a directory of your choice. I just tossed it right under my home folder (~/) for easy access. In your terminal, go to the directory where you saved the tar file and run the following command to unzip it:

$ tar zxvf MITSIMLab.tar.gz

Then enter the newly created folder by doing

$ cd MITSIMLab

2.   Unzip the GUI_Libs.tar.gz file inside of your MITSIMLab directory

$ tar.zxvf GUI_Libs.tar.gz

Then enter the newly created folder by doing

$ cd GUI_Libs

3.   Open the Install script inside of the GUI_Libs folder in an editor

$ gedit Install

and replace the #!/bin/sh with #!/bin/bash, save and exit.


4.   Run the install script as root (your computer may ask you for password)

$ sudo -s ./Install
Your computer should take a minute or two here, and you should see a “All done” after the process is finished. If it stops shortly after you hit “enter” and you can see warning messages, repeat Part 1 and Part 2.

Congratulations! You have successfully installed MITSIMLab on your Ubuntu 8.10. However before we can run MITSIMLab, you’ll need to configure your system to work with it.

Part 3: Configuring your system for MITSIMLab

1.   Edit the file /etc/ld.so.conf
$ sudo gedit /etc/ld.so.conf
and add the line
/usr/local/lib
at the end of the file, save and exit.
Then type
$ sudo ldconfig

2.   Set the XENVIRONMEN with

$ gedit ~/.bashrc

and add the following lines at the end of the file

export XENVIRONMENT=~/MITSIMLab/bin/ad/xmitsim.ad
export PATH=$PATH:~/MITSIMLab/bin/Linux

save and exit.

Then type

$ source .bashrc

to reload the newly changed .bashrc file.

Note: I unzipped the MITSIMLab folder into my home directory. If you unzipped yours elsewhere, then you need to change the line you add to point to the location on your computer.

3.   In your terminal, go to your /MITSIMLab directory and edit the .pmv_hosts file

$ gedit .pvm_hosts

The file will look something like: 
# Configuration file used for starting PVM for SIMLAB programs 
localhost.localdomain ep=$SIMLAB_Linux wd=$SIMLAB_DAT 

You need to add a line which says: 
<computer name> ep=$SIMLAB_Linux wd=$SIMLAB_DAT 
(where computer name is for example: bass.mit.edu) 

My added line was

VMUbuntuOnHappy ep=$SIMLAB_Linux wd=$SIMLAB_DAT

because my computer name is VMUbuntuOnHappy and I didn’t have a domain name.

Part 4: Running MITSIMLab
To run the examples included in the downloaded file, navigate to /MITSIMLab folder and run PVM
$ pvm .pvm_hosts
Type conf to verify your that HOST is indeed your host name, and quit to exit the PVM interface but leave PVM running. (If you want to stop PVM, type halt)
Finally, to run the brunnsviken example of MITSIMLab in GUI, go into /MITSIMLab/view/data/brunnsviken and type
$ xmitsim master.mitsim