omdl  v0.9.5
OpenSCAD Mechanical Design Library
button.scad
Go to the documentation of this file.
1 //! Button cell batteries data table
2 /***************************************************************************//**
3  \file
4  \author Roy Allen Sutton
5  \date 2023
6 
7  \copyright
8 
9  This file is part of [omdl] (https://github.com/royasutton/omdl),
10  an OpenSCAD mechanical design library.
11 
12  The \em omdl is free software; you can redistribute it and/or modify
13  it under the terms of the [GNU Lesser General Public License]
14  (http://www.gnu.org/licenses/lgpl.html) as published by the Free
15  Software Foundation; either version 2.1 of the License, or (at
16  your option) any later version.
17 
18  The \em omdl is distributed in the hope that it will be useful,
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  Lesser General Public License for more details.
22 
23  You should have received a copy of the GNU Lesser General Public
24  License along with the \em omdl; if not, write to the Free Software
25  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26  02110-1301, USA; or see <http://www.gnu.org/licenses/>.
27 
28  \details
29 
30  \amu_define group_name (Button cell)
31  \amu_define group_brief (Button cell batteries data table.)
32 
33  \amu_include (include/amu/pgid_path_pstem_pg.amu)
34 *******************************************************************************/
35 
36 //----------------------------------------------------------------------------//
37 
38 /***************************************************************************//**
39  \amu_include (include/amu/group_in_parent_start.amu)
40  \amu_include (include/amu/includes_required.amu)
41 
42  \details
43 
44  \amu_define title (Button cell batteries)
45  \amu_define image_views (top right diag)
46  \amu_define image_size (sxga)
47  \amu_define notes_diagrams (See Wikipedia battery [sizes] for information.)
48  \amu_define notes_table (Identifier names are based on [IEC] standards.
49  Measurements in millimeters.)
50 
51  \amu_include (include/amu/scope_diagrams_3d_table.amu)
52 
53  [sizes]: https://en.wikipedia.org/wiki/List_of_battery_sizes
54  [IEC]: https://en.wikipedia.org/wiki/International_Electrotechnical_Commission
55 *******************************************************************************/
56 
57 //----------------------------------------------------------------------------//
58 
59 //! <map> Button cell batteries data table columns map.
60 //! \hideinitializer
62 [
63  ["id", "battery identifier"],
64  ["d", "battery diameter"],
65  ["h", "battery height"]
66 ];
67 
68 //! <table> Button cell batteries data table rows.
69 //! \hideinitializer
71 [
72  ["CR927", l_mm( 9.5), l_mm( 2.7)],
73  ["CR1025", l_mm(10 ), l_mm( 2.5)],
74  ["CR1130", l_mm(11.5), l_mm( 3.0)],
75  ["CR1216", l_mm(12.5), l_mm( 1.6)],
76  ["CR1220", l_mm(12.5), l_mm( 2.0)],
77  ["CR1225", l_mm(12.5), l_mm( 2.5)],
78  ["CR1616", l_mm(16 ), l_mm( 1.6)],
79  ["CR1620", l_mm(16 ), l_mm( 2.0)],
80  ["CR1632", l_mm(16 ), l_mm( 3.2)],
81  ["CR2012", l_mm(20 ), l_mm( 1.2)],
82  ["CR2016", l_mm(20 ), l_mm( 1.6)],
83  ["CR2020", l_mm(20 ), l_mm( 2 )],
84  ["CR2025", l_mm(20 ), l_mm( 2.5)],
85  ["CR2032", l_mm(20 ), l_mm( 3.2)],
86  ["CR2040", l_mm(20 ), l_mm( 4.0)],
87  ["CR2050", l_mm(20 ), l_mm( 5.0)],
88  ["CR2320", l_mm(23 ), l_mm( 2 )],
89  ["CR2325", l_mm(23 ), l_mm( 2.5)],
90  ["CR2330", l_mm(23 ), l_mm( 3.0)],
91  ["BR2335", l_mm(23 ), l_mm( 3.5)],
92  ["CR2354", l_mm(23 ), l_mm( 5.4)],
93  ["CR2412", l_mm(24.5), l_mm( 1.2)],
94  ["CR2430", l_mm(24.5), l_mm( 3.0)],
95  ["CR2450", l_mm(24.5), l_mm( 5.0)],
96  ["CR2477", l_mm(24.5), l_mm( 7.7)],
97  ["CR3032", l_mm(30.0), l_mm( 3.2)],
98  ["CR11108", l_mm(11.6), l_mm(10.8)]
99 ];
100 
101 //! @}
102 //! @}
103 
104 //----------------------------------------------------------------------------//
105 // openscad-amu auxiliary scripts
106 //----------------------------------------------------------------------------//
107 
108 /*
109 BEGIN_SCOPE diagram;
110  BEGIN_OPENSCAD;
111  include <omdl-base.scad>;
112  include <tools/align.scad>;
113  include <tools/operation_cs.scad>;
114  include <tools/drafting/draft-base.scad>;
115  include <database/component/battery/cylindrical.scad>;
116 
117  $fn=36;
118 
119  d = 50; dt = d*9/10;
120  h = 15; ht = h*1/10;
121 
122  cylinder(d=d, h=h-ht);
123  color("lightgray")
124  translate([0,0,h-ht])
125  cylinder(d=dt, h=ht);
126 
127  if ( !is_undef(__mfs__top) )
128  color("black")
129  draft_dim_line(p1=[-d/2,0], p2=[+d/2,0], d=d*6/10, e=d*4/10, es=2, t="d");
130 
131  if ( !is_undef(__mfs__right) )
132  color("black")
133  translate([0, d/2, h/2]) rotate([0,90])
134  draft_dim_line(p1=[-h/2,0], p2=[+h/2,0], d=d*3/10, e=h*4/10, es=2, t="h");
135  END_OPENSCAD;
136 
137  BEGIN_MFSCRIPT;
138  include --path "${INCLUDE_PATH}" {var_init,var_gen_png2eps}.mfs;
139  table_unset_all sizes;
140 
141  images name "sizes" types "sxga";
142  views name "views" views "top right diag";
143 
144  variables set_opts_combine "sizes views";
145  variables add_opts "--viewall --autocenter";
146 
147  include --path "${INCLUDE_PATH}" scr_make_mf.mfs;
148  END_MFSCRIPT;
149 END_SCOPE;
150 
151 BEGIN_SCOPE table;
152  BEGIN_OPENSCAD;
153  include <omdl-base.scad>;
154  include <database/component/battery/button.scad>;
155 
156  tr = dtr_battery_button;
157  tc = dtc_battery_button;
158 
159  n = true;
160  hi = true;
161  ht = true;
162 
163  table_write( tr, tc, number=n, heading_id=hi, heading_text=ht );
164  END_OPENSCAD;
165 
166  BEGIN_MFSCRIPT;
167  include --path "${INCLUDE_PATH}" {var_init,var_gen_term}.mfs;
168  include --path "${INCLUDE_PATH}" scr_make_mf.mfs;
169  END_MFSCRIPT;
170 END_SCOPE;
171 */
172 
173 //----------------------------------------------------------------------------//
174 // end of file
175 //----------------------------------------------------------------------------//
dtc_battery_button
Definition: button.scad:300
dtr_battery_button
Definition: button.scad:309
function l_mm(v)
Shorthand length conversion for millimeters.