Sign in with STEVE

steve/distance-measuring-sensor

Sharp GP2Y0A41SK0F distance measuring sensor unit (4 to 30 cm, analog output) with mounting ears and 3-pin connector.

v1.0.0 Latest STEVE MIT 4
Isometric
part.py 92 lines · Python · STEVE runtime · checked
Download
1"""Sharp GP2Y0A41SK0F distance measuring sensor unit (4 to 30 cm, analog output): a lens case with two mounting ears, a light
2emitter and a light detector lens on its front, and a small board with a 3-pin connector hanging below. The ears' back (the
3mounting face) is the XY plane and the unit looks toward +Z. The mounting holes lie on the X axis, centred on the origin, the
4emitter is on the -X side and the connector on the -Y side. The case, each lens, the board and the connector housing are
5separate solids. Dimensions from Sharp's data sheet; see the README."""
6from steve import Model
7
8part_number = "GP2Y0A41SK0F" # Sharp part number
9
10# Sharp GP2Y0A41SK0F data sheet, Sheet No. OP13008EN, page 2, Outline (drawing CY13036j02A, "GP2Y0A41SK0F Outline Dimensions",
11# unit mm, unspecified tolerance +/-0.3, dimensions in parenthesis for reference):
12# mounting holes 37 apart, dia. 3.2, in ears R3.75, 1.5 thick ("2-1.5"); case 29.5 wide and 13 high, 13.5 deep overall from
13# the ears' back to the lens blocks' front; the front steps: 6.3 deep in all, 8.4 high, of which the last 2 are the lens
14# blocks, 7.2 high; lens blocks 7.5 (emitter) and 16.3 (detector) wide with 4.15 between them; emitter lens centre 4.5 from
15# the case's side and 3.75 from its block's outer end, detector lens centre 19.7 +/-0.1 from the emitter's; connector part
16# 10.1 wide, centred 14.75 from the case's side; 18.9 (+0.5/-0.3) from the case's top to the connector's and board's lower
17# end; board (PWB) 1.2 thick, its back (3.3) in front of the case's back.
18PARTS = {
19 "GP2Y0A41SK0F": {
20 "hole_pitch": 37.0, "hole_d": 3.2, "ear_r": 3.75, "ear_t": 1.5,
21 "case_w": 29.5, "case_h": 13.0, "depth": 13.5,
22 "front": 6.3, "front_h": 8.4, "block": 2.0, "block_h": 7.2,
23 "emitter_block": 7.5, "gap": 4.15, "detector_block": 16.3,
24 "emitter_x": 4.5, "emitter_in": 3.75, "lens_pitch": 19.7,
25 "board_w": 10.1, "board_x": 14.75, "overall_h": 18.9, "board_t": 1.2, "board_back": 3.3,
26 },
27}
28# Proportions, for looks (the drawing shows these but doesn't dimension them; README): the lenses' diameters as they show in
29# the front view and the depth they are shown at, and the connector housing's width and depth in front of the board.
30PROPORTIONS = {"GP2Y0A41SK0F": {"emitter_lens": 4.9, "detector_lens": 4.5, "lens_t": 1.0, "connector_w": 7.9, "connector_d": 4.8}}
31
32if part_number not in PARTS:
33 raise ValueError(f"no part number {part_number!r}: {', '.join(PARTS)}")
34D = PARTS[part_number]
35P = PROPORTIONS[part_number]
36W, H, depth = D["case_w"], D["case_h"], D["depth"]
37case_d = depth - D["front"] # the 13 high part of the case, from the mounting face
38step_d = D["front"] - D["block"] # the 8.4 high step in front of it
39left = -W / 2 # the case's side on the emitter's end
40
41model = Model()
42model.box("case", W, H, case_d, at=(0, 0, case_d / 2), op="new", body="case_body", name="Lens case")
43model.box("step", W, D["front_h"], step_d, at=(0, 0, case_d + step_d / 2), op="join", body="case_body", name="Front step")
44# The lens blocks: the emitter's starts 4.5 - 3.75 from the case's side, the detector's follows after the gap.
45x0 = left + D["emitter_x"] - D["emitter_in"]
46x1 = x0 + D["emitter_block"] + D["gap"]
47zb = depth - D["block"] / 2
48model.box("emitter_block", D["emitter_block"], D["block_h"], D["block"], at=(x0 + D["emitter_block"] / 2, 0, zb), op="join",
49 body="case_body", name="Emitter lens block")
50model.box("detector_block", D["detector_block"], D["block_h"], D["block"], at=(x1 + D["detector_block"] / 2, 0, zb), op="join",
51 body="case_body", name="Detector lens block")
52# The ears: a tab as wide as the round end, out to the hole's centre, and the round end around the hole.
53r, t = D["ear_r"], D["ear_t"]
54for k, s in (("a", -1), ("b", 1)):
55 xh = s * D["hole_pitch"] / 2
56 tab = abs(xh) - W / 2
57 model.box(f"ear_{k}_tab", tab, 2 * r, t, at=(s * (W / 2 + tab / 2), 0, t / 2), op="join", body="case_body", name="Ear")
58 model.cylinder(f"ear_{k}_end", r, t, at=(xh, 0, 0), op="join", body="case_body", name="Ear")
59 with model.sketch(f"hole_{k}_sketch", on="XY", name="Mounting hole") as sk:
60 sk.circle(f"hole_{k}_circle", (xh, 0), D["hole_d"] / 2)
61 model.extrude(f"hole_{k}", f"hole_{k}_sketch", distance=t, op="cut", body="case_body", name="Mounting hole")
62
63# The lenses, shown as discs set flush in the lens blocks' fronts at the dimensioned centres.
64xe = left + D["emitter_x"]
65lens_t = P["lens_t"]
66model.plane("lens_plane", on="XY", offset=depth - lens_t, name="Lens seat")
67for k, x, d, what in (("emitter", xe, P["emitter_lens"], "Light emitter"), ("detector", xe + D["lens_pitch"], P["detector_lens"], "Light detector")):
68 with model.sketch(f"{k}_seat_sketch", on="lens_plane", name=f"{what} lens seat") as sk:
69 sk.circle(f"{k}_seat_circle", (x, 0), d / 2)
70 model.extrude(f"{k}_seat", f"{k}_seat_sketch", distance=lens_t, op="cut", body="case_body", name=f"{what} lens seat")
71 with model.sketch(f"{k}_lens_sketch", on="lens_plane", name=f"{what} lens") as sk:
72 sk.circle(f"{k}_lens_circle", (x, 0), d / 2)
73 model.extrude(f"{k}_lens", f"{k}_lens_sketch", distance=lens_t, op="new", body=f"{k}_lens_body", name=f"{what} lens")
74
75# The board's part below the case, and the connector housing on its front.
76drop = D["overall_h"] - H
77xc = left + D["board_x"]
78yc = -H / 2 - drop / 2
79zp = D["board_back"]
80model.box("board", D["board_w"], drop, D["board_t"], at=(xc, yc, zp + D["board_t"] / 2), op="new", body="board_body", name="Board (PWB)")
81model.box("connector", P["connector_w"], drop, P["connector_d"], at=(xc, yc, zp + D["board_t"] + P["connector_d"] / 2), op="new",
82 body="connector_body", name="Connector housing")
83
84# Materials (page 2, Materials): "Lens: Acrylic acid resin (Visible light cut-off resin)" (pmma, dark), "Case: Carbonic ABS
85# (Conductive resin)" (abs, black), "PCB: Paper phenol" (bakelite). The sheet names the connector (JCTC 12001W90-3P-HF) but not
86# what it is made of: its housing is shown as pa6, natural.
87model.material("abs", bodies=["case_body"], color="#1c1c1e")
88model.material("pmma", bodies=["emitter_lens_body", "detector_lens_body"], color="#2a2a30")
89model.material("bakelite", bodies=["board_body"], color="#b08a4a")
90model.material("pa6", bodies=["connector_body"], color="#e8e4d8")
91result = model.result()
92

