10 posts in this topic

I will probably switch to using a micro, but getting something working, without one, should help me with writing the code.

I record concerts, and recently switched from recording into a laptop to a multi channel recorder. While I have used worse, the deck's meter is lacking, compared to  the software one I am used to. One reason for building this is to get more resolution, the only markings are at -18dB (?) and 0dB. Also, there is no peak hold, so unless I am looking at it, when a spike happens, I do not know how close it came to clipping. In addition, I also want to add a clip indicator, as I have found the one in the deck to be unreliable. I ran into this the other day, which got me thinking about this project. This would also give me better visibility.

I looked at a couple chips, and the LM3915 seems to be the best fit for this project. For the most part, all the examples I have found are for "dancing lights" which might be nice to look at, but not of much use for my purposes. The base, "dancing lights", part is pretty straight forward. The peak hold and clip indicator are where I hit a snag. Doubling up the LM3915 and using one in dot mode, for the hold, seemed like a good idea at first, but not so good the more I think about it. I found one explanation of switching between bar and dot mode to achieve the hold, but without a schematic to reference it is hard for me to follow. Ideally, I would like the peaks to stay lit, as opposed to falling off, as is normal. Thinking about it more, an extended hold time would be a better option. That brings me to the last problem of the clip indicator. That is easy enough to light, but needs to stay lit, until reset.

This is the meter I am used to, and what I am trying to somewhat emulate.

meters.jpg.b5123e9e5b827975fefb623779f7be83.jpg

The inner bars are the VU meter, but it is the outer, peak meter I want. The values to the right are what I was thinking about with making the peak hold persistent. While I will not be able to go get a beer and come back to see that I was coming close, and should probably turn down, I would like to be able to see how high it got after I hear a spike in volume, or crowd noise. A simple clip indicator will be good enough to warn me of problems.

Now that I explained my goal good enough, I hope, on to what I have so far.

The recorder runs on 12V DC, so I figure sharing a battery would be the best power solution. If this ends up too power hungry, I bring spares, so I can a separate one if I have to. I will need to come up with a way to drop the voltage, for the LEDs, but that can wait for now. The second LM3915 can be ignored, I just did not delete it yet. The rest is mostly taken from the datasheet, so should be OK, except deciding on values and what not. The 5V for the LEDs is just an arbitrary number to fit the requirements; 3V < > Vcc.

VU-Meter.jpg.76eee0913f4c4fb25332253cdd5ca7e2.jpg

What I need to figure out first is how to do the switching between bar and dot mode. The circuit theory, from the meter kit, linked above, uses a transistor, nand gates, op amps, and bilateral switches to do this. While I can sort of understand how each works on its own, I am lost when it comes to putting then together. If someone could help me with that part of the circuit, it does not have to be a direct fit, just something similar, it would be a great help.

Share this post


Link to post
Share on other sites

There's a decoupling cap after the input jack (to block DC), then the common type of precision rectifier (made using opamps and diodes), which then uses the capacitor to store the peak voltage, which the LM3915 displays. That was a classic circuit in the electronics hobbyist mags 30 to 40 years ago (along with the classic 741 opamps of the time). You'll find plenty of other precision rectifier and peak detector circuits (with varying hold times which you can easily tweak) on the web, old books, and even in the LM3915 datasheet itself.

For the bar/dot mode switching, it's just a matter of which voltage level you're applying to the MODE pin (pin 9). Here it's just selected using a SPDT switch.

The IC's been obsolete for a while though. You can't buy it from "legit" distributors anymore (like digikey, mouser, farnell, newark, allied, etc) . Either you'll find chinese fake/cloned parts, or old stock (most of which is gonna be fake/clone parts pretending to be new old stock -- from questionable chinese sellers on ebay/tabobao/aliexpress). 

It would be better to implement this using a simple MCU but to do that you'll still need that analog stage. The voltage will still have to be rectified, and then amplified or divided to fit the ADC's voltage range (depending on your input level).

Fmilburn likes this

Share this post


Link to post
Share on other sites

Hmm, After going through 300 or so magazines, I found one project using a LM3914, but it was unhelpful. In my web searches, that landed in a forum where this question was asked, someone always says there is an example in the datasheet, but no matter how many times I look I cannot find it. Or that examples are readily available, but that is close to an example as I can find, which is why I tried asking for myself. A couple times a circuit similar to the one I mentioned was mentioned, but only as far as a parts list. I did finally find one, in the datasheet, that had a switch, so I have an idea of how to do that part now. I am still not clear on how to do the hold though.

The chip really has not been obsolete for that long, I think it was still readily available at the beginning of last year. I have never had a problem buying from China, other than waiting a month to get my order. As long as they work, it is not taking away from anyone, since the original manufacturer stopped making them. At 10 for < $5.00 shipped, I will have plenty of extras, if I ever need them also.

enl likes this

Share this post


Link to post
Share on other sites

OK, I think I have the switching mostly worked out.

Peak-Meter.jpg.27b35e9d7057d15a81396c63b2514a32.jpg

I need to redraw and organize this better, but I think the idea is sound. If I understood the description right, I should be able to take a branch from the rectified signal, pass it through a resistor and capacitor, in parallel, then in and out of the 4066, and finally tie it to the signal input on the LM3915. That does not sound right though, and I feel like I am missing something.

Share this post


Link to post
Share on other sites
On 10/16/2017 at 7:02 PM, admirlk said:

, someone always says there is an example in the datasheet, but no matter how many times I look I cannot find it.

 

See, for example,

https://web.stanford.edu/class/archive/physics/physics105/physics105.2002/datasheets/Analog_Linear_OpAmp_ICs/LM3915.pdf

pages 8-21

 

I like this IC family, and have used them many times for many things. I miss them, but not much.

Share this post


Link to post
Share on other sites

i have that one and the TI one, basically the same. The rectifier comes from there, as well as part of the switch. If I knew more about electronics, I could probably pick things out better. The guy at the electronics shop asked me why I do not pick simple projects to do. The only answer I could give is that would be too easy. While I generally need help, I learn ,more if I am in over my head.

I think I have the hold part sort of figured out, although I do not think I have it right.

Hold.jpg.66b3b9321565cd6a76f54d12a40906ad.jpg

 

Share this post


Link to post
Share on other sites

Best advice I can give you is to breadboard it. The LM3915 is pretty rugged, as long as you don't mix up the power supply pins, and everything else except the analog switch is, as well. The frequencies are low. This is very bread-boardable. The 4000 series IC's are not as static sensitive as some, but they do take some care. ALL unused inputs should be connected to ground or V+. I generally use about a 10K resistor, rather than direct connection, primarily because there are some failure modes that can occur during power cycling  if the inputs are direct connected to V+ or ground, and the resistor limits current generally preventing damage. The unused analog pins should also be connected to ground.

Share this post


Link to post
Share on other sites

Yea, I plan to breadboard it first, only problem is I do not expect to see the LM3915s until the middle of next month.

I have one more part to figure out, the clip indicator. Since it needs a reset button, to turn it off, if it goes on, it is not as straight forward as just turning it on. I tried making a truth table, but for 0 & 0 no change is made.

clip reset result
0 0  
0 1 0
1 0 1
1 1 0

It is trivial in software, the pseudo code would be

for(;;;)
{
    if(clip)
        LED = 1;
    if(reset)
        LED = 0;
}

Maybe I am over thinking it and a simple OR gate would do the trick?

Share this post


Link to post
Share on other sites

Well, I got the first stage doing something on a breadboard. The wave flattens out quite a bit, but I used my laptop for a signal source and it does not go very loud, so all I could see was slightly wavy trace on the outputs. I was not able to tell, for sure, if the outputs were different, or not, but I do not expect them to be very different.

Imputs.jpg.3a94e64d71cbc6620a90820140d87f81.jpg

I could not get a 4066 locally, so I am waiting on that to add the second stage.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now