steve/melf-diode
Surface-mount diode packages MELF (DO-213AB), MiniMELF (SOD-80) and MicroMELF, from Vishay's package drawings.
Surface-mount diode packages SOD-123, SOD-323, SOD-523 and SMF (DO-219AB), from Vishay's package drawings.
| 1 | """Surface-mount diode in a small plastic package (SOD-123, SOD-323, SOD-523 or SMF), by Vishay's package drawings. Centred on the origin |
| 2 | with the seating plane on the XY plane and the length along X: the moulded body, the cathode band on top at the -X end, and a lead at each |
| 3 | end (each lead its own solid). SOD-123 and SOD-323 have gull-wing leads that leave the body's ends and bend down to a foot; SOD-523 and SMF |
| 4 | have flat leads along the board under the body's ends. Dimensions from Vishay's drawings; see the README.""" |
| 5 | from steve import Model |
| 6 | |
| 7 | package = "SOD-123" # SOD-123, SOD-323, SOD-523 or SMF (DO-219AB) |
| 8 | |
| 9 | # package: (lead style, body length, body width, lead width, height, lead thickness, foot, length over the leads, standoff under the body), |
| 10 | # ranges (min, max) in mm. Foot: gull-wing leads, from the lead's tip to the inside of its bend; SMF's flat leads, the lead's whole length |
| 11 | # from its tip; None where the drawing doesn't give it. |
| 12 | # Vishay Semiconductors, "Package Dimensions for ESD-, Zener-, Small Signal Switching-, and Schottky Diodes", document number 80128, |
| 13 | # revision 1.4, 11-Oct-2022 (https://www.vishay.com/docs/80128/package_information.pdf), "PACKAGE DIMENSIONS in millimeters (inches)": |
| 14 | # SOD-123 page 25 (drawing S8-V-3910.01-001, rev. 4, 24 Sep 2009), SOD-323 page 26 (S8-V-3910.02-001, rev. 6, 23 Sep 2016), |
| 15 | # SOD-523 page 27 (S8-V-3880.02-003, rev. 3, 27 May 2019), SMF (DO-219AB) page 31 (S8-V-3915.01-001, rev. 5, 09 Oct 2017). |
| 16 | OUTLINES = { |
| 17 | "SOD-123": ("gull", (2.55, 2.85), (1.40, 1.70), (0.45, 0.65), (1.0, 1.35), (0.10, 0.15), (0.25, 0.45), (3.55, 3.85), (0.0, 0.1)), |
| 18 | "SOD-323": ("gull", (1.60, 1.95), (1.1, 1.5), (0.20, 0.40), (0.8, 1.15), (0.10, 0.15), (0.25, 0.40), (2.50, 2.85), (0.0, 0.1)), |
| 19 | "SOD-523": ("flat", (1.1, 1.3), (0.7, 0.9), (0.18, 0.35), (0.55, 0.75), (0.1, 0.2), None, (1.5, 1.7), (0.0, 0.1)), |
| 20 | "SMF": ("flat", (2.7, 2.9), (1.7, 1.9), (0.8, 1.2), (0.88, 1.08), (0.05, 0.25), (0.35, 0.85), (3.5, 3.9), (0.0, 0.1)), |
| 21 | } |
| 22 | # Proportions, for looks (the drawings show these but don't dimension them): a gull-wing lead's middle leaves the body at half its height; |
| 23 | # leads run INTO into the body (SOD-523's from the body's end; SOD-123's and SOD-323's arms), in a room cut out of it; the cathode band is |
| 24 | # 0.12 of the body's length wide, 0.1 of it in from the -X end, and 0.03 proud of the top. |
| 25 | INTO = 0.15 |
| 26 | BAND_W = 0.12 |
| 27 | BAND_IN = 0.1 |
| 28 | BAND_T = 0.03 |
| 29 | |
| 30 | |
| 31 | def mid(pair): |
| 32 | return (pair[0] + pair[1]) / 2 |
| 33 | |
| 34 | |
| 35 | style, BL, BW, LW, HT, LT, FOOT, SPAN, STAND = OUTLINES[package] |
| 36 | body_l, body_w, lead_w, height, t, span = (mid(v) for v in (BL, BW, LW, HT, LT, SPAN)) |
| 37 | gull = style == "gull" |
| 38 | # Flat leads lie on the board and the body sits on them; a gull-wing package's body stands off the board. |
| 39 | bottom = mid(STAND) if gull else 0.0 |
| 40 | model = Model() |
| 41 | model.box("body", body_l, body_w, height - bottom, at=(0, 0, (height + bottom) / 2), op="new", body="body_body", name="Body") |
| 42 | model.box("band", BAND_W * body_l, body_w, BAND_T, at=(-body_l / 2 + (BAND_IN + BAND_W / 2) * body_l, 0, height + BAND_T / 2), op="new", |
| 43 | body="band_body", name="Cathode band") |
| 44 | arm_z = height / 2 - t / 2 |
| 45 | leads = [] |
| 46 | rooms = [] |
| 47 | for tag, side in (("cathode", -1), ("anode", 1)): |
| 48 | tip = side * span / 2 |
| 49 | if gull: |
| 50 | # The lead's side section (x, z): into the body at arm_z, out past its end, down the leg, and out along the foot to the tip. |
| 51 | inner = side * (body_l / 2 - INTO) |
| 52 | leg = tip - side * mid(FOOT) |
| 53 | section = [(inner, arm_z), (inner, arm_z + t), (leg + side * t, arm_z + t), (leg + side * t, t), (tip, t), (tip, 0.0), (leg, 0.0), |
| 54 | (leg, arm_z)] |
| 55 | rooms.append((inner, side * body_l / 2, arm_z, arm_z + t)) |
| 56 | else: |
| 57 | # A flat strip on the board from the tip to its inner end under the body. |
| 58 | inner = tip - side * mid(FOOT) if FOOT else side * (body_l / 2 - INTO) |
| 59 | section = [(inner, 0.0), (tip, 0.0), (tip, t), (inner, t)] |
| 60 | rooms.append((inner, side * body_l / 2, 0.0, t)) |
| 61 | # The XZ plane's normal is -Y: offset -lead_w / 2 puts it on the lead's +Y side, and the extrusion runs across the lead to -Y. |
| 62 | model.plane(f"{tag}_plane", on="XZ", offset=-lead_w / 2, name="Leads") |
| 63 | with model.sketch(f"{tag}_sketch", on=f"{tag}_plane", name="Leads") as sk: |
| 64 | sk.polyline(f"{tag}_section", section, closed=True) |
| 65 | model.extrude(f"{tag}_lead", f"{tag}_sketch", distance=lead_w, op="new", body=f"{tag}_body", name="Leads") |
| 66 | leads.append(f"{tag}_body") |
| 67 | # Cut the leads' room out of the body, so that no solids overlap. |
| 68 | with model.sketch("room_sketch", on="cathode_plane", name="Room for the leads") as sk: |
| 69 | for i, (a, b, z0, z1) in enumerate(rooms): |
| 70 | sk.rect(f"room_{i}", (min(a, b), z0), (max(a, b), z1)) |
| 71 | model.extrude("room", "room_sketch", distance=lead_w, op="cut", body="body_body", name="Room for the leads") |
| 72 | # Materials, for looks and a rough mass: the moulding is epoxy compound, mostly silica filler (density about 1.9 to 2.0), ptfe (2.07) the |
| 73 | # nearest in the material list; the leads are tin-plated copper alloy, copper; the band is marking ink, shown in ptfe. |
| 74 | model.material("ptfe", bodies=["body_body"], color="#26282b") |
| 75 | model.material("ptfe", bodies=["band_body"], color="#c8c8c4") |
| 76 | model.material("copper", bodies=leads, color="#c9ccd1") |
| 77 | result = model.result() |
| 78 |
| 1 | name = "steve/sod-diode" |
| 2 | version = "1.0.0" |
| 3 | runtime = "steve" |
| 4 | license = "MIT" |
| 5 | summary = "Surface-mount diode packages SOD-123, SOD-323, SOD-523 and SMF (DO-219AB), from Vishay's package drawings." |
| 6 | description = """Small surface-mount diode packages for board layouts and enclosures: the moulded body, the cathode band and two leads, each lead its own solid. SOD-123 and SOD-323 have gull-wing leads; SOD-523 and SMF (DO-219AB) have flat leads under the body's ends. Dimensions from Vishay's package drawings (document 80128). See the README.""" |
| 7 | tags = ["diode", "smd", "sod-123", "sod-323", "sod-523", "smf", "do-219ab", "electronics"] |
| 8 | |
| 9 | [parameters.package] |
| 10 | type = "choice" |
| 11 | default = "SOD-123" |
| 12 | choices = ["SOD-123", "SOD-323", "SOD-523", "SMF"] |
| 13 | label = "Package" |
| 14 | description = "SOD-123 and SOD-323: gull-wing leads. SOD-523 and SMF (DO-219AB): flat leads." |
| 15 | |
| 16 | [[presets]] |
| 17 | id = "SOD-123" |
| 18 | title = "SOD-123 diode package, gull-wing leads, Vishay drawing" |
| 19 | params = { package = "SOD-123" } |
| 20 | aliases = ["SOD-123 diode", "SOD-123 package"] |
| 21 | standard = "Vishay 80128" |
| 22 | |
| 23 | [[presets]] |
| 24 | id = "SOD-323" |
| 25 | title = "SOD-323 diode package, gull-wing leads, Vishay drawing" |
| 26 | params = { package = "SOD-323" } |
| 27 | aliases = ["SOD-323 diode", "SOD-323 package"] |
| 28 | standard = "Vishay 80128" |
| 29 | |
| 30 | [[presets]] |
| 31 | id = "SOD-523" |
| 32 | title = "SOD-523 diode package, flat leads, Vishay drawing" |
| 33 | params = { package = "SOD-523" } |
| 34 | aliases = ["SOD-523 diode", "SOD-523 package"] |
| 35 | standard = "Vishay 80128" |
| 36 | |
| 37 | [[presets]] |
| 38 | id = "SMF" |
| 39 | title = "SMF (DO-219AB) diode package, flat leads, Vishay drawing" |
| 40 | params = { package = "SMF" } |
| 41 | aliases = ["DO-219AB", "SMF (DO-219AB)", "SMF diode", "SMF package"] |
| 42 | standard = "Vishay 80128" |
| 43 |
Small surface-mount diode packages SOD-123, SOD-323, SOD-523 and SMF (DO-219AB), as Vishay draws them. The package is centred on the origin with the seating plane on the XY plane and its length along X. It is the moulded body, the cathode band on top at the -X end, and a lead at each end. Each lead is its own solid.
Vishay Semiconductors, "Package Dimensions for ESD-, Zener-, Small Signal Switching-, and Schottky Diodes", document number 80128, revision 1.4, 11-Oct-2022, https://www.vishay.com/docs/80128/package_information.pdf. Each page is "PACKAGE DIMENSIONS in millimeters (inches)":
| Package | Body length | Body width | Lead width | Height | Lead thickness | Foot | Over the leads | Standoff |
|---|---|---|---|---|---|---|---|---|
| SOD-123 | 2.55–2.85 | 1.40–1.70 | 0.45–0.65 | 1.0–1.35 | 0.10–0.15 | 0.25–0.45 | 3.55–3.85 | 0–0.1 |
| SOD-323 | 1.60–1.95 | 1.1–1.5 | 0.20–0.40 | 0.8–1.15 | 0.10–0.15 | 0.25–0.40 | 2.50–2.85 | 0–0.1 |
| SOD-523 | 1.1–1.3 | 0.7–0.9 | 0.18–0.35 | 0.55–0.75 | 0.1–0.2 | not given | 1.5–1.7 | 0–0.1 |
| SMF | 2.7–2.9 | 1.7–1.9 | 0.8–1.2 | 0.88–1.08 | 0.05–0.25 | 0.35–0.85 | 3.5–3.9 | 0–0.1 |
The foot of a gull-wing lead is measured from its tip to the inside of its bend. SMF's foot is the flat lead's whole length from its tip, as the drawing's top view gives it. The model uses the middle of each range.
Proportions, stated plainly. The drawings show these but don't dimension them:
Materials and mass. The moulding is epoxy compound, mostly silica filler (density about 1.9 to 2.0), and ptfe (2.07) is the nearest in the material list. The leads are tin-plated copper alloy, shown as copper. Vishay's data sheets give each package's weight:
| Package | Model | Vishay's weight | Data sheet |
|---|---|---|---|
| SOD-123 | 11.2 mg | approx. 10.3 mg | 1N4148W, document 85748, rev. 1.8, 23-Feb-18 (LCSC's copy, datasheet.lcsc.com) |
| SOD-323 | 5.1 mg | 4 mg | 1N4148WS, document 86455, rev. 1.2, 03-Mar-2026 (LCSC's copy, datasheet.lcsc.com) |
| SOD-523 | 1.5 mg | 1.32 mg | VESD05A1-02V, document 86129, rev. 1.7, 04-Aug-2020 (vishay.com) |
| SMF | 11.8 mg | 15 mg | SMF5V0A-M to SMF58A-M, document 86330, rev. 1.1, 04-Jul-2023 (vishay.com) |
The small packages come out heavier than stated, because the plain blocks leave out the moulding's draft. SMF comes out lighter, because its lead frame inside the body isn't modelled.
The old catalogue's D_SOD-123, D_SOD-323, D_SOD-523 and D_SMF entries have no models to measure. Each names its package, and each maps to Vishay's drawing of that package (SMF is DO-219AB).
The family is shared with do214-diode (SMA, SMB and SMC). The other surface-mount diode packages in it (SOD-123F, SOD-323F, MELF, PowerDI and the others) aren't read yet; see COVERAGE.md.
| 1 | # SOD diode package |
| 2 | |
| 3 | Small surface-mount diode packages SOD-123, SOD-323, SOD-523 and SMF (DO-219AB), as Vishay draws them. The package is centred on the origin with the seating plane on the XY plane and its length along X. It is the moulded body, the cathode band on top at the -X end, and a lead at each end. Each lead is its own solid. |
| 4 | |
| 5 | - **SOD-123 and SOD-323** have gull-wing leads: each leaves the body's end, bends down and runs out along the board to its tip. The body stands off the board. |
| 6 | - **SOD-523 and SMF** have flat leads: each is a strip on the board under the body's end, and the body sits on the leads. |
| 7 | |
| 8 | ## Source |
| 9 | |
| 10 | Vishay Semiconductors, "Package Dimensions for ESD-, Zener-, Small Signal Switching-, and Schottky Diodes", document number 80128, revision 1.4, 11-Oct-2022, <https://www.vishay.com/docs/80128/package_information.pdf>. Each page is "PACKAGE DIMENSIONS in millimeters (inches)": |
| 11 | |
| 12 | - SOD-123: page 25, drawing S8-V-3910.01-001, rev. 4, 24 Sep 2009. |
| 13 | - SOD-323: page 26, drawing S8-V-3910.02-001, rev. 6, 23 Sep 2016. |
| 14 | - SOD-523: page 27, drawing S8-V-3880.02-003, rev. 3, 27 May 2019. |
| 15 | - SMF (DO-219AB): page 31, drawing S8-V-3915.01-001, rev. 5, 09 Oct 2017. |
| 16 | |
| 17 | | Package | Body length | Body width | Lead width | Height | Lead thickness | Foot | Over the leads | Standoff | |
| 18 | |---|---|---|---|---|---|---|---|---| |
| 19 | | SOD-123 | 2.55–2.85 | 1.40–1.70 | 0.45–0.65 | 1.0–1.35 | 0.10–0.15 | 0.25–0.45 | 3.55–3.85 | 0–0.1 | |
| 20 | | SOD-323 | 1.60–1.95 | 1.1–1.5 | 0.20–0.40 | 0.8–1.15 | 0.10–0.15 | 0.25–0.40 | 2.50–2.85 | 0–0.1 | |
| 21 | | SOD-523 | 1.1–1.3 | 0.7–0.9 | 0.18–0.35 | 0.55–0.75 | 0.1–0.2 | not given | 1.5–1.7 | 0–0.1 | |
| 22 | | SMF | 2.7–2.9 | 1.7–1.9 | 0.8–1.2 | 0.88–1.08 | 0.05–0.25 | 0.35–0.85 | 3.5–3.9 | 0–0.1 | |
| 23 | |
| 24 | The foot of a gull-wing lead is measured from its tip to the inside of its bend. SMF's foot is the flat lead's whole length from its tip, as the drawing's top view gives it. The model uses the middle of each range. |
| 25 | |
| 26 | **Proportions, stated plainly.** The drawings show these but don't dimension them: |
| 27 | |
| 28 | - A gull-wing lead's middle leaves the body at half the body's height, and the lead runs 0.15 into the body. |
| 29 | - SOD-523's leads run 0.15 under the body from its ends. The drawing shows them meeting the body's ends but doesn't give their length under it. |
| 30 | - Leads sit in rooms cut out of the body, so no solids overlap. |
| 31 | - The flat-lead packages' bodies sit on the board. The drawings' 0 to 0.1 step under SOD-523's and SMF's bodies isn't modelled. A gull-wing body stands 0.05 off the board, the middle of its 0 to 0.1. |
| 32 | - The cathode band is 0.12 of the body's length wide, 0.1 of the length in from the -X end, and 0.03 proud of the top. The drawings mark the band but don't dimension it. |
| 33 | - The bodies are plain blocks. The drawn draft of the moulding's sides isn't modelled. |
| 34 | |
| 35 | **Materials and mass.** The moulding is epoxy compound, mostly silica filler (density about 1.9 to 2.0), and ptfe (2.07) is the nearest in the material list. The leads are tin-plated copper alloy, shown as copper. Vishay's data sheets give each package's weight: |
| 36 | |
| 37 | | Package | Model | Vishay's weight | Data sheet | |
| 38 | |---|---|---|---| |
| 39 | | SOD-123 | 11.2 mg | approx. 10.3 mg | 1N4148W, document 85748, rev. 1.8, 23-Feb-18 (LCSC's copy, datasheet.lcsc.com) | |
| 40 | | SOD-323 | 5.1 mg | 4 mg | 1N4148WS, document 86455, rev. 1.2, 03-Mar-2026 (LCSC's copy, datasheet.lcsc.com) | |
| 41 | | SOD-523 | 1.5 mg | 1.32 mg | VESD05A1-02V, document 86129, rev. 1.7, 04-Aug-2020 (vishay.com) | |
| 42 | | SMF | 11.8 mg | 15 mg | SMF5V0A-M to SMF58A-M, document 86330, rev. 1.1, 04-Jul-2023 (vishay.com) | |
| 43 | |
| 44 | The small packages come out heavier than stated, because the plain blocks leave out the moulding's draft. SMF comes out lighter, because its lead frame inside the body isn't modelled. |
| 45 | |
| 46 | ## Catalogue models |
| 47 | |
| 48 | The old catalogue's `D_SOD-123`, `D_SOD-323`, `D_SOD-523` and `D_SMF` entries have no models to measure. Each names its package, and each maps to Vishay's drawing of that package (SMF is DO-219AB). |
| 49 | |
| 50 | The family is shared with `do214-diode` (SMA, SMB and SMC). The other surface-mount diode packages in it (SOD-123F, SOD-323F, MELF, PowerDI and the others) aren't read yet; see `COVERAGE.md`. |
| 51 |
Small surface-mount diode packages for board layouts and enclosures: the moulded body, the cathode band and two leads, each lead its own solid. SOD-123 and SOD-323 have gull-wing leads; SOD-523 and SMF (DO-219AB) have flat leads under the body's ends. Dimensions from Vishay's package drawings (document 80128). See the README.
Small surface-mount diode packages SOD-123, SOD-323, SOD-523 and SMF (DO-219AB), as Vishay draws them. The package is centred on the origin with the seating plane on the XY plane and its length along X. It is the moulded body, the cathode band on top at the -X end, and a lead at each end. Each lead is its own solid.
Vishay Semiconductors, "Package Dimensions for ESD-, Zener-, Small Signal Switching-, and Schottky Diodes", document number 80128, revision 1.4, 11-Oct-2022, https://www.vishay.com/docs/80128/package_information.pdf. Each page is "PACKAGE DIMENSIONS in millimeters (inches)":
| Package | Body length | Body width | Lead width | Height | Lead thickness | Foot | Over the leads | Standoff |
|---|---|---|---|---|---|---|---|---|
| SOD-123 | 2.55–2.85 | 1.40–1.70 | 0.45–0.65 | 1.0–1.35 | 0.10–0.15 | 0.25–0.45 | 3.55–3.85 | 0–0.1 |
| SOD-323 | 1.60–1.95 | 1.1–1.5 | 0.20–0.40 | 0.8–1.15 | 0.10–0.15 | 0.25–0.40 | 2.50–2.85 | 0–0.1 |
| SOD-523 | 1.1–1.3 | 0.7–0.9 | 0.18–0.35 | 0.55–0.75 | 0.1–0.2 | not given | 1.5–1.7 | 0–0.1 |
| SMF | 2.7–2.9 | 1.7–1.9 | 0.8–1.2 | 0.88–1.08 | 0.05–0.25 | 0.35–0.85 | 3.5–3.9 | 0–0.1 |
The foot of a gull-wing lead is measured from its tip to the inside of its bend. SMF's foot is the flat lead's whole length from its tip, as the drawing's top view gives it. The model uses the middle of each range.
Proportions, stated plainly. The drawings show these but don't dimension them:
Materials and mass. The moulding is epoxy compound, mostly silica filler (density about 1.9 to 2.0), and ptfe (2.07) is the nearest in the material list. The leads are tin-plated copper alloy, shown as copper. Vishay's data sheets give each package's weight:
| Package | Model | Vishay's weight | Data sheet |
|---|---|---|---|
| SOD-123 | 11.2 mg | approx. 10.3 mg | 1N4148W, document 85748, rev. 1.8, 23-Feb-18 (LCSC's copy, datasheet.lcsc.com) |
| SOD-323 | 5.1 mg | 4 mg | 1N4148WS, document 86455, rev. 1.2, 03-Mar-2026 (LCSC's copy, datasheet.lcsc.com) |
| SOD-523 | 1.5 mg | 1.32 mg | VESD05A1-02V, document 86129, rev. 1.7, 04-Aug-2020 (vishay.com) |
| SMF | 11.8 mg | 15 mg | SMF5V0A-M to SMF58A-M, document 86330, rev. 1.1, 04-Jul-2023 (vishay.com) |
The small packages come out heavier than stated, because the plain blocks leave out the moulding's draft. SMF comes out lighter, because its lead frame inside the body isn't modelled.
The old catalogue's D_SOD-123, D_SOD-323, D_SOD-523 and D_SMF entries have no models to measure. Each names its package, and each maps to Vishay's drawing of that package (SMF is DO-219AB).
The family is shared with do214-diode (SMA, SMB and SMC). The other surface-mount diode packages in it (SOD-123F, SOD-323F, MELF, PowerDI and the others) aren't read yet; see COVERAGE.md.
Surface-mount diode packages MELF (DO-213AB), MiniMELF (SOD-80) and MicroMELF, from Vishay's package drawings.
Surface-mount diode packages DO-214AC (SMA), DO-214AA (SMB) and DO-214AB (SMC), from Vishay's outline drawings.
SMD quartz crystals by maker series: Epson FA-238, FA-238V, TSX-3225, MA-406, MA-505; TXC 7M, AX; Abracon ABM8G, ABM3B; EuroQuartz MT.
No-lead small-outline IC packages by TI outline: WSON-8/10/12/16, VSON-8 and X1SON-8, 0.4 to 0.8 mm pitch, with exposed thermal pad.