Archive for category Software

Sienna Hood Rod Pivot: PETG Edition

Our Larval Engineer reports that the PLA pivot for the Sienna’s hood rod didn’t survive contact with the van’s NYS Inspection. I’m not surprised, as PLA tends to be brittle and the inspection happened on a typical February day in upstate New York. Seeing as how PETG claims to be stronger and more durable than PLA, I ran off some replacements:

Toyota Sienna hood rod pivot - small - PETG

Toyota Sienna hood rod pivot – small – PETG

The square cap fit snugly over the bottom of the post; PETG tolerances seem pretty much the same as for PLA.

A slightly larger loop may be more durable, so I changed one parameter in the OpenSCAD code to get this:

Toyota Sienna Hood Rod Pivot - up-armored - solid model

Toyota Sienna Hood Rod Pivot – up-armored – solid model

Which printed just like you’d expect:

Toyota Sienna hood rod pivot - large - PETG hairs

Toyota Sienna hood rod pivot – large – PETG hairs

Despite the hairs stretching between each part, the nozzle didn’t deposit any boogers during the print. The top and bottom use Hilbert Curve infill, which looks pretty and keeps the nozzle from zipping back and forth quite so much; perhaps that’s a step in the right direction.

Tapping the holes for 6-32 stainless machines screws went easily enough:

Toyota Sienna hood rod pivot - PETG - assembled

Toyota Sienna hood rod pivot – PETG – assembled

She gets one of each and I keep the others for show-n-tell sessions.

The OpenSCAD source code, which differs from the original by a constant or two:

// Sienna Hood Rod Pivot
// Ed Nisley KE4ZNU November 2013

//- Extrusion parameters must match reality!
//  Print with 2 shells and 3 solid layers

ThreadThick = 0.25;
ThreadWidth = 0.40;

HoleWindage = 0.2;

Protrusion = 0.1;			// make holes end cleanly

inch = 25.4;

function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit);

//----------------------
// Dimensions

ShellOD = 20.0;
ShellID = 8.75;
ShellLength = 10.0;

TaperLength = 1.5;
TaperID = 11.4;

BaseWidth = 20.0;
BaseThick = 3.0;

PegSide = 9.5;					// mounting peg through sheet metal
PegLength = 7.0;
PegCornerTrim = 0.75;
PegHoleOD = 0.107*inch;			//  6-32 tap hole

PegTrimSide = sqrt(2)*PegSide - PegCornerTrim;

ClampWall = 3.0;				// clamping cap under sheet metal
ClampHoleOD = 0.150*inch;		//  6-32 clearance hole
ClampCap = 3.0;					// solid end thickness

PanelThick = 2.0;				// sheet metal under hood

NumSides = 6*4;

//----------------------
// Useful routines

module PolyCyl(Dia,Height,ForceSides=0) {			// based on nophead's polyholes

  Sides = (ForceSides != 0) ? ForceSides : (ceil(Dia) + 2);

  FixDia = Dia / cos(180/Sides);

  cylinder(r=(FixDia + HoleWindage)/2,
           h=Height,
	   $fn=Sides);
}

module ShowPegGrid(Space = 10.0,Size = 1.0) {

  Range = floor(50 / Space);

	for (x=[-Range:Range])
	  for (y=[-Range:Range])
		translate([x*Space,y*Space,Size/2])
		  %cube(Size,center=true);

}

//----------------------
// Build it

//ShowPegGrid();

// pivot

translate([-ShellOD,0,0])
	difference() {
		union() {
			cylinder(r=ShellOD/2,h=ShellLength,$fn=NumSides);		// housing
			translate([-ShellOD/2,0,0])								// filler
				cube([ShellOD,(ShellOD/2 + BaseThick),ShellLength],center=false);
			translate([0,(ShellOD/2 + BaseThick/2),ShellLength/2])	// foot
				cube([BaseWidth,BaseThick,ShellLength],center=true);

			translate([0,											// peg
						(ShellOD/2 + PegLength/2 + BaseThick - Protrusion),
						PegSide/2])
				intersection() {
					cube([PegSide,(PegLength + Protrusion),PegSide],center=true);
					rotate([0,45,0])
						cube([PegTrimSide,2*PegLength,PegTrimSide],center=true);
				}
		}

		PolyCyl(ShellID,ShellLength,NumSides);		// central hole

		translate([0,0,-Protrusion])				// end bevels
			cylinder(r1=TaperID/2,r2=ShellID/2,h=(TaperLength + Protrusion),$fn=NumSides);
		translate([0,0,(ShellLength + Protrusion)])
			rotate([180,0,0])
				cylinder(r1=TaperID/2,r2=ShellID/2,h=(TaperLength + Protrusion),$fn=NumSides);

		translate([0,0,PegSide/2])					// screw tap hole
			rotate([-90,0,0])
				PolyCyl(PegHoleOD,(ShellOD + BaseThick + PegLength),6);

	}

// anchor cap

translate([2*PegSide,0,0])
	difference() {
		translate([0,0,(PegLength + ClampCap)/2])					// overall shape
			cube([(PegSide + ClampWall),(PegSide + ClampWall),(PegLength + ClampCap)],center=true);
		translate([0,0,(PegLength/2 + ClampCap + Protrusion)])		// peg cutout
			cube([(PegSide + ThreadWidth),(PegSide + ThreadWidth),(PegLength + Protrusion)],center=true);
		translate([0,0,-Protrusion])								// screw clearance
				PolyCyl(ClampHoleOD,2*PegLength,6);
	}

, ,

Leave a comment

Build Platform Chisel Handle

My father used a little chisel for some unknown purpose while he was an instrument repair tech at Olmstead AFB during the mid-60s. Its homebrew wood handle eventually disintegrated and I made a quick-and-truly-dirty replacement from epoxy putty and heatshrink tubing, promising that I’d eventually do better.

Seeing as how I use it to pop objects off the M2’s build platform and being in need of a tall, skinny object to see how PETG works with towers, that chisel now has a nice magenta handle:

Platform Chisel - PETG handle

Platform Chisel – PETG handle

Well, OK, it may not be the prettiest handle you’ve ever seen, but it’s much better than an epoxy turd, as measured along several axes.

Incidentally, epoxy putty bonds to clean steel like there’s no tomorrow. I had to file the last remaining chunks off and sandpaper the residue down to clean steel again.

The solid model shows it in build-a-tower mode:

Chisel Handle - solid model

Chisel Handle – solid model

I think at least one rounded end would improve its appearance. Two rounded ends would make it un-printable in that orientation, although a low-vertex polygonal approximation might have enough of a flat bottom to suffice. Given how long it took me to replace the epoxy, that could take a while.

The central slot fits snugly around the handle, requiring persuasion from a plastic mallet to set in in position.

Once again, the nozzle shed a small brown PETG booger after the first few layers:

PETG Chisel Handle - oxidized plastic

PETG Chisel Handle – oxidized plastic

I’m beginning to think PETG infill needs more attention than I’ve been giving it: that’s 15% 3D Honeycomb combined over three layers.

The OpenSCAD source code:

// Chisel Handle
// Ed Nisley KE4ZNU - March 2015

Layout = "Show";			// Show Build

//-------
//- Extrusion parameters must match reality!

ThreadThick = 0.25;
ThreadWidth = 0.40;

HoleWindage = 0.2;

Protrusion = 0.1; 				// make holes end cleanly

function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit);

//-------
// Dimensions

Shank = [16.0,2.4,59];			// width, thickness, length to arched end

BladeWidth = 27.0;

HandleSides = 8;

//-------

module ShowPegGrid(Space = 10.0,Size = 1.0) {

  RangeX = floor(95 / Space);
  RangeY = floor(125 / Space);

	for (x=[-RangeX:RangeX])
	  for (y=[-RangeY:RangeY])
		translate([x*Space,y*Space,Size/2])
		  %cube(Size,center=true);

}

module PolyCyl(Dia,Height,ForceSides=0) {			// based on nophead's polyholes
  Sides = (ForceSides != 0) ? ForceSides : (ceil(Dia) + 2);
  FixDia = Dia / cos(180/Sides);
  cylinder(r=(FixDia + HoleWindage)/2,h=Height,$fn=Sides);
}



module Handle() {
	difference() {
		scale([1.0,0.5,1.0])
			rotate(180/HandleSides)
				cylinder(d=BladeWidth/cos(180/HandleSides),h=Shank[2],$fn=HandleSides);
		translate([0,0,Shank[2]/2])
			cube(Shank + [0,0,2*Protrusion],center=true);
	}
}

//-------
// Build it!

//ShowPegGrid();

if (Layout == "Show") {
	Handle();
}

if (Layout == "Build") {
	translate([0,0,0])
		rotate([0,0,0])
			Handle();
}

,

2 Comments

Detergent Cap Holder

Although chain mail provides a good test of the M2’s setup and slicing parameters, it doesn’t offer much in the way of infill. To test that, I designed a holder for the cap of the bulk laundry detergent container:

Detergent Cap Holder - in place

Detergent Cap Holder – in place

The container must rest on its side, but if you snap the cap back in place, detergent will ooze out between the cap and the container and drip on whatever’s below. The never-sufficiently-to-be-damned Whirlpool high-efficiency front loading washer vibrates like crazy during the spin cycle, shaking anything from its top to the floor. The cap must sit in a cup to catch the inevitable ooze down its side, the wire shelf already has a bunch of other crap on it, and I needed a bulky test object, soooo ….

We regard that detergent container and its cap as a botched design.

Anyhow.

The holder has pair of holes in its back surface for the copper (!) hangers:

Detergent Cap Holder - solid model - rear

Detergent Cap Holder – solid model – rear

I stripped a length of 10 AWG wire, straightened & annealed it, bent up a pair of hooks, then hammered them just flat enough to work-harden the copper, and they were all good.

Printing that massive block with 20% infill showed that the nozzle collected enough PETG during the first few layers to leave a substantial booger behind:

Detergent cup holder - oxidized PETG

Detergent cup holder – oxidized PETG

Fortunately, that was the only one and it ended up on the inside, tucked out of sight.

The PETG depot on the outside of the nozzle gradually darkens from the original magenta to brown, which I’m pretty sure means that it’s oxidizing / decomposing / going bad. There’s no obvious way to remove the booger during the print; I’ve taken to wiping the nozzle after each object, while it’s still hot and the PETG remains flexible.

Because the nozzle didn’t accumulate any more PETG during the rest of the print, it’s not a constant problem, but I have seen boogers several times so far.

Perhaps continued refinement of the slicing parameters will help? One can always hope…

The OpenSCAD source code:

// Detergent Cap Holder
// Ed Nisley KE4ZNU - March 2015

Layout = "Show";			// Show Build

//-------
//- Extrusion parameters must match reality!

ThreadThick = 0.20;
ThreadWidth = 0.40;

HoleWindage = 0.2;

Protrusion = 0.1; 				// make holes end cleanly

function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit);

//-------
// Dimensions

RecessX = 45.0;								// cap recess
RecessDia = 55.0;
RecessDepth = 10.0;
RecessSides = 16*4;

BaseThick = 5.0;							// block thickness below cap

PinDia = 2.5;
PinLength = 20.0;
PinOC = 65.0;
PinInset = 7.0;
PinZ = BaseThick;

Block = [RecessX,PinOC + 2*PinInset,30.0];	// overall block size (X to cap center)

FairingRadius = Block[2] - RecessDepth - BaseThick;

//-------

module ShowPegGrid(Space = 10.0,Size = 1.0) {

  RangeX = floor(95 / Space);
  RangeY = floor(125 / Space);

	for (x=[-RangeX:RangeX])
	  for (y=[-RangeY:RangeY])
		translate([x*Space,y*Space,Size/2])
		  %cube(Size,center=true);

}

module PolyCyl(Dia,Height,ForceSides=0) {			// based on nophead's polyholes
  Sides = (ForceSides != 0) ? ForceSides : (ceil(Dia) + 2);
  FixDia = Dia / cos(180/Sides);
  cylinder(r=(FixDia + HoleWindage)/2,h=Height,$fn=Sides);
}

module Holder() {
	difference() {
		union() {									// main shape
			translate([-Block[0]/2,0,Block[2]/2])
			cube(Block,center=true);
			cylinder(d=Block[1],h=Block[2],$fn=RecessSides);
		}
		for (j=[-1,1])								// mounting pin holes
			translate([-(Block[0] + Protrusion),j*PinOC/2,PinZ])
				rotate([0,90,0]) rotate(180/6)
					PolyCyl(PinDia,PinLength + Protrusion,6);
		translate([0,0,Block[2]])					// fairing arc
			rotate([90,0,0])
				cylinder(r=FairingRadius,h=2*Block[1],center=true);
		translate([Block[0]/2,0,Block[2]/2 + RecessDepth + BaseThick])	// flat top
			scale([1,2,1])
				cube(Block,center=true);
		translate([0,0,BaseThick])
			cylinder(d1=RecessDia,d2=1.1*RecessDia,h=Block[2]);
	}
}

//-------
// Build it!

//ShowPegGrid();

if (Layout == "Show") {
	Holder();
}

if (Layout == "Build") {
	translate([0,0,0])
	rotate([0,0,0])
	Holder();
}

6 Comments

RPi: Static WiFi Addressing

Having configured ssh on the Raspberry Pi for public keys, the next step is to cut the cord by configuring the USB WiFi dongle to automagically come up with a static IP.

Make /etc/network/interfaces look like this:

auto lo

iface lo inet loopback

#iface eth0 inet dhcp

auto eth0
#iface eth0 inet static
iface eth0 inet manual
 address 192.168.1.209
 gateway 192.168.1.1
 netmask 255.255.255.0
 network 192.168.1.0
 broadcast 192.168.1.255

allow-hotplug wlan0

#iface wlan0 inet manual
iface wlan0 inet static
 address 192.168.1.9
 gateway 192.168.1.1
 netmask 255.255.255.0
 network 192.168.1.0
 broadcast 192.168.1.255

#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

iface default inet dhcp

Then set up /etc/wpa_supplicant/wpa_supplicant.conf thusly:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
	ssid="whatever it might be"
	psk="choose your own password"
}

You want different IP addresses for the eth0 and wlan0 devices, because you never know when you’ll be forced to use them at the same time.

Using wpa-conf rather than wpa-roam prevents the machinery from automagically doing things when you’re not watching.

The router can hand out IP addresses based on MACs, but that means bottling up all that configuration in a single device that might go toes up. Forcibly configuring each device to a static IP adds a bit of resilience to the network, right up to the point where you must change all of them at once.

Alas, the router seemed to lose track of the Pi after a day. Pinging from my desktop box reported Destination Host Unreachable, even though signing on through the USB keyboard showed the USB WiFi link (a netis WF2123) was still up. Signing on to the router and refreshing the DHCP list (even though the RPi has a static IP) knocked things loose: suddenly the RPi became pingable.

It seems the WiFi link turns itself off after a while, which can be averted by tweaking the options:

sudo nano /etc/modprobe.d/8192cu.conf
# Disable power saving
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0
  

