Reading speaker voltages
so i'm trying program addressable led strip react music i'm clueless how read-in speaker voltages. thinking of connecting 2 leads speaker (the input coming computer) , connecting arduino read voltages. ideas?
thanks in advance!
thanks in advance!
you can damage arduino if input negative voltage, , audio ac. so @ minimum, need prevent negative voltage of the audio getting arduino.
there few different solutions - simplest solution diode wired across arduino's input "short" negative voltages ground.* then, need resistor before diode (1k - 10k) limit current don't damage audio circuit when diode "'turns on"'. while you're @ it, diode wired other way arduino's 5v supply "short-out" current if signal ever goes on +5v, can damage arduino.
i use peak detector circuit (op-amp, diode, capacitor) change audio signal varying dc voltage. i add resistor across capacitor (which not shown in peak detector schematics) peak voltage discharges in fraction of second, rahter holding "forever". following peak dector buffer amplifier (an op-amp) peak-detector's capacitor sees high-impedance load (only it's resistor). following resistor & diode "protection" circuit described above. (the peak detector should never go negative, need protect posiotive over-voltage, , negative protection 1 more diode.)
fyi - signal coming out of computer called output. @ other end of wire same signal goes into speaker, or into arduino, call input. soundcards input getting sound computer.
and, audio output soundcard not "speaker" output, , cannot directly connect 4-ohm or 8-ohm speaker. it's line-level, or headphone level signal. puts-out 1v @ full volume. computer speakers have amplifier built-in, , why need power supply. it's signal arduino's analog inputs.
if connect speaker-outputs power amplifier, may high of signal, might need voltage divider (2 resistors) knock-down signal before connecting arduino.
* diode wired other way "block" negative current, doesnt work wekk, because diode doesn't turn-on 'till gets 1/2 volt across it, , block low-level signals. the diode voltage-drop means you'll 1/2v negative if way suggested. but, very-small negative voltage won't hurt arduino.
there few different solutions - simplest solution diode wired across arduino's input "short" negative voltages ground.* then, need resistor before diode (1k - 10k) limit current don't damage audio circuit when diode "'turns on"'. while you're @ it, diode wired other way arduino's 5v supply "short-out" current if signal ever goes on +5v, can damage arduino.
i use peak detector circuit (op-amp, diode, capacitor) change audio signal varying dc voltage. i add resistor across capacitor (which not shown in peak detector schematics) peak voltage discharges in fraction of second, rahter holding "forever". following peak dector buffer amplifier (an op-amp) peak-detector's capacitor sees high-impedance load (only it's resistor). following resistor & diode "protection" circuit described above. (the peak detector should never go negative, need protect posiotive over-voltage, , negative protection 1 more diode.)
quote
i thinking of connecting 2 leads speaker (the input coming computer)ther 3 wires in connector/cable coming computer's audio jack. left signal, right signal, , ground. you need connect ground arduino's ground , 1 (or both) signal wires 1 of arduino's inputs.
fyi - signal coming out of computer called output. @ other end of wire same signal goes into speaker, or into arduino, call input. soundcards input getting sound computer.

and, audio output soundcard not "speaker" output, , cannot directly connect 4-ohm or 8-ohm speaker. it's line-level, or headphone level signal. puts-out 1v @ full volume. computer speakers have amplifier built-in, , why need power supply. it's signal arduino's analog inputs.
if connect speaker-outputs power amplifier, may high of signal, might need voltage divider (2 resistors) knock-down signal before connecting arduino.
* diode wired other way "block" negative current, doesnt work wekk, because diode doesn't turn-on 'till gets 1/2 volt across it, , block low-level signals. the diode voltage-drop means you'll 1/2v negative if way suggested. but, very-small negative voltage won't hurt arduino.
Arduino Forum > Using Arduino > Audio > Reading speaker voltages
arduino
Comments
Post a Comment