Electronics-Related.com
Forums

Finding LTspice Models

Started by Ricky C May 4, 2020
LTspice is a nice program... well, it's ok in many respects and great in others.  But it can be a PITA to find models for.  

I'm looking at a number of possible parts to use in a new design but many of them have no spice models.  I'm not so worried about finding an accurate LED model.  But I'm using a Schottky diode to prevent back feeding of power through a regulator and I need a good match to the Vf and Ir.  

I tried going through the available LEDs in LTspice and few of them are current parts.  I don't want to do the same search for a Schottky diode as they have a lot more of them and many are likely not useful for a number of reasons.  A part I picked from Digikey is PMEG40T20ER.  I thought they had no model, but I got a reply from support and they told me how to find it.  They list it under documentation.  Why not?  Now to figure out if I can connect it to my schematic. 

I considered using the current limiting part Win is using, the FPF2125 which would do a great job of running current into the supercap and includes the back current block.  With a comparator this should be all that is needed to charge the supercap.  But no model.  I'd have to cobble something up that *should* work the same, but who knows? 

Dialog Semi has programmable devices for this like the SLG46116.  I don't see any indication it includes a block of the back current and doesn't limit the current, but otherwise it might include enough configurable logic and analog to do nearly the whole thing in one chip!  No model for LTspice, but they have their own simulator.  Not sure how the tools work and what other parts of the system can be included.  Their web site is all marketing heavy and not so much info on the details.  

Maybe I'll download the Dialog tools and see how well they work. 

Someone posted an inrush limiting circuit that gave me an idea to just construct my own regulator by adding a PNP to the PFET with a sense resistor.  That works ok, but there's just not enough head room to keep the current up once the voltage on the cap approaches 4V compared to the input of 5V.  That's no big deal since the cap is mostly charged by that point.  At the end there is still about half a volt across the drain/source of the PFET with almost 4V across the source/gate.  I'm using a BSS84 in the simulation, in no small part because that was in the library.  Is there another part that would have a lower drain/source voltage while passing 100mA with 4 volts on the gate? 

-- 

  Rick C.

  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
On 5/4/2020 4:08 AM, Ricky C wrote:
> LTspice is a nice program... well, it's ok in many respects and great in others. But it can be a PITA to find models for. > > I'm looking at a number of possible parts to use in a new design but many of them have no spice models. I'm not so worried about finding an accurate LED model. But I'm using a Schottky diode to prevent back feeding of power through a regulator and I need a good match to the Vf and Ir. > > I tried going through the available LEDs in LTspice and few of them are current parts. I don't want to do the same search for a Schottky diode as they have a lot more of them and many are likely not useful for a number of reasons. A part I picked from Digikey is PMEG40T20ER. I thought they had no model, but I got a reply from support and they told me how to find it. They list it under documentation. Why not? Now to figure out if I can connect it to my schematic. > > I considered using the current limiting part Win is using, the FPF2125 which would do a great job of running current into the supercap and includes the back current block. With a comparator this should be all that is needed to charge the supercap. But no model. I'd have to cobble something up that *should* work the same, but who knows? > > Dialog Semi has programmable devices for this like the SLG46116. I don't see any indication it includes a block of the back current and doesn't limit the current, but otherwise it might include enough configurable logic and analog to do nearly the whole thing in one chip! No model for LTspice, but they have their own simulator. Not sure how the tools work and what other parts of the system can be included. Their web site is all marketing heavy and not so much info on the details. > > Maybe I'll download the Dialog tools and see how well they work. > > Someone posted an inrush limiting circuit that gave me an idea to just construct my own regulator by adding a PNP to the PFET with a sense resistor. That works ok, but there's just not enough head room to keep the current up once the voltage on the cap approaches 4V compared to the input of 5V. That's no big deal since the cap is mostly charged by that point. At the end there is still about half a volt across the drain/source of the PFET with almost 4V across the source/gate. I'm using a BSS84 in the simulation, in no small part because that was in the library. Is there another part that would have a lower drain/source voltage while passing 100mA with 4 volts on the gate? >
Adding e.g. diode models to LTSpice is easy, you can use standard SPICE models if you have one. just go to to program files > LTC > LTSpicexxx > lib > cmp and click at top right of the file explorer there should be an icon that shows LTSpice as the associated program, paste the .model in at the end of the list with the others and save the file, it will be available to select next time you run the program. If you can find a PSpice model for something you should have a working LTSpice model also, just open the PSpice model in LTSpice, highlight the name of the part immediately after the ".model" declaration, right click and select "auto-generate symbol" and a symbol will be created for the model and you can find it under "AutoGenerated" in the component browser window and just drop in like any other component from the included library. I did that for the LM317 and LM337 on that circuit earlier, works fine.
On 5/4/2020 4:41 AM, bitrex wrote:
> On 5/4/2020 4:08 AM, Ricky C wrote: >> LTspice is a nice program... well, it's ok in many respects and great >> in others.  But it can be a PITA to find models for. >> >> I'm looking at a number of possible parts to use in a new design but >> many of them have no spice models.  I'm not so worried about finding >> an accurate LED model.  But I'm using a Schottky diode to prevent back >> feeding of power through a regulator and I need a good match to the Vf >> and Ir. >> >> I tried going through the available LEDs in LTspice and few of them >> are current parts.  I don't want to do the same search for a Schottky >> diode as they have a lot more of them and many are likely not useful >> for a number of reasons.  A part I picked from Digikey is >> PMEG40T20ER.  I thought they had no model, but I got a reply from >> support and they told me how to find it.  They list it under >> documentation.  Why not?  Now to figure out if I can connect it to my >> schematic. >> >> I considered using the current limiting part Win is using, the FPF2125 >> which would do a great job of running current into the supercap and >> includes the back current block.  With a comparator this should be all >> that is needed to charge the supercap.  But no model.  I'd have to >> cobble something up that *should* work the same, but who knows? >> >> Dialog Semi has programmable devices for this like the SLG46116.  I >> don't see any indication it includes a block of the back current and >> doesn't limit the current, but otherwise it might include enough >> configurable logic and analog to do nearly the whole thing in one >> chip!  No model for LTspice, but they have their own simulator.  Not >> sure how the tools work and what other parts of the system can be >> included.  Their web site is all marketing heavy and not so much info >> on the details. >> >> Maybe I'll download the Dialog tools and see how well they work. >> >> Someone posted an inrush limiting circuit that gave me an idea to just >> construct my own regulator by adding a PNP to the PFET with a sense >> resistor.  That works ok, but there's just not enough head room to >> keep the current up once the voltage on the cap approaches 4V compared >> to the input of 5V.  That's no big deal since the cap is mostly >> charged by that point.  At the end there is still about half a volt >> across the drain/source of the PFET with almost 4V across the >> source/gate.  I'm using a BSS84 in the simulation, in no small part >> because that was in the library.  Is there another part that would >> have a lower drain/source voltage while passing 100mA with 4 volts on >> the gate? >> > > Adding e.g. diode models to LTSpice is easy, you can use standard SPICE > models if you have one. just go to to program files > LTC > LTSpicexxx > > lib > cmp and click at top right of the file explorer
Sorry, you need to highlight the diode model file first it will have a blue "D" icon in the file explorer. Or you can just open it in Wordpad and do the same thing.
On 5/4/2020 4:08 AM, Ricky C wrote:
> LTspice is a nice program... well, it's ok in many respects and great in others. But it can be a PITA to find models for. > > I'm looking at a number of possible parts to use in a new design but many of them have no spice models. I'm not so worried about finding an accurate LED model. But I'm using a Schottky diode to prevent back feeding of power through a regulator and I need a good match to the Vf and Ir. > > I tried going through the available LEDs in LTspice and few of them are current parts. I don't want to do the same search for a Schottky diode as they have a lot more of them and many are likely not useful for a number of reasons. A part I picked from Digikey is PMEG40T20ER. I thought they had no model, but I got a reply from support and they told me how to find it. They list it under documentation. Why not? Now to figure out if I can connect it to my schematic. > > I considered using the current limiting part Win is using, the FPF2125 which would do a great job of running current into the supercap and includes the back current block. With a comparator this should be all that is needed to charge the supercap. But no model. I'd have to cobble something up that *should* work the same, but who knows? > > Dialog Semi has programmable devices for this like the SLG46116. I don't see any indication it includes a block of the back current and doesn't limit the current, but otherwise it might include enough configurable logic and analog to do nearly the whole thing in one chip! No model for LTspice, but they have their own simulator. Not sure how the tools work and what other parts of the system can be included. Their web site is all marketing heavy and not so much info on the details. > > Maybe I'll download the Dialog tools and see how well they work. > > Someone posted an inrush limiting circuit that gave me an idea to just construct my own regulator by adding a PNP to the PFET with a sense resistor. That works ok, but there's just not enough head room to keep the current up once the voltage on the cap approaches 4V compared to the input of 5V. That's no big deal since the cap is mostly charged by that point. At the end there is still about half a volt across the drain/source of the PFET with almost 4V across the source/gate. I'm using a BSS84 in the simulation, in no small part because that was in the library. Is there another part that would have a lower drain/source voltage while passing 100mA with 4 volts on the gate? >
Google "PMEG40T20ER spice model", second hit is: <https://assets.nexperia.com/documents/spice-model/PMEG40T20ER.txt> at bottom, save this into a file called "PMEG40T20ER.sub", open in LTSpice and highlight "PMEG40T20ER" at the top after .SUBCKT and right click and it should be able to make a component for you .SUBCKT PMEG40T20ER 1 2 R1 1 2 7E+006 D1 1 2 + DIODE1 D2 1 2 + DIODE2 * *The resistor R1 and the diode D2 do not reflect *physical devices but improve *only modeling in the reverse *mode of operation. * .MODEL DIODE1 D + IS = 5E-007 + N = 1 + BV = 66 + IBV = 0.03 + RS = 0.03 + CJO = 4.989E-010 + VJ = 2.5 + M = 0.8 + FC = 0.5 + TT = 0 + EG = 0.69 + XTI = 2 .MODEL DIODE2 D + IS = 5E-012 + N = 1 + RS = 1.2 .ENDS
On Monday, May 4, 2020 at 4:41:37 AM UTC-4, bitrex wrote:
> On 5/4/2020 4:08 AM, Ricky C wrote: > > LTspice is a nice program... well, it's ok in many respects and great in others. But it can be a PITA to find models for. > > > > I'm looking at a number of possible parts to use in a new design but many of them have no spice models. I'm not so worried about finding an accurate LED model. But I'm using a Schottky diode to prevent back feeding of power through a regulator and I need a good match to the Vf and Ir. > > > > I tried going through the available LEDs in LTspice and few of them are current parts. I don't want to do the same search for a Schottky diode as they have a lot more of them and many are likely not useful for a number of reasons. A part I picked from Digikey is PMEG40T20ER. I thought they had no model, but I got a reply from support and they told me how to find it. They list it under documentation. Why not? Now to figure out if I can connect it to my schematic. > > > > I considered using the current limiting part Win is using, the FPF2125 which would do a great job of running current into the supercap and includes the back current block. With a comparator this should be all that is needed to charge the supercap. But no model. I'd have to cobble something up that *should* work the same, but who knows? > > > > Dialog Semi has programmable devices for this like the SLG46116. I don't see any indication it includes a block of the back current and doesn't limit the current, but otherwise it might include enough configurable logic and analog to do nearly the whole thing in one chip! No model for LTspice, but they have their own simulator. Not sure how the tools work and what other parts of the system can be included. Their web site is all marketing heavy and not so much info on the details. > > > > Maybe I'll download the Dialog tools and see how well they work. > > > > Someone posted an inrush limiting circuit that gave me an idea to just construct my own regulator by adding a PNP to the PFET with a sense resistor. That works ok, but there's just not enough head room to keep the current up once the voltage on the cap approaches 4V compared to the input of 5V. That's no big deal since the cap is mostly charged by that point. At the end there is still about half a volt across the drain/source of the PFET with almost 4V across the source/gate. I'm using a BSS84 in the simulation, in no small part because that was in the library. Is there another part that would have a lower drain/source voltage while passing 100mA with 4 volts on the gate? > > > > Adding e.g. diode models to LTSpice is easy, you can use standard SPICE > models if you have one. just go to to program files > LTC > LTSpicexxx > > lib > cmp and click at top right of the file explorer there should be an > icon that shows LTSpice as the associated program, paste the .model in > at the end of the list with the others and save the file, it will be > available to select next time you run the program. > > If you can find a PSpice model for something you should have a working > LTSpice model also, just open the PSpice model in LTSpice, highlight the > name of the part immediately after the ".model" declaration, right click > and select "auto-generate symbol" and a symbol will be created for the > model and you can find it under "AutoGenerated" in the component browser > window and just drop in like any other component from the included library. > > I did that for the LM317 and LM337 on that circuit earlier, works fine.
Thanks for the info. I wasn't quite getting it but a little google-fu and I got a new symbol (a rectangle with the numbers 1 and 2) connected to the model file. Info on using LTspice is a lot more available than it used to be. Turns out this part number is a bit better in reverse current, but a bit worse in forward voltage. So I'm keeping the one I found in LTspice, it's a couple pennies cheaper at Digikey and they've got a lot more of them in stock. I'm pretty pleased with this part of the design. It is working well with nothing marginal that I can see. The rest of the circuit is crap. I don't know how complicated the logic needs to be. I started out thinking simply and used a pair of FETs to "remember" the state. I think the state machine needs to be a bit more complex than is reasonable with a hand full of transistors. Now I need to find a logic family that works from 4 volts down to under 2 volts and doesn't draw excess current. I did a quick look at LVC and with 2 volt inputs it's starting to draw excess current. I'll check the old CD4000 family to see if that will work below 2 volts Vdd. -- Rick C. + Get 1,000 miles of free Supercharging + Tesla referral code - https://ts.la/richard11209
On 04/05/2020 9:08 am, Ricky C wrote:
> LTspice is a nice program... well, it's ok in many respects and great in others. But it can be a PITA to find models for. > > I'm looking at a number of possible parts to use in a new design but many of them have no spice models. I'm not so worried about finding an accurate LED model. But I'm using a Schottky diode to prevent back feeding of power through a regulator and I need a good match to the Vf and Ir. > > I tried going through the available LEDs in LTspice and few of them are current parts. I don't want to do the same search for a Schottky diode as they have a lot more of them and many are likely not useful for a number of reasons. A part I picked from Digikey is PMEG40T20ER. I thought they had no model, but I got a reply from support and they told me how to find it. They list it under documentation. Why not? Now to figure out if I can connect it to my schematic. > > I considered using the current limiting part Win is using, the FPF2125 which would do a great job of running current into the supercap and includes the back current block. With a comparator this should be all that is needed to charge the supercap. But no model. I'd have to cobble something up that *should* work the same, but who knows? > > Dialog Semi has programmable devices for this like the SLG46116. I don't see any indication it includes a block of the back current and doesn't limit the current, but otherwise it might include enough configurable logic and analog to do nearly the whole thing in one chip! No model for LTspice, but they have their own simulator. Not sure how the tools work and what other parts of the system can be included. Their web site is all marketing heavy and not so much info on the details. > > Maybe I'll download the Dialog tools and see how well they work. > > Someone posted an inrush limiting circuit that gave me an idea to just construct my own regulator by adding a PNP to the PFET with a sense resistor. That works ok, but there's just not enough head room to keep the current up once the voltage on the cap approaches 4V compared to the input of 5V. That's no big deal since the cap is mostly charged by that point. At the end there is still about half a volt across the drain/source of the PFET with almost 4V across the source/gate. I'm using a BSS84 in the simulation, in no small part because that was in the library. Is there another part that would have a lower drain/source voltage while passing 100mA with 4 volts on the gate? >
The inrush limiter I posted in response to Win's post is not really a regulator, instead it uses a resistor to limit inrush and then shorts the resistor with the p-fet switch once the drop across the resistor falls. That creates a second inrush surge but huge gate capacitance can help partly tame that. You could try FDC638P which is specified for 2.5Vgs and is in the default LT Spice IV library (I haven't checked if it is in LTSVII). piglet
On 04/05/2020 10:41 am, Ricky C wrote:
> Now I need to find a logic family that works from 4 volts down to under 2 volts and doesn't draw excess current. I did a quick look at LVC and with 2 volt inputs it's starting to draw excess current. I'll check the old CD4000 family to see if that will work below 2 volts Vdd. >
CD4000 might work that low but be very feeble, think Rdson values in tens of kilo-ohm. 30+ year old 74HC (not HCT) parts are spec'd for Vdd 2V and will work much lower (with worsening performance). I had 74HC163 counters that retained internal states right down to Vdd of 50mV (yes - millivolts) piglet
On Monday, May 4, 2020 at 7:25:05 AM UTC-4, piglet wrote:
> On 04/05/2020 10:41 am, Ricky C wrote: > > Now I need to find a logic family that works from 4 volts down to under 2 volts and doesn't draw excess current. I did a quick look at LVC and with 2 volt inputs it's starting to draw excess current. I'll check the old CD4000 family to see if that will work below 2 volts Vdd. > > > > CD4000 might work that low but be very feeble, think Rdson values in > tens of kilo-ohm. 30+ year old 74HC (not HCT) parts are spec'd for Vdd > 2V and will work much lower (with worsening performance). > > I had 74HC163 counters that retained internal states right down to Vdd > of 50mV (yes - millivolts) > > piglet
I realized the required logic is even simpler than I thought. Once I made a state diagram I realized one of the two FFs controlling the indicators can actually be removed as the output was essentially the same as an input. That leaves one FF to control the other indicator which can be muted. Taking advantage of wire and diode connections allows the transistor based FF to be set and reset on the same net. Then the mute control drives a transistor which acts as an AND gate combining the mute signal with the alarm signal to drive the indicator. So as long as the functionality doesn't change, this is a pretty simple solution. -- Rick C. -- Get 1,000 miles of free Supercharging -- Tesla referral code - https://ts.la/richard11209
On Monday, May 4, 2020 at 6:03:59 AM UTC-4, piglet wrote:
> On 04/05/2020 9:08 am, Ricky C wrote: > > LTspice is a nice program... well, it's ok in many respects and great in others. But it can be a PITA to find models for. > > > > I'm looking at a number of possible parts to use in a new design but many of them have no spice models. I'm not so worried about finding an accurate LED model. But I'm using a Schottky diode to prevent back feeding of power through a regulator and I need a good match to the Vf and Ir. > > > > I tried going through the available LEDs in LTspice and few of them are current parts. I don't want to do the same search for a Schottky diode as they have a lot more of them and many are likely not useful for a number of reasons. A part I picked from Digikey is PMEG40T20ER. I thought they had no model, but I got a reply from support and they told me how to find it. They list it under documentation. Why not? Now to figure out if I can connect it to my schematic. > > > > I considered using the current limiting part Win is using, the FPF2125 which would do a great job of running current into the supercap and includes the back current block. With a comparator this should be all that is needed to charge the supercap. But no model. I'd have to cobble something up that *should* work the same, but who knows? > > > > Dialog Semi has programmable devices for this like the SLG46116. I don't see any indication it includes a block of the back current and doesn't limit the current, but otherwise it might include enough configurable logic and analog to do nearly the whole thing in one chip! No model for LTspice, but they have their own simulator. Not sure how the tools work and what other parts of the system can be included. Their web site is all marketing heavy and not so much info on the details. > > > > Maybe I'll download the Dialog tools and see how well they work. > > > > Someone posted an inrush limiting circuit that gave me an idea to just construct my own regulator by adding a PNP to the PFET with a sense resistor. That works ok, but there's just not enough head room to keep the current up once the voltage on the cap approaches 4V compared to the input of 5V. That's no big deal since the cap is mostly charged by that point. At the end there is still about half a volt across the drain/source of the PFET with almost 4V across the source/gate. I'm using a BSS84 in the simulation, in no small part because that was in the library. Is there another part that would have a lower drain/source voltage while passing 100mA with 4 volts on the gate? > > > > The inrush limiter I posted in response to Win's post is not really a > regulator, instead it uses a resistor to limit inrush and then shorts > the resistor with the p-fet switch once the drop across the resistor > falls. That creates a second inrush surge but huge gate capacitance can > help partly tame that. > > You could try FDC638P which is specified for 2.5Vgs and is in the > default LT Spice IV library (I haven't checked if it is in LTSVII).
Yes, that part seems to work much better in the simulation with the current holding at 80 mA until the full 4 volts is achieved. Thanks. The data sheet provides good thermal info... or I thought so until I noticed the example copper area layout doesn't fit this device. It would short most of the pins together. I guess they just use it for "illustrative" purposes. I'm surprised how simple this constant current design is. I was worried putting the back current Schottky in the regulating leg with the sense resistor might result in a sneak path for current through the 2N2907, but the BE junction is lower reverse current than the Schottky. Add one half of an LT6700-3 to the circuit and the current is a constant 80 mA until the supercap reaches 4 volts from a 5 volt supply. Even with a 4.7 volt source it holds 80 mA. I see the voltage across the PFET drop to 125 mV at the point the supercap is 4 volts. Nice. I was still exploring the device Win used which has no sim model. On support replied and they suggested a similar current limiting device, FPF2195 which does have a spice model. The current regulation setting is very loose though. Set it for 100 mA (the minimum) and you can get anywhere between 75 and 125 mA. The concern is the power from that current at the full 5 volts supply with zero volts on the supercap. It takes some time to put volts on these things so the device will heat up. Using the transistor design at 80 mA, the peak power is 390 mW in the PFET. 60 seconds later it is still 240 mW. I think if I pour a square inch of 2 oz copper on each side of the board connected by vias it should stand up fine. The data sheet says with a 2 oz square in on one side of the board the theta JA is 78 &deg;C/W giving a rise of 30 &deg;C worse case. Thanks for the tip. I'm using LTspice XVII, btw. It has a few UI quirks that rear heads when using the cntl-tab to switch windows. I don't know what that is about. Seems the cntl key changes the function of the cursor in the waveform display that mucks it up and I have to reset to view all and zoom in again if I mess up. -- Rick C. -+ Get 1,000 miles of free Supercharging -+ Tesla referral code - https://ts.la/richard11209
On 5/4/2020 12:09 PM, Ricky C wrote:
> On Monday, May 4, 2020 at 7:25:05 AM UTC-4, piglet wrote: >> On 04/05/2020 10:41 am, Ricky C wrote: >>> Now I need to find a logic family that works from 4 volts down to under 2 volts and doesn't draw excess current. I did a quick look at LVC and with 2 volt inputs it's starting to draw excess current. I'll check the old CD4000 family to see if that will work below 2 volts Vdd. >>> >> >> CD4000 might work that low but be very feeble, think Rdson values in >> tens of kilo-ohm. 30+ year old 74HC (not HCT) parts are spec'd for Vdd >> 2V and will work much lower (with worsening performance). >> >> I had 74HC163 counters that retained internal states right down to Vdd >> of 50mV (yes - millivolts) >> >> piglet > > I realized the required logic is even simpler than I thought. Once I made a state diagram I realized one of the two FFs controlling the indicators can actually be removed as the output was essentially the same as an input. That leaves one FF to control the other indicator which can be muted. > > Taking advantage of wire and diode connections allows the transistor based FF to be set and reset on the same net. Then the mute control drives a transistor which acts as an AND gate combining the mute signal with the alarm signal to drive the indicator. > > So as long as the functionality doesn't change, this is a pretty simple solution. >
To get flip-flops with guaranteed operation down below 2 volts you'll have to use something a little exotic like these Fairchild/ON "TinyLogic" parts with guaranteed down to 1.65: <https://www.mouser.com/datasheet/2/308/NC7SZ74-D-1812305.pdf> They are very nice high-performance flops though the US8 package is a little tedious to hand-solder to a surfboard for prototyping, use a microscope if you have one and are gonna do that.