Sharp's GP2Y0A41SK0F distance measuring sensor unit for brackets, enclosures and robot layouts: a lens case with two mounting ears (holes 37 apart), the light emitter and light detector lenses on its front, and a small board with a 3-pin connector below. The case, each lens, the board and the connector housing are separate solids. Dimensions from Sharp's data sheet. See the README.

Distance measuring sensor

Sharp's GP2Y0A41SK0F distance measuring sensor unit (measuring distance 4 to 30 cm, analog output). It is a lens case with two mounting ears, a light emitter lens and a light detector lens on its front, and a small board with a 3-pin connector hanging below the case. The ears' back, the mounting face, is the XY plane and the unit looks toward +Z. The mounting holes lie on the X axis, centred on the origin. The emitter is on the -X side and the connector on the -Y side. The case, each lens, the board and the connector housing are separate solids.

Overall it is 44.5 across the ears, 18.9 from the case's top to the connector's lower end, and 13.5 deep.

Source

Sharp, GP2Y0A41SK0F "Distance Measuring Sensor Unit, Measuring distance: 4 to 30 cm, Analog output type", Sheet No. OP13008EN, page 2, Outline: drawing CY13036j02A, "GP2Y0A41SK0F Outline Dimensions", unit mm. Copy: sharp-world.com/products/device/lineup/data/pdf/datasheet/gp2y0a41sk_e.pdf (1 request). The sheet carries no date or revision other than its sheet number.

