Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Simulation model for the LM3915 logarithmic bar/dot display driver

Status
Not open for further replies.

alec_t

Well-Known Member
Most Helpful Member
Here's an LM3915 model (and its hierarchical variant).
Operation is similar to the LM3914 model apart from the logarithmic response and divider ladder.
Again, peer review and bug reports appreciated.
 

Attachments

  • LM3915.zip
    2.7 KB · Views: 1,690
  • LM3915asc.zip
    4.3 KB · Views: 959
hi alec,

Still working on it, but initial trials suggest the lower end is not switching over at the correct logarithmic steps.

I will look at it in more detail.

E.

EDIT:

It appears that LED #1 is ON at Vin= 1uV and higher, also the logs steps appear incorrect.
 

Attachments

  • AAesp02.gif
    AAesp02.gif
    43.5 KB · Views: 1,635
  • LM3915_Test2.asc
    2.9 KB · Views: 648
Last edited:
hi alec,

Created a simple chain using the d/s values.

You can see the equal spacing of the comp outputs [ I have use OPA's for convenience, the outputs are inverted.]

Attached the asc for your reference.

E.
 

Attachments

  • AAesp04.gif
    AAesp04.gif
    46.6 KB · Views: 1,610
  • Chain2.asc
    5.6 KB · Views: 428
Hmm, thanks for the observations Eric. I'm struggling to get the ladder resistors to match up with the d/s figures for the thresholds. Will work on it.
 
Right. I think these are better. I've corrected a bug arising from my misinterpretation of the d/s, in both the '14 and the '15 models.
 

Attachments

  • LM391x.zip
    6.7 KB · Views: 780
Right. I think these are better. I've corrected a bug arising from my misinterpretation of the d/s, in both the '14 and the '15 models.

hi alec,
Downloaded, will run it later, let you know.

E
 
hi alec,

The LM3915 runs OK, but the LM3914 reports an error.
It looks as though the 'V' is missing in this line.

B10 L10 V- I=1u-10*i(rs)*(V(dvin)>10*V(dv))*((V(Bar/_dot)+0.1>=V(v+))|(V(Bar/_dot)>=V(L9)-0.9))

E
 

Attachments

  • AAesp01.gif
    AAesp01.gif
    42.9 KB · Views: 994
  • AAesp02.gif
    AAesp02.gif
    24.7 KB · Views: 2,060
Wouldn't you know it; fix one bug and introduce another :(. Thanks, Eric. Will look into it.

Edit: You're right, the 'V' was missing in the .sub file line for B10. The offending line should indeed read as you've got it in post #7.
 
Last edited:
Wouldn't you know it; fix one bug and introduce another :(. Thanks, Eric. Will look into it.

hi,
I inserted the 'V' in the LM3914.sub circuit formula and it runs OK.

E
 
Ah, posts crossed :) At least LTS is helpful and specific with its error reports (unlike a certain major operating system!).
 
Update: I've now added modelling of the pin 5 (Sig) input for both the 3914 and the 3915 (i.e a 20k resistor and reverse-biased diode in series from Sig to V-, plus a 25nA current source across the diode), so Sig voltages less than V- are now handled better.
 
Hi Alec, could you upload the revised files for the LM3914 and LM3915 please?
I'm finding it very useful (thanks for sharing) but have a couple of questions:
What is the purpose of current sink B1a? I'm not sure why pin 1 is different from the other 9 outputs. I can't find anything indicative of a difference on the datasheets.
I'm trying to drive a 10 LED dot display where I'm limited to 3.5mA supply current and 5V, so I'm trying to simulate it with low power LEDs to reduce the device power consumption, by adjusting resistor values and the like. Then I'll breadboard it to make sure it'll work. So if you have any good ideas about using it in a very low power consumption modes, that'd be good too.

thanks again,
 
Attached are the updated files. Have fun.
Re current sink B1a, see the 'Dot Mode Carry' section on P9 of the LM3914 datasheet. B1a models the 'auxiliary current source'.
If your supply current is limited, bear in mind that "Typical standby supply current (all LEDs OFF) is 1.6mA (2.5mA max)."
 

Attachments

  • LM3914 andLM3915.zip
    5.3 KB · Views: 1,009
Thanks for that, the datasheet I had didn't have the information on "B1a", but I've since found a datasheet which has that detailed. Seems not all datasheets are created equal....

I'm mindful of the standby current, but I seem to get reasonable illumination with HE LEDs at 2mA. The one LM3914 I have seems to consume only 0.8mA with a 4V supply (all LEDs off) and it all connected, maybe I got lucky with a good one, I'll see how it goes with some others from (hopefully) a different batch when I get some more in a few days and report back.
 
Attached are the updated files. Have fun.
Re current sink B1a, see the 'Dot Mode Carry' section on P9 of the LM3914 datasheet. B1a models the 'auxiliary current source'.
If your supply current is limited, bear in mind that "Typical standby supply current (all LEDs OFF) is 1.6mA (2.5mA max)."

Hi

I was trying out your LM3914 test Jig with a new LED array I created and stumbled upon something interesting.

If I remove all the diodes (any diode(s) including LEDs) from the schematic, and run a sim, I get an error "can't find definition of Model D" error.
If I place a diode on the schematic (I tried a 1n4148 but didn't connect it to anything) the sim ran with no errors.:confused:

I believe the device model "D" statement is missing from the LM3914 subckt definition. :-|
eT
 
Thanks for the bug report and cure. I'll have to find time to revise my model. That bug probably affects my LM3915 model too.
 
Thanks for the bug report and cure. I'll have to find time to revise my model. That bug probably affects my LM3915 model too.

Your welcome..:)

I haven't tried the lm3915 yet but I will today.

Basically, without the D statement, the D device references in your models will inherit the D model characteristics of any device placed on the schematic containing a D model statement.:(

Also,

I created a 10 LED Array so I don't have to place LED's one at a time. :)

eT
 
Attached are the updated files. Have fun.
Re current sink B1a, see the 'Dot Mode Carry' section on P9 of the LM3914 datasheet. B1a models the 'auxiliary current source'.
If your supply current is limited, bear in mind that "Typical standby supply current (all LEDs OFF) is 1.6mA (2.5mA max)."

Hi eT,
For what program where these simulation models made? I have Multisim 12.0 and it does not seem to recognize it. It's looking for a *.prz or *.cir spice file. Does it have the Dot/Bar mode working?

Thanks in advance.
 
The model was created by me for LTspice. You can probably edit it in any text editor, and rename to suit Multisim (but I've never used Multisim).
 
Hi eT,
For what program where these simulation models made? I have Multisim 12.0 and it does not seem to recognize it. It's looking for a *.prz or *.cir spice file. Does it have the Dot/Bar mode working?

Thanks in advance.

This thread is old....but it regards a model by Alex_t.
I have since made my own model.

Anyway....
You'll need to import the file in standard spice format. But be aware that there may be devices and/or statements used that are proprietary to LTSpice.
Perhaps Alex_t can advise.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top