Sign in with STEVE

steve/reflective-optical-sensor

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

v1.0.0 Latest STEVE MIT 0
Isometric
part.py 129 lines · Python · STEVE runtime · checked
Download
1"""Vishay reflective optical sensors with transistor output: the CNY70 cube and the TCRT5000 / TCRT5000L with two domed lenses and
2mounting clips. The sensor stands on the board (the XY plane), its body centred on the origin, the emitter and detector side by
3side along X, looking up (+Z), and the leads down through the board. The housing is one solid, each lens its own solid, and each
4lead its own solid. Dimensions from Vishay's data sheets; see the README."""
5from steve import Model
6
7part_number = "CNY70" # Vishay part number
8
9# CNY70: Vishay CNY70 data sheet, Rev. 1.8, 30-Jul-12 (document 83751), page 5, PACKAGE DIMENSIONS, drawing 6.544-5062.01-4 issue 6:
10# body 7 +/-0.1 square, 6 -0.1 high, 12 overall (so the leads reach 6 below the body); leads 0.4 x 0.5 at 2.8 (+0.3) along X and
11# 2.54 nom. along Y, centred on the body's centre lines; windows d1.8 -0.1, 2.8 apart, on the body's centre line, 1 deep (side
12# view, "1"). Weight ca. 0.70 g.
13# (body length X, width Y, height, lead length below the body, lead section X, lead section Y, lead pitch X, lead pitch Y,
14# window diameter, window pitch, window depth)
15CNY70 = (7.0, 7.0, 6.0, 6.0, 0.4, 0.5, 2.8, 2.54, 1.8, 2.8, 1.0)
16# TCRT5000 / TCRT5000L: Vishay TCRT5000 data sheet, Rev. 1.7, 17-Aug-09 (document 83760), PACKAGE DIMENSIONS, page 4 (TCRT5000,
17# drawing 6.550-5096.01-4 issue 4) and page 5 (TCRT5000L, drawing 6.550-5146.01-4): body 10.2 (+0.1/-0.2) x 5.8 (+0.1/-0.2), its
18# nose flat 2.5 +/-0.3 wide; 3 from the reference plane (the board) to the shoulder, 6.3 (+0.5/-0.1) to the lens tops, 7 +/-0.2 to
19# the divider's top; leads 0.4 x 0.65 max, 5.5 apart along X and 2.54 along Y, 3.5 +/-0.3 (TCRT5000) or 15 +/-0.5 (TCRT5000L)
20# below the reference plane; locating peg d0.9 +/-0.05, 1.5 +/-0.2 below, 4.65 +/-0.1 from the clips' centre (footprint: 2.45 off
21# the centre line); two clips 0.95 +/-0.05 wide, reaching 3 below, barb 1.2 wide, 0.5 beyond the body's side, its top 1.6 to 1.8
22# and its widest 2.2 +/-0.1 below, tips 2.45 off the centre line. Weight ca. 0.23 g.
23# (body length X, width Y, nose flat, shoulder height, lens top, divider top, lead section X, lead section Y, lead pitch X,
24# lead pitch Y, peg diameter, peg length, peg X from centre, peg Y from centre, clip width X, clip depth, barb width, barb out,
25# barb top, barb top inner, barb widest, clip tip Y)
26TCRT5000 = (10.2, 5.8, 2.5, 3.0, 6.3, 7.0, 0.4, 0.65, 5.5, 2.54, 0.9, 1.5, 4.65, 2.45, 0.95, 3.0, 1.2, 0.5, 1.8, 1.6, 2.2, 2.45)
27LEADS = {"TCRT5000": 3.5, "TCRT5000L": 15.0}
28# Proportions, for looks (the TCRT5000 drawings show these but don't dimension them; README): the body's underside stands 0.5 above
29# the reference plane except the foot at the peg end, which reaches it and runs 1.42 in from that end; above the shoulder the body
30# tapers to a top face 4.45 above the plane, 1.45 in at the ends and 1.1 in at the sides; the nose's corner chamfers run 1.7 along X;
31# each lens is 3.0 x 3.0, upright sides then a half-round top (radius 1.5) across Y, its centre 1.75 off the middle; the divider
32# between them is 0.45 thick and 3.0 long; the clip's stem is the barb's inner 0.7, and its tip is pointed 0.25 in from its inner
33# face.
34TCRT_PROPORTIONS = {"underside": 0.5, "foot": 1.42, "top": 4.45, "inset_x": 1.45, "inset_y": 1.1, "nose_x": 1.7, "lens": 3.0,
35 "lens_x": 1.75, "divider": 0.45}
36PROUD = 0.03 # the CNY70's lens discs stand this far proud of the window floors so the renderer draws their edges
37
38model = Model()
39leads = []
40if part_number == "CNY70":
41 L, W, H, lead_len, lx, ly, px, py, wd, wp, depth = CNY70
42 model.box("housing", L, W, H, at=(0, 0, H / 2), op="new", body="housing_body", name="Housing")
43 model.plane("window_plane", on="XY", offset=H - depth, name="Window floor")
44 lenses = []
45 for k, (x, what) in enumerate(((-wp / 2, "emitter"), (wp / 2, "detector"))):
46 with model.sketch(f"window_{k}_sketch", on="window_plane", name=f"{what.capitalize()} window") as sk:
47 sk.circle(f"window_{k}_circle", (x, 0), wd / 2)
48 model.extrude(f"window_{k}", f"window_{k}_sketch", distance=depth, op="cut", body="housing_body", name=f"{what.capitalize()} window")
49 with model.sketch(f"lens_{k}_sketch", on="window_plane", name=f"{what.capitalize()} lens") as sk:
50 sk.circle(f"lens_{k}_circle", (x, 0), wd / 2)
51 model.extrude(f"lens_{k}", f"lens_{k}_sketch", distance=PROUD, op="new", body=f"lens_{k}_body", name=f"{what.capitalize()} lens")
52 lenses.append(f"lens_{k}_body")
53 emitter, detector = lenses
54 for i, x in enumerate((-px / 2, px / 2)):
55 for j, y in enumerate((-py / 2, py / 2)):
56 n = 2 * i + j
57 model.box(f"lead_{n}", lx, ly, lead_len, at=(x, y, -lead_len / 2), op="new", body=f"lead_{n}_body", name=f"Lead {n + 1}")
58 leads.append(f"lead_{n}_body")
59elif part_number in LEADS:
60 (L, W, nose, shoulder, lens_top, divider_top, lx, ly, px, py, peg_d, peg_len, peg_x, peg_y, clip_w, clip_depth, barb_w, barb_out,
61 barb_top, barb_top_in, barb_wide, tip_y) = TCRT5000
62 P = TCRT_PROPORTIONS
63 lead_len = LEADS[part_number]
64 under, top = P["underside"], P["top"]
65
66 def outline(dx, dy):
67 """The body's plan outline (the nose at +X, its corners chamfered, its flat nose wide), inset dx at the ends and dy at
68 the sides."""
69 x0, x1, y1, f = -L / 2 + dx, L / 2 - dx, W / 2 - dy, nose / 2
70 xn = x1 - P["nose_x"]
71 return [(x0, -y1), (xn, -y1), (x1, -f), (x1, f), (xn, y1), (x0, y1)]
72
73 model.plane("under_plane", on="XY", offset=under, name="Underside")
74 with model.sketch("body_sketch", on="under_plane", name="Body") as sk:
75 sk.polyline("body_outline", outline(0, 0), closed=True)
76 model.extrude("housing", "body_sketch", distance=shoulder - under, op="new", body="housing_body", name="Housing")
77 model.plane("shoulder_plane", on="XY", offset=shoulder, name="Shoulder")
78 model.plane("top_plane", on="XY", offset=top, name="Top")
79 with model.sketch("taper_base", on="shoulder_plane", name="Taper") as sk:
80 sk.polyline("taper_base_outline", outline(0, 0), closed=True)
81 with model.sketch("taper_top", on="top_plane", name="Taper") as sk:
82 sk.polyline("taper_top_outline", outline(P["inset_x"], P["inset_y"]), closed=True)
83 model.loft("taper", ["taper_base", "taper_top"], ruled=True, op="join", body="housing_body", name="Taper")
84 # The foot at the peg end, down to the reference plane, and the locating peg below it.
85 foot = P["foot"]
86 model.box("foot", foot, W, under, at=(-L / 2 + foot / 2, 0, under / 2), op="join", body="housing_body", name="Foot")
87 model.cylinder("peg", peg_d / 2, peg_len, at=(-peg_x, -peg_y, -peg_len), op="join", body="housing_body", name="Locating peg")
88 # The divider between the lenses, up to its dimensioned top.
89 d = P["divider"]
90 model.box("divider", d, P["lens"], divider_top - top, at=(0, 0, top + (divider_top - top) / 2), op="join", body="housing_body",
91 name="Divider")
92 # The two clips, a side-view (YZ) outline each, extruded clip_w along X and centred on X = 0.
93 for s, side in ((1, "right"), (-1, "left")):
94 body_side, out = W / 2, W / 2 + barb_out
95 stem_in = out - barb_w
96 pts = [(stem_in, under), (body_side, under), (body_side, -barb_top_in), (out, -barb_top), (out, -barb_wide), (tip_y, -clip_depth),
97 (stem_in, -clip_depth + (tip_y - stem_in))]
98 with model.sketch(f"clip_{side}_sketch", on="YZ", name=f"Clip {side}") as sk:
99 sk.polyline(f"clip_{side}_outline", [(s * y, z) for y, z in pts], closed=True)
100 model.extrude(f"clip_{side}", f"clip_{side}_sketch", distance=clip_w, both=True, op="join", body="housing_body", name=f"Clip {side}")
101 # The lenses: upright sides, then a half-round top across Y, each P["lens"] long along X.
102 r = P["lens"] / 2
103 lenses = []
104 for k, (x, what) in enumerate(((-P["lens_x"], "detector"), (P["lens_x"], "emitter"))):
105 model.plane(f"lens_{k}_plane", on="YZ", offset=x, name=f"{what.capitalize()} lens")
106 with model.sketch(f"lens_{k}_sketch", on=f"lens_{k}_plane", name=f"{what.capitalize()} lens") as sk:
107 sk.polyline(f"lens_{k}_sides", [(-r, lens_top - r), (-r, top), (r, top), (r, lens_top - r)], closed=False)
108 sk.arc(f"lens_{k}_top", (0, lens_top - r), r, 0, 180)
109 model.extrude(f"lens_{k}", f"lens_{k}_sketch", distance=P["lens"], both=True, op="new", body=f"lens_{k}_body", name=f"{what.capitalize()} lens")
110 lenses.append(f"lens_{k}_body")
111 detector, emitter = lenses
112 for i, x in enumerate((-px / 2, px / 2)):
113 for j, y in enumerate((-py / 2, py / 2)):
114 n = 2 * i + j
115 run = lead_len + under
116 model.box(f"lead_{n}", lx, ly, run, at=(x, y, under - run / 2), op="new", body=f"lead_{n}_body", name=f"Lead {n + 1}")
117 leads.append(f"lead_{n}_body")
118else:
119 raise ValueError(f"no part {part_number!r}: CNY70, TCRT5000, TCRT5000L")
120
121# Materials (the sheets name none): the housing is black moulded plastic that blocks visible light ("daylight blocking filter",
122# page 1), shown as pc; the lenses are the clear epoxy over the emitter and the dark filter epoxy over the detector, shown as pmma
123# (1.18; epoxy is about 1.2); the leads are metal, shown as copper.
124model.material("pc", bodies=["housing_body"], color="#1c1c1e")
125model.material("pmma", bodies=[emitter], color="#8fb4e8")
126model.material("pmma", bodies=[detector], color="#2a2a30")
127model.material("copper", bodies=leads, color="#c9ccd1")
128result = model.result()
129

