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.

LM3915 math

Super-Dave

New Member
Okay, I've been studying (or trying to) the data sheets for the LM3814/3915/3916. All similar, all requiring the same components. Minor differences in how they display but similar enough that they can be interchanged. One of the things that stump me is the math. I haven't done this kind of "alphabet" algebra since high school and it makes me feel stupid.

I know from the data sheets that the audio input signal voltage on pin 5 can't exceed the VCC+ voltage (power supply) on pin 3. Since I'm making this for a "car", I'm looking at 14.4 power supply voltage with the engine running. The aftermarket radio to drive this is rated at 60W x 4 using 4ohm.speakers. By my calculations, that is about 15 volts, does that sound right? If this is correct, that'll overload the LM391*, so should I use a resistor inline to attenuate it? How would I calculate that?

And how do I calculate the resistors needed for pins 6, 7 & 8? (Ref Hi, Ref Out & Ref Adj) I know there's an equation on page 8 of the LM3915 datasheet, but I can't wrap my head around it.
"V out = V ref(1 + R2/R1) + I adj R2"
Whaaaaaat????

Whoever's idea to introduce letters to math should be flogged.
 

rjenkinsgb

Well-Known Member
Most Helpful Member
The voltage reference works in a similar way to an LM317 etc.

It holds a fixed voltage (1.2V) between out and adj, so whatever resistor is there defines a current.
That current flows between adj and ground, so the value of the resistor there adds a voltage proportional to that current to the output; eg, the same value adds the same voltage, half adds half again, double adds double again.

If you use eg. 1200 Ohms from out to adj, the ground resistor would add 1V per 1000 ohms.

It's not exactly that as the adj pin takes a small current, offsetting the voltage slightly.

With these specific ICs, the ref current also sets the LED current about 10x higher. A 1.2K ref resistor means around 1mA there so 10mA LED, if I'm getting it right from a quick look.
So if you wanted 20mA LED drive, half both the voltage setting resistors to give 2mA from the ref pin.

Note that because the 3915 has a logarithmic scale, you cannot just series up the Rhi - Rlo through two or more devices, the voltage across each IC Rx needs to be correct for that part of the overall scale.

For your speaker output, the voltage should be around 15.5V RMS at 60W RMS output.
The peak voltage will be roughly 1.4 times the RMS, near 22V

I's aim for around 9 - 10V reference

You need some form of rectifier to get a DC level from the AC speaker signal.
See figure 18 on page 12 of the datasheet; make R1 larger than R2 and it will reduce the signal level; eg. 2.5X would give 8.8V out for 22V in.
 

Diver300

Well-Known Member
Most Helpful Member
Whoever's idea to introduce letters to math should be flogged.
It's an interesting take on life from someone who's using semiconductors that were probably designed by computer, and the data sheet is viewed on a computer.

Actually using the internet and posting on forum is using thousands, well probably millions, of lines of computer code, most of which will have numbers represented by letters.

As rjenkinsgb said, the peak voltage across a 4 Ohm speaker has to be about 22 V to get 60 W. There are various ways that the radio can achieve that voltage. It could have one side of the speaker grounded, and only drive the other side of the speaker. It would need to have supplies at +22 V and at -22 V to do that. Alternatively, it could have a single +22V supply, and drive both wires of the speaker. The +ve supply would only need to be above 12 V when the music is really loud, so the circuit to boost to 22 V might be turned off if the volume is low.

The effect is that it's not possible to know what the dc voltage on the speaker is unless you measure it. It may be necessary to have a differential amplifier to take the signal from both signal wires. The output from the differential amplifier would be the signal to be displayed.
 

Super-Dave

New Member
It's an interesting take on life from someone who's using semiconductors that were probably designed by computer, and the data sheet is viewed on a computer.
No, I'm a little bit old school. I actually printed the data sheets out on paper. Got annoying toggling back & forth between tabs. Something satisfying about the feel and smell of fresh ink on reams of a "slain tree" that trumps swipping a touchscreen. Here's my stack of what I'm dealing with, along with my feline study buddy. I even use a notepad to scribble down stuff. If I'm gonna be using obsolete old school chips, jump in with both feet, right?
IMG_20211113_200628.jpg


Now in the picture, if you zoom in, you'll see page 2 of each datasheet. In the equation on EACH PAGE, it gives a value of Vref = 1.25v (1+R2/R1) + R2 x 80 uA. Is 1.25v the internal voltage of the chip coming out of pins 6,7 & 8? Where does that value come from? Isn't 80uA the same as 80 milliamps? Where did that come from??? I look, I can't find 1.25 volts anywhere in the specs. Where is this hiding?

I'm not gonna ask y'all to do the math for me, give me the circuit diagrams for a VU Meter or Spectrum Analyzer, or "cheat codes". I know it doesn't work that way. But I am respectfully asking you people, who have more knowledge & experience than me, to please explain it to me. What am I missing?

As a guy, it goes against my "Y" chromosomal instinct to ask for directions, so for me to inquire, it comes with a HUGE dose of humility and embarrassment. Explain it it as if I were a child. It's been 30+ years since I've done math like this.
 

Super-Dave

New Member
The voltage reference works in a similar way to an LM317 etc.

It holds a fixed voltage (1.2V) between out and adj, so whatever resistor is there defines a current.
That current flows between adj and ground, so the value of the resistor there adds a voltage proportional to that current to the output; eg, the same value adds the same voltage, half adds half again, double adds double again.

If you use eg. 1200 Ohms from out to adj, the ground resistor would add 1V per 1000 ohms.

It's not exactly that as the adj pin takes a small current, offsetting the voltage slightly.

With these specific ICs, the ref current also sets the LED current about 10x higher. A 1.2K ref resistor means around 1mA there so 10mA LED, if I'm getting it right from a quick look.
So if you wanted 20mA LED drive, half both the voltage setting resistors to give 2mA from the ref pin.

Note that because the 3915 has a logarithmic scale, you cannot just series up the Rhi - Rlo through two or more devices, the voltage across each IC Rx needs to be correct for that part of the overall scale.

For your speaker output, the voltage should be around 15.5V RMS at 60W RMS output.
The peak voltage will be roughly 1.4 times the RMS, near 22V

I's aim for around 9 - 10V reference

You need some form of rectifier to get a DC level from the AC speaker signal.
See figure 18 on page 12 of the datasheet; make R1 larger than R2 and it will reduce the signal level; eg. 2.5X would give 8.8V out for 22V in.
Argh! The inside of my skull itches!!! Those brain cells haven't seen this much use in a long while.

Okay, I understand the rectification. I was studying op-amps and bandpass filters to eventually make a Spectrum Analyzer, I sorta got my head around that. I do have some LM317s to adjust the current and I kinda understand those.

So what your saying is that the rectifier circuit, if I don't get crazy with the gain, will attenuate the source signal enough to not exceed the limitations of the LED driver?

I was intending to limit the supply voltage to the driver to 5v to prevent overheating it, but now I'm thinking just limiting the LED supply is a better bet, leave the driver to be fed by the whole "12" volts, and a heat sink on top for longevity.

But before I build the analyzer, I feel I need to understand and build a VU meter 1st. Baby steps, can't run before I learn to walk.
 

Diver300

Well-Known Member
Most Helpful Member
80 uA is another way of writing 80 μA, if the Greek letter μ (Mu) can't be used. It is 80 microAmps, or 0.00008 A. That is 1000 times less than 80 mA, which is 80 milliAmps or 0.08 A.

Data sheets for ICs are not easy to read. Data sheets contain lots of words, or uses of words, that are not in common English, so part of the learning process is learning to read the datasheets. That's one reason why forums like this exist.

The first item on page 4 of this data sheet:- https://www.ti.com/lit/ds/symlink/lm3914.pdf is the voltage reference section.

The output minimum output voltage is 1.2 V, the typical is 1.28 V and the maximum is 1.34. That is where the 1.25 V is specified. Elsewhere they refer to it as "a nominal 1.25V" but the typical voltage is slightly more than that.

Also on page 4 in the voltage reference section is the adjust pin current which has a typical value of 75 μA and a maximum of 120 μA. Figure 5 is a graph of that current against temperature, and that seems to be around 80 μA.

In practice it won't make a significant difference if you use 1.25 V or 1.28 V, and 75 μA or 80 μA in the calculations.
 

rjenkinsgb

Well-Known Member
Most Helpful Member
So what your saying is that the rectifier circuit, if I don't get crazy with the gain, will attenuate the source signal enough to not exceed the limitations of the LED driver?
Yep, depending on the ratio of input to output resistors, the gain can be fractional rather than boost.

If you are using more than one IC, I'm not sure if the "cascade" logic will work with different voltages?
I'd suggest ultra-bright LEDs, rather than standard ones at high current. I have several types that only need about 1mA to be painfully bright.
 

alec_t

Well-Known Member
Most Helpful Member
Do you have genuine LM3915s ? I understand that now that those are obsolete there are lots of fake ones on the market.
 

schmitt trigger

Well-Known Member
Most Helpful Member
Super Dave:
Cats are excellent study buddies.

If I was struggling with a complex concept or equation and my head seemed to burst, when my cat cuddled amongst the papers and books and started purring, between that and my stroking her hair would soothe my mind into the right mindset to continue studying.
 

audioguru

Well-Known Member
Most Helpful Member
Car radio amplifiers are rated in Whats, not Watts. Peak power is simply double the real power. Music power and severely distorted power is doubled again.
Most car radios produce 14 Watts per channel at low distortion into 4 ohms.

I agree that the audio LM3915 and LM3916 are obsolete. I probably bought the last LM3915 ICs.
 

Super-Dave

New Member
Yeah, I doubt they are TI or Nat Semi originals, no symbol or "Made in Malaysia" on them. Which means the math may be a little fuzzy.

I got an assortment of T220 linear voltage regulators from Amazon: 5 @ L7805, L7809, L7812, L7815, L7905, L7912, L7915 & LM317, and a handful of heatsinks. They are way off. 5 volts puts out 5.9v, 12s output almost 14, 15s output 16.6. that's a variance in excess of 10%. A couple were DOA out of the bag or smoked within minutes on the breadboard just bench testing with only a 20 mA LED load. So I'm crossing my fingers hoping the LED drivers work out better.

Pretty much everything comes from China these days, even Ikea furniture. Unless your willing to shell out $38 for authentic legacy chips someone hoarded in a warehouse for decades. I'm not that concerned with accuracy, it isn't like this is being built for NASA. But I do want it to work and last more than a weekend.
 

schmitt trigger

Well-Known Member
Most Helpful Member
Another chip that I sorely miss from my student days is the LM3909 LED flasher.
Obsoleted a long, long time ago.
 

audioguru

Well-Known Member
Most Helpful Member
I got an assortment of T220 linear voltage regulators from Amazon: 5 @ L7805, L7809, L7812, L7815, L7905, L7912, L7915 & LM317, and a handful of heatsinks. They are way off. 5 volts puts out 5.9v, 12s output almost 14, 15s output 16.6. that's a variance in excess of 10%.
Amazon might buy junk from ebay.
A uA7805 or uA78anything is rated with a minimum load of 5ma. with no load its output voltage might be wrong.
An LM317 MUST have a load of at least 10mA. Usually the resistor between the output and the ADJ pin is 120 ohms so it is the load (1.25V/120 ohms= 10.6mA). The datasheet shows the more expensive LM117 using a 240 ohm resistor because its minimum allowed load is 5mA, When an LM3xx has a load that is less than 10mA then its output voltage is not regulated and will rise.
 

JimB

Super Moderator
Most Helpful Member
Also, don't forget the little capacitors on the input and output pins of the 78xx and 79xx, without the capacitors they can behave like oscillators.

JimB
 

Nigel Goodwin

Super Moderator
Most Helpful Member
Amazon might buy junk from ebay.
A uA7805 or uA78anything is rated with a minimum load of 5ma. with no load its output voltage might be wrong.
An LM317 MUST have a load of at least 10mA. Usually the resistor between the output and the ADJ pin is 120 ohms so it is the load (1.25V/120 ohms= 10.6mA). The datasheet shows the more expensive LM117 using a 240 ohm resistor because its minimum allowed load is 5mA, When an LM3xx has a load that is less than 10mA then its output voltage is not regulated and will rise.

They won't be sold by Amazon, it will just be Amazon market place, and the seller is almost certainly a dodgy Chinese or Ebay seller.
 

crutschow

Well-Known Member
Most Helpful Member
Whoever's idea to introduce letters to math should be flogged.
Kinda hard to do algebra or calculus without letters.
So you want mathematics to never be more complicated than 6th grade math? :rolleyes:
 

Super-Dave

New Member
Amazon might buy junk from ebay.
A uA7805 or uA78anything is rated with a minimum load of 5ma. with no load its output voltage might be wrong.
An LM317 MUST have a load of at least 10mA. Usually the resistor between the output and the ADJ pin is 120 ohms so it is the load (1.25V/120 ohms= 10.6mA). The datasheet shows the more expensive LM117 using a 240 ohm resistor because its minimum allowed load is 5mA, When an LM3xx has a load that is less than 10mA then its output voltage is not regulated and will rise.
For what it's worth, during my breadboard testing, I did use bypass caps, upstream & downstream of the regulators, both poly film & electrolytics, a heatsink, as well as a 20mA LED WITH a 470 resistor so the bulb won't die. And for the regulators that did work, it did light up. Volts were measured from the anode to the resistor south of the cathode and were higher than expected. With or without a load, it didn't matter. About what could be expected from Chinese stuff. I'm not entirely certain that if I bought them from a more expensive vendor like Arrow or Digikey that I'd get better results. Everything is made in China these days.

I do have a buck-boost converter (15v+, gnd & -) to drive the dual power TL074 Op-Amps for my bandpass (when I get around to building a real Spectrum Analyzer) and I planned to regulate them with LM7815/7915's. The 15v converter outputs high too, 17+, gnd & -. Even with the 15v regulators I have now, I'm still looking at a total of 34 volts total, a little too high for my liking. The TL074 datasheet doesn't recommend more than 30 Max. So now the plan is to use the LM7812/7912's to reign in the power to acceptable 27 volts, survivable for the Op-Amps I have. They may be higher than rated but still worthwhile for what I need.

I could have chosen a lower end Op-Amp, but I also want to use one as an adjustable low pass preamp for the subwoofer amplifier input. Give the kick drums and bass line a little more "kick". They have low distortion, a high slew rate, and low noise. And because I could pick up a couple dozen at a discount, they seemed a good choice for bandpass filters too. I think I can get a dozen decibels and tunability of 15-400 Hz cutoff with decent pots, and I'm not talking little board mounted trim pots either. But that's for another post.

Back to the math I was bitching & whining about at the start of this thread: Am I correct in assuming the voltage values to be consider for calculating resistors on pins 6, 7 & 8 should be the "Typical Output Voltages" of 1.28v as listed on page 4 of the data sheets? Am I getting that right?
 

Latest threads

EE World Online Articles

Loading
Top