News:

SMF for DIYStompboxes.com!

Main Menu

LM339N questions

Started by BJM, June 22, 2021, 02:11:13 PM

Previous topic - Next topic

BJM

Hi all,

I recently picked up a PCB at a junk yard (no idea what it was for), spend some time with a desoldering iron to take out the parts (yes I know it's cheaper to buy them....) and ended up with a lot of capacitors, doides and a few IC's. Two HEF 4093 BP IC's and four LM339N IC's.

I've searched the forum for some possible use, looks like I won't be using the HEF4093BP, so if someoe else here is interested, please let me know. The LM339N looks more interesting. I'm building an effects splitter/mixer, the mixer is the four channel RG Keen / GGG mini mixer. The LM339N is a quad comparator so I think I could use it to light up some LED's to show which channels are on. The simplest way I could think of is to use sterep pots, on part for the volume and the other for the LED, so if the pot is above "1" the LED is switched on. I suppose that would work with only a few resistors as voltage dividers for the reference voltage. Please comment if this not a workable idea.

I also stumbled on this post, https://www.diystompboxes.com/smfforum/index.php?topic=104781.msg941019#msg941019,
at the bottom of the page PRR posted a schematic for "sound-to-light". It's a little different than what I have in mind, I'd just like one LED to go on, but I suppose this will also work with four separate inputs. Anyway  the whole idea got me a bit puzzled and I hope some can shed some (sound-to)light on this?

First, I think the reference voltage is DC and the audio signal is AC (?). Does that work? Second, PRR mentions input resistors but these are not shown in the schematic. How should these be wired? Between the inputs of the IC and ground?

Any help is appreciated of course.

Bert

iainpunk

generally, the reference is DC indeed, but it doesn't need to be.
in this case, the signal can be compared with a static DC level, and if the signal is above said level, the LED turns and off at the frequency of the audio. those frequencies are to fast for us to see, so it looks like its just on, but less bright. the higher the input signal level is, the brighter the LED will appear because the ratio of on vs off will get higher.
if the signal just ticks the threshold with its peaks, the 'on pulse' will be only that tiny time when it exceeds the threshold, if the signal gets bigger, there will be more and more signal above the threshold, keeping in on for more time.
the signal should be biased at ground level, and the series resistor for the LED should be to taste.


cheers

friendly reminder: all holes are positive and have negative weight, despite not being there.

cheers

antonis

Quote from: iainpunk on June 22, 2021, 03:20:15 PM
the series resistor for the LED should be to taste.

Taste of LED or voltage comparator sinking current..?? :icon_wink:
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

iainpunk



these are the LM339's internals, i'd say good luck with sourcing current instead.

also, different resistances have different tastes to it. a 330r is full but a bit tangy, 4k7 tastes sweet like strawberry, 3k3 is similar although bit more fresh, and 1k is sweet with a slight bitter after taste and notes of cocoa and grapes.

cheers
friendly reminder: all holes are positive and have negative weight, despite not being there.

cheers

antonis

Quote from: iainpunk on June 22, 2021, 07:19:43 PM
i'd say good luck with sourcing current instead.

@BJM: Iain tries to scare you.. :icon_mrgreen:

As for all-time-classic "open collector" comparators, a pull-up resistor will serve for current sourcing purposes.. :icon_wink: 
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

duck_arse

Quote from: iainpunk on June 22, 2021, 07:19:43 PM


these are the LM339's internals, i'd say good luck with sourcing current instead.

also, different resistances have different tastes to it. a 330r is full but a bit tangy, 4k7 tastes sweet like strawberry, 3k3 is similar although bit more fresh, and 1k is sweet with a slight bitter after taste and notes of cocoa and grapes.

cheers

33k would taste like orange. 2k2 more like tomato. I think.
" I will say no more "

BJM

Quote from: antonis on June 23, 2021, 09:54:25 AM
Quote from: iainpunk on June 22, 2021, 07:19:43 PM
i'd say good luck with sourcing current instead.

@BJM: Iain tries to scare you.. :icon_mrgreen:

As for all-time-classic "open collector" comparators, a pull-up resistor will serve for current sourcing purposes.. :icon_wink:
He almost succeeded..... Thanks for your comment on the pull-up resistor, I now more or less understand what PRR wrote

Btw, Iain thanks also. I'm going to try this on the breadboard. Probably with a bit more fresh blueberry, I don't have enough red LED's in my part box :).