omdl
v1.0
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/doxyg_init_pd_gds_ipg.amu)
34
*******************************************************************************/
35
36
//----------------------------------------------------------------------------//
37
38
/***************************************************************************/
/**
39
\amu_include (include/amu/doxyg_define_in_parent_open.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
61
dtc_battery_button
=
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
70
dtr_battery_button
=
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 <transforms/base_cs.scad>;
113
include <tools/2d/drafting/draft-base.scad>;
114
include <database/component/battery/cylindrical.scad>;
115
116
$fn=36;
117
118
d = 50; dt = d*9/10;
119
h = 15; ht = h*1/10;
120
121
cylinder(d=d, h=h-ht);
122
color("lightgray")
123
translate([0,0,h-ht])
124
cylinder(d=dt, h=ht);
125
126
if ( !is_undef(__mfs__top) )
127
color("black")
128
draft_dim_line(p1=[-d/2,0], p2=[+d/2,0], d=d*6/10, e=d*4/10, es=2, t="d");
129
130
if ( !is_undef(__mfs__right) )
131
color("black")
132
translate([0, d/2, h/2]) rotate([0,90])
133
draft_dim_line(p1=[-h/2,0], p2=[+h/2,0], d=d*3/10, e=h*4/10, es=2, t="h");
134
END_OPENSCAD;
135
136
BEGIN_MFSCRIPT;
137
include --path "${INCLUDE_PATH}" {var_init,var_gen_png2eps}.mfs;
138
table_unset_all sizes;
139
140
images name "sizes" types "sxga";
141
views name "views" views "top right diag";
142
143
variables set_opts_combine "sizes views";
144
variables add_opts "--viewall --autocenter";
145
146
include --path "${INCLUDE_PATH}" scr_make_mf.mfs;
147
END_MFSCRIPT;
148
END_SCOPE;
149
150
BEGIN_SCOPE table;
151
BEGIN_OPENSCAD;
152
include <omdl-base.scad>;
153
include <database/component/battery/button.scad>;
154
155
tr = dtr_battery_button;
156
tc = dtc_battery_button;
157
158
n = true;
159
hi = true;
160
ht = true;
161
162
table_write( tr, tc, number=n, heading_id=hi, heading_text=ht );
163
END_OPENSCAD;
164
165
BEGIN_MFSCRIPT;
166
include --path "${INCLUDE_PATH}" {var_init,var_gen_term}.mfs;
167
include --path "${INCLUDE_PATH}" scr_make_mf.mfs;
168
END_MFSCRIPT;
169
END_SCOPE;
170
*/
171
172
//----------------------------------------------------------------------------//
173
// end of file
174
//----------------------------------------------------------------------------//
dtc_battery_button
dtc_battery_button
Definition:
button.scad:300
dtr_battery_button
dtr_battery_button
Definition:
button.scad:309
l_mm
function l_mm(v, d=1)
Shorthand length conversion for millimeters.
database
component
battery
button.scad
Generated on Tue Mar 24 2026 18:54:46 for omdl by
doxygen
with
openscad-amu