impedance detector->help

i need to build a impedance detector....

this waht i what to build more exactly:

i neet to make the amplifier to"know" if the loudspeakers at the exit are 2,4,or 8 ohm... and in each case to activate a diffrent relay...

this is what i was thinking:

a comparator that compares the voltages at the output, and the amp's but i don't know how i can make that...(i don't know to biuld the schematic)

and also i don't know if it will work,because of the phase shift .....

does anyeone have any ideea how can i do that(not with pic's) or any link's or schematics...???

You would need to make an AC current source that passes a very small current like 1mA and measure the voltage required to do this. You would have to use a quite low frequency (20Hz or so) to keep out of any resonances or inductive impedance rises. Then the circuit would have to switch the connection over to the output of your amplifier for use, as you may damage your amp if you forced current into it.

Not that simple and I'd have say it's a lot of complexity for not a lot. Then again I don't regularly change my speakers.
What were you going to do with the relays, reduce the power supply voltage? You need some way of detecting current draw, and comparing that to the output voltage.

I don't think you want a circuit that beeps when you turn it on, to test the speakers? Speaker impedance is different at different frequencies too.

I'd take a que from one of ST's auto-stereo power chips, and reduce the DC supply when the amplifier gets hot. Actually, what they do is strap front and back channels in series. The idea is to keep running, and its automatic full time protection.

this is exactly what i want to do
(if you got any others idee,please tell them)

i whant to build a protection that functions like this:

if i put more voltage at the imput at the amplifier and the amplifier starts to go into clipping the voltaje will be automaticly lowerd at the imput, so the amplifier does not clip even if i have 4-5V at the imput
(this is a extreme case, normaly i will have 1V at the imput)

and also it detects what loudspeakers i am using and it automaticly ajust the volume(at the imput) so the amplifier does not deliver more than the power it can handle...and most importantly does not go into clipping

i am thinking like this:

a limiter at the input and this limits the imput signal at 5-600mV, or what i need to get the maximum power at the output at 2 ohm.

and after the limiter i will maka a small amplifier with AO and that i can control the negative reaction in 3 or more steps from nearly 100%(liniar amplification) to what i need to get the full power @8 ohm

but the problem is how i can detect if it's a 2, 4 or 8 ohm's ..

could someone help me with that...

i didn't think about putting a constant curent source and testing the tension at the output..with multiple thesholds.....could you elaborate on that.....

a schematic would be nice...:D