Saturday, December 29, 2012

Finally got the Makerbot Replicator 2 3D printer yesterday.

 
First impressions are very good, both software and hardware.

The ordering process.

I probably ordered at the worst possible time.  I ordered on 22nd of October 2012, just days before the big storm came through.  I sent a money order a few days later. It took 9 days for them to even get my check and then a few days to post it to my account.  By then over 2 weeks had passed.  When I first ordered it I should have gotten it by the beginning of Dec.  Instead, because of the delays in mail delivery and processing the order caused by Sandy, and my own request to send it a few days later, the order arrived on the 28th of December.

Support was very polite and responsive to me, when I wanted to make sure my money order got there, and when I needed the delivery date extended out a week so that it wouldn't arrive when I was travelling.

Overall I am very impressed with the service I received in the face of a new production line and horrible weather.


The hardware is a Replicator 2 from Makerbot.  https://store.makerbot.com/replicator2.html


The device itself is not much bigger than an older laser printer.  It is made very sturdily and the device is very professional and futuristic looking.  The build platform is lit up with LED's that can change color, turning redder and redder as the extruder gets up to temperature is a nice touch.

The small control panel is brightly back lit and the main button is a  lighted up M and is surrounded by 4 directional buttons to allow you to scroll, or return.  The buttons are very sensitive and have a rubber cover on them that seems sturdy.

After I got the delivery, I unboxed it, set it up, levelled the platform and was printing from the SD card in about 10 minutes after I got it.  I had read the manual again on Thursday in anticipation of the delivery on Friday. I printed out all 5 of the demos on the SD card just to demonstrate that everything worked right.  Everything printed out first try and the accuracy and precision of the machine is mind boggling.  I printed the comb and then realized that each tooth of the comb is a loop, not solid.  This makes each tooth amazingly flexible.  The fact that it printed out these single layer of plastic loops about 50 stacks high and it looks perfectly smooth is much better than I had even hoped to see in my wildest dream.



The software is Makerware.  http://www.makerbot.com/makerware/
 
Today I installed the Makerbot 3D printing software on my fastest machine, which is currently running windows.  I have been using this as my windows game box for about 5 years now.  The software currently runs better on the windows box than it did on a linux box I tried it on about a month ago. Installation was effortless, and after I installed the software I turned on the printer, and windows loaded the driver for Replicator.  I was able to load in an stl file, adjust the items scale, move it, and rotate it easily and look at it from any angle I wanted using the software.  Printing is as easy as pressing a button on screen and accepting some simple options.

The yoda head appears to be what all the cool kids are printing, so I printed one as well.   I printed out a scaled down yoda head in medium quality and am currently printing out the yoda head in high quaility.  At .270mm the layers are very visible.  At .100mm the layers are much less obvious.

Printed the one on the left at high resolution, the one on the right at low resolution. Took 45 minutes for low, an hour and 45 for high. It is very hard to see any lines at all in the high resolution print.
The next thing I am going to print is a planetary gear to demonstrate how accurately it can print parts that fit together with tight tolerances and that move against each other during uperation.  I will also try to print a few other things I downloaded from http://thingiverse.com  After that I will try to design and print my own 3D object very soon.


The future.

This is the model T of 3D printers, and this is going to be a major workhorse in the coming few years.  As this technology becomes more mainstream there will be an arms race of features from different vendors.  I can easily see a printer that adds dye as the plastic is extruded in order to color the exterior and give you any color you want. Or one that prints using 5 strands of plastic to give white, black, and a mix of the 3 primary colors, advancing each strand on command to give the color you want at that point of the print. Printing in multiple kinds of plastic so that the support will easily dissolve away or you can print wire traces right into the plastic so you can print a circuit board would also allow so much more flexibility.   There will be advances that we cannot even image now.

Right now this is limited to just a few people, but I can see places like print shops adding a 3D printer that is ran by the staff to let you make a one off copy of something.  Eventually there will be 3D printers that operate almost like a vending machine, you put in your memory card, select which file you want printed, and it calculates the cost to print the item.  You pay, it prints and drops the item into a tray where you can retrieve the object. 

Friday, December 14, 2012

2013 Comet - Don't Panic!

In a year there will be a large comet visible. It may fill most of the sky and may even be visible during the day.  It is predicted to be one of the most stunning astronomical events we ever see in our lifetimes.  Or it could break up and barely be visible.

It is not a sign from anyone, not even God. No, God is not unhappy with humans, so no fasting or self flagellation needed.  Not unless you are into that sort of thing.  No, the Earth is not ending.  No, the Universe is not ending.  Praying won't make it go away even a goggle of a second sooner and it is not any proof that what you prayed for is coming true.  A baby born while the comet is in the sky is coincidence, not a heavenly blessing. It is not going to hit the Earth or any of the other planets or even the Sun.  It is not an alien space craft that you have to commit suicide to hitch a ride on, despite what your religious leader may claim.  Do be on the look out for anyone that believes any of the above are true.  They can be dangerous and may become homicidal or suicidal.

This is just physics and math.  Yes, scientists have known that something exactly like this was coming for hundreds of years now.  It is just random chance that it is happening now, in our lifetimes.  It is a rock and ice object from the Oort cloud which surrounds the sun at about 2 to 10 times the distance of Jupiter from the Sun. Like most objects we detected this while it was just a tiny little dot in the sky invisible to the naked eye.  Right now it is still outside the orbit of Jupiter.

