1. 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.
    Dismiss Notice

Simulation model for the LM3915 logarithmic bar/dot display driver

Discussion in 'Circuit Simulation & PCB Design' started by alec_t, Apr 28, 2013.

  1. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,655
    Likes:
    1,269
    Location:
    Cardiff, Wales
    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.
     

    Attached Files:

  2. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,351
    Likes:
    650
    Location:
    Ex Yorks' Hants UK
    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.
     

    Attached Files:

    Last edited: Apr 29, 2013
  3. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,351
    Likes:
    650
    Location:
    Ex Yorks' Hants UK
    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.
     

    Attached Files:

  4. dave miyares

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    2
    Likes:
    -10


     
  5. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,655
    Likes:
    1,269
    Location:
    Cardiff, Wales
    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.
     
  6. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,655
    Likes:
    1,269
    Location:
    Cardiff, Wales
    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.
     

    Attached Files:

  7. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,351
    Likes:
    650
    Location:
    Ex Yorks' Hants UK
    hi alec,
    Downloaded, will run it later, let you know.

    E
     
  8. dave miyares

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    2
    Likes:
    -10


     
  9. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,351
    Likes:
    650
    Location:
    Ex Yorks' Hants UK
    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
     

    Attached Files:

  10. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,655
    Likes:
    1,269
    Location:
    Cardiff, Wales
    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: Apr 30, 2013
  11. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,351
    Likes:
    650
    Location:
    Ex Yorks' Hants UK
    hi,
    I inserted the 'V' in the LM3914.sub circuit formula and it runs OK.

    E
     
  12. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,655
    Likes:
    1,269
    Location:
    Cardiff, Wales
    Ah, posts crossed :) At least LTS is helpful and specific with its error reports (unlike a certain major operating system!).
     
  13. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,655
    Likes:
    1,269
    Location:
    Cardiff, Wales
    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.
     
  14. Lovard

    Lovard New Member

    Joined:
    Nov 14, 2013
    Messages:
    2
    Likes:
    0
    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,
     
  15. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,655
    Likes:
    1,269
    Location:
    Cardiff, Wales
    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)."
     

    Attached Files:

  16. Lovard

    Lovard New Member

    Joined:
    Nov 14, 2013
    Messages:
    2
    Likes:
    0
    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.
     
  17. eTech

    eTech Active Member

    Joined:
    Apr 25, 2012
    Messages:
    605
    Likes:
    59
    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
     
  18. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,655
    Likes:
    1,269
    Location:
    Cardiff, Wales
    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.
     
  19. eTech

    eTech Active Member

    Joined:
    Apr 25, 2012
    Messages:
    605
    Likes:
    59
    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
     
  20. Countpv

    Countpv New Member

    Joined:
    Jan 30, 2016
    Messages:
    1
    Likes:
    0
    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.
     
  21. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,655
    Likes:
    1,269
    Location:
    Cardiff, Wales
    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).
     
  22. eTech

    eTech Active Member

    Joined:
    Apr 25, 2012
    Messages:
    605
    Likes:
    59
    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.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice