Results 1 to 11 of 11

Thread: LED driver - op amp comparator

  1. #1
    Old Timer
    Join Date
    Jun 2007
    Location
    Chicago
    Posts
    2,275

    LED driver - op amp comparator

    I'd like to add a feature to my new design that allows the user to adjust the signal voltage into a preamp stage "visually." I know I know it sounds stupid but please just humor me.

    I found this comparator circuit here Voltage comparator : ANALOG INTEGRATED CIRCUITS and think I could get by with 2 LEDs and 1 dual op amp, namely a mc1458.

    A few q's:

    Can I use a simple 2 diode rectifier and 1 filter cap to rectify the ac signal to DC to feed the non-inverting input? One diode anode to ground then one diode in series with the cathode feeding the filter cap? Maybe I need to use a high Z jfet to "tap" off the ac signal as to not interfere with the regular signal?

    How do I know what my output ac voltage will be? In the referenced above circuit what would the output voltage be when the inverting input is 18v and the non-inverting input is 20v?

    I'd like to know so I can have an idea of what LEDs and current limiting resistor values I should use.

  2. #2
    Senior Member
    Join Date
    Aug 2006
    Location
    Lancashire
    Posts
    575
    Quote Originally Posted by lowell View Post
    I'd like to add a feature to my new design that allows the user to adjust the signal voltage into a preamp stage "visually."
    What do you mean? Sounds like you're trying to make either a clipping indicator or a VU meter (if the latter then the LM3916 is the obvious choice)

  3. #3
    Old Timer
    Join Date
    Jun 2007
    Location
    Chicago
    Posts
    2,275
    Yes!

  4. #4
    Old Timer
    Join Date
    Jun 2007
    Location
    Chicago
    Posts
    2,275
    actually Merlin that honestly IMHO seems like overkill to me. Will my dual op amp idea work?

  5. #5
    Senior Member
    Join Date
    Aug 2006
    Location
    Lancashire
    Posts
    575
    Quote Originally Posted by lowell View Post
    actually Merlin that honestly IMHO seems like overkill to me. Will my dual op amp idea work?
    So you want to make a clipping indicator, is that it? Yes you can do that with an opamp or two. Not really 'adjusting the signal voltage visially' though.

  6. #6
    Lifetime Member
    Join Date
    May 2006
    Posts
    3,228
    Check out the National Semiconductor LM3916. These are single-chip, direct LED drive VU meters with adjustable scales, dot-bar mode, etc. Neat chip.

    Note that even if you only use one or two of the LED outputs, having all the rest of the mess in a single chip is a big advantage. I use the linear-scale cousin, the LM3914, like jellybeans.

  7. #7
    Senior Member Enzo's Avatar
    Join Date
    May 2006
    Location
    Lansing, Michigan, USA
    Posts
    20,311
    How about defining the project a little better.

    Merlin asked if you wanted to make a clipping indicator or a VU meter, and you said "yes." That sounded more like a which one question than a yes/no question to me.

    Yes, you can take the signal and rectify it to make a DC voltage that represents the average signal level. SInce no current will be drawn from it, you needn't worry about full wave rectification, a single diode ought to work. yes, waveforms are not symmetrical, but over any length of time greater than an instant, it averages out to symmetrical. And that filter cap is not there to brute force the DC into submission. It needs to be large enough to do the job, but not large enough that the response time is several seconds.

    Try knocking that part - the rectifier and filter - together on the bench and stuff some signal into it. Monitor the output - the voltage across the cap - on a scope or a meter. Try a 0.1uf cap, a 1uf cap, a 10uf cap. See how they respond to music.

    But what is it in, a tube stage? A solid state stage? What signal levels will be present, and importantly, how will you determine what threshold this thing should toggle at? A comparator has to have a reference to compare to.

    The comparator is not an amplifier. When the + input is more positive than the - input, then the output pin goes positive. Otherwise it sits negative. So if you send the + input some music, you won't see music leaving the comparator. You will see a trail of square waves, representing any points in the waveform that exceed the refernce voltage.


    18v, 20v? What power rails is your IC running on? If you have an 18v reference, and a 20v input, then the output will swing positive to just shy of whatever your power supply is. That assumes your power supply is greater than +/-20v. If you have a tube stage with 50v of signal, you won;t be applying that to the IC, you'd have to use a voltage divider or other measure to scale it down.
    Education is what you're left with after you have forgotten what you have learned.

  8. #8
    Old Timer
    Join Date
    Jun 2007
    Location
    Chicago
    Posts
    2,275
    Thanks Enzo that's really great, helpful info. I basically want my LED to light when a certain "voltage" appears on a 12ax7 grid. I want one LED to light at say 1v and the other at say 1.5v. I know this seems like overkill and unnecessary but I just wanna try it. The idea is to get the exact same amount of clipping whether using humbuckers or single coils. This way the user can, for example, set the pot so that the first LED is lit and the second one is barely blinking, if that's the setting that they so desire. I

    My reason for doing this is purely from an anal designer standpoint. If I'm going to really dial in a couple stages to "compress" or "clip" at a certain point I want the user to be able to set if right without a scope.

  9. #9
    Senior Member redelephant's Avatar
    Join Date
    Oct 2010
    Posts
    195
    Quote Originally Posted by lowell View Post
    The idea is to get the exact same amount of clipping whether using humbuckers or single coils. This way the user can, for example, set the pot so that the first LED is lit and the second one is barely blinking, if that's the setting that they so desire. I

    My reason for doing this is purely from an anal designer standpoint. If I'm going to really dial in a couple stages to "compress" or "clip" at a certain point I want the user to be able to set if right without a scope.
    Nothing wrong with some fancy engineering If you really want to dial in the gain setting I think you need more resolution, perhaps just adding one more LED? Using a quad opamp you can also use the fourth opamp as a buffer so the input is shielded from the comparator's switching behaviour.

    I use a similar circuit on the output stage's cathode resistors to monitor bias.

    Something like this?
    Attached Thumbnails Attached Thumbnails comp_indicator.jpg  

  10. #10
    Old Timer
    Join Date
    Oct 2007
    Location
    Buenos Aires, Argentina
    Posts
    5,119
    Well, some Trace Elliott Bass amplifiers have a very useful 2 led indicator, coupled to a gain stage which can be set with a pot.
    Basically you want the green lit most of the time, so your signal sits safely over the noise threshold, but only occasionally have the red one blink, which means clipping.
    They probably react at, say, 50 or 100mV (green) and , say, 2 to 5 V (red).

  11. #11
    Old Timer
    Join Date
    Jun 2007
    Location
    Chicago
    Posts
    2,275
    Cool thanks guys. All helpful info. I'm gonna try the dual opamp first and see how it goes.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 08-10-2010, 07:04 AM
  2. op-amp basics
    By redepoch7 in forum Music Electronics
    Replies: 5
    Last Post: 03-21-2010, 12:47 AM
  3. Using Op-amps as reverb driver / recovery
    By PositiveNegativeMan in forum Theory & Design
    Replies: 11
    Last Post: 07-19-2009, 05:08 AM
  4. Op-amp Biasing
    By tonmann in forum Guitar Effects
    Replies: 10
    Last Post: 03-17-2009, 06:17 PM
  5. Op Amp Labs
    By bobsamps in forum Music Electronics
    Replies: 2
    Last Post: 04-17-2008, 03:45 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •