I want to build a volume controller.

Posted by: tfabris

I want to build a volume controller. - 13/04/2004 16:59

This sounds like a good spring project for me:



This is the box I've discussed before here on the BBS. I want to see if I can actually make one. This is similar to a speed-controlled volume circuit, except that its attenuation is based on a microphone input rather than a speed input.

Its advantages over speed-controlled volume are:

- It does not require reading the car's OBD connector, or timing pulses of any kind. So in theory, the circuits should be simpler.

- It is based on a more realistic method of deciding when you would want to turn up your stereo. For instance, differences in road surface quality cause much more cabin noise than increased speed does. At least in my car.

The problem is that I've got no clue how to build the critical part of the thing. I figure that there's got to be a very simple way to do it with a few analog components. But I can't find any examples of it on the web. Anyone got any clues, links, or ideas?

There are two alternatives to this:

1. Find someone who already makes one. Problem is, I haven't found one. Anyone know of one?

2. Write some code to add in to Hijack that does essentially the same thing for the empeg, using the microphone connector. Problem is, I don't know how to do that, either. And it's spring, so Mark is out rock climbing, so I don't know if rubbing the genie lamp would work or not. Also, if I can make it in hardware instead of software, it can work for people other than empeg owners and I could theoretically market it for a profit.

So... Any ideas?
Posted by: tman

Re: I want to build a volume controller. - 13/04/2004 17:07

Personally I'd just use a Microchip PIC or Cypress PSoC for the control circuitry and two Maxim dual gang digital potentiometer. Not very helpful for you though

A PIC or PSoC has a ADC so you could hook the mic to it with minimal components. A microcontroller would give you much greater control over how this would work.
Posted by: tfabris

Re: I want to build a volume controller. - 13/04/2004 17:17

I see what you mean. But if it's gonna involve programming, I might as well do it on the empeg. Then again, doing it with analog circuits could potentially cause a ground loop, so I might want to reconsider doing it on the empeg...
Posted by: tman

Re: I want to build a volume controller. - 13/04/2004 17:23

The microcontroller would involve programming but it would still be standalone. The component count would be fairly low as well. Two digital potentiometers, microcontroller and some misc analogue components for the mic.

You could get fancy and do a FFT on the mic input and do a more complicated algorithm to decide when to increase the volume.
Posted by: gbeer

Re: I want to build a volume controller. - 13/04/2004 23:41

I think you are looking for an op-amp. For instance they are used in peak charge detection systems of r/c electric cars. If I have it right, not sure of that, they continously compare two signals and output a value based on that comparison. The reference signal can be steady or dynamic.

Google rocks!
op-amp

You may need some way to average the response time of a circuit like this. You could wind up with every bump causing a thump in the speakers.
Posted by: gbeer

Re: I want to build a volume controller. - 14/04/2004 00:00

[image]http://empeg.comms.net/files/211879-op-amp.TIF[/image]
you need more than just this.
Posted by: gbeer

Re: I want to build a volume controller. - 14/04/2004 00:07

ok it should have been a gif file.



Still need more descrete components, resistors caps voltage references....
Posted by: boxer

Re: I want to build a volume controller. - 14/04/2004 06:14

When you've solved the problem, fitted it in a little black box with TFabris enterprises inc. embossed on the top and written some fitting instructions as lucid as the FAQ, let us know how much and what the shipping cost is.

Of course, if you could make it totally independent of the Empeg, so that it could work with any HU, your fortune is assured: as a guide, a house in London has just been sold for over £70 million.

The world has needed this for a long, long time!
Posted by: tfabris

Re: I want to build a volume controller. - 14/04/2004 10:31

You may need some way to average the response time of a circuit like this. You could wind up with every bump causing a thump in the speakers.
Yup, definitely has to be a part of the system. Not sure how to do that.

Not certain how long of a period it should be averaged for. Too long, and it won't respond to changes in road noise quickly enough. Too short, and the volume will vary too wildly.

But you're right, a simple op-amp circuit is the sort of thing I was looking for. I knew there was a simple way of doing it with analog circuits.
Posted by: tfabris

Re: I want to build a volume controller. - 14/04/2004 10:34

let us know how much and what the shipping cost is.
I sure will. If it's something that I can really get working, my hope is to do just that.
Posted by: tanstaafl.

Re: I want to build a volume controller. - 14/04/2004 11:49

This is similar to a speed-controlled volume circuit, except that its attenuation is based on a microphone input rather than a speed input.


If I understand you correctly, you want a setup that turns up the volume of your player when the noise level in the car increases.

Can you say "positive feedback loop" ?

