Fighting with computers

Computers are not always friendly.

Saturday, March 29, 2014

Viewing g-code files in Linux and OSX

Working with CNC machines and 3D printers and developing CAM software myself I need a tool to quickly display the 3D view of any g-code file generated. For a while I have been using EMC2 software on Linux and Pleasant3D in OSX. The former was a bit picky about certain commands that were not understood that would prevent the displaying of a file completely. The latter is ok, but being oriented to 3D printers, it is not very convenient when handling files of several square feet. It works but your viewing ability and angles are a bit limited.

After a bit of searching and playing with several potential candidates I have settled with version 0.2.3 of OpenSCAM that I had used in the past on Windows but somehow was not available at the time for OSX or Linux (or I was lazy enough not to try to compile it from the sources myself). Current version worked nicely in OSX and gave me some minor problems in Ubuntu Linux, that could be solved by installing libv8-dev library and doing a soft link. And I really liked the software provides a machining-time estimate, which is great when you are developing different CAM strategies and want to compare them time-wise. 

Other tools I tried but were not up to the task were tatlin, this Python-based viewer and this online tool. Don't get me wrong these tools are ok but have a 3D printer orientation so they are a bit out of the water if fed with other type of g-code. 


Thursday, March 27, 2014

Delta 3D printers

Since the presentation of the Rostock 3D printer, I have been amazed on the kind of motion that these machines make to print a part. While I have found quite hypnotic the way layers are deposited to create plastic part using fused filament fabrication, when the process is done by a delta robot instead of by a cartesian robot, the show is even more interesting.

However the Rostock was a big machine, not compatible with the space I have available at home. But when I saw Richard's 3DR printers, I thought it was a good way for me to venture into the interesting world of this type of printers. Contrary to the Rostock, the 3DR had a small footprint so I built one. But that was just part of the challenge.

Delta 3D printers use three vertical parallel carriages linked by a set of rods to a central platform where the hotend is placed. But contrary to some other printers, those vertical axis are not screw-driven but belt-driven, which allows very fast motion. As a result, Delta 3D printers can move the low-inertia effector very fast accurately. Besides, z-axis speed is no longer restricted compared to the other axis speeds, which enables operations like raising the hotend in z-axis when retracting (before a non-extruding movement).

The second part of the challenge is properly calibrating the printer. A bit more difficult that its equivalent on a cartesian bot. But this is an interesting world where smart people are creating cool innovations on a daily basis. A new feature to auto bed-leveling permits not to have to worry about bed-leveling when using a delta. This make its operation simpler but requires to have a way to detect when the head is touching the bed. Several ways have been developed to do that, like a dedicated retractable switch, proximity switches or even force sensitive resistors on the bed. But the most radical idea was to use the printer to probe itself in order to create its own calibration data.  Just run "G30 A" command and wait your printer to create its own calibration values.


Tuesday, March 11, 2014

Of pumps and stepper motors

I have been quite busy lately due to several factors. One of them things not working out as expected. Of course every failure is a learning opportunity and this case, my chance to get familiar with the world of hydraulics and fluid dynamics. As a Computer Scientist, you do not get any training on that matter (other than maybe learning about fans for cooling down electronic parts).

I have been working for more than a year on a project where the least I was expecting was to have trouble with what it is eating a lot of my time lately: pushing a viscous fluid in a precise, controlled-way, from a container to the printing area of a 3D-printer we have designed and successfully built as part of our research project.

If you are familiar with 3D printing, you can think of us trying to create a reliable paste extruder. There are many open paste extruder designs out there, but many are designed for not so viscous pastes or liquids. Others can handle viscous fluids but only a very small amount of it (ie. syringe-based ones). And one effect I have learned is the more viscous the fluid the less likely is to move through a narrow tube. And every inch of tube will increase the need of output pressure in your pump.

Another thing I have learned is that pressurized tubes and 3D printed parts are not a good match, so it is difficult to create your own pump. Or more exactly, it is difficult to achieve a good performance level (ie pressure) with your 3D printed parts.

So I kind of gave up and looked around for pump manufacturers, but those that have small pumps could not work with the viscosity levels I needed. After getting some help from an hydraulics professor, the nice people from Food Technology department came to the rescue and lend us a mono pump that worked great with our material. The only problem being that the pump was powered by a 1CV AC motor driven by a variable frequency drive (VFD) to allow the user select different speeds.

But what we needed was a pump that can start and stop on a dime and that we can precisely control the material flow. That is was not possible with the setup of our pump. So our next step is to replace that motor with an stepper motor we can control.

In the previous blog entry I was visiting a company in Rome helping them out to put to work their home-built CNC machine. They have used powerful nema34 motors.

I thought I could use similar steppers, reaching up to 12.5 Nm of torque, to move a mono pump. The only current problem is that we run out of funds. So I am now in the process of piecing together the paperwork for a funding round to see if we can put the thing together and finally finish our research project successfully.

Till then, most of what I can show does not look pretty: