🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: sci.electronics.design
Article #632

Re: AI resistor picker

#632
From: john larkin
Date: Thu, 29 Oct 2026 11:02
368 lines
13126 bytes
On Thu, 29 Oct 2026 05:45:01 +0000, someone
<2a59d59e3809f827ce709d3815e3950eef4a6a93af5557a93a7fdfba71460843@example.com>
wrote:

>Do you care if your schematic, or portions thereof, end up in the cloud?

That's just one sheet of four. Not rocket science.

>
>As a test case, I created a schematic for the "interesting regulator"
>Automotive sensor power supply without a switching pre-regulator by Vishwas Vaidya
>
>( With a slight refinement to achieve 60dB input bus ripple rejection, and got rid of the KF capacitor. Also found he transposed the values for R6 and R5 which doesn't work at all)
>
>then munged the resistor values off standard E-24
>
>applied an algorithm to clean up the resistors to closest E-24 values.

We try hard to use parts that we already have in stock. That includes
quad r-packs whose various series/parallel combos add to the fun.



>
>The program executes in a flash.
>
>Here is the original schema with munged resistors, making them candidates for replacement with standard values;
>
>Version 4
>SHEET 1 2732 1280
>WIRE -224 48 -352 48
>WIRE -32 48 -160 48
>WIRE 144 48 -32 48
>WIRE 304 48 144 48
>WIRE 608 48 400 48
>WIRE 704 48 608 48
>WIRE 832 48 784 48
>WIRE 912 48 832 48
>WIRE 1200 48 976 48
>WIRE 1472 48 1200 48
>WIRE 1632 48 1472 48
>WIRE -32 112 -32 48
>WIRE 144 112 144 48
>WIRE 608 112 608 48
>WIRE 1200 144 1200 48
>WIRE 352 176 352 112
>WIRE 560 176 352 176
>WIRE 832 176 832 48
>WIRE 832 176 656 176
>WIRE -352 256 -352 48
>WIRE -32 272 -32 192
>WIRE 144 320 144 192
>WIRE 144 320 32 320
>WIRE 784 320 144 320
>WIRE 784 368 784 320
>WIRE 960 416 848 416
>WIRE 1072 416 960 416
>WIRE 1200 416 1200 224
>WIRE 1200 416 1152 416
>WIRE 1344 416 1200 416
>WIRE -32 432 -32 368
>WIRE 784 512 784 464
>WIRE 1344 528 1344 416
>WIRE 1472 528 1472 48
>WIRE -32 544 -32 512
>WIRE 352 544 352 176
>WIRE 352 544 -32 544
>WIRE 960 560 960 416
>WIRE -32 576 -32 544
>WIRE 784 608 784 576
>WIRE 896 608 784 608
>WIRE 1200 608 1200 416
>WIRE 784 672 784 608
>WIRE -32 704 -32 640
>WIRE -352 784 -352 336
>WIRE -32 784 -32 768
>WIRE -32 784 -352 784
>WIRE 464 784 -32 784
>WIRE 784 784 784 752
>WIRE 784 784 464 784
>WIRE 960 784 960 656
>WIRE 960 784 784 784
>WIRE 1200 784 1200 688
>WIRE 1200 784 960 784
>WIRE 1344 784 1344 608
>WIRE 1344 784 1200 784
>WIRE 1472 784 1472 608
>WIRE 1472 784 1344 784
>WIRE 464 864 464 784
>FLAG 464 864 0
>FLAG 1632 48 out
>IOPIN 1632 48 Out
>DATAFLAG 496 48 "round($*1k)/1k"
>DATAFLAG 256 320 "round($*1k)/1k"
>DATAFLAG 160 544 "round($*1k)/1k"
>DATAFLAG 1472 48 "round($*1k)/1k"
>DATAFLAG 160 48 "round($*1k)/1k"
>DATAFLAG -32 656 "round(I(D2)*1M)/1M"
>SYMBOL res -48 96 R0
>SYMATTR InstName R7
>SYMATTR Value 510.125
>SYMBOL res 128 96 R0
>SYMATTR InstName R6
>SYMATTR Value 6.825k
>SYMBOL pnp 32 368 R180
>SYMATTR InstName Q4
>SYMATTR Value MPSA92
>SYMBOL res -48 416 R0
>SYMATTR InstName R8
>SYMATTR Value 100.125
>SYMBOL zener -16 640 R180
>WINDOW 0 24 64 Left 2
>WINDOW 3 24 0 Left 2
>SYMATTR InstName D2
>SYMATTR Value 1N4735
>SYMBOL diode -48 704 R0
>SYMATTR InstName D3
>SYMATTR Value 1N914
>SYMBOL npn 304 112 R270
>WINDOW 0 73 24 Left 2
>WINDOW 3 74 74 Left 2
>SYMATTR InstName Q1
>SYMATTR Value MPSA42
>SYMBOL npn 560 112 M90
>SYMATTR InstName Q2
>SYMATTR Value MPSA42
>SYMBOL res 688 32 M90
>WINDOW 0 0 56 VBottom 2
>WINDOW 3 38 54 VTop 2
>SYMATTR InstName R4
>SYMATTR Value 10.125
>SYMBOL schottky 912 64 R270
>WINDOW 0 32 32 VTop 2
>WINDOW 3 0 32 VBottom 2
>SYMATTR InstName D1
>SYMATTR Value RB521CS-30L
>SYMATTR Description Diode
>SYMATTR Type diode
>SYMBOL res 1184 128 R0
>SYMATTR InstName R1
>SYMATTR Value 1.0125K
>SYMBOL res 1184 592 R0
>SYMATTR InstName R2
>SYMATTR Value 1.0125K
>SYMBOL res 1168 400 R90
>WINDOW 0 0 56 VBottom 2
>WINDOW 3 38 55 VTop 2
>SYMATTR InstName R3
>SYMATTR Value 10K
>SYMBOL npn 848 368 M0
>SYMATTR InstName Q3
>SYMATTR Value MPSA42
>SYMBOL voltage -352 240 R0
>WINDOW 123 0 0 Left 0
>WINDOW 39 24 124 Left 2
>WINDOW 3 24 96 Invisible 2
>SYMATTR SpiceLine Rser=0.01
>SYMATTR Value PULSE(13.6 73.6 0 100u 500m 100u 750m 1)
>SYMATTR InstName V1
>SYMBOL voltage 1344 512 R0
>WINDOW 123 0 0 Left 0
>WINDOW 39 0 0 Left 0
>SYMATTR InstName V2
>SYMATTR Value 3.5V
>SYMBOL res 768 656 R0
>SYMATTR InstName R5
>SYMATTR Value 1.2125K
>SYMBOL diode -224 64 R270
>WINDOW 0 32 32 VTop 2
>WINDOW 3 0 32 VBottom 2
>SYMATTR InstName D5
>SYMATTR Value 1N4007
>SYMBOL current 1472 528 R0
>WINDOW 123 0 0 Left 0
>WINDOW 39 0 0 Left 0
>SYMATTR InstName I1
>SYMATTR Value 20m
>SYMBOL npn 896 560 R0
>SYMATTR InstName Q5
>SYMATTR Value MPSA42
>SYMBOL diode 768 512 R0
>SYMATTR InstName D4
>TEXT -376 1224 Left 2 !.op I1 0 75m 5m
>TEXT 1504 664 Left 2 !;dc I1 0 75m 5m
>TEXT -368 936 Left 2 !.model MPSA42 NPN (Is=34.9f Xti=3 Eg=1.11 Vaf=100 Bf=2.65K Ne=1.708 Ise=16.32p Ikf=23.79m Xtb=1.5 Br=9.769 Nc=2 Isc=0 Ikr=0 Rc=7 Cjc=14.23p Mjc=.5489 Vjc=.75 Fc=.5 Cje=49.62p Mje=.4136 Vje=.75 Tr=934.3p Tf=1.69n Itf=5 Vtf=20 Xtf=150 Rb=10)
>TEXT -368 992 Left 2 !.model MPSA92 PNP (Is=1.31f Xti=3 Eg=1.11 Vaf=100 Bf=183.1 Ne=1.312 Ise=1.31f Ikf=.1507 Xtb=1.5 Br=4.249 Nc=2 Isc=0 Ikr=0 Rc=4.4 Cjc=18.15p Mjc=.4936 Vjc=.75 Fc=.5 Cje=28.15p Mje=.4161 Vje=.75 Tr=11.23n Tf=1.708n Itf=1 Vtf=10 Xtf=2 Rb=10)
>TEXT -368 1040 Left 2 !.model 1N4007 D (IS=76.9p RS=42.0m BV=1.00k IBV=5.00u CJO=26.5p M=0.333 N=1.45 TT=4.32u)
>TEXT -368 1096 Left 2 !.model RB521CS-30L D (Is=2.27u Rs=0.68 N=1.19 Cjo=21.5p M=0.33 Vj=0.65 Fc=0.5 Bv=30 Ibv=100u Eg=0.69 Xti=2)
>TEXT -376 1264 Left 2 !;tran 750m
>TEXT -368 1144 Left 2 !.model 1N4735 D(Is=5.205n Rs=.4763 N=1.28 Cjo=180p M=.3333 Vj=.75 Isr=1.317u Nr=3.097 Bv=6.2 Ibv=41m)
>
>Here is the instantaneously cleaned-up version:
>
>Version 4
>SHEET 1 2732 1280
>WIRE -224 48 -352 48
>WIRE -32 48 -160 48
>WIRE 144 48 -32 48
>WIRE 304 48 144 48
>WIRE 608 48 400 48
>WIRE 704 48 608 48
>WIRE 832 48 784 48
>WIRE 912 48 832 48
>WIRE 1200 48 976 48
>WIRE 1472 48 1200 48
>WIRE 1632 48 1472 48
>WIRE -32 112 -32 48
>WIRE 144 112 144 48
>WIRE 608 112 608 48
>WIRE 1200 144 1200 48
>WIRE 352 176 352 112
>WIRE 560 176 352 176
>WIRE 832 176 832 48
>WIRE 832 176 656 176
>WIRE -352 256 -352 48
>WIRE -32 272 -32 192
>WIRE 144 320 144 192
>WIRE 144 320 32 320
>WIRE 784 320 144 320
>WIRE 784 368 784 320
>WIRE 960 416 848 416
>WIRE 1072 416 960 416
>WIRE 1200 416 1200 224
>WIRE 1200 416 1152 416
>WIRE 1344 416 1200 416
>WIRE -32 432 -32 368
>WIRE 784 512 784 464
>WIRE 1344 528 1344 416
>WIRE 1472 528 1472 48
>WIRE -32 544 -32 512
>WIRE 352 544 352 176
>WIRE 352 544 -32 544
>WIRE 960 560 960 416
>WIRE -32 576 -32 544
>WIRE 784 608 784 576
>WIRE 896 608 784 608
>WIRE 1200 608 1200 416
>WIRE 784 672 784 608
>WIRE -32 704 -32 640
>WIRE -352 784 -352 336
>WIRE -32 784 -32 768
>WIRE -32 784 -352 784
>WIRE 464 784 -32 784
>WIRE 784 784 784 752
>WIRE 784 784 464 784
>WIRE 960 784 960 656
>WIRE 960 784 784 784
>WIRE 1200 784 1200 688
>WIRE 1200 784 960 784
>WIRE 1344 784 1344 608
>WIRE 1344 784 1200 784
>WIRE 1472 784 1472 608
>WIRE 1472 784 1344 784
>WIRE 464 864 464 784
>FLAG 464 864 0
>FLAG 1632 48 out
>IOPIN 1632 48 Out
>DATAFLAG 496 48 "round($*1k)/1k"
>DATAFLAG 256 320 "round($*1k)/1k"
>DATAFLAG 160 544 "round($*1k)/1k"
>DATAFLAG 1472 48 "round($*1k)/1k"
>DATAFLAG 160 48 "round($*1k)/1k"
>DATAFLAG -32 656 "round(I(D2)*1M)/1M"
>SYMBOL res -48 96 R0
>SYMATTR InstName R7
>SYMATTR Value 510
>SYMBOL res 128 96 R0
>SYMATTR InstName R6
>SYMATTR Value 6.8k
>SYMBOL pnp 32 368 R180
>SYMATTR InstName Q4
>SYMATTR Value MPSA92
>SYMBOL res -48 416 R0
>SYMATTR InstName R8
>SYMATTR Value 100
>SYMBOL zener -16 640 R180
>WINDOW 0 24 64 Left 2
>WINDOW 3 24 0 Left 2
>SYMATTR InstName D2
>SYMATTR Value 1N4735
>SYMBOL diode -48 704 R0
>SYMATTR InstName D3
>SYMATTR Value 1N914
>SYMBOL npn 304 112 R270
>WINDOW 0 73 24 Left 2
>WINDOW 3 74 74 Left 2
>SYMATTR InstName Q1
>SYMATTR Value MPSA42
>SYMBOL npn 560 112 M90
>SYMATTR InstName Q2
>SYMATTR Value MPSA42
>SYMBOL res 688 32 M90
>WINDOW 0 0 56 VBottom 2
>WINDOW 3 38 54 VTop 2
>SYMATTR InstName R4
>SYMATTR Value 10
>SYMBOL schottky 912 64 R270
>WINDOW 0 32 32 VTop 2
>WINDOW 3 0 32 VBottom 2
>SYMATTR InstName D1
>SYMATTR Value RB521CS-30L
>SYMATTR Description Diode
>SYMATTR Type diode
>SYMBOL res 1184 128 R0
>SYMATTR InstName R1
>SYMATTR Value 1K
>SYMBOL res 1184 592 R0
>SYMATTR InstName R2
>SYMATTR Value 1K
>SYMBOL res 1168 400 R90
>WINDOW 0 0 56 VBottom 2
>WINDOW 3 38 55 VTop 2
>SYMATTR InstName R3
>SYMATTR Value 10K
>SYMBOL npn 848 368 M0
>SYMATTR InstName Q3
>SYMATTR Value MPSA42
>SYMBOL voltage -352 240 R0
>WINDOW 123 0 0 Left 0
>WINDOW 39 24 124 Left 2
>WINDOW 3 24 96 Invisible 2
>SYMATTR SpiceLine Rser=0.01
>SYMATTR Value PULSE(13.6 73.6 0 100u 500m 100u 750m 1)
>SYMATTR InstName V1
>SYMBOL voltage 1344 512 R0
>WINDOW 123 0 0 Left 0
>WINDOW 39 0 0 Left 0
>SYMATTR InstName V2
>SYMATTR Value 3.5V
>SYMBOL res 768 656 R0
>SYMATTR InstName R5
>SYMATTR Value 1.2K
>SYMBOL diode -224 64 R270
>WINDOW 0 32 32 VTop 2
>WINDOW 3 0 32 VBottom 2
>SYMATTR InstName D5
>SYMATTR Value 1N4007
>SYMBOL current 1472 528 R0
>WINDOW 123 0 0 Left 0
>WINDOW 39 0 0 Left 0
>SYMATTR InstName I1
>SYMATTR Value 20m
>SYMBOL npn 896 560 R0
>SYMATTR InstName Q5
>SYMATTR Value MPSA42
>SYMBOL diode 768 512 R0
>SYMATTR InstName D4
>TEXT -376 1224 Left 2 !.op I1 0 75m 5m
>TEXT 1504 664 Left 2 !;dc I1 0 75m 5m
>TEXT -368 936 Left 2 !.model MPSA42 NPN (Is=34.9f Xti=3 Eg=1.11 Vaf=100 Bf=2.65K Ne=1.708 Ise=16.32p Ikf=23.79m Xtb=1.5 Br=9.769 Nc=2 Isc=0 Ikr=0 Rc=7 Cjc=14.23p Mjc=.5489 Vjc=.75 Fc=.5 Cje=49.62p Mje=.4136 Vje=.75 Tr=934.3p Tf=1.69n Itf=5 Vtf=20 Xtf=150 Rb=10)
>TEXT -368 992 Left 2 !.model MPSA92 PNP (Is=1.31f Xti=3 Eg=1.11 Vaf=100 Bf=183.1 Ne=1.312 Ise=1.31f Ikf=.1507 Xtb=1.5 Br=4.249 Nc=2 Isc=0 Ikr=0 Rc=4.4 Cjc=18.15p Mjc=.4936 Vjc=.75 Fc=.5 Cje=28.15p Mje=.4161 Vje=.75 Tr=11.23n Tf=1.708n Itf=1 Vtf=10 Xtf=2 Rb=10)
>TEXT -368 1040 Left 2 !.model 1N4007 D (IS=76.9p RS=42.0m BV=1.00k IBV=5.00u CJO=26.5p M=0.333 N=1.45 TT=4.32u)
>TEXT -368 1096 Left 2 !.model RB521CS-30L D (Is=2.27u Rs=0.68 N=1.19 Cjo=21.5p M=0.33 Vj=0.65 Fc=0.5 Bv=30 Ibv=100u Eg=0.69 Xti=2)
>TEXT -376 1264 Left 2 !;tran 750m
>TEXT -368 1144 Left 2 !.model 1N4735 D(Is=5.205n Rs=.4763 N=1.28 Cjo=180p M=.3333 Vj=.75 Isr=1.317u Nr=3.097 Bv=6.2 Ibv=41m)
>
>Functionally, this establishes a route to using what's called an "inventory bound" file for the calculations in place of standard spec of using the full E-24 line.
>
>This has been expanded to use series/parallel combinations of resistors from the inventory file (text file with one value per line).
>All the resistors are recalculated, and you have the option of replacement on the schematic or not. If you choose not to replace, which may be the wiser decision, the program outputs a table of the results for each resistor, the combination of inventory resistors used for a prospective replacement, and an error for the replacement deviation from the schematic value. So you can pick and choose which one you want, or change, or leave alone. If you choose to replace, the program will alter the resistor's attribute spec with the pseudo c-code, which lets you quickly simulate to verify everything is hunky-dory. The actual drawing is not altered.
>
>This approach seems like the most universal way to go since all your circuits originate with a schematic. And you avoid some app mess with hundreds of possible input directives.
>
>Let me know if you want to pursue it further. I have no use for it, so this is as far as I go.

John Larkin
Highland Tech Glen Canyon Design Center
Lunatic Fringe Electronics
Technical Details
Message-ID: <je96elhc32620nqg2kfbnuhsk018k24ftq@4ax.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <re77dl9ft5v2mcim72s8gpaq6qeu2uaort@4ax.com> <18e2e9d4c870a409$1064$3179723$4226dc73@news.newsgroupdirect.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: john larkin <jl@glen--canyon.com>
Newsgroups: sci.electronics.design
Subject: Re: AI resistor picker
Date: Thu, 29 Oct 2026 04:02:28 -0700
Organization: A noiseless patient Spider
Lines: 368
Message-ID: <je96elhc32620nqg2kfbnuhsk018k24ftq@4ax.com>
References: <re77dl9ft5v2mcim72s8gpaq6qeu2uaort@4ax.com> <18e2e9d4c870a409$1064$3179723$4226dc73@news.newsgroupdirect.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 29 Oct 2026 11:02:31 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="3444525"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+xYCGlcbvM3Cjr8+5pF/G3"; posting-host="11c1b264104c30890b66cac0063a0ca1"
User-Agent: ForteAgent/8.00.32.1272
Cancel-Lock: sha1:G6BY1lEqELw4HDGXiuABavye75M= sha256:nZ7G/N6rB9Gtk7Gg82POYfBxyK6Lh/fPmOb68VZvltA=
	sha1:36TmARFbScU+DZegqQ+VvuzjC0c= sha256:SWS5TtApodSSDACyenZZHGKq3iqd9zjJf8L4wXhe23E=