Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.
The improved platform for the M2 runs at 30 V, but the RAMBo board specs limit the max HBP voltage to 24 V, presumably because the 15 A ATO fuse won’t clear a high-voltage, high amperage DC short. While setting up the SSR that drives the new platform, I looked up the specs for the PSMN7R0-60YS MOSFET controlling the bed heater and … it doesn’t have a logic level gate.
The rDS spec is an impressive 6.4 mΩ max, but that’s at VGS = 10 V. The 1 mA threshold voltage VGS(th) = 4 V max, which means there’s only 1 V of headroom to turn the transistor on enough to pass upwards of 10 A.
The typical ID vs. VGS curve (Fig 6) shows 20 A at maybe 4.2 V, but the typical RDSon curve (Fig 8) shows the resistance skyrocketing for VGS under maybe 4.8 V; sliding that curve a wee bit to the right would cause a Very Bad Thing to take place.
A 20 mΩ resistance dissipates 4.5 W at 15 A, which seems rather aggressive for the small PCB copper-pour heatsink on the RAMBo board. It’s a somewhat more bearable 2 W at 10 A, but I think that’s still too high. Of course, the typical dissipation will should be much lower…
A good engineering rule of thumb is to ignore the datasheet’s “Typical” column and design using the “Minimum” or “Maximum” columns, as appropriate. When you depend on typical specs, getting “the same part” from a different supplier can provide a real education in supply-chain management.
I suspect tolerance stacking works well enough that nearly all the MOSFETs on nearly all the RAMBo boards run cool enough to survive, but I’d rather see logic-level MOSFETs in Arduino circuits where the maximum gate voltage won’t ever get above 5 V.
This may not look like much, but it’s the first test of the p-MOSFET power switch that completely kills power to the Arduino Pro Mini board and the Hall Effect LED Blinky Light:
Power off – 30 mA load
The top trace is the base drive to the NPN transistor that holds the p-MOSFET on while the Arduino is running. When it’s time to shut off, the Arduino drops the base drive output, the MOSFET turns off, and the switched battery voltage in the bottom trace drops like a rock. The current is about 30 mA when the Arduino is running and immeasurably low when it’s off; the MOSFET spec says it’s less than 1 μA, which is fine with me.
The PCB has those components clustered in the upper left corner, with the Arduino Pro Mini perched on header pins to the right:
Hall LED PCB – power switch test
The test code is a crudely hacked version of the canonical Blink sketch that waits 5 s after it starts running, then pulls the plug:
// Modified from Arduino Blink example
// Drives external p-MOSFET power switch
// Ed Nisley - KE4ZNU - Sep 2013
int led = 13;
// HIGH to enable power supply
int PowerOn = 4;
// HIGH to light Status LED
int Status = 10;
unsigned long MillisThen;
void setup() {
pinMode(led, OUTPUT);
pinMode(PowerOn,OUTPUT);
digitalWrite(PowerOn,HIGH);
pinMode(Status,OUTPUT);
digitalWrite(Status,HIGH);
MillisThen = millis();
}
void loop() {
digitalWrite(led, HIGH);
delay(100);
digitalWrite(led, LOW);
delay(500);
if (((millis() - MillisThen) > 5000ul)) {
digitalWrite(Status,LOW);
delay(50);
digitalWrite(PowerOn,LOW);
digitalWrite(Status,HIGH);
}
}
It turns out that the Arduino runtime has a several-second delay after power comes up before the setup() routine starts running, so brief pulses from a vibration switch won’t last long enough to turn the thing on. That’s not a fatal flaw for now and, in fact, having to hold the power button in for a few seconds isn’t entirely a Bad Thing.
However, once the power turns on, a vibration switch could trigger an Arduino interrupt pin to reset a power-off timer. I’d be tempted to put the vibration switch in parallel with the button, with a pair of steering diodes that isolate the raw battery from the input pin.
This is, of course, a pure electronic implementation of a Useless Machine…
The brassboard PCB for the Hall effect blinky light is too bendy for the SMD parts to survive much debugging, particularly with all the wires hanging off the edges, so I whipped up a stiff mounting bracket that captures the whole thing, with a flange that fits in the work stand arms:
PCB Test Frame – solid model
I ran some self-tapping 4-40 hex-head screws into the holes while the plastic was still warm on the M2’s platform:
PCB stiffener with screws on M2 platform
Six screws seem excessive and I’ll probably wind up using just the middle two, but there’s no harm in having more holes and fittings than you really need.
The flange fits neatly into the board holder on the Electronics Workbench, above all the construction clutter:
PCB stiffener in board holder
The nice thing about having a 3D printer: when you need an object like this, a couple of hours later you have one!
The OpenSCAD source code, slightly improved based the results you see above:
// Test support frame for Hall Effect LED Blinky Light
// Ed Nisley KE4ZNU - Sept 2013
ClampFlange = true;
//- Extrusion parameters - must match reality!
ThreadThick = 0.25;
ThreadWidth = 0.40;
function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit);
Protrusion = 0.1;
HoleWindage = 0.2;
//- Screw sizes
inch = 25.4;
Tap4_40 = 0.089 * inch;
Clear4_40 = 0.110 * inch;
Head4_40 = 0.211 * inch;
Head4_40Thick = 0.065 * inch;
Nut4_40Dia = 0.228 * inch;
Nut4_40Thick = 0.086 * inch;
Washer4_40OD = 0.270 * inch;
Washer4_40ID = 0.123 * inch;
//- PCB sizes
PCBSize = [46.5,84.0,1.0];
PCBShelf = 2.0;
Clearance = 4*[ThreadWidth,ThreadWidth,0];
WallThick = IntegerMultiple(4.0,ThreadWidth);
FrameHeight = 5.0;
ScrewOffset = 0.0 + Clear4_40/2;
OAHeight = FrameHeight + Clearance[2] + PCBSize[2];
FlangeExtension = 3.0;
FlangeThick = IntegerMultiple(1.5,ThreadThick);
Flange = PCBSize
+ 2*[ScrewOffset,ScrewOffset,0]
+ 2*[Washer4_40OD,Washer4_40OD,0]
+ [2*FlangeExtension,2*FlangeExtension,(FlangeThick - PCBSize[2])]
;
echo("Flange: ",Flange);
NumSides = 4*5;
//- Adjust hole diameter to make the size come out right
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);
}
//- Put peg grid on build surface
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
ShowPegGrid();
difference() {
union() { // body block and screw bosses
translate([0,0,OAHeight/2])
color("LightBlue")
cube(PCBSize + Clearance + [2*WallThick,2*WallThick,FrameHeight],center=true);
for (x=[-1,1], y=[-1,0,1]) {
translate([x*(PCBSize[0]/2 + ScrewOffset),
y*(PCBSize[1]/2 + ScrewOffset),
0])
color("Orchid") cylinder(r=Washer4_40OD,h=OAHeight,$fn=NumSides);
}
if (ClampFlange)
translate([0,0,Flange[2]/2])
color("SeaGreen") cube(Flange,center=true);
}
for (x=[-1,1], y=[-1,0,1]) { // screw holes and washer recesses
translate([x*(PCBSize[0]/2 + ScrewOffset),
y*(PCBSize[1]/2 + ScrewOffset),
-Protrusion])
rotate((x-1)*90)
PolyCyl(Tap4_40,(OAHeight + 2*Protrusion));
translate([x*(PCBSize[0]/2 + ScrewOffset),
y*(PCBSize[1]/2 + ScrewOffset),
OAHeight - PCBSize[2]])
PolyCyl(1.2*Washer4_40OD,(PCBSize[2] + Protrusion),NumSides);
}
translate([0,0,OAHeight/2]) // through hole below PCB
cube(PCBSize - 2*[PCBShelf,PCBShelf,0] + [0,0,2*OAHeight],center=true);
translate([0,0,(OAHeight - (PCBSize[2] + Clearance[2])/2 + Protrusion/2)]) // PCB pocket on top
cube(PCBSize + Clearance + [0,0,Protrusion],center=true);
}
The big rectangle at the top will heatsink the main p-MOSFET power switch, which shouldn’t dissipate much power at all. The two lower rectangles heatsink the n-MOSFETs, although I think they may each require a stand-up metal tab to handle the dissipation during high-duty-cycle blinkiness.
The silver line around the edge is soldered copper foil tape connecting the top and bottom ground planes; a dozen or so additional Z wires will connect the planes at high current nodes. It’ll get a bunch of flying signal wires, too, because I’m not a fanatic gotta-embed-all-the-wires kind of guy on stuff like this.
The PCB is 30 mil FR4, which (once again, I make this mistake over and over again) seems a bit bendy for surface-mount parts; I must print a simple nest to stabilize the poor thing. Some of the drilled holes look white, because I hadn’t rinsed out the remains of the silver plating powder; the surfaces are a lot more silvery in person.
Before I etched the back side, I realized I’d made a classic layout blunder: the high-current return path from the center MOSFET flows around the Hall effect sensor near the center of the board. So I filled in the grid pour with a fat point black Sharpie to get more copper in that area:
Hall Effect Brassboard – added etch masking
I think it probably wouldn’t matter either way, but nothing exceeds like excess. FWIW, I use the grid pattern as a way to verify the end of the board etching: when all the holes in the ground pour come clear, all the traces are done, too.
The etched backside came out OK, although with a few etched squares sprinkled in the Sharpie masking:
Hall Effect Brassboard – bare back
The three leads for the Hall effect sensor are just to the right of the center, with the middle lead connected to the ground pour. Given the millivolt-level signals, this isn’t a good place for ground bounce…
It’s etched with ferric chloride, rubbed with a sponge, and took under ten minutes on each side. That’s less than the usual time, which suggests the PCB is plated with half-ounce copper (that’s 0.5 ounce / ft2), rather than the one-ounce copper on the other boards I’ve done recently; just one of the hazards of buying surplus PCB stock. Doesn’t really matter, as the peak currents will be under half an amp and now I know not to use this batch of raw board stock for high current circuits.
All in all, it looks good enough. Now, for some component soldering.
The 36 V 350 W power brick for the improved M2 HBP arrived and seems to work fine, apart from a distinct smell of hot electronics under load. Dialed back to 30.1 V at the terminals (to match the HBP spec) and with the HBP connected through the same length of 12 AWG wire as before, the supply draws 150 W from the AC line.
It draws 160 W at 31.7 V and stabilizes at about 100 °C. The heater resistance is 7.6 Ω before it has a chance to cool off, so the heater runs at 4.17 A and 132 W. The supply efficiency is 83% = 132/160, about what you’d expect. The fan runs intermittently with that load.
In order to dissipate 150 W in the panel at the same resistance, the voltage must be 33.5 V at 4.5 A. I’d want to install it in the M2 and make some measurements before jumping to any conclusions.
The SSR’s forward drop runs around 1.0 to 1.1 V at 4 A, which suggests a drain-source resistance near 0.25 Ω, rather more than you’d expect for a bare MOSFET, but probably about right for an up-armored device. Or it could just be a crap MOSFET inside there…
So I think the brick will wind up at about 35 V to make up for the SSR drop. The SSR will dissipate about 5 W and won’t need much heatsinking; just bolting it to an aluminum chassis may suffice.
I picked up five 12 V 40 W cartridge heaters from the usual eBay source for some extruder experiments and did a quick check to make sure they actually worked:
Cartridge heater test
The bench supply is good for 3 A, which isn’t quite enough to light them up all the way, but at 8 V they drew anywhere from 2.67 to 2.20 A, declining by about 0.1 A as they heated over the course of maybe 5 s, which is about as long as you want to run them outside of whatever they’re supposed to be heating.
Those dissipations are a bit lower than I expected; at 8 V you’d expect to see about 27 W = 2/3 * 40 W, not the 18 to 21 W I actually measured. Current & power don’t scale linearly, so I must gimmick up a larger block and make some better measurements when I get the LinuxCNC hardware set up.
The insulating tubes on the wires emerging from the cartridge, inside the main sheath, show the usual attention to detail I’ve come to know and love from eBay suppliers:
Cheap cartridge heater insulation
Ah, well, it keeps my toy budget under control…
There’s a story behind the dark vertical smudge just to the right of the cartridge. More on that in a bit.