Reflective optical sensors (an infrared emitter and a phototransistor side by side) for board layouts and enclosures, as Vishay draws them: the CNY70 cube with its two windows, and the TCRT5000 with two domed lenses, a divider, a locating peg and two mounting clips, with standard (TCRT5000) or long leads (TCRT5000L). The housing, each lens and each lead are their own solids. Dimensions from Vishay's data sheets. See the README.

Reflective optical sensor

Vishay's reflective optical sensors with transistor output, chosen by part number: an infrared emitter and a phototransistor side by side, looking up. The sensor stands on the board (the XY plane), its body centred on the origin, the emitter and detector along X, and the leads down through the board. The housing is one solid. Each lens is its own solid, and so is each lead.

Part number Body (X x Y x height) Leads below the board Weight (sheet)
CNY70 7 x 7 x 6, two windows Ø 1.8 6 ca. 0.70 g
TCRT5000 10.2 x 5.8, 7 high to the divider, two domed lenses, peg and clips 3.5 ca. 0.23 g
TCRT5000L as TCRT5000 15 ca. 0.23 g

Source

  • CNY70: Vishay, CNY70 "Reflective Optical Sensor with Transistor Output", Rev. 1.8, 30-Jul-12, document number 83751, page 5, PACKAGE DIMENSIONS, drawing 6.544-5062.01-4, issue 6. Copy: vishay.com/docs/83751/cny70.pdf (1 request).
  • TCRT5000, TCRT5000L: Vishay, TCRT5000, TCRT5000L "Reflective Optical Sensor with Transistor Output", Rev. 1.7, 17-Aug-09, document number 83760, page 4 (TCRT5000, drawing 6.550-5096.01-4, issue 4) and page 5 (TCRT5000L, drawing 6.550-5146.01-4), PACKAGE DIMENSIONS. Copy: vishay.com/docs/83760/tcrt5000.pdf (1 request).