So you humans don't freak out.

Saturday, December 1, 2012

Linux from Scratch on the Rasberry Pi

The Linux from scratch project is a way to build your own custom Linux distribution.  By building a distribution in this way you learn how every part of the system works together.  This would also be a good way to become intimately familiar with all the hardware in the Raspi as well.  The Raspi would be an excellent system to learn how to do this on.

http://www.linuxfromscratch.org/

My first Linux box was in 1993, it was a 33MHz 386 with no math coprocessor, 5 MB of RAM, and a 60 MB Linux partition on a 120 MB hard drive.  I managed to fit most of the Soft Landing System onto the computer over a period of 6 months, installing things one at a time (from 1.44MB floppy disk), then optimizing each package, compressing what I could, removing unneeded files.  A Raspi is so far beyond that system that it is amazing to think about it now.

http://en.wikipedia.org/wiki/Softlanding_Linux_System

One of the problems with a traditional Linux distro is that it uses the glibc library, which, while complete, is also very heavy and large.  On a system with 4 GB of RAM running at 3.8GHz, this is not an issue.  But when you have a 256 MB system and 128 MB is reserved for the graphics, then every single byte counts.  A solution to this problem is to use the uclibc library to reduce the size of the system and the compiled executables. 

http://en.wikipedia.org/wiki/UClibc

I have linked against this small libc version for several programs, and the difference in  compiled program size is amazing.  I have seen 1/4 to 1/10 reductions in the sizes of compiled executables.    You also want to try to compile programs for size instead of speed and use built in executable compression systems such as:

http://linux.die.net/man/1/upx

Because the raspi is 4 to 10 times slower than a modern $600 desktop machine, and it has a very slow disk subsystem, then by making the files much smaller than the desktop machine you can load them much faster.  This is not a criticism of the Raspi, because you are comparing a $25 computer against a $600 computer, by any economic measure the Raspi wins everything on a dollar by dollar basis.   By reducing the file size with dynamic linking against smaller libraries and compressing the resulting executables you can get amazingly fast performance because the processor is much faster than the file subsystem.  Of course this could also be done on the desktop machine, but nobody does it because in that case  the disk subsystem is so fast that you don't gain much performance gain.

For the level just above the OS, you need a good, small shell such as busybox.

http://www.busybox.net/

What busy box does is sit in the bin directory as a single file.  Many of the commands such as "cat" or "ls" are then linked against that single executable and depending on the name it was called by, it can transform and act just like the command itself.  Most of the commands and options for a normal UNIX system are supported.  Once this single command is loaded once, it will stay in memory and you can rapidly run commands again and again, without first needing to load different executables into memory against and again.

There are a variety of small versions of many programs that can easily be put onto a box.  These are commonly found on Linux based routers to provide ssh access, web servers, and the like.  If you just need to share a few files, or run a couple of cgi scripts, instead of Apache, you install Boa:

http://www.boa.org/

Instead of the normal ssh you run beardrop ssh:

https://matt.ucc.asn.au/dropbear/dropbear.html

Once you get to the graphics system, the X window system is actually fairly lightweight at this point.  If this subsystem was compiled against uclibc and then compressed in place with upx, then you could get amazing size reductions.

Then on top of X you need a library like Qt or Gnome to allow applications to be built.  These often come with large collections of applications.  This is where it becomes more interesting.  There may be a better choice for a system like the raspi than the two most popular choices.

One of the things that I would like to do is to analyze what libraries are commonly used by the majority of applications, then standardize on a collection of a couple of dozen libraries that do common tasks, such as processing html, xml, compression, encryption, file retrieval and so on.  Instead of using 12 different libraries that all do the same thing one function, you port any program you want to run on the box to use a much smaller standard set of libraries.  This reduces the memory footprint of the system and the speed that the system is able to load programs substantially.

You also want to dynamically link as many of the libraries as possible in the system.   If you statically link libraries into an executable, it makes the program more portable, because the library is built into the executable at that point.  This results in that program being larger and each program having to load its own copy of each library into memory at the same time.  With a couple dozen programs running you can easily waste MB of RAM with redundant copies of libraries.

Once I have a system up and running, then it would be very interesting to start looking at how to get to a login prompt as quickly as possible, and then get to their desktop as quickly as possible once they have logged in. We may be able to load in common libraries in memory in the background so they are ready when a user successfully logs in.  Start other services on the box, such as the web server, over a couple of minutes time in the background.

Back in the late 1980's I used commodore 64 and 128 computers.  These machines were slow.  Start loading a program, walk down to the bottom of the lane to check the mail, drink a cup of tea, come back and still have to wait for the program to load slow.   There was a cartridge that you could plug into the machine, that once a program had loaded into memory, you could click a button and a menu would pop up, allowing you to save the entire state of the computer at that point.  After that you could speed load that saved position in just a few seconds, instead of the multiple minutes that many of the games took to load.

It would be very interesting if we could snapshot a computer at the login prompt so that we could speed load the system to this point in just a second or two, instead of up to a minute. Almost an instant on.  As the user is logging in, other things can be loaded in the background. Of course, if we updated the system, then a new snapshot would have to be taken.