I can see it now -- you play "Moving Pictures" and that big drum smash on the opening note of Tom Sawyer comes in, and Mr. black box says, "Hey, it's noisy in here. Let's turn up the volume." And then when the volume gets louder, he says "Hey, it's even noiser now than it was before. Better do it again." Before long, he'll be saying, "Well, darn. That's as loud as she goes. What am I gonna do now?"

I have some misgivings about whether this project will realistically fulfill your expectations.

tanstaafl.
Posted by: tfabris

Re: I want to build a volume controller. - 14/04/2004 11:53

I thought you were in Texas this week.

Note the diagram carefully. I want to place the microphone outside the vehicle. Preferably in a location that allows it to pick up the most tire/road noise. Perhaps near a wheel well.

I agree that if I don't choose a good location for the microphone that a feedback loop could happen.
Posted by: rtundo

Re: I want to build a volume controller. - 14/04/2004 13:03

BOSE uses microphone feedback in some of their stereos in "select" vehicles. These are placed inside the car I believe. Hmmm....maybe this weekend I'll go "car shopping" and see if I can find where they place their microphone(s). I just went to their website, they call it "Audiopilot Noise Compensation Technology". Bose AutoPilot
Posted by: tfabris

Re: I want to build a volume controller. - 14/04/2004 13:18

Yeah, looking at their web site, it uses an interior microphone, subtracts the music from the mic input, and then does both volume compensation and dynamic range compression based on what's left of the noise sample. Perhaps it even does some EQ fiddling, too, but I'm not sure if it tries to get a frequency sample of the noise level. Maybe it's just a bass loundness control.

Cool stuff, and theoretically do-able in the empeg all in software...
Posted by: tanstaafl.

Re: I want to build a volume controller. - 14/04/2004 16:13

I thought you were in Texas this week.


Yep. Just outside of Dallas. Trying to see if I can borrow a rifle and get directions to the school book repository, then go out for a picnic on a nice grassy knoll...

Microphone outside the car, eh? I wonder if there will be a linear relationship between noise outside the car and noise inside the car? Is it possible that a significant part of the sound you perceive as "road noise" is really noise generated harmonically within the interior of the car by vibrations from the wheels and suspension?

I will be very interested to see how this comes out.

tanstaafl.
Posted by: tfabris

Re: I want to build a volume controller. - 14/04/2004 16:21

Yep. Just outside of Dallas.
Well, then, someone at your work has turned on your computer and left your ICQ connection running. Wondered why you weren't answering.

I wonder if there will be a linear relationship between noise outside the car and noise inside the car?
For the particular noises I want to overcome (the sound of the tires interacting with the pavement), I'm 100 percent certain that this is what/how I want to measure. Wind noise is very low in my car, there's no harmonic vibrations I need to account for, and engine noise is only a small fraction of the whole equation.

I can be going at 85 miles per hour on smooth pavement, and noise is not a problem. But as soon as I hit bad/old pavement, the noise becomes a problem. As I've said before... There's a stretch of Interstate 80 that I frequent where it goes from new-road-smooth to crappy pebbly worn-out concrete and back again in several spots. Loren knows, it's the stretch leading up to the summit and Truckee. Some of that road is just utter crap, and some sections have been recently replaced. The amount of volume change between road sections that I want is in the neighborhood of 15-20db on the empeg's volume scale.
Posted by: gbeer

Re: I want to build a volume controller. - 14/04/2004 19:30

Just three words. Noise cancelling microphone. Except in this case you want a music cancelling mic.
Posted by: rtundo

Re: I want to build a volume controller. - 15/04/2004 04:29

I think mounting the microphone close as possible to the listeners ears would be best. It would take into account road noise w/ windows open/closed as well as interior noise (people talking in back etc.).
Posted by: pgrzelak

Re: I want to build a volume controller. - 15/04/2004 04:48

Greetings!

As for cancelling the music to avoid feedback, what you might be able to do is the following. Take a copy of your regular signal, as seen from your amp, and invert it. Add it to the input from the microphone. You would need to have some kind of adjustment for calibrating the cancellation circuit - perhaps just a amplifier control and calibrating the music level when there is no noise in the car (parked). Might work...
Posted by: rtundo

Re: I want to build a volume controller. - 15/04/2004 05:30

It seems like there is 3 ways to approach this.

1. Noise cancellation
2. Increase total volume as noise increases
3. Increase certain frequencies using eq as noise increases

I guess each would have its own advantages/disadvantages.
Posted by: tms13

Re: I want to build a volume controller. - 15/04/2004 07:19

In reply to:

Take a copy of your regular signal, as seen from your amp, and invert it. Add it to the input from the microphone. You would need to have some kind of adjustment for calibrating the cancellation circuit - perhaps just a amplifier control and calibrating the music level when there is no noise in the car (parked). Might work...


Might work, but I suspect that there's more to it than that - propogation delays and frequency-domain transfer function will have an effect. If you're smart with the software, though, you can give more credence to the calculation when the music is quiet than when it's loud.

This is something that's been on my wishlist for a while, but I haven't even got around to buying a suitable microphone yet, never mind writing the software...
Posted by: tfabris

Re: I want to build a volume controller. - 15/04/2004 10:14

I think mounting the microphone close as possible to the listeners ears would be best.
But would require subtracting the music from the input signal, as Paul said. And as Toby correctly pointed out, there are a lot of tricks you need to do in order for that to actually work. Simply inverting the signal is not enough.

I also do not want the microphone to pick up conversations in the vehicle and then attempt to increase the volume over the conversations, thus causing a different kind of feedback loop.

Anyway, I'm looking for a simple project, and anything involving noise cancellation or signal subtraction would be extreme overkill for what I want to do. I merely want the average of the microphone input level to control the amount of volume attenuation.
Posted by: rtundo

Re: I want to build a volume controller. - 15/04/2004 18:00

Ah, I see your point. An outside mounted mike would eliminate conflicts with sounds from the player etc. and would make things potentially easier to set up.
Posted by: gbeer

road noise WAS: I want to build a volu - 15/04/2004 22:37

At some point you mentioned it was specifically road noise. Tires on differing surfaces.

Road noise is low frenquency stuff. right? Maybe a cutoff filter on the mic input would help.
Posted by: rtundo

Re: road noise WAS: I want to build a volu - 16/04/2004 03:13

It would be interesting to know the "average" frequency of road noise versus interior cabin noises etc. just to see how separate they are on the spectrum.
Posted by: _hardcore_

Re: I want to build a volume controller. - 19/04/2004 14:39

Yeah, looking at their web site, it uses an interior microphone, subtracts the music from the mic input, and then does both volume compensation and dynamic range compression based on what's left of the noise sample. Perhaps it even does some EQ fiddling, too, but I'm not sure if it tries to get a frequency sample of the noise level. Maybe it's just a bass loundness control.

Cool stuff, and theoretically do-able in the empeg all in software...


Why not hook up to the tacho instead ? - Much simpler, and it's easy to find the tacho in most cars.

\\Kaare
Posted by: tfabris

Re: I want to build a volume controller. - 19/04/2004 14:42

Why not hook up to the tacho instead ? - Much simpler, and it's easy to find the tacho in most cars.
Please read the whole thread from the beginning. I clearly explain, in the very first post, that road noise is governed more by the road surface than by the car's speed or the revs of its engine. For me, at least, it's much more desirable to have road-noise-based compensation than speed- or tach-based compensation.
Posted by: _hardcore_

Re: I want to build a volume controller. - 19/04/2004 15:24

Please read the whole thread from the beginning. I clearly explain, in the very first post, that road noise is governed more by the road surface than by the car's speed or the revs of its engine. For me, at least, it's much more desirable to have road-noise-based compensation than speed- or tach-based compensation.


Busted. I replied within reading through the entire thread. Sorry. Still think that the tacho controlled volume control would do in must situations. Isn't there a analog input port on the pcats tuner btw ?

\\Kaare
Posted by: toolman

Re: I want to build a volume controller. - 31/01/2005 00:17

Given that the empeg has a mic input on the back sled, surely you could do this completely in software inside the empeg? perhaps a patch to the hijack kernel?
Posted by: tfabris

Re: I want to build a volume controller. - 31/01/2005 02:59

Quote:
Given that the empeg has a mic input on the back sled, surely you could do this completely in software inside the empeg? perhaps a patch to the hijack kernel?

Yes. Please re-read the very first post at the very top of this thread... completely.
Posted by: bonzi

Re: I want to build a volume controller. - 01/02/2005 05:35

Have you got anywhere with this Tony? I find this a quite ingenious approach to the problem of road noise - for example, I did not think of 'conversatio feedback' problem with internally mounted mic.

To me as a total electronics layman, it woud seem to involve rectifying mic signal, amplifying it (with manual gain control), charging with it a capacitor in a simple RC circuit (that serves as an integrator - make R adjustable in order to control discharge time) and finally using the result to control the actual volume. Now, of course, someone who actually has a clue should step in.
Posted by: tfabris

Re: I want to build a volume controller. - 01/02/2005 15:18

I haven't gotten anywhere with this because I'm even more of an electronics layman than you, I know nothing about circuit design. So I don't know where to start with any of it. All I've got is the idea.