Skip to content

Instantly share code, notes, and snippets.

@ericfont
Created January 30, 2025 01:58
Show Gist options
  • Save ericfont/df273be42d891bd2251b3d2518748117 to your computer and use it in GitHub Desktop.
Save ericfont/df273be42d891bd2251b3d2518748117 to your computer and use it in GitHub Desktop.
TL431 regulating "5V" USB supply 4.75-5.5V range to limit under 5.032 V, simulated in circuitjs
Display the source blob
Display the rendered blob
Raw
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="668" height="324"><defs><linearGradient id="PvczCDAdxLtO" x1="0px" x2="32px" y1="0px" y2="0px" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#807f7f"/><stop offset="1" stop-color="#40be40"/></linearGradient><linearGradient id="GeeOvucfBHtO" x1="0px" x2="32px" y1="0px" y2="0px" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#40be40"/><stop offset="1" stop-color="#01fd01"/></linearGradient><linearGradient id="mZOCOsEkoeSS" x1="0px" x2="32px" y1="0px" y2="0px" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#01fd01"/><stop offset="1" stop-color="#01fd01"/></linearGradient><clipPath id="GTyvZnamnUrR"><path fill="none" stroke="none" d=" M 0 0 L 96 0 L 96 48 L 0 48 L 0 0 Z"/></clipPath><clipPath id="CMZNoHVCKaqP"><path fill="none" stroke="none" d=" M 0 0 L 192 0 L 192 144 L 0 144 L 0 0 Z"/></clipPath></defs><g><rect fill="#000000" stroke="none" x="0" y="0" width="668" height="324"/><g transform="scale(1,1) translate(-538,-366)"><g><path fill="none" stroke="#807f7f" paint-order="fill stroke markers" d=" M 784 624 L 784 608" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><text fill="#ffffff" stroke="none" font-family="normal" font-size="20px" font-style="normal" font-weight="normal" text-decoration="normal" x="778" y="598" text-anchor="start" dominant-baseline="alphabetic">A</text><path fill="none" stroke="#01fd01" paint-order="fill stroke markers" d=" M 784 496 L 784 512" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><text fill="#ffffff" stroke="none" font-family="normal" font-size="20px" font-style="normal" font-weight="normal" text-decoration="normal" x="778" y="534" text-anchor="start" dominant-baseline="alphabetic">C</text><path fill="none" stroke="#40be40" paint-order="fill stroke markers" d=" M 752 560 L 768 560" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><text fill="#ffffff" stroke="none" font-family="normal" font-size="18px" font-style="normal" font-weight="normal" text-decoration="normal" x="773" y="566" text-anchor="start" dominant-baseline="alphabetic">ref</text><path fill="none" stroke="#c0c0c0" paint-order="fill stroke markers" d=" M 768 512 L 800 512 L 800 608 L 768 608 Z" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/></g><path fill="none" stroke="#807f7f" paint-order="fill stroke markers" d=" M 784 624 L 720 624" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><text fill="#ffffff" stroke="none" font-family="sans-serif" font-size="12px" font-style="normal" font-weight="normal" text-decoration="normal" x="752" y="618" text-anchor="start" dominant-baseline="alphabetic"></text><path fill="none" stroke="#807f7f" paint-order="fill stroke markers" d=" M 720 624 L 720 608" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><path fill="none" stroke="#40be40" paint-order="fill stroke markers" d=" M 720 576 L 720 560" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><g transform="matrix(0,-1,1,0,720,608)"><path fill="none" stroke="url(#PvczCDAdxLtO)" paint-order="fill stroke markers" d=" M 0 0 L 2 6 L 6 -6 L 10 6 L 14 -6 L 18 6 L 22 -6 L 26 6 L 30 -6 L 32 0" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/></g><text fill="#ffffff" stroke="none" font-family="sans-serif" font-size="12px" font-style="normal" font-weight="normal" text-decoration="normal" x="730" y="598" text-anchor="start" dominant-baseline="alphabetic">10k</text><path fill="none" stroke="#40be40" paint-order="fill stroke markers" d=" M 720 560 L 752 560" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><text fill="#ffffff" stroke="none" font-family="sans-serif" font-size="12px" font-style="normal" font-weight="normal" text-decoration="normal" x="736" y="554" text-anchor="start" dominant-baseline="alphabetic"></text><path fill="none" stroke="#40be40" paint-order="fill stroke markers" d=" M 720 560 L 720 544" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><path fill="none" stroke="#01fd01" paint-order="fill stroke markers" d=" M 720 512 L 720 496" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><g transform="matrix(0,-1,1,0,720,544)"><path fill="none" stroke="url(#GeeOvucfBHtO)" paint-order="fill stroke markers" d=" M 0 0 L 2 6 L 6 -6 L 10 6 L 14 -6 L 18 6 L 22 -6 L 26 6 L 30 -6 L 32 0" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/></g><text fill="#ffffff" stroke="none" font-family="sans-serif" font-size="12px" font-style="normal" font-weight="normal" text-decoration="normal" x="730" y="534" text-anchor="start" dominant-baseline="alphabetic">10k</text><path fill="none" stroke="#01fd01" paint-order="fill stroke markers" d=" M 720 496 L 784 496" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><text fill="#ffffff" stroke="none" font-family="sans-serif" font-size="12px" font-style="normal" font-weight="normal" text-decoration="normal" x="752" y="490" text-anchor="start" dominant-baseline="alphabetic"></text><path fill="none" stroke="#01fd01" paint-order="fill stroke markers" d=" M 720 496 L 704 496" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><path fill="none" stroke="#01fd01" paint-order="fill stroke markers" d=" M 672 496 L 656 496" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><g transform="matrix(-1,0,0,-1,704,496)"><path fill="none" stroke="url(#mZOCOsEkoeSS)" paint-order="fill stroke markers" d=" M 0 0 L 2 6 L 6 -6 L 10 6 L 14 -6 L 18 6 L 22 -6 L 26 6 L 30 -6 L 32 0" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/></g><text fill="#ffffff" stroke="none" font-family="sans-serif" font-size="12px" font-style="normal" font-weight="normal" text-decoration="normal" x="681" y="486" text-anchor="start" dominant-baseline="alphabetic">10</text><g><g><text fill="#00ffff" stroke="none" font-family="sans-serif" font-size="14px" font-style="normal" font-weight="bold" text-decoration="normal" x="880" y="496" text-anchor="middle" dominant-baseline="central">5031.568 mV</text></g><path fill="none" stroke="#00ffff" paint-order="fill stroke markers" d=" M 832 496 L 828 496" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><path fill="#ffffff" stroke="none" paint-order="stroke fill markers" d=" M 835 496 A 3 3 0 1 1 834.9999999999577 495.99998407846124 Z"/></g><g transform="scale(1,1) translate(538,366)"><g transform="translate(102,50)" clip-path="url(#GTyvZnamnUrR)"><g><path fill="none" stroke="#A0A0A0" paint-order="fill stroke markers" d=" M 0 43 L 95 43" stroke-linecap="round" stroke-miterlimit="10" stroke-dasharray=""/><path fill="none" stroke="#404040" paint-order="fill stroke markers" d=" M 0 23 L 95 23" stroke-linecap="round" stroke-miterlimit="10" stroke-dasharray=""/><path fill="none" stroke="#404040" paint-order="fill stroke markers" d=" M 0 2 L 95 2" stroke-linecap="round" stroke-miterlimit="10" stroke-dasharray=""/><path fill="none" stroke="#404040" paint-order="fill stroke markers" d=" M 91 0 L 91 47" stroke-linecap="round" stroke-miterlimit="10" stroke-dasharray=""/><path fill="none" stroke="#404040" paint-order="fill stroke markers" d=" M 60 0 L 60 47" stroke-linecap="round" stroke-miterlimit="10" stroke-dasharray=""/><path fill="none" stroke="#404040" paint-order="fill stroke markers" d=" M 29 0 L 29 47" stroke-linecap="round" stroke-miterlimit="10" stroke-dasharray=""/><path fill="none" stroke="#FFFFFF" paint-order="fill stroke markers" d=" M 0 21 L 95 21" stroke-linecap="round" stroke-miterlimit="10" stroke-dasharray=""/><text fill="#ffffff" stroke="none" font-family="sans-serif" font-size="12px" font-style="normal" font-weight="normal" text-decoration="normal" x="0" y="10" text-anchor="start" dominant-baseline="alphabetic">Max=21.943 mW</text></g></g></g><path fill="none" stroke="#807f7f" paint-order="fill stroke markers" d=" M 656 624 L 656 564" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><path fill="none" stroke="#01fd01" paint-order="fill stroke markers" d=" M 656 556 L 656 496" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><path fill="none" stroke="#807f7f" paint-order="fill stroke markers" d=" M 646 564 L 666 564" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><path fill="none" stroke="#01fd01" paint-order="fill stroke markers" d=" M 640 556 L 672 556" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><g><g><text fill="#ffffff" stroke="none" font-family="sans-serif" font-size="14px" font-style="normal" font-weight="normal" text-decoration="normal" x="608" y="496" text-anchor="middle" dominant-baseline="central">5500.000 mV</text></g><path fill="none" stroke="#01fd01" paint-order="fill stroke markers" d=" M 656 496 L 659 496" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/></g><path fill="none" stroke="#807f7f" paint-order="fill stroke markers" d=" M 832 624 L 832 564" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><path fill="none" stroke="#807f7f" paint-order="fill stroke markers" d=" M 820 564 L 844 564" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><path fill="none" stroke="#01fd01" paint-order="fill stroke markers" d=" M 832 496 L 832 556" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><path fill="none" stroke="#01fd01" paint-order="fill stroke markers" d=" M 820 556 L 844 556" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><text fill="#ffffff" stroke="none" font-family="sans-serif" font-size="12px" font-style="normal" font-weight="normal" text-decoration="normal" x="846" y="566" text-anchor="start" dominant-baseline="alphabetic">100μF</text><path fill="none" stroke="#01fd01" paint-order="fill stroke markers" d=" M 832 496 L 784 496" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><text fill="#ffffff" stroke="none" font-family="sans-serif" font-size="12px" font-style="normal" font-weight="normal" text-decoration="normal" x="808" y="490" text-anchor="start" dominant-baseline="alphabetic"></text><path fill="none" stroke="#807f7f" paint-order="fill stroke markers" d=" M 832 624 L 784 624" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><text fill="#ffffff" stroke="none" font-family="sans-serif" font-size="12px" font-style="normal" font-weight="normal" text-decoration="normal" x="808" y="618" text-anchor="start" dominant-baseline="alphabetic"></text><path fill="none" stroke="#807f7f" paint-order="fill stroke markers" d=" M 720 624 L 656 624" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><text fill="#ffffff" stroke="none" font-family="sans-serif" font-size="12px" font-style="normal" font-weight="normal" text-decoration="normal" x="688" y="618" text-anchor="start" dominant-baseline="alphabetic"></text><g transform="scale(1,1) translate(538,366)"><g transform="translate(424,256)"><path fill="none" stroke="#404040" paint-order="fill stroke markers" d=" M 4.9 0 A 4.9 4.9 0 1 1 4.899997550000204 -0.004899999183336211" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><path fill="none" stroke="#404040" paint-order="fill stroke markers" d=" M -8 0 L -5 0" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><path fill="none" stroke="#404040" paint-order="fill stroke markers" d=" M 8 0 L 5 0" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><path fill="none" stroke="#404040" paint-order="fill stroke markers" d=" M 0 -8 L 0 -5" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><path fill="none" stroke="#404040" paint-order="fill stroke markers" d=" M 0 8 L 0 5" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><path fill="none" stroke="#404040" paint-order="fill stroke markers" d=" M -6 -6 L -4 -4" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><path fill="none" stroke="#404040" paint-order="fill stroke markers" d=" M 6 -6 L 4 -4" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><path fill="none" stroke="#404040" paint-order="fill stroke markers" d=" M -6 6 L -4 4" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/><path fill="none" stroke="#404040" paint-order="fill stroke markers" d=" M 6 6 L 4 4" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" stroke-dasharray=""/></g><g transform="translate(406,130)" clip-path="url(#CMZNoHVCKaqP)"><g><path fill="none" stroke="#A0A0A0" paint-order="fill stroke markers" d=" M 0 135 L 191 135" stroke-linecap="round" stroke-miterlimit="10" stroke-dasharray=""/><path fill="none" stroke="#404040" paint-order="fill stroke markers" d=" M 0 109 L 191 109" stroke-linecap="round" stroke-miterlimit="10" stroke-dasharray=""/><path fill="none" stroke="#404040" paint-order="fill stroke markers" d=" M 0 83 L 191 83" stroke-linecap="round" stroke-miterlimit="10" stroke-dasharray=""/><path fill="none" stroke="#404040" paint-order="fill stroke markers" d=" M 0 59 L 191 59" stroke-linecap="round" stroke-miterlimit="10" stroke-dasharray=""/><path fill="none" stroke="#404040" paint-order="fill stroke markers" d=" M 0 33 L 191 33" stroke-linecap="round" stroke-miterlimit="10" stroke-dasharray=""/><path fill="none" stroke="#404040" paint-order="fill stroke markers" d=" M 0 7 L 191 7" stroke-linecap="round" stroke-miterlimit="10" stroke-dasharray=""/><path fill="none" stroke="#404040" paint-order="fill stroke markers" d=" M 187 0 L 187 143" stroke-linecap="round" stroke-miterlimit="10" stroke-dasharray=""/><path fill="none" stroke="#404040" paint-order="fill stroke markers" d=" M 156 0 L 156 143" stroke-linecap="round" stroke-miterlimit="10" stroke-dasharray=""/><path fill="none" stroke="#404040" paint-order="fill stroke markers" d=" M 125 0 L 125 143" stroke-linecap="round" stroke-miterlimit="10" stroke-dasharray=""/><path fill="none" stroke="#404040" paint-order="fill stroke markers" d=" M 94 0 L 94 143" stroke-linecap="round" stroke-miterlimit="10" stroke-dasharray=""/><path fill="none" stroke="#404040" paint-order="fill stroke markers" d=" M 62 0 L 62 143" stroke-linecap="round" stroke-miterlimit="10" stroke-dasharray=""/><path fill="none" stroke="#404040" paint-order="fill stroke markers" d=" M 31 0 L 31 143" stroke-linecap="round" stroke-miterlimit="10" stroke-dasharray=""/><path fill="none" stroke="#404040" paint-order="fill stroke markers" d=" M 0 0 L 0 143" stroke-linecap="round" stroke-miterlimit="10" stroke-dasharray=""/><path fill="none" stroke="#00ff00" paint-order="fill stroke markers" d=" M 0 71 L 191 71" stroke-linecap="round" stroke-miterlimit="10" stroke-dasharray=""/><text fill="#ffffff" stroke="none" font-family="sans-serif" font-size="12px" font-style="normal" font-weight="normal" text-decoration="normal" x="0" y="10" text-anchor="start" dominant-baseline="alphabetic">Max=5.032 V</text><text fill="#ffffff" stroke="none" font-family="sans-serif" font-size="12px" font-style="normal" font-weight="normal" text-decoration="normal" x="0" y="139" text-anchor="start" dominant-baseline="alphabetic">Min=5.032 V</text></g></g></g><path fill="#ffffff" stroke="none" paint-order="stroke fill markers" d=" M 787 624 A 3 3 0 1 1 786.9999999999577 623.9999840784612 Z"/><path fill="#ffffff" stroke="none" paint-order="stroke fill markers" d=" M 787 496 A 3 3 0 1 1 786.9999999999577 495.99998407846124 Z"/><path fill="#ffffff" stroke="none" paint-order="stroke fill markers" d=" M 723 624 A 3 3 0 1 1 722.9999999999577 623.9999840784612 Z"/><path fill="#ffffff" stroke="none" paint-order="stroke fill markers" d=" M 723 560 A 3 3 0 1 1 722.9999999999577 559.9999840784612 Z"/><path fill="#ffffff" stroke="none" paint-order="stroke fill markers" d=" M 723 496 A 3 3 0 1 1 722.9999999999577 495.99998407846124 Z"/><path fill="#ffffff" stroke="none" paint-order="stroke fill markers" d=" M 659 496 A 3 3 0 1 1 658.9999999999577 495.99998407846124 Z"/><path fill="#ffffff" stroke="none" paint-order="stroke fill markers" d=" M 835 496 A 3 3 0 1 1 834.9999999999577 495.99998407846124 Z"/></g></g></svg>
@ericfont
Copy link
Author

sim

@ericfont
Copy link
Author

When divided in 2, the range becomes 2.373-2.516V, which lies within the iCE40 LP/HX LVCMOS25 recommended range of 2.37-2.62V.

When divided again in 2, the range becomes 1.186-1.258V, which lies within the iCE40 LP/HX core's recommended range of 1.14-1.26V.

@ericfont
Copy link
Author

If put a 1kohm potentiometer in the middle of the divider, then the resistors of the divider could be off by 5% and still could get a 5.035V regulated voltage: circuit-20250129-2154

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment