Sunday, February 26, 2017

Building xpilot classic on Ubunut 15.04

sudo apt-get install libx11-dev xutils-dev libxext-dev

Download xpilot classic from SourceForge, Unpack.

xmkmf -a

I got:
Error in textinterface.c: getline conflicts with builtin
Replace all occurences of 'getline' with 'getline2' in src/client/textinterface.c

Then make. Works!

Friday, July 31, 2015

Experimenting with PLA

I'm experimenting with PLA filament on my Printrbot Classic 3D printer. Slicing with Slic3r 1.2.9. Printing with Octoprint.

Filament is not sticking to bed. The model is large but small surface area - basically a third of the perimeter of a circle with radius 100 mm, perimeter is 2 mm wide. I also have a new fan assembly which is not perfect.

Bed measured temp is around 71. Hotend temp set to 215.

Set first layer speed changed from 25% to 15 mm/s. Retry.

I think head was too far from bed. Changed G92 Z-1.6 to G92 Z-1.5 in printer init script.

filament is coming out of printhead unevenly - in globs.

Removing fan assembly. Reducing printhead temp to 210 to try to reduce uneven PLA flow. Changed G92 Z-1.5 to G92 Z-1.45. Reducing max print speed from 120 to 80 mm/s.

First layer still not sticking properly. Still uneven flow.

Lower printhead even more, to Z-1.35. Globbing could be because not sticking properly?

Still not good. Unsure if the G92 Z stuff is having an effect. Perhaps I should go out and buy blue painters' tape or hair spray.

Changed to G92 Z-1.1. Still looks the same.

Now tried adjusting Z-stop screw instead of G92. Removing G92 command. Retry.

That seems to have done it!

Continued experiments:

Added a spoke to the model. Changing first layer speed from 15 to 20 mm/s. Changing max speed from 80 to 100. Calculate volumetric speed equivalent of 100 mm/s: cylinder 2.85 mm diameter x 100 mm volume = 638 mm^3 / s. Test with 638. Increasing layer height to 0.4 mm.

Worked fairly well. Print time 44 minutes. Extruder stepper was losing steps when printing the smaller top part. That part also turned out poorly, probably no fan caused it not to have time too cool down. For the next one, try a minimum layer time (30 second layers were good, 5 second layers were bad), slower volumetric speed, try even higher layers (0.5 mm).

Changed minimum layer time to from 5 to 30 seconds, max volumetric speed to 500, first layer speed to 20, layer height to 0.5, default extrusion width to auto. Print time will now be about 90 layers * 30 seconds = 45 minutes.

The extruder stepper is still losing steps. I don't understand why. Stepper motor weak because it is hot? trying decreasing pressure holding filament against knurled bolt in extruder. I think reducing this pressure fixed the problem.

Note to self: next time, thread the filament from the spool, through the 'b' in the pb (PrinterBot) logo on the Power Tower, so that the filament is not pulled sideways off the spool.

Worked well. Slower layer times appear to be an alternative to having a fan.

Continued experiments 2015-08-02

Made a fan attachment model in FreeCAD (fairly difficult design for me). Printing with 30% infill. Increasing layer height from 0.5 to 0.6 mm, max print speed from 100 to 120, max volumetric speed to 550, first layer speed from 20 to 25 mm/s.

Extruder skipped. Raised extruder temp to 215. Head was too far from printbed. Needed to back off on Z-screw 1.5 turns.

Got a printout. It was pretty rough, stringy. Some parts of layers didn't attach properly. Dimensions were not very accurate. Maybe 0.5 layer is just too rough. Trying to print it at 0.3 mm. Max print speed at 100, max volumetric speed 500, first layer speed to 30 mm/s.

Printout turned out fairly well. A bit of unevenness, but OK for a structural part that doesn't have to be pretty.

Changing seam position to nearest, decreasing filament temperature from 215 to 213. Increasing first layer speed to 40 mm/s, decreasing diameter from 2.85 to 2.83 to decrease extrusion. Decreasing bed temp from 42 to 40 (Note that my temp sensor is wacky, so this is not the actual temperature), don't combine infill (so little infill anyway in this model). Sent to printer, will print tomorrow.

Tuesday, July 28, 2015

Raspberry Pi troubles solved

After updating the software (using apt-get) on the Raspberry Pi I use to run OctoPrint to control my 3D printer, it would not recognize my TPLink USB WiFi dongle.

Turned out that the firmware needed for it has been removed from the Raspberry Pi kernel, so the fix as presented here was to do:

sudo wget  -O /lib/firmware/rtlwifi/rtl8188eufw.bin
I had some other problems too, apparently I must have powered down the RPi messily. I had to use the Mac's Disk Utilities to repair the boot partition (Windows FAT format), then load a Linux virtual machine and copy the start.elf file from another copy of the distribution to my boot partition.

Sunday, January 25, 2015

Using an Arduino 32u4 as a Visual Pinball controller

I'm building a Visual Pinball cabinet, and I'm planning to use an Arduino Compatible board (a Pololu A-Star 32U4 Micro) as a controller. The Arduino will appear as a USB keyboard, joystick and Media remote to convert button pushes to keyboard presses, plunger position to joystick movements, and volume knob rotations to volume controls on the PC.

I may later try to use the Arduino as an output device as well, to control a lit button, and some solenoids.

I've found the following sites with information:
So, all information seems to be available.

The second two links both require modifying two files (in the Arduino installation. Too bad the software is not flexible enough to support using new USB device types without modifying the distribution.

I forked the Arduino stable (1.0.6) distribution on GitHub here.

I've pushed my untested changes. To be continued.

Sunday, October 26, 2014

Adding a new disk to an LVM Ubuntu system

Today I'm adding another disk to my main Linux server.

I used cgdisk to write a partition table. I set the partition type to 8e00 for LVM (Logical Volume Manager?)

sudo pvcreate /dev/sdb1

$ sudo lvcreate --extents 100%FREE -n lvdisk2 vgdisk2 
  Logical volume "lvdisk2" created

$ sudo vgcreate vgdisk2 /dev/sdb1

  Volume group "vgdisk2" successfully created

sudo mkdir /mnt/disk2
sudo mount /dev/vgdisk2/lvdisk2 /mnt/disk2/

And it's up!

Tuesday, October 21, 2014

Avoiding Paralells price gouging

Paralells makes a virtual machine software for the Mac, called Paralells Desktop. They said I needed to upgrade their product to before upgrading to Mac OS X 10.10 Yosemite (although it seems they may have been lying).

The upgrade price in the US is $50, but if you're located in Europe they charge you $76 for exactly the same thing. Not a respectful way to treat your customers to charge 50% more for a download depending on where you live. (Note - it's not just the VAT).

So, the way to avoid paying their EU surcharge is to use a free web proxy like Go to the site, enter "" in the web address box, and navigate to the download you want. Note: don't enter any credit card details using the web proxy since it circumvents encryption. But enter your e-mail address and pay by Paypal. It's OK to enter an EU address. The price ended up being $59.41 including VAT.

There you go - save some money!

Thursday, October 02, 2014

Ubuntu server maintenance

I'm doing some server maintenance today.

The main reason being that Ubuntu 13.10 systems are not updated to fix the Shellshock security hole, so I'll try to upgrade my main server to 14.04 or 14.10.

I had a full /boot partition first which I needed to fix. I had to move two initrd files (initrd.img-3.11.0-15-generic and initrd.img-3.11.0-17-generic) to /tmp temporarily to be able to fix it.

I then did an "apt-get install -f" to fix some broken package stuff, probably due to the full /boot partition.

I still got some out of diskspace errors, so I guess I have to move another initrd or two to /tmp:

run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.11.0-26-generic /boot/vmlinuz-3.11.0-26-generic
update-initramfs: Generating /boot/initrd.img-3.11.0-26-generic
gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.11.0-26-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.11.0-26
Rerunning "sudo apt-get -f install". It's very slow when doing "running depmod". Success! I now have 23M free on /boot. 

I'll try running apt-get autoremove. I now have 87 MB free on /boot.

I now do:

sudo apt-get purge linux-image-3.11.0-23-generic
sudo apt-get purge linux-image-3.11.0-24-generic
sudo apt-get purge linux-image-3.11.0-15-generic 
The last command removed the running kernel, which I hadn't really planned to do. Oh well. Now I have 155 MB free on /boot.

Actually, I got a bit worried, so I reinstalled the running kernel (3.11.0-15). 140 MB free.

Now I'll try again to upgrade to 14.04:

Hm. I did some kind of resurrect in the previously failed 14.04 installation window. I wonder if the installation restarted properly? I don't dare to interrupt it, so I'll let it run.

Rebooted after 240 days uptime. It is taking a very long time with the hard disk light on. I hope it is just a forced fsck.

For some reason the network didn't come up on the first boot, but after the next reboot.