Saturday, October 30, 2010

Componentize

The real cost of 1-off engineering is the effort to design it. Most of the components are only about 4x the price they would be if bought in maximum bulk.

As a result, anything that can be designed once but fabricated and used many times is a big win. The rifle's many accelerating magnets is a perfect situation to exploit in this way. Each magnet will have it's own control circuit and it's own capacitor. I'll design a circuit once. I'll make 12 of them.

Everything mounts on a meter long, aluminium, square tube. I've spaced the accelerator magnets out with 6cm between them and I'll drill the bar accordingly. Each component will need to have it's own bracket to hold it in place and for this I'm intending to use a 3d-printer that's scheduled to arrive in a few weeks.

In the meantime, there's plenty of time to design the parts I'll be asking the machine to build. For this, I've used OpenSCAD. It's essentially a language for writing objects. This was my first time at writing actual objects.

In case you've never used such a product, it's essentially done adding or removing shapes. I started with the intention of making parts by a combination of subparts. So if there was a half cylinder that would hold the magnet and then a rectangular chunk that would hold it to the aluminium bar, I'd make each of the independantly and then join them. This turned out to have a lot of complexity in exactly how they were joined. It's very easy to end up with one part sticking out of the inside of the other in an unintended way.

Instead, I ended up making an object with a series of added shapes and a series of removed shapes with very minimual heiarchy.

As you can see from the code below, it was only about half way through that I also chose to start using variables instead of hard coding the sizes. (For whatever reason it cleared out my tabbing.)

//Coil

//85mm long

//29mm wide (14.5 rad)

//Cap

//50.5mm wide

//92.6mm long

//Bar

//19.4mm wide

//8mm hole

//10mm from hole center to bar top

//Circuits

//45mm Outer range

//35mm inner range (not w diode)

//20mm high (w diode sticking out)

//LittleBolt

//Nut: 9.35mm

//Bolt: 4.65mm

//Head: 8.98mm

//Thread lenth: 15mm

//BigBolt

//Bolt:12.58mm

//Threads: 30mm

coilRad = 15;

coilLength = 20;

coilWall = 5;

capRad = 26;

boltRad = 4.5;

lilBoltRad = 2.5;

circuitOuterRange = 45;

circuitInnerRange = 35;

circuitHeight = 20;

circuitBoardWidth = 3;

circuitWidth = 3;

circuitBaseWidth=14;

circuitBoltSpacing = 10;

module circuitHolder()

{

difference()

{

union() //added

{

cube(size=[circuitWidth*2+circuitBoardWidth,circuitOuterRange+2*circuitWidth,circuitHeight], center=true);

translate([0,0,-circuitHeight/2-1])

cube(size=[circuitBaseWidth,circuitOuterRange+2*circuitWidth,circuitWidth],center=true);

}

union() //removed

{

translate([0,0,1])

cube(size=[circuitWidth*4+circuitBoardWidth, circuitInnerRange, circuitHeight+2], center=true);

translate([0,0,1])

cube(size=[circuitBoardWidth, circuitOuterRange, circuitHeight+2], center=true);

translate([0,circuitBoltSpacing/2,0])

cylinder(h=circuitHeight+2*circuitWidth+2,r=lilBoltRad,center=true);

translate([0,-circuitBoltSpacing/2,0])

cylinder(h=circuitHeight+2*circuitWidth+2,r=lilBoltRad,center=true);

}

}

}

module coilCradleTop()

{

//add parts, then remove parts

difference()

{

union() //added parts

{

cylinder(h = coilLength, r=(coilRad+coilWall), center = true); //Outer cylinder

translate([coilRad+circuitBaseWidth/2+coilWall-1,0,0]) //Circuit holder

cube(size=[circuitBaseWidth+2,circuitWidth*2,coilLength], center=true);

translate([-coilRad-circuitBaseWidth/2-coilWall+1,0,0]) //Circuit holder

cube(size=[circuitBaseWidth+2,circuitWidth*2,coilLength], center=true);

}

union() //removed parts

{

cylinder(h = coilLength+2, r=coilRad, center = true); //inner cylinder

translate([0,36/2,0]) //Cube to remove top of cylinder

cube(size=[100,36,100], center=true);

translate([coilRad+circuitBaseWidth/2+coilWall-1,0,0])

{

translate([0,0,circuitBoltSpacing/2])

rotate([90,0,00])

cylinder(h=100,r=lilBoltRad,center=true);

translate([0,0,-circuitBoltSpacing/2])

rotate([90,0,0])

cylinder(h=100,r=lilBoltRad,center=true);

}

translate([-coilRad-circuitBaseWidth/2-coilWall+1,0,0])

{

translate([0,0,circuitBoltSpacing/2])

rotate([90,0,00])

cylinder(h=100,r=lilBoltRad,center=true);

translate([0,0,-circuitBoltSpacing/2])

rotate([90,0,0])

cylinder(h=100,r=lilBoltRad,center=true);

}

}

}

}

module coilCradle2()

{

//add parts, then remove parts

difference()

{

union() //added parts

{

translate([0,-70/2-10,0])

cube(size=[30,70,20],center=true); //Main block,

cylinder(h = coilLength, r1 = (coilRad+coilWall), r2 = 20, center = true); //Outer cylinder

translate([coilRad+circuitBaseWidth/2+coilWall-1,0,0]) //Circuit holder

cube(size=[circuitBaseWidth+2,circuitWidth*2,coilLength], center=true);

translate([-coilRad-circuitBaseWidth/2-coilWall+1,0,0]) //Circuit holder

cube(size=[circuitBaseWidth+2,circuitWidth*2,coilLength], center=true);

}

union() //removed parts

{

cylinder(h = coilLength+2, r=coilRad, center = true); //inner cylinder

translate([0,36/2,0]) //Cube to remove top of cylinder

cube(size=[100,36,100], center=true);

translate([0,-70,0])

cube(size=[20,20,100],center=true);

translate([0,-70,0]) //Lower bolt

rotate([0,90,0])

cylinder(h=80,r1=boltRad,r2=boltRad, center=true);

translate([0,-40,0]) //Upper bolt

rotate([0,90,0])

cylinder(h=80,r1=boltRad,r2=boltRad, center=true);

translate([0,-40,0]) //removed main section (for weight)

cube(size=[20,30,20],center=true);

translate([coilRad+circuitBaseWidth/2+coilWall-1,0,0])

{

translate([0,0,circuitBoltSpacing/2])

rotate([90,0,00])

cylinder(h=100,r=lilBoltRad,center=true);

translate([0,0,-circuitBoltSpacing/2])

rotate([90,0,0])

cylinder(h=100,r=lilBoltRad,center=true);

}

translate([-coilRad-circuitBaseWidth/2-coilWall+1,0,0])

{

translate([0,0,circuitBoltSpacing/2])

rotate([90,0,00])

cylinder(h=100,r=lilBoltRad,center=true);

translate([0,0,-circuitBoltSpacing/2])

rotate([90,0,0])

cylinder(h=100,r=lilBoltRad,center=true);

}

}

}

}

module capHolder()

{

difference()

{

union() //Added parts

{

cylinder(h=70, r1=(52+10)/2, r2=(52+10)/2,center=true); //Outer cup

translate([0,(52+10)/2+20/2-4,0]) //Main bolt holder

cube(size=[30,30,70],center=true);

}

union() //Removed parts

{

translate([0,0,5])

cylinder(h = 70, r1=52/2, r2 = 52/2, center=true); //Inner cup

translate([0,0,-15])

{

translate([0,(52+10)/2+20/2-2,0])

cube(size=[20,15,100],center=true);

translate([0,60,10])

rotate([90,0,0])

cylinder(h=40,r1=boltRad,r2=boltRad, center=true);

translate([0,60,40])

rotate([90,0,0])

cylinder(h=40,r1=boltRad,r2=boltRad, center=true);

translate([0,(52+10)/2+20/2+7,50])

cube(size=[boltRad*2,10,20],center=true);

translate([0,(52+10)/2+20/2+7,-30])

cube(size=[boltRad*2,10,80],center=true);

}

//Removed part for weight reasons

translate([0,0,15])

{

rotate([0,90,33])

cylinder(h=100,r=10,center=true);

rotate([0,90,-33])

cylinder(h=100,r=10,center=true);

rotate([0,90,90])

translate([0,0,-50])

cylinder(h=100,r=10,center=true);

}

//Removed part for weight reasons

translate([0,0,-15])

{

rotate([0,90,33])

cylinder(h=100,r=10,center=true);

rotate([0,90,-33])

cylinder(h=100,r=10,center=true);

rotate([0,90,90])

translate([0,0,-50])

cylinder(h=100,r=10,center=true);

}

}

}

}

translate([20+14/2,-25,0])

rotate([90,0,0])

circuitHolder();

translate([-70,70,0])

rotate([90,90,0])

capHolder();

translate([0,5,0])

rotate([180,0,0])

coilCradle2();

translate([0,-5,0])

coilCradleTop();

The beginning of the real deal

The goal, of course, is building an electromagnetic rifle.

A long series of electromagnets will sequentially pull and therefore accelerate a steel projectile down the barrel.

The First image is the making of the barrel. Each electromagnet is several layers of wire with a ferrite shield around them. Each layer must be laid and super glued in place before the next one can be done. Since there are 12 gates and 5 layers each we're talking 60 wrapping sessions.

The size of those magnets has mostly been determined experimentally (some calculations before hand). Their most important attribute is that they're designed to fire a respectable size cap (2mF) in about 100us. They'll need to fire quick if they're to pull a fast moving bullet.

Friday, October 29, 2010

Padding things: Does not scale

http://www.dailymail.co.uk/news/article-525785/Brick-Lane-Britains-Safe-Text-street-padded-lampposts-prevent-mobile-phone-injuries.html

The subject of this article padding lampposts to prevent injuries by people walking into them. From an engineering standpoint, this does not scale. Padding only some items will not negate people's need to consistently watch where they're going. Padding all the items will be prohibitively difficult given pedestrians and cars travel in the same area and cars will require significant volumes of padding to make them pedestrian friendly.

The solution does not scale.

Thursday, October 28, 2010