The WordPress sourcecode tag seems to turn underscores into blanks [Update: on the last line of a sourcecode block, which I’ve now forced to be a blank line; the options should read rtw_power_mgmt and rtw_enusbss, respectively.

Anyhow, the rtw_enusbss option prevents the USB interface from going down. It was already zero in the default configuration, but I presume there’s no harm in clearing it again.

6 Comments

MakerGear M2: Slic3r Config for PETG

Changing from PLA to PETG with a V4 hot end and 24 V power required several slicing adjustments, some of which weren’t at all obvious. It’s not all settled down, but what you see here comes from a bunch of test objects and tweaks that you’ll see over the next few days; this is basically a peek into the future.

M2 V4 Calibration Objects

M2 V4 Calibration Objects

The obvious changes:

  • Extrusion temperature: 250 °C
  • Platform temperature: 90 °C

Hot PETG seems rather sticky and produces hair-fine strings that aren’t due to poor retraction. Running at 230 °C is possible, but the strings are nasty. The V4 hot end shouldn’t run over 250 °C; fortunately, some tests suggest the stringing doesn’t Go Away at 260 °C, so moah powah! isn’t required.

Hair spray on glass works well above 90 °C and not at all below 80 °C. A stick of Elmer’s Washable Glue Stick, chosen because it was on the Adhesive Shelf, produced exactly zero adhesion at any platform temperature I was willing to use. Its “washable” nature surely contributed to the failure; you want something that’s gonna stick with you forever.

The eSun PETG filament diameter varies from 1.63 to 1.72 mm, which seems like a lot compared to the MakerGear PLA I’d been using; I’ve told Slic3r to run with 1.70 mm. In practice, it doesn’t seem to matter; the average over a meter works out to 1.70, I haven’t seen any abrupt bulges, and the objects come out fine. This spool arrived late last year, early in eSun’s production, so perhaps they’ve smoothed things out by now.

A few iterations of thinwall box building put the Extrusion Multiplier at 1.11, producing a spot-on 0.40 mm thread width at either 0.20 or 0.25 mm thread thickness.

Infill:

  • Infill overlap: 10%
  • Max infill: 40%
  • Infill pattern: 3D Honycomb
  • Top/bottom pattern: Hilbert Curve
  • Combine infill: 3 layers

The first attempt at a solid box (left of center, first row) became so overstuffed I canceled the print; the top bulges upward. A few parameter tweak iterations produced the perfect 100% filled solid box to its right, but in actual practice a 40% 3D Honeycomb will be entirely strong enough for anything I build.

Reducing the overlap from 15% to 10% reduced the obviously overstuffed junction just inside the perimeter threads.

Cooling:

  • Fan for layers below 20 s
  • Minimum layer time: 10 s
  • Minimum speed: 10 mm/s

PETG wants to go down hot, but printing a single thinwall box requires that much cooling to prevent slumping. Might be excessive; we shall see.

Speeds:

  • First layer: 15 mm/s
  • External perimeters: 25 mm/s
  • Perimeters: 50 mm/s
  • Infill: 75 mm/s
  • Travel: 300 mm/s

Slower XY speeds seem to produce better results, although those values aren’t based on extensive experience.

The first layer doesn’t work well at higher speeds, with acute corners and edges pulling up as the nozzle moves away. Using the Hilbert Curve pattern not only looks pretty, but also ensures the nozzle spends plenty of time in the same general area. Higher platform temperatures work better, too, and I may goose the 40 V supply a bit to improve the 0.2 °C/s warmup rate.

The travel speed went up from 250 mm/s in an attempt to reduce stringing, but it may be too aggressive for the Y axis with the new 24 V supply. On very rare occasions, the Y axis stalls during homing, despite not changing the speeds in the startup G-Code, and I’m still accumulating experience with that.

Bridging isn’t nearly as clean as PLA. After some tinkering, a bridge speed of 25 mm/s and flow of 0.90 seems to work, but some chain mail patches suggest there’s plenty of room for improvement.

Mechanically, PETG is softer and more resilient than PLA, with a much higher glass transition temperature. Larger objects with 40% infill are essentially rigid and smaller objects are bendy, rather than brittle.

On the whole, PETG seems like it will work well for the stuff I build, although magenta isn’t my favorite color…

CAUTION: Don’t use this Slic3r configuration unless:

The Slic3r configuration:

# generated by Slic3r 1.2.7-dev on Mon Mar  9 19:51:37 2015
avoid_crossing_perimeters = 0
bed_shape = -100x-125,100x-125,100x125,-100x125
bed_temperature = 90
before_layer_gcode =
bottom_solid_layers = 3
bridge_acceleration = 0
bridge_fan_speed = 100
bridge_flow_ratio = 0.9
bridge_speed = 25
brim_width = 0
complete_objects = 0
cooling = 1
default_acceleration = 0
disable_fan_first_layers = 2
dont_support_bridges = 1
duplicate_distance = 6
end_gcode = ;-- Slic3r End G-Code for M2 starts --\n;  Ed Nisley KE4NZU - 15 November 2013\nM104 S0		; drop extruder temperature\nM140 S0		; drop bed temperature\nM106 S0		; bed fan off\nG1 Z160 F2000	; lower bed\nG1 X135 Y100 F30000	; nozzle to right, bed front\nM84     	; disable motors\n;-- Slic3r End G-Code ends --
external_fill_pattern = hilbertcurve
external_perimeter_extrusion_width = 0
external_perimeter_speed = 25
external_perimeters_first = 0
extra_perimeters = 1
extruder_clearance_height = 25
extruder_clearance_radius = 15
extruder_offset = 0x0
extrusion_axis = E
extrusion_multiplier = 1.11
extrusion_width = 0.4
fan_always_on = 0
fan_below_layer_time = 20
filament_diameter = 1.7
fill_angle = 45
fill_density = 40%
fill_pattern = 3dhoneycomb
first_layer_acceleration = 0
first_layer_bed_temperature = 90
first_layer_extrusion_width = 0.4
first_layer_height = 100%
first_layer_speed = 15
first_layer_temperature = 250
gap_fill_speed = 50
gcode_arcs = 0
gcode_comments = 0
gcode_flavor = reprap
infill_acceleration = 0
infill_every_layers = 3
infill_extruder = 1
infill_extrusion_width = 0
infill_first = 1
infill_only_where_needed = 0
infill_overlap = 10%
infill_speed = 75
interface_shells = 0
layer_gcode =
layer_height = 0.25
max_fan_speed = 100
min_fan_speed = 100
min_print_speed = 10
min_skirt_length = 15
notes =
nozzle_diameter = 0.35
octoprint_apikey =
octoprint_host =
only_retract_when_crossing_perimeters = 1
ooze_prevention = 0
output_filename_format = [input_filename_base].gcode
overhangs = 1
perimeter_acceleration = 0
perimeter_extruder = 1
perimeter_extrusion_width = 0.4
perimeter_speed = 50
perimeters = 3
post_process =
pressure_advance = 0
raft_layers = 0
resolution = 0.005
retract_before_travel = 1
retract_layer_change = 0
retract_length = 1
retract_length_toolchange = 5
retract_lift = 0
retract_restart_extra = 0
retract_restart_extra_toolchange = 0
retract_speed = 60
seam_position = aligned
skirt_distance = 3
skirt_height = 1
skirts = 3
slowdown_below_layer_time = 10
small_perimeter_speed = 25
solid_infill_below_area = 1
solid_infill_every_layers = 0
solid_infill_extruder = 1
solid_infill_extrusion_width = 0
solid_infill_speed = 75
spiral_vase = 0
standby_temperature_delta = -5
start_gcode = ;-- Slic3r Start G-Code for M2 starts --\n;  Ed Nisley KE4NZU - 2015-03-07\n;  Makergear V4 hot end\n; Z-min switch at platform, must move nozzle to X=135 to clear\nM140 S[first_layer_bed_temperature]	; start bed heating\nG90				; absolute coordinates\nG21				; millimeters\nM83				; relative extrusion distance\nM17				; enable steppers\nG4 P250			;  ... wait for power up\nG92 Z0			; set Z to zero, wherever it might be now\nG1 Z10 F1000	; move platform downward to clear nozzle; may crash at bottom\nG28 Y0			; home Y to clear plate, origin in middle\nG92 Y-127\nG28 X0			; home X, origin in middle\nG92 X-100\nG1 X130 Y0 F30000	; move off platform to right side, center Y\nG28 Z0			; home Z to platform switch, with measured offset\nG92 Z-2.07\nG0 Z2.0			; get air under switch\nG0 Y-127 F10000	; set up for priming, zig around corner\nG0 X0			;  center X\nG0 Y-125.0		; just over platform edge\nG0 Z0 F500	; exactly at platform\nM109 S[first_layer_temperature]	; set extruder temperature and wait\nM190 S[first_layer_bed_temperature]	; wait for bed to finish heating\nG1 E20 F300		; prime to get pressure, generate blob on edge\nG0 Y-123		; shear off blob\nG1 X15 F20000	; jerk away from blob, move over surface\nG4 P500			; pause to attach\nG1 X45 F500		; slowly smear snot to clear nozzle\nG1 Z1.0 F2000	; clear bed for travel\n;-- Slic3r Start G-Code ends --
support_material = 0
support_material_angle = 0
support_material_contact_distance = 0.2
support_material_enforce_layers = 0
support_material_extruder = 1
support_material_extrusion_width = 0
support_material_interface_extruder = 1
support_material_interface_layers = 3
support_material_interface_spacing = 0
support_material_interface_speed = 100%
support_material_pattern = pillars
support_material_spacing = 2.5
support_material_speed = 50
support_material_threshold = 0
temperature = 250
thin_walls = 1
threads = 2
toolchange_gcode =
top_infill_extrusion_width = 0
top_solid_infill_speed = 25
top_solid_layers = 3
travel_speed = 300
use_firmware_retraction = 0
use_relative_e_distances = 0
use_volumetric_e = 0
vibration_limit = 0
wipe = 0
xy_size_compensation = 0
z_offset = 0

,

1 Comment

RPi: Logitech Camera Data

After installing things like imagemagick and mjpg_streamer on the Raspberry Pi, I exhumed a quartet of Logitech cameras from the heap to see how they worked. None bear any identification, apart from a tag on the cable, so here’s what I found out for later reference.

They’re all reasonably good for still pictures, if you don’t mind terrible initial exposures. The default program works OK:

fswebcam -d /dev/video0 -r 320x240 image.jpg

On the other hand, getting any streaming video requires searching through the parameter space, which wasn’t helped by the total lack of documentation. The Arch Linux wiki has a useful summary of camera & drivers, with pointers to additional lists-of-lists. The OctoPrint repo documents the mjpg-streamer plugin parameters.

So, we begin…

This camera, one of two identical cameras in the heap, has a clip that used to fit on the upper edge of a laptop display:

Logitech QuickCam for Notebook Plus - front

Logitech QuickCam for Notebook Plus – front

One has a tag:

Logitech QuickCam for Notebook Plus - tag

Logitech QuickCam for Notebook Plus – tag

To make the tag data more useful for search engine inquiries:

  • M/N: V-UBG35
  • P/N: 861228-0000
  • PID: CE64105

From lsusb:

Bus 001 Device 008: ID 046d:08d8 Logitech, Inc. QuickCam for Notebook Deluxe

With Raspbian on the RPi, 640×480 video tears and stutters, leaving 320×240 as the least-worst alternative:

mjpg_streamer -i "/usr/local/lib/input_uvc.so -r 320x240" -o "/usr/local/lib/output_http.so -w /usr/local/www"

The cameras don’t support YUYV at all and the video quality is mediocre, at best, but they do have a manual focus ring that lets you snuggle the camera right up against the subject.

This ball camera:

Logitech QuickCam Pro 5000 - on tripod

Logitech QuickCam Pro 5000 – on tripod

Has a tag:

Logitech QuickCam Pro 5000 - tag

Logitech QuickCam Pro 5000 – tag

Which reads:

  • M/N: V-UAX16
  • P/N: 861306-0000
  • PID: LZ715BQ

From lsusb:

Bus 001 Device 009: ID 046d:08ce Logitech, Inc. QuickCam Pro 5000

It requires YUYV at 320×240 (on the Pi) and nothing else works at all:

mjpg_streamer -i "/usr/local/lib/input_uvc.so -r 320x240 -y" -o "/usr/local/lib/output_http.so -w /usr/local/www"

It produces even worse video than the Notebook camera.

This HD 720p camera has C130 scrawled on the front in my handwriting:

Logitech HD Webcam C510 - front

Logitech HD Webcam C510 – front

And a tag:

Logitech HD Webcam C510 - tag

Logitech HD Webcam C510 – tag

Bearing this text:

  • M/N: V-U0016
  • P/N: 860-000261
  • PID: LZ114SF

The scrawled C130 doesn’t match up with what lsusb reports:

Bus 001 Device 010: ID 046d:081d Logitech, Inc. HD Webcam C510

It produces very nice results in many resolutions, using YUYV mode, although I think its native resolution is 1280×720 and that works perfectly on the Pi:

mjpg_streamer -i "/usr/local/lib/input_uvc.so -r 1280x720 -y" -o "/usr/local/lib/output_http.so -w /usr/local/www"

Video over USB is mysterious…

4 Comments

Raspberry Pi Setup Tweaks

Things to remember during Raspberry Pi setups…

You can do some of this through raspi-config.

The NOOBS setup configures the HDMI video parameters to work with the worst possible display, so edit the /boot/config.txt (per the Official Doc):

  • Comment out all the NOOBS auto-configuration entires at the bottom
  • Set disable_overscan=1

The highest mutually compatible setting for the U2711 monitor was 1920×1080@60Hz, which turned out to be CEA Mode 16 and was automagically selected as the monitor’s “native” mode. Disabling overscan lets the X session use the entire monitor screen, rather than being confined within the (huge) black overscan borders.

That requires a power off-on cycle to take effect. Shut down properly with sudo shutdown -H now or just sudo halt.

To set the default size of the lxterminal window so that it’s big enough to be useful, edit the Exec entry (down near the bottom) in /usr/share/raspi-ui-overrides/applications/lxterminal.desktop to read:

Exec=lxterminal --geometry=80x60

The Droid font family seems more readable than the default selection.

Create a user for yourself, just so SSH will eventually work the way it does for all the other boxes. The group list comes from the default pi user:

sudo adduser ed
sudo usermod -a -G pi,adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,netdev,input,spi,gpio ed

Regrettably, the default pi user has the same numeric ID as the one I use on all the other boxes, which leads to problems with file sharing permissions. I may need to swap numeric IDs to make this work out correctly.

To set a static IP, edit /etc/network/interfaces thusly:

#iface eth0 inet dhcp     <-- comment this out to stop DHCP

auto eth0
iface eth0 inet static
 address 192.168.1.9      <-- obviously, pick your own
 gateway 192.168.1.1
 netmask 255.255.255.0
 network 192.168.1.0
 broadcast 192.168.1.255

Change the hostname in /etc/hostname and /etc/hosts.

Set up SSH for public-key access on an unusual port by editing /etc/ssh/sshd_config:

  1. Port 12345 <— choose your own
  2. PermitRootLogin no
  3. PasswordAuthentication no

Create the ~/.sshd directory and put your own public key in it, which you can do from the remote system:

scp ~/.ssh/id_rsa.pub octopi-1:.ssh/authorized_keys

Twiddle ~/.ssh/config on the remote box to include the Pi and specify the unusual port:

Host octopi-1 thisone thatone anotherone
	ForwardX11	yes
	Port	12345   <--- pick your own
	User	ed

Using ssh-agent -t 4h helps relieve the tedium of typing your passphrase all the time. Then sudo service ssh restart on the pi will require you to use your key passphrase; it’s a Good Idea to remain signed in through Port 22 with the original authorization while you fiddle with this stuff, then sign out when it all works.

Update with the usual routine:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade    <-- for system-level update
sudo apt-get clean           <-- flushes /var/cache/apt/archives to save space

Leave a comment