Date:2011-10-03 22:53:50 (7 years 10 months ago)
Author:Werner Almesberger
Commit:70e88c565117dbcd210214d460c806a40acb970e
Message:m1/button/: milling process for making M1 buttons from a piece of wood

Files: m1/button/Makefile (1 diff)
m1/button/NOTES (1 diff)
m1/button/bgen (1 diff)

Change Details

m1/button/Makefile
1SPOOL=/home/moko/svn.openmoko.org/developers/werner/cncmap/spool/spool
2
3out.gp: bgen
4        ./bgen >out.gp || { rm -f out.gp; exit 1; }
5
6out.rml: out.gp
7        PATH=$PATH:/home/qi/cae-tools/gp2rml gp2rml 10 1 1 <$< >$@ || \
8            { rm -f $@; exit 1; }
9
10spool: out.rml
11        PORT=/dev/ttyUSB0 $(SPOOL) out.rml
12
13clean:
14        rm -f out.gp out.rml
m1/button/NOTES
1Nominal dimensions:
2
3pusher 1.1 mm x 12 mm
4shaft 3.7 mm x 8 mm
5
6Adjusted dimensions for the first try:
7
81.2 mm, 3.8 mm = 5 mm
9
10Piece thickness:
11
127.9 mm
13
14Final size:
15
16pusher ~0.8 mm x 10 mm
17
18http://downloads.qi-hardware.com/people/werner/tmp/m1butwood.jpg
m1/button/bgen
1#!/usr/bin/perl
2
3
4$pi = atan2(1, 1)*4;
5
6
7sub circ
8{
9    local ($r, $d) = @_;
10
11    for ($a = 0; $a <= 2*$pi; $a += 2*$pi/200) {
12        print $x0+$r*sin($a), " ", $y0+$r*cos($a), " ", $z0-$d, "\n";
13    }
14    print "\n";
15}
16
17
18$x0 = 123;
19$y0 = 19+18;
20$z0 = -39.5; # piece surface
21$z0 -= 7.9-5; # depth into piece
22
23
24$ds = 7.8; # shaft diameter
25$dp = 10; # pusher plate diameter
26
27$tr = 25.4/8/2;
28
29#&circ($ds/2-$tr, 0);
30&circ(1, 0);
31&circ(3, 0);
32&circ(0.2, 0);
33
34&circ($ds/2+$tr, 0);
35&circ($ds/2+$tr, 2);
36#&circ($ds/2+$tr, 3.8);
37#&circ($ds/2+$tr, 3.8); # twice, for cleaner cuts
38&circ($ds/2+$tr, 3.9);
39&circ($ds/2+$tr, 4.0); # twice, for cleaner cuts
40
41&circ($dp/2+$tr, 0);
42&circ($dp/2+$tr, 3);
43&circ($dp/2+$tr, 5+0.3);

Archive Download the corresponding diff file

Branches:
master



interactive