The drawing's notes: dimensions marked * give the lens centre positions, unspecified tolerances are ±0.3, and dimensions in parenthesis are for reference.

Dimension Drawing
Mounting holes ø3.2, 37 apart
Ears R3.75 around each hole, 1.5 thick ("2-1.5")
Case width 29.5
Case height 13
Depth, ears' back to the lens blocks' front 13.5
Front step 6.3 deep in all and 8.4 high; its last 2 are the lens blocks, 7.2 high
Lens blocks 7.5 wide (emitter) and 16.3 wide (detector), 4.15 between them
Emitter lens centre * 4.5 from the case's side, 3.75 from its block's outer end
Detector lens centre * 19.7 ±0.1 from the emitter's
Connector part 10.1 wide, centred 14.75 from the case's side (the case's middle)
Height over the connector 18.9 +0.5/-0.3 from the case's top
Board (PWB) 1.2 thick, its back (3.3) in front of the case's back

From these: the 13 high part of the case is 13.5 - 6.3 = 7.2 deep, the 8.4 high step in front of it is 6.3 - 2 = 4.3 deep, and the board and connector reach 18.9 - 13 = 5.9 below the case. The emitter's lens block starts 4.5 - 3.75 = 0.75 from the case's side, so the detector's block ends 29.5 - 0.75 - 7.5 - 4.15 - 16.3 = 0.8 from the other side. The drawing puts the holes, the lens centres, the step and the lens blocks on one centre line through the middle of the case's height, and the model does the same.

Proportions, stated plainly. The drawing shows these but doesn't dimension them. They are scaled off the drawing:

  • The lenses show about 4.9 (emitter) and 4.5 (detector) across in the front view. The model has them as discs 1 thick, set flush in the lens blocks' fronts. The drawing's side view shows domed lenses set back inside the lens case, behind openings in the lens blocks.
  • The connector housing is about 7.9 wide and 4.8 deep in front of the board. It is a plain block as high as the board's part below the case. Its three contacts, its opening and its latch aren't modelled: the sheet names the connector (Shenglan Technology, JCTC, 12001W90-3P-HF) and dimensions nothing of it but the height over it.
  • The board is modelled only where it shows below the case, 10.1 wide. The drawing's 10.1 is across the connector part as a whole; its bottom view shows the board that wide.
  • The ears are flat tabs with round ends. The sloped webs between the ears and the case's sides, the case's cut-out around the connector, its seams and the stamp area aren't modelled.

Materials. From the sheet's Materials list on page 2. The lens is "Acrylic acid resin (Visible light cut-off resin)", shown as pmma, dark. The case is "Carbonic ABS (Conductive resin)", shown as abs, black. The PCB is "Paper phenol", shown as bakelite. The sheet doesn't say what the connector is made of; its housing is shown as pa6.

Mass. The sheet gives no weight. The model is solid where the real unit is a shell around its optics and board: case 4,261 mm³, lenses 35 mm³ together, board 72 mm³, connector housing 224 mm³, about 5 g in all. The real unit will weigh less. No material was chosen to meet a weight.

Catalogue model

The old catalogue's Sharp_GP2Y0A41SK0F entry maps to this part. Its reference model was measured against the drawing:

Measured Drawing
44.5 across the ears 37 + 2 x 3.75
18.9 from the case's top to the connector's lower end, case 13 high 18.9 +0.5/-0.3, 13
13.5 deep 13.5
Lens centres 4.5 from the case's side and 19.7 apart 4.5, 19.7 ±0.1
  1. 1.0.0 Latest
STEVEMIT

steve/reflective-optical-sensor

Reflective optical sensors with transistor output: Vishay CNY70, TCRT5000 and TCRT5000L and onsemi QRE1113GR, by part number.

10 4 sizes 0 2 weeks ago v1.1.0
STEVEMIT

steve/ir-receiver-module

Vishay IR receiver modules for remote control, by package: Cast, Minicast, Mold and Minimold, three leads.

3 4 sizes 0 2 weeks ago v1.0.0
STEVEMIT

steve/pluggable-terminal-header

PCB header for pluggable terminal blocks, Phoenix Contact: MSTBA 2,5, MC 1,5, GMSTBA 2,5; vertical MSTBVA, MCV, GMSTBVA; MC/MCV with threaded flange (GF).

48 232 sizes 0 3 weeks ago v1.6.0
STEVEMIT

steve/to-package

Through-hole TO packages standing on the board: TO-220AB, TO-220AC, TO-220F, TO-262, TO-251AA, TO-247AC, TO-126, TO-92 and the TO-3, TO-18, TO-39 and TO-46 metal cans, from the makers' drawings.

24 15 sizes 0 3 weeks ago v1.3.1