I ordered a few PCBs and programmed a Arduino to act as a soft start and for temp sensing for audio amplifier. It is set up to shut off at 70c and turn a fan on at 55c and it is working great. I need to add a DC speaker protection circuit to disconnect the power rails with the relays in the event of a DC fault and a 12vDC trigger. It is currently using 2 relays - 1 for zero non crossing and the other is a solid state relay. Basically I to figure out the best way to sense DC and have the Arduino turn on or turn off the device and keep tabs on the status and report the error. The next step would be connecting a single board computer to it for network control and additional controls. Any help would be fantastic.
Hi,
Welcome to the forum.
Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html
Have you tried googling dc speaker protection arduino.
Tom....
Yep, I have and I saw a few posts about it. One was recommending to keep the protection as a solid state circuit because of delays and possible errors. If I set up a speaker protection circuit with all SS components and there is a fault, how am I able to have the arduino poll and relay the status?
Basically I to figure out the best way to sense DC
The logic & programming are fairy easy. Just make sure the ADC reads nearly zero at least every 10 milliseconds or so. That is, once it reads non-zero, start timing and if doesn't get back to zero in time, you've got DC (or a very-low frequency). Or you can "reverse the logic" and continuously reset a timer as long as the output is zero... If the timer counts too high before being reset again, you've got DC. I say "nearly zero", because there may be some slight offset and some inaccuracy. But, something like a 100mV threshold should work because 100mV won't damage your speakers and your amp shouldn't have an offset that high.
The circuitry is a bit tricky...
The Arduino has to be [u]protected[/u] against voltages greater than +5V and from negative voltages.
And, the input needs to be biased so it can read negative voltages (of course the bias can be subtracted-out in software). For regular audio, you bias the Arduino's input with 2 equal-value resistors an a capacitor. But, you can't have the capacitor because you must read DC. I think you can make a bias circuit with 3 resistors but I don't quite have the circuit figured-out in my head... There are couple of way of doing it with op-amps (including a full-wave precision rectifier) but of course it would be nicer if you can do it with a few resistors.
and have the Arduino turn on or turn off the device
You said you're using relays, right? In general, the Arduino needs a driver (transistor or MOSFET) to drive a relay coil (and you can buy relay boards with drivers already built-in) or you can get solid-stage relays that can be controlled directly by an Arduino I/O pin.
and keep tabs on the status and report the error.
An LED on an Arduino I/O pin? Or, an I/O pin to your SBC if you get that done.
One was recommending to keep the protection as a solid state circuit because of delays
"Delay" isn't really an issue, because "DC" only exists over a time period. And, your speakers won't fry instantly with DC (as long as they are appropriately rated for the available amplifier power). If the DC sensing is "instant" it will shut-off the amplifier as soon as there's any signal.
If I set up a speaker protection circuit with all SS components and there is a fault, how am I able to have the arduino poll and relay the status?
Since, presumably, the Arduino is controlling the relays the Arduino always knows the status.
If you are switching the speaker connection, I'd recommend regular-old electromechanical relays. A relay is as close as you can get to a perfect switch and it won't mess with the audio signal. Solid state relays (especially AC solid state relays) can be a little "strange". If you are switching the power rails inside the amplifier, you can use regular relays, solid state relays, or MOSFETs. If you are switching the AC power to the amplifier, a regular relay or a AC solid-state relay is fine.
...and possible errors.
I'm not sure what they mean by "errors"... I suppose they mean "failures". Although electromechanical relays are mechanical and they can eventually wear-out, they are generally super reliable and I've only seen one or two relay failures in my life! I remember a horn relay failed in an old car once. There are probably more than 10 relays in your car, have you ever had one fail? Mechanical relays are also electrically rugged... You can occasionally over-current or over-voltage them (within reason) and they will survive.
...I put a DC protection circuit in an amplifier I built a million years ago, but I don't remember exactly how I did it. There were relays on the speaker outputs and I think I used some analog comparators (op-amps). ...I know there is no "brain" in that amp so there was no software involved.
Jared1179:
Yep, I have and I saw a few posts about it. One was recommending to keep the protection as a solid state circuit because of delays and possible errors. If I set up a speaker protection circuit with all SS components and there is a fault, how am I able to have the arduino poll and relay the status?
You have relays with extra change over contacts, use a pair of these extra contacts to pull an Arduino digital input HIGH or LOW depending on your coding.
Or opto couple the relay coils to the Arduino, coil activation passes through the opto to a digital pin on the Arduino.
Tom...