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

Problem with chained LM3915

Discussion in 'General Electronics Chat' started by fezder, Nov 1, 2015.

  1. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,573
    Likes:
    950
    Location:
    Canada, of course!
    I am retired so I also don't have a job. But I am very busy and do not have enough time to do everything I want.
     
  2. chemelec

    chemelec Well-Known Member

    Joined:
    Apr 4, 2004
    Messages:
    2,123
    Likes:
    77
    Location:
    Hedley, B.C. Canada
    Yes you spend Far too Much Time on these Various Discussion Forums in Helping Others.
    So no time to do anything else.

    But it Keeps the Brain Active!
     
    • Like Like x 1
  3. fezder

    fezder Well-Known Member

    Joined:
    Dec 11, 2011
    Messages:
    1,665
    Likes:
    100
    Location:
    Mikkeli, Finland
    I have many friends who are into electronics but NONE could shed light to any of these problems. so audioguru's help is/was priceless! and even google didn't help much
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,573
    Likes:
    950
    Location:
    Canada, of course!

    Did you notice that this thread has over 100 posts?
     
  6. fezder

    fezder Well-Known Member

    Joined:
    Dec 11, 2011
    Messages:
    1,665
    Likes:
    100
    Location:
    Mikkeli, Finland
    hehe, yeah, but luckily not much off-topic
     
  7. fezder

    fezder Well-Known Member

    Joined:
    Dec 11, 2011
    Messages:
    1,665
    Likes:
    100
    Location:
    Mikkeli, Finland
    I was wondering, is it possible to change that your circuit so it shows average instead of peak? as i'm planning to place both peak/average, if that is easily made instead of peak/instant. Or then only peak, just thinking out loud here
     
  8. chemelec

    chemelec Well-Known Member

    Joined:
    Apr 4, 2004
    Messages:
    2,123
    Likes:
    77
    Location:
    Hedley, B.C. Canada
    Increasing the Value of the .33 cap on the Output should do it. (A 1 uF or 4.7 uF.)
     
    • Thanks Thanks x 1
  9. fezder

    fezder Well-Known Member

    Joined:
    Dec 11, 2011
    Messages:
    1,665
    Likes:
    100
    Location:
    Mikkeli, Finland
    i was thinking about similiar, as bigger capacity capacitor holds charge longer. If i'm not terribly mistaken it also charges slower but that's negligible in this situation, it's still avergae
     
  10. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,573
    Likes:
    950
    Location:
    Canada, of course!
    The datasheet says that feeding the audio directly to the input of the LM3915 without a rectifying peak detector and without a capacitor will allow some peaks to be seen dimly and average levels to be brighter when the LM3915 is in the DOT mode.

    A true average detector charges its capacitor slowly and discharges it the same. Then the datasheet shows changing the 100 ohm resistor to 100k ohms, and the transistor is not needed. You will not see the peak levels that might be much higher than the average levels. If you increase the capacitor value then the discharge will be too slow causing many events not to show.
     
    • Informative Informative x 1
  11. chemelec

    chemelec Well-Known Member

    Joined:
    Apr 4, 2004
    Messages:
    2,123
    Likes:
    77
    Location:
    Hedley, B.C. Canada
    That 100 Ohm Resistor will Not Slow down the Charge rate very much.
     
  12. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,573
    Likes:
    950
    Location:
    Canada, of course!
    The low value of the 100 ohm resistor charges the peak detecting capacitor very quickly but limits the charging current. I said the datasheet says to change it to 100k ohms to see average levels then it charges slowly the same as it discharges.
     
  13. fezder

    fezder Well-Known Member

    Joined:
    Dec 11, 2011
    Messages:
    1,665
    Likes:
    100
    Location:
    Mikkeli, Finland
    Got mylars today and couple opamps, these won't help thought, they need dual supply but i noticed it after placing order (were cheap hehe....)....lf353 & lf348 (dual & quad) and offset too is too big, tomorrow i should get those proper opamps
     
  14. Mosaic

    Mosaic Well-Known Member

    Joined:
    Jun 3, 2010
    Messages:
    2,611
    Likes:
    129
    Location:
    Caribbean
    This may be OT, but the newer enhanced 32Mhz 16F1xxx Pic series with multiple Internal Vrefs for $1.50 or so would be able to sample audio and drive an LED display with PWM and deliver any type of linear/log averaging or peak or RMS or simultaneous peak & RMS or whatever you could want. A 28 pin PIC could do all 20+ outputs under PWM with trailing FX etc, if a bright full bar mode is essential you could add 3 ULN2003 darlington buffers for another $1.65 total.
    The LM391x series is a bit dated now, although fun to play with.
     
    • Like Like x 1
  15. fezder

    fezder Well-Known Member

    Joined:
    Dec 11, 2011
    Messages:
    1,665
    Likes:
    100
    Location:
    Mikkeli, Finland
    No worries, i'm open for ideas. :) i didn't feel like placing MCU for such simple project
     
  16. fezder

    fezder Well-Known Member

    Joined:
    Dec 11, 2011
    Messages:
    1,665
    Likes:
    100
    Location:
    Mikkeli, Finland
    Got today those better opamps, MCM model works better in this circuit, supply voltage is 5v
    Hmm, still output from peak detector is 0.4 volts lower than input.
    Resistors are 4.7k (r7,r8,r9,r11) and capacitors are mylars(c4 & c8=330n c5=100n), no more ceramics.
    Thing of note, if i take output capacitor from peak detector output out, output increases by 0.4 volts
    nvm that, i tested with too high frequency


    with TLE in place, output at peak detector is at least 200mv all the time
    bought these opamps from farnell

    i noticed also that lm358's offset can be ''nulled'' in first lm3915, by inreasing lower level. it then drops its sensitivity though but at least bars won't lit without sound applied
    but in thi case i need also to change other lm3915's lower lever too, but seems won't be needed

    But. it works enough well for now, even though peak detectors output is bit lower than input signal. i'll solder this now to protoboard if that makes any issues better...
     
    Last edited: Dec 5, 2015
  17. Mosaic

    Mosaic Well-Known Member

    Joined:
    Jun 3, 2010
    Messages:
    2,611
    Likes:
    129
    Location:
    Caribbean
    Not to belabor a point, but I am using a differential instrumentation mode jelly bean LM324 configured as classB to derive peak voltages so rail to rail is not required...that feeds into an ADC of a 16F886 via a 1k-.01uf-1K pi filter for noise free peak signal sampling (Nyquist oversampling as well) . I added a 1n4148 diode clamp across the cap. in case of any over range conditions to prevent ADC latchup. A trimmer pot is used on the diff. amp feedback to get approx 0.02V accuracy, tested with a new 6.5 digit benchtop DMM. No expensive opamp, or dual voltage supply required.

    Are you configuring a peak detector diode as an ideal diode with the opamp? It should have enough drive (20mA) to 'fill' the capacitor in time. I= C dv/dt is the eq you can use to calc. that response capability.
    https://en.wikipedia.org/wiki/Precision_rectifier
     
    • Like Like x 1
  18. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,573
    Likes:
    950
    Location:
    Canada, of course!
    The peak detector is a precision type with an output peak voltage within a few millivolts of the input peak voltage. Your last posted schematic 2 weeks ago and mine should work perfectly so please post the schematic that causes the 0.4V voltage drop.
    Why are your resistors R7, R8 and R9 only 4.7k when mine are 100k? Then the cutoff frequency of C4 and R9 is 103Hz so it will not detect bass frequencies.
     
  19. fezder

    fezder Well-Known Member

    Joined:
    Dec 11, 2011
    Messages:
    1,665
    Likes:
    100
    Location:
    Mikkeli, Finland
    I opted that 103hz would be good for my purposes, at least it seemed to give best performance so far, but that can be false performance if this circuit is not working as intended, yet i mean
    circuit for 103hz
    peak detector_audioguru's-103hz.png
    scope shot, actually voltage drop was much lower....0.2 volts
    NewFile2.jpg

    and for comparison, original values of 100k resistors (4.8hz)
    peak detector_audioguru's-4.8hz.png
    and there's some bumbs at output too
    NewFile3.jpg

    tested with 3 different NPN small signal transistors: bc547, 2n5551 and c1815, same results
     
    Last edited: Dec 6, 2015
  20. fezder

    fezder Well-Known Member

    Joined:
    Dec 11, 2011
    Messages:
    1,665
    Likes:
    100
    Location:
    Mikkeli, Finland
    here's couple shots from protoboard
    IMG_1060.jpg IMG_1060-edited.jpg IMG_1062.jpg IMG_1063.jpg IMG_1061.jpg
    output from opamp
    NewFile4.jpg
    inverting (-) input
    NewFile5.jpg
    non-inverting (+) input
    NewFile6.jpg
     
    Last edited: Dec 6, 2015
  21. Mosaic

    Mosaic Well-Known Member

    Joined:
    Jun 3, 2010
    Messages:
    2,611
    Likes:
    129
    Location:
    Caribbean
    The OPA FB pulling down your input sig it seems.
    Use another OPA to buffer the input signal first or increase the input cap by about 10 times.
    Also R11 may not be required as that OPA does not have crossover distortions.

    Try the precision rectifier circuit from wiki...the input signal is isolated from the FB, none of these design complications that you have.
     

Share This Page