Ben Counterweight
Sign in or create your account | Project List | Help
Ben Counterweight Commit Details
Date: | 2010-08-05 19:58:16 (13 years 7 months ago) |
---|---|
Author: | Werner Almesberger |
Commit: | fcd83689fa89570f5d096be895fb975dc47a6f6e |
Message: | Added a cover sheet to separate counterweight and main PCB. - README: describe mechanical stacking and the function of the various protective layers - cvr.py: model of the cover sheet, with gnuplot and HeeksCAD output |
Files: |
README (1 diff) cvr.py (1 diff) |
Change Details
README | ||
---|---|---|
1 | Mechanical stacking | |
2 | ------------------- | |
3 | ||
4 | From the bottom to the top, we have the following elements: | |
5 | ||
6 | - Ben case, bottom shell | |
7 | - a few drops of glue or silicone, to hold the counterweight in place | |
8 | - the counterweight, covered by protective paint | |
9 | - a few drops of glue or silicone, to keep the cover sheet in place | |
10 | - a cover sheet of thin hard plastic, e.g., the type of plastic film used to | |
11 | make transparencies | |
12 | - isolating tape, applied to tall components of the Ben's main PCB | |
13 | - the Ben's main PCB | |
14 | ||
15 | ||
16 | Protection | |
17 | ---------- | |
18 | ||
19 | The counterweight is covered by one or more layers of paint, to prevent | |
20 | direct skin contact with the lead during handling. The paint may also | |
21 | offer some amount of protection against electrical contact. | |
22 | ||
23 | The counterweight is covered by a layer of hard plastic that isolates | |
24 | from electrical contact and that also resists being punctured by pointy | |
25 | components or solder joints of the main PCB. | |
26 | ||
27 | Finally, all elements on the main PCB that are unusually tall are taped | |
28 | over, to further reduce the risk of them working their way into the | |
29 | counterweight. Right now, the only component where problems are | |
30 | considered likely is the buzzer. |
cvr.py | ||
---|---|---|
1 | #!/usr/bin/python | |
2 | ||
3 | # | |
4 | # gnuplot the outline | |
5 | # | |
6 | ||
7 | def outline_gnuplot(points): | |
8 | x0 = points[0] | |
9 | y0 = points[1] | |
10 | while len(points): | |
11 | print points.pop(0), points.pop(0) | |
12 | print x0, y0 | |
13 | ||
14 | ||
15 | # | |
16 | # make a HeeksCAD sketch of the outline | |
17 | # | |
18 | ||
19 | ||
20 | def cad_line(sk, x0, y0, x1, y1): | |
21 | cad.line(x0, y0, x1, y1) | |
22 | cad.add(sk, cad.getlastobj()) | |
23 | ||
24 | ||
25 | def outline_cad(points): | |
26 | cad.sketch() | |
27 | sk = cad.getlastobj() | |
28 | ||
29 | x0 = points.pop(0) | |
30 | y0 = points.pop(0) | |
31 | last_x = x0 | |
32 | last_y = y0 | |
33 | while len(points): | |
34 | x = points.pop(0) | |
35 | y = points.pop(0) | |
36 | cad_line(sk, last_x, last_y, x, y) | |
37 | last_x = x | |
38 | last_y = y | |
39 | cad_line(sk, last_x, last_y, x0, y0) | |
40 | ||
41 | cad.reorder(sk) | |
42 | return sk | |
43 | ||
44 | ||
45 | def closed_outline(*args): | |
46 | do(list(args)) | |
47 | ||
48 | ||
49 | # | |
50 | # Make the cover sheet 2 mm larger than the counterweight on all sides. We need | |
51 | # the following exceptions to avoid mechanical interference: | |
52 | # | |
53 | # - at the power connector, keep the ymin edge flush with the counterweight | |
54 | # - follow the counterweight's J-shaped space for the reset button, with the | |
55 | # border reduced from 2 mm to 0.5 mm | |
56 | # - next to the long side of the battery, follow the counterweight's edge | |
57 | # - also follow the counterweight's bay for the battery cover's tongue and | |
58 | # make it even 0.5 mm larger, anticipating imperfect registration | |
59 | # | |
60 | # Also, as a simplification, we don't follow steps and recesses in these cases: | |
61 | # | |
62 | # - 1 mm steps on the left and right side. Just use the larger size. | |
63 | # - the whole sponge area. Just put the cover on top of the sponge. | |
64 | # - all recesses near the batter, except the one for the lid's central tongue | |
65 | # | |
66 | # The above simplifications are possible, because, being on top of the | |
67 | # counterweight, we've already cleared the obstacles these steps and recesses | |
68 | # are designed to avoid. | |
69 | # | |
70 | ||
71 | # | |
72 | # Note: to visualize the shape defined below, plot the counterweight in 2D with | |
73 | # gnuplot and follow the shape it the mouse. | |
74 | # | |
75 | # To visualize the result, do this: | |
76 | # | |
77 | # ./cw.py >cw.gnuplot | |
78 | # ./cvr.py >cvr.gnuplot | |
79 | # gnuplot | |
80 | # gnuplot> set style data lines | |
81 | # gnuplot> plot "cw.gnuplot", "cvr.gnuplot" | |
82 | # | |
83 | ||
84 | ||
85 | def outline(): | |
86 | closed_outline( | |
87 | # counterweight corners: (16, 46) and (15, 60) | |
88 | 13, 46, | |
89 | # (15, 69.5) | |
90 | 13, 71.5, | |
91 | # (82.5, 65), (82.5, 64), (89.5, 64), (89.5, 69) | |
92 | 83, 71.5, | |
93 | 83, 64.5, 89, 64.5, 89, 71, | |
94 | # (100, 69) | |
95 | 102, 71, | |
96 | # (99.5, 46) | |
97 | 102, 44, | |
98 | # (88, 46) | |
99 | 86, 44, | |
100 | # (88, 55), (82, 50) | |
101 | 86, 50, | |
102 | # (59.5, 55), (59.5, 56.5), (52.5, 56.5), (52.5, 55) | |
103 | 60, 50, | |
104 | 60, 57, 52, 57, 52, 50, | |
105 | # (24, 55) | |
106 | 26, 50, | |
107 | # (24, 46) | |
108 | 26, 46) | |
109 | ||
110 | ||
111 | if __name__ == "__main__": | |
112 | do = outline_gnuplot | |
113 | else: | |
114 | import HeeksPython as cad | |
115 | do = outline_cad | |
116 | ||
117 | outline() |
Branches:
master