Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.
Fancy new sewing machines can stop with the needle either up (so you can remove the fabric) or down (to nail it in place while you rotate it). This requires sensing the needle position, which prompted me to spend far too long contemplating all the mechanical gadgetry driven by the motor.
As nearly as I can tell, the crank counterweight behind the handwheel produces the most unambiguous position reports. Here’s what it looks like with the needle down:
Kenmore 158 – main shaft counterweight
As you’d expect, with the shaft rotated exactly 180° from that point, the needle is up.
The inviting space just above the shaft provides room for the bobbin winder that engages a knurled ring on the back of the handwheel, but the lower space seems to be available. The counterweight sits about halfway into the back of the handwheel, so the sensors must look at the frame side of the counterweight.
Two adjacent sensors could detect the edge of the counterweight, which would be enough to uniquely identify both positions. If they were spaced across the lower-left edge in that picture:
01 = trailing edge = bottom dead center = needle down (as shown)
00 = open air = needle rising
10 = leading edge = top dead center = needle up
11 = solid steel = needle falling
Either sensor gives you one pulse per handwheel revolution and the combination gives you a quadrature output of both position and direction. The top speed of 1000 RPM produces 17 Hz square waves.
An additional pulse/rev sensor on the motor shaft would give better control over the motor speed, as the handwheel runs at 1/10 the motor speed with belt slip built right in. Figure 10 kRPM → 170 Hz pulses.
From a cold start, you know the shaft angle to within a bit under 180°. If the motor can turn in both directions (as would a stepper or DC motor), you can always move the needle upward. If it turns only forward (as does the AC motor) and the needle is falling, then you probably don’t want to move the motor until you get a button push indicating that all fingers are clear.
A pair of Hall effect sensors might suffice to detect that big hunk of steel, perhaps with a pair of teeny magnets glued to the face or a magnetic circuit closed by the counterweight.
Huh. Who’d’a thunk it? That’s just too good to pass up…
Although you wouldn’t use PLA for the real motor mount, this was easy:
Drive Motor Mount – solid model
And the whole affair fits pretty much like you’d expect:
Kenmore 158 – NEMA 23 stepper – on adapter
The NEMA 23 motor doesn’t have the same end profile as the AC motor and the adapter plate gets in the way of the pulley, but flipping the pulley end-for-end perfectly aligned the belt.
For whatever it’s worth, here’s how I removed the pressed-on gear from the shaft:
NEMA 23 Stepper – removing gear
I’m pretty sure I have a little gear puller somewhere, but it’s not where I expected to find it, which means it could be anywhere.
Much to my astonishment, the shafts on both motors are exactly 1/4″ inch. I filed a flat on the shaft to avoid having the setscrew goober the poor thing.
A stepper isn’t the right hammer for this job, because it can’t possibly reach 8000 rpm, but it’ll be good enough to explore the parameter space and weed out the truly stupid mistakes. A brushless DC motor from halfway around the planet would fit in the same spot.
The OpenSCAD source code:
// NEMA 23 Stepper Mounting Plate
// Ed Nisley - KE4ZNU - June 2014
Layout = "Build"; // Build Show
//- Extrusion parameters must match reality!
// Print with 4 shells and 3 solid layers
ThreadThick = 0.20;
ThreadWidth = 0.40;
HoleWindage = 0.2; // extra clearance
Protrusion = 0.1; // make holes end cleanly
AlignPinOD = 1.70; // assembly alignment pins: filament dia
inch = 25.4;
function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit);
//----------------------
// Dimensions
// Origin at bottom front corner of plate as mounted on machine
// motor mounted on rear surface, so recess is on that side
PlateThick = 4.0; // overall plate thickness
SlotOffset = [10.0,13.0,0]; // center nearest origin, motor in X+,Y+ direction
SlotSize = [8.0,25.0]; // diameter of mounting screw , overall end-to-end length
CutoutOffset = [0.0,40.0,0]; // cutout around machine casting
CutoutSize = [18.0,18.0];
MotorBase = 58.0; // square base plate side
MotorHoleOC = 47.2; // hole center-to-center spacing
MotorHoleOffset = MotorHoleOC/2;
MotorHoleDia = 5.0;
MotorBaseCornerRadius = (MotorBase - MotorHoleOC)/2;
FlangeWidth = 20.0; // mounting flange
MotorCenter = [(FlangeWidth + MotorBase/2),(MotorBase/2),0]; // XY of shaft centerline
MotorShaftDia = 7.0; // allow some clearance
HubDia = 38.5; // allow some clearance
HubHeight = 1.8;
//----------------------
// 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) {
RangeX = floor(100 / Space);
RangeY = floor(125 / Space);
for (x=[-RangeX:RangeX])
for (y=[-RangeY:RangeY])
translate([x*Space,y*Space,Size/2])
%cube(Size,center=true);
}
//----------------------
// Build it!
module BasePlate() {
difference() {
// cube([(MotorCenter[0] + MotorBase/2),MotorBase,PlateThick],center=false);
linear_extrude(height = PlateThick) {
hull() {
translate([MotorBaseCornerRadius,MotorBaseCornerRadius])
circle(r=MotorBaseCornerRadius);
translate([MotorBaseCornerRadius,MotorBase - MotorBaseCornerRadius])
circle(r=MotorBaseCornerRadius);
translate([FlangeWidth + MotorBase - MotorBaseCornerRadius,MotorBase - MotorBaseCornerRadius])
circle(r=MotorBaseCornerRadius);
translate([FlangeWidth + MotorBase - MotorBaseCornerRadius,MotorBaseCornerRadius])
circle(r=MotorBaseCornerRadius);
}
}
translate(MotorCenter - [0,0,Protrusion]) {
rotate(180/8)
PolyCyl(MotorShaftDia,(PlateThick + 2*Protrusion),8); // shaft hole
PolyCyl(HubDia,(HubHeight + Protrusion)); // hub recess
for (x=[-1,1] , y=[-1,1]) {
translate([x*MotorHoleOffset,y*MotorHoleOffset,0])
rotate(180/8)
PolyCyl(MotorHoleDia,(PlateThick + 2*Protrusion),8);
}
}
translate(SlotOffset - [0,0,Protrusion]) { // adjustment slot
linear_extrude(height = (PlateThick + 2*Protrusion))
hull() {
circle(d=SlotSize[0]);
translate([0,(SlotSize[1] - SlotSize[0])])
circle(d=SlotSize[0]);
}
}
translate(CutoutOffset - [Protrusion,0,Protrusion])
linear_extrude(height = (PlateThick + 2*Protrusion))
square(CutoutSize + [Protrusion,Protrusion]);
}
}
ShowPegGrid();
if (Layout == "Show") {
BasePlate();
}
if (Layout == "Build") {
translate([-(SlotOffset[0] + MotorBase/2),MotorBase/2,PlateThick])
rotate([180,0,0])
BasePlate();
}
The Sony HDR-AS30V camera has a USB Micro-B jack. One might think all three of these cables / adapters should work:
USB Micro-B adapters
But no:
The blocky Mini-to-Micro adapter on the top has no data lines
The Mini-to-Micro adapter cable works
The lower cable produces dependable disconnects
There is, of course, no way to determine any of that, except by trying each one to see what happens; the product descriptions diverge from the truth in myriad ways.
The camera came with a Micro-B cable that undoubtedly worked, but you try keeping track of one particular USB cable amid all the others.
With the platform and extruder starting at the 19.5 °C = 67 °F Basement Laboratory ambient …
The extruder takes 1 minute to reach 175 °C, overshoots to about 180 °C, crosses 175 °C going downward at 1:30, then gets up to 174 °C again at 3:15. I ran a PID tuning session quite a while ago with inconclusive results. Reducing the initial overshoot would probably increase the time-to-get-ready, with no net improvement.
The platform, which isn’t the stock Makergear hardware, requires 3:30 to reach 69 °C, just under the 70 °C target, at which point it’s ready to start. There’s no insulation under the PCB-trace heater, but some previous tinkering implies that running bare doesn’t make much difference, particularly with a fan blowing on the top surface of the glass.
Remember that’s with an outboard SSR to unload the RAMBo’s MOSFET.
By and large, the M2 is ready to print in under 5 minutes from a standing start, which is just about enough time to spritz hair spray on the platform, load the G-Code into Pronterface, and so forth and so on.
Last week I gave a class at Squidwrench that helped bootstrap folks from new-to-Arduino to won’t-blow-it-up, showing how the I/O pins work in digital and analog mode with a bit of hands-on experimentation:
Potentiometer – analog input
We also covered some setup, how the whole compiler thing works, and suchlike.
The parts kit contains a 10 kΩ pot (with detents!), a green LED (with resistor!), and a jumper that serves as both a switch and a short antenna for an input without a pullup. They’re all terminated in header pins with heatstink tubing for strain relief.
The ZIP file with all the source code (ArduinoIOIntro-2014-06.zip.odt) masquerades as an OpenDocument text file, because WordPress prohibits ZIP files. Just rename it to remove the ODT suffix, unzip it, and there you are. It also includes the PDF, because none of the Arduino files have any comments at all…
The improved platform was designed for a 30 V supply that would run it at about 150 W, which took slightly less than forever to reach operating temperature.
With the 36 V supply set to 38.6 V, the platform drew 6.2 A at room temperature, which worked out to 6.2 Ω and 240 W. It was a tad pokey getting up to temperature
At 40 V, the platform starts at 6.3 A / 6.3 Ω / 250 W from a bit over room temperature and drops to 5.8 A / 6.9 Ω / 232 W at 70 °C.
At about 250 W, the platform takes about three times longer to reach operating temperature than the extruder, but it doesn’t require calling down to the engine room for more coal before maneuvering. I must run some numbers on it, now that I have a power supply with a useful range.
There’s obviously an upper limit to the peak power the PCB traces under the glass can handle, but it runs at the same average power (to produce the same average temperature) and, at least so far, hasn’t shown any signs of distress. The few additional watts at 40 V won’t make any difference.
Note that you must use an external DC-to-DC solid state relay, because the Rambo controller board can’t handle anything over 24 VDC and high current loads tend to melt its Phoenix-style connectors. When you add the SSR, replace the HBP connectors with Anderson Powerpoles, use fat wires, and be done with it.
M2 HBP SSR Wiring
The M2’s Marlin firmware uses bang-bang control and tends to overshoot the setpoint; I’m not sure a few degrees makes all that much difference, particularly because it’s not measuring the temperature at the top of the glass plate.
According to its Service Tag, this Dimension 2300 came off the line in late November 2002. All of the other caps on the board seemed OK, so apparently the plague affected just this lot of Hermei 470 µF 6.3 V capacitors.
Or, hey, they’re not supposed to last a dozen years and this is perfectly normal …