All dimensions are in mm.

CNY70 Value
Body 7 ±0.1 x 7 ±0.1, 6 -0.1 high
Overall height 12 (leads 6 below the body)
Leads 0.4 x 0.5, 2.8 (+0.3) apart along X and 2.54 nom. along Y, centred on the body
Windows Ø 1.8 -0.1, 2.8 apart on the body's centre line, 1 deep (side view)
TCRT5000 / TCRT5000L Value
Body 10.2 (+0.1/-0.2) x 5.8 (+0.1/-0.2); its nose end flat 2.5 ±0.3 wide
Heights above the reference plane (the board) shoulder 3, lens tops 6.3 (+0.5/-0.1), divider top 7 ±0.2
Leads 0.4 x 0.65 max, 5.5 apart along X and 2.54 along Y; 3.5 ±0.3 (TCRT5000) or 15 ±0.5 (TCRT5000L) below the plane
Locating peg Ø 0.9 ±0.05, 1.5 ±0.2 below, 4.65 ±0.1 from the clips' centre along X and 2.45 off the centre line (footprint)
Clips 0.95 ±0.05 wide (X), 3 below the plane; barb 1.2 wide, 0.5 beyond the body's side, its top 1.6 to 1.8 below and its widest 2.2 ±0.1 below; tips 2.45 off the centre line

The leads and the clips are centred on the body. The sheet gives the leads' width only as "0.65 max", and the model uses 0.65 along their whole length.

Proportions, stated plainly. The TCRT5000 drawings show these but don't dimension them. They are scaled off the drawings:

  • The body's underside stands 0.5 above the reference plane. Only the foot at the peg end reaches the plane, and it runs 1.42 in from that end.
  • Above the shoulder, the body tapers to a top face 4.45 above the plane, 1.45 in at the ends and 1.1 in at the sides. The nose flat keeps its 2.5 width at the top face.
  • The nose's corner chamfers run 1.7 along X.
  • Each lens is 3.0 x 3.0, with upright sides and then a half-round top (radius 1.5) across Y. Its centre is 1.75 off the middle. The divider between the lenses is 0.45 thick and 3.0 long.
  • Each clip's stem is the barb's inner 0.7. Its tip is pointed, 0.25 in from its inner face.
  • The CNY70's small notches and the inner frame lines on its top and bottom views aren't modelled. Its lens discs stand 0.03 above the window floors so their edges show.

Materials. The sheets name no materials. The housing is black moulded plastic that blocks visible light (the sheets list a "daylight blocking filter"), shown as pc. The lenses are the epoxy over the emitter (clear, tinted blue) and over the detector (dark filter), shown as pmma (1.18; epoxy is about 1.2). The leads are metal, shown as copper.

Mass. CNY70: the model weighs about 0.39 g (housing 289 mm³ of pc, leads 4.8 mm³ of copper) against the sheet's ca. 0.70 g. TCRT5000: about 0.32 g (housing 212 mm³, lenses 27.5 mm³, leads 4.2 mm³) against ca. 0.23 g. The sheets don't describe what is inside the housings (lead frame, chips, filler) or the hollows the drawings don't dimension, so the difference isn't explained further. No material was picked to match the weight.

Catalogue models

The old catalogue's Vishay_CNY70 and Vishay_TCRT5000 entries map to the presets of those part numbers. Their reference models were measured and agree with the drawings:

Model Measured Drawing
Vishay_CNY70 body 7.01 x 7.00 x 6.00, 12 overall; leads 0.40 x 0.50 at 2.80 x 2.54, centred; windows Ø 1.8, 2.8 apart, floors 1 below the top 7 x 7 x 6, 12; 0.4 x 0.5 at 2.8 x 2.54; Ø 1.8 at 2.8
Vishay_TCRT5000 body 10.2 x 5.8, 7.0 high, leads 3.5 below; leads 0.40 x 0.66 at 5.50 x 2.54; peg Ø 0.9, 1.5 below, 4.65 from the centre; clips 0.96 wide, 3.0 below 10.2 x 5.8, 7; 3.5; 0.4 x 0.65 max at 5.5 x 2.54; Ø 0.9, 1.5, 4.65; 0.95, 3

The family's other entries name other parts and makers (Everlight, Kodenshi, Osram, Sharp, Broadcom, light-dependent resistors and Vishay's IR receiver packages). They are left with their reasons in COVERAGE.md.

  1. 1.0.0 Latest
STEVEMIT

steve/tht-led

Through-hole round LEDs from Vishay's drawings: 5 mm (T-1 3/4, TLHx5400) and 3 mm (T-1, TLHx4400), red, yellow or green.

1 6 sizes 0 9 hours ago v1.0.1
STEVEMIT

steve/axial-resistor

Axial leaded metal film resistor, Vishay Beyschlag MBA/SMA 0204, MBB/SMA 0207 and MBE/SMA 0414, with colour rings, horizontal or vertical.

1 9 sizes 0 12 hours ago v1.0.0
STEVEMIT

steve/leaded-inductor

Axial leaded inductor, Fastron fixed choke coils (MICC, SMCC, MECC, HCCC, LACC, HBCC, VHBCC, XHBCC) and suppression coils (MISC, MESC, 77A), Vishay Dale molded IM-1 to IM-10, horizontal or vertical.

0 63 sizes 0 12 hours ago v1.1.0
STEVEMIT

steve/axial-diode

Axial leaded diodes in Vishay's DO-35, DO-41, DO-15, DO-201AD and P600 packages, with the cathode band, horizontal or vertical.

0 30 sizes 0 11 hours ago v1.0.0