2
\$\begingroup\$

I downloaded the VOM617AT (optocoupler) SPICE model from the following address:

https://www.mouser.com/ProductDetail/Vishay-Semiconductors/VOM617AT?qs=9vrc9xEJKyxW%252B%2FlvaQ%252BSPg%3D%3D

I am not quite sure why it's named as BJT_5mA. Then I tried to import it to Microcap, and I am unable to do so. Microcap can't find a spice model in this file, but I do see "subckt" text in the file. Previously, I have successfully imported spice models from Mouser/Digikey. Is something wrong with this spice model? Here's a copy of the spice model in text:

* Library of DC Input Phototransistor Output Optocoupler BJT_5mA
* Copyright VISHAY, Inc. 2018 All Rights Reserved.
*
* ==== BJT_5mA ====
* A = diode anode
* K = diode cathode
* C = BJT collector
* E = BJT emitter
*$
.SUBCKT BJT_5mA A K C E PARAMS: REL_CTR=1
D1 A D DIRED    ;IRED
Vsense D K 0 ;IF Current sense
Hd R 0 Vsense 1 ;I-V
Rd R T 10K
Cd T 0 0.2n
Rdummy B 0 4G
Q1 C B E [E] QBJT ;phototransistor
* V-I
Gpcg C B TABLE  ;Photodetector {(IC vs IF) / Q1 BF}
+ {0.4*REL_CTR*(V(T)**1.658*exp(limit(4.3-60*V(T),-50,50))*
+ ((4*10**(-9)*(REL_CTR**6))-(7*10**(-7)*(REL_CTR**5))+(5*10**(-5)*(REL_CTR**4))-(0.0015*(REL_CTR**3))+
+ (0.023*(REL_CTR**2))-(0.155*(REL_CTR))+2.2261)/100)}
+ (0,0) (10,10)
.model DIRED D IS=1P N=1.948621 BV=6 IBV=10U
+ CJO=18.8P EG=1.424 TT=500N
.model QBJT NPN IS=3.64P BF=100 NF=1.193293 BR=10 TF=13N TR=350n
+ CJE=5.16P CJC=18P VAF=65 ISS=0 CJS=7.74p
.ends
*$
**==================================================================*
* Note:
* Although models can be a useful tool in evaluating device performance,
* they cannot model exact device performance under all conditions, nor
* are they intended to replace breadboarding for final verification.
* Models provided by VISHAY Semiconductors GmbH (“Vishay”) do not represent
* all of the specifications and operating characteristics of the product to
* which the model relates. The models attempt to describe the characteristics
* of typical products. The current data sheet information for a given
* product represents the final design guideline and includes actual
* performance specifications. The accuracy, reliability and compatibility
* of models provided by Vishay are not guaranteed or warranted in any way
* and Vishay disclaims liability of any kind whatsoever, including, without
* limitation, liability for quality, performance, merchantability and fitness
* for a particular purpose arising out of the use, or inability to use a model.
* Vishay reserves the right to change models without prior notice.
* The products described herein, including the model and any results produced
* using the model, are subject to the specific disclaimers set forth at www.vishay.com/doc?91000.
**===================================================================
\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

The SPICE model can be found at Vishay's web site which is what I would download instead of a model at a third party's web site.

It looks like the BJT_5mA.lib file is in UTF-8 UCS-2 encoding. Perhaps Microcap doesn't understand UTF-8 UCS-2. If so, you'll need to transform the file to ASCII which Libreoffice Writer does, as well as many other programs. You need to make your own symbol for Microcap. Lines 5 thru 10 of the model show the pin designations.

\$\endgroup\$
5
  • 1
    \$\begingroup\$ It was an issue about UTF-8 file format. I used an online tool and it was able to import the spice model without an issue. Thanks. \$\endgroup\$
    – nmr
    Commented Dec 11, 2023 at 20:23
  • \$\begingroup\$ I did some more digging into this. The file is actually in UCS-2 Little Endian encoding without a BOM (byte order mark). Micro-Cap cannot understand the UCS-2 format, either with or without the BOM. However, it can indeed process an actual UTF-8 file though, BOM or no BOM. It's a shame Vishay supplies a library file written in 2018 with this obsolete UCS-2 format. Hopefully it's not common throughout their other libraries... \$\endgroup\$
    – Ste Kulov
    Commented Dec 11, 2023 at 23:07
  • 1
    \$\begingroup\$ @SteKulov I've never heard of UCS-2. Thanks for the research. \$\endgroup\$
    – qrk
    Commented Dec 12, 2023 at 6:53
  • \$\begingroup\$ @SteKulov UCS-2 is the encoding Windows uses natively, I believe. Much to the consternation of everyone else. \$\endgroup\$
    – Hearth
    Commented Dec 12, 2023 at 15:18
  • \$\begingroup\$ @Hearth I think that's close. What Windows (at least in XP and 7) refers to as "Unicode" is UCS-2. If you use Notepad to save something as "Unicode" it ends up as UCS-2 w/ a BOM. If you save it as "UTF-8", it will save it properly as UTF-8 (w/ a BOM). I dunno, seems like UCS-2 and UTF-16 are used interchangeably, so maybe when Notepad++ reports UCS-2 it means UTF-16??? I just know that for the purposes of this discussion, MicroCap seems to reject text using a fixed two bytes per character representation. \$\endgroup\$
    – Ste Kulov
    Commented Dec 12, 2023 at 23:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.