Finding LTspice Models

LTspice is a nice program... well, it's ok in many respects and great in ot hers. 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 o f 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 cur rent parts. I don't want to do the same search for a Schottky diode as the y have a lot more of them and many are likely not useful for a number of re asons. 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. Th ey list it under documentation. Why not? Now to figure out if I can conne ct it to my schematic.

I considered using the current limiting part Win is using, the FPF2125 whic h would do a great job of running current into the supercap and includes th e 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 tha t *should* work the same, but who knows?

Dialog Semi has programmable devices for this like the SLG46116. I don't s ee 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 heav y 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 cons truct 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. Th at'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
Reply to
Ricky C
Loading thread data ...

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.

Reply to
bitrex

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.

Reply to
bitrex

Google "PMEG40T20ER spice model", second hit is:

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
Reply to
bitrex

n others. But it can be a PITA to find models for.

ny of them have no spice models. I'm not so worried about finding an accur ate LED model. But I'm using a Schottky diode to prevent back feeding of p ower through a regulator and I need a good match to the Vf and Ir.

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 o f reasons. A part I picked from Digikey is PMEG40T20ER. I thought they ha d 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 c onnect it to my schematic.

which would do a great job of running current into the supercap and include s the back current block. With a comparator this should be all that is nee ded to charge the supercap. But no model. I'd have to cobble something up that *should* work the same, but who knows?

't see any indication it includes a block of the back current and doesn't l imit 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 o ther parts of the system can be included. Their web site is all marketing heavy and not so much info on the details.

construct my own regulator by adding a PNP to the PFET with a sense resisto r. That works ok, but there's just not enough head room to keep the curren t 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 w ith 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 t hat would have a lower drain/source voltage while passing 100mA with 4 volt s on the gate?

y.

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 wo rse 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 sto ck.

I'm pretty pleased with this part of the design. It is working well with n othing 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 tran sistors.

Now I need to find a logic family that works from 4 volts down to under 2 v olts 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 CD40

00 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
Reply to
Ricky C

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

Reply to
piglet

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

Reply to
piglet

2 volts and doesn't draw excess current. I did a quick look at LVC and wi th 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.

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 ca n 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 tra nsistor 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 sol ution.

--

  Rick C. 

  -- Get 1,000 miles of free Supercharging 
  -- Tesla referral code - https://ts.la/richard11209
Reply to
Ricky C

n others. But it can be a PITA to find models for.

ny of them have no spice models. I'm not so worried about finding an accur ate LED model. But I'm using a Schottky diode to prevent back feeding of p ower through a regulator and I need a good match to the Vf and Ir.

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 o f reasons. A part I picked from Digikey is PMEG40T20ER. I thought they ha d 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 c onnect it to my schematic.

which would do a great job of running current into the supercap and include s the back current block. With a comparator this should be all that is nee ded to charge the supercap. But no model. I'd have to cobble something up that *should* work the same, but who knows?

't see any indication it includes a block of the back current and doesn't l imit 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 o ther parts of the system can be included. Their web site is all marketing heavy and not so much info on the details.

construct my own regulator by adding a PNP to the PFET with a sense resisto r. That works ok, but there's just not enough head room to keep the curren t 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 w ith 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 t hat would have a lower drain/source voltage while passing 100mA with 4 volt s on the gate?

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 sh eet provides good thermal info... or I thought so until I noticed the examp le 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 pu tting the back current Schottky in the regulating leg with the sense resist or 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 L T6700-3 to the circuit and the current is a constant 80 mA until the superc ap reaches 4 volts from a 5 volt supply. Even with a 4.7 volt source it ho lds 80 mA. I see the voltage across the PFET drop to 125 mV at the point t he supercap is 4 volts. Nice.

I was still exploring the device Win used which has no sim model. On suppo rt replied and they suggested a similar current limiting device, FPF2195 wh ich 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 7

5 and 125 mA. The concern is the power from that current at the full 5 vol ts 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 t

Thanks for the tip. I'm using LTspice XVII, btw. It has a few UI quirks t hat rear heads when using the cntl-tab to switch windows. I don't know wha t 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 z oom in again if I mess up.

--

  Rick C. 

  -+ Get 1,000 miles of free Supercharging 
  -+ Tesla referral code - https://ts.la/richard11209
Reply to
Ricky C

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:

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.

Reply to
bitrex

er 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 ol d CD4000 family to see if that will work below 2 volts Vdd.

d

ade a state diagram I realized one of the two FFs controlling the indicator s can actually be removed as the output was essentially the same as an inpu t. That leaves one FF to control the other indicator which can be muted.

sed 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 al arm signal to drive the indicator.

solution.

Thanks for the info. "Below 2 volts" is just that I don't want the thing g oing crazy. The sounder is rated for 2 to 4 volts, so I am basing my power life on that range, charging the supercap up to 4 volts and running it dow n as long as it works.

I actually simplified the logic a bit. I had been looking at two FFs to co ntrol the alarm state as well as the mute for the audio alarm. But once I tried implementing it I found a number of nice simplifications so the circu it is just one FF (implemented with two transistors and a transistor to act as an AND gate to combine the alarm with the mute signal for the sounder. The run time with 2.5 F is 20 minutes... just meeting the requirement. If I want to extend the time I can pulse the alarm by some duty cycle which m ight make it more apparent. Then I need something additional to create the pulsing. A 555 timer seems overkill, but maybe it is perfect kill? I bel ieve there is a CMOS version that runs at very low currents. Maybe not all that low. I'm finding 100 uA at 5 volts. I'd like to at least find low d ouble digits uA.

I need to ask more about the alarm requirements, but I think they want me t o define them.

--

  Rick C. 

  +- Get 1,000 miles of free Supercharging 
  +- Tesla referral code - https://ts.la/richard11209
Reply to
Ricky C

Flops and logic made from discrete BJTs doesn't sound particularly low-power to me. There is a CMOS 555 but as you say it's not particularly cheap or low-current, me being me I'd think about using the low-power ATTiny variant that will run down to 1.8 volts, when it's not doing anything it can be put in the deep sleep and draw only nA.

There's a circuit for a one-shot/timer on page 21 of the Lm13700 datasheet that draws (almost) zero stand-by current and triggers on 2 volts. The 13700 requires about 3-ish volt supply to operate properly but looking at the circuit and the internal schematic of the 13700 I suspect it would work OK with a lower supply rail if the output was bootstrapped to the positive rail to boost its own supply as the output is positive-going.

Reply to
bitrex

nder 2 volts and doesn't draw excess current. I did a quick look at LVC an d 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.

Vdd

dd

made a state diagram I realized one of the two FFs controlling the indicat ors can actually be removed as the output was essentially the same as an in put. That leaves one FF to control the other indicator which can be muted.

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.

le solution.

ng going crazy. The sounder is rated for 2 to 4 volts, so I am basing my p ower life on that range, charging the supercap up to 4 volts and running it down as long as it works.

o control the alarm state as well as the mute for the audio alarm. But onc e I tried implementing it I found a number of nice simplifications so the c ircuit is just one FF (implemented with two transistors and a transistor to act as an AND gate to combine the alarm with the mute signal for the sound er. The run time with 2.5 F is 20 minutes... just meeting the requirement. If I want to extend the time I can pulse the alarm by some duty cycle whi ch might make it more apparent. Then I need something additional to create the pulsing. A 555 timer seems overkill, but maybe it is perfect kill? I believe there is a CMOS version that runs at very low currents. Maybe not all that low. I'm finding 100 uA at 5 volts. I'd like to at least find l ow double digits uA.

me to define them.

NFETs with 1 Mohm resistors are adequately low power. I had them on the bo ard anyway so why not use them for a FF? I like keeping the BOM short.

Yeah, I hate to use an MCU when it's not really required. So far the circu it has gotten simpler rather than more complex. Realizing I didn't need a three state FSM was a help. A two state mute circuit is simpler. I'm look ing at implementing that with a cap, but that requires nA currents and I ha ve little confidence since a fingerprint in the wrong place can cause a fai lure.

Doesn't look so good to me. I can kill power to the device entirely since it has to be run from its own regulator. It's the active current that is i mportant. Ten or twenty uA is not bad since the load it is controlling is 3 mA. I'm thinking it can be pulsed on for a second and off for up to 9 s econds and still be effective, but that's a question that I'll need to get some feedback on.

I know I am over thinking this design, but I don't really have many require ments. I think I'm expected to figure them out myself.

For grins I took a look at FFs and found an 74HCS72 single dual with negati ve edge trigger which is required unless I add an inverter or use a cap to couple a signal transition to a clear input. I'm looking at that and it lo oks pretty good. The second FF could be used with a pair of resistors, cap acitors and diodes to make an oscillator, no? Every input to the device ha s a Schmitt trigger so a slow transition won't cause noise!

--

  Rick C. 

  ++ Get 1,000 miles of free Supercharging 
  ++ Tesla referral code - https://ts.la/richard11209
Reply to
Ricky C

I've looked into a CMOS FF and it is a nice choice instead of the two NFETs and two resistors. The NFETs would have worked just fine, but I can get t wo FFs in a single package and use the other one for something else. Also it is pretty easy to assure the FF starts in the right state.

I even rigged up a serviceable emulation of the FF using the LTspice digita l library. I was ready to run the simulation and I got an error that wasn' t clear. Turns out the library I got for the TI regulator is encrypted!!! WTF!!! Why does TI have such a hard on to interfere with using LTspice. I mean really! TINA has lost the war. The world is an LTspice domain and that's a natural fact.

The TI wasn't a perfect fit anyway. It is only specified down to 2.2 volts and I want the design to work down to 2. I spent a couple of hours lookin g but did not find one part at Digikey that matched all my requirements. I found a couple that were really close. One had a disturbing overshoot whe n enabled. I am using the LDO to prevent the 5 volts on the supercap from damaging the sounder which is rated for 2 to 4 volts. If it overshoots to

4.6 volts, that defeats the point!

The device also needs to have very low drop out at low currents, 4 mA and l ow double digit uA of supply (ground) current when operating. The main thi ng though is to maintain the drop out voltage down to 2.0 volts or even low er.

I found one that did everything perfectly, but it is only available in fixe d voltages. Mouser will order the 4.0 volt part and say you can buy qty 1. I don't know the lead time and I'm not sure I won't have to buy the reel.

I'll try again Thursday when I have time to work on this again.

--

  Rick C. 

  --- Get 1,000 miles of free Supercharging 
  --- Tesla referral code - https://ts.la/richard11209
Reply to
Ricky C

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.