I have a horn driver that works fine on any one input. However, I'd like to add the inputs together, literally mixxing them is what's occuring now, so a 0 signal will turn a 10 to a 5. In essence, the output is very low. I have one input from arduino going thru a 100ohm resistor to a 10W classD amp. The other source is a IP camera audio out and that is going thru the 100ohm resistor to the same amp at the same point. Is is possible to have the two inputs on one driver without it being drowned out?
The general rule is NEVER short outputs together. (It's OK to short inputs together, for example it's OK to connect the 2 amplifiers to a CD player. Or if you have a mono source, it's OK to connect the left & right inputs of an amplifier together so you get sound out of both speakers.)
In essence, the output is very low. I have one input from arduino going thru a 100ohm resistor to a 10W classD amp. The other source is a IP camera audio out and that is going thru the 100ohm resistor to the same amp at the same point.
What kind of "sound" is coming out of the Arduino? Are you using tone()?
Connect separate resistors to each output. Connect the other end of the resistors together and to the amplifier input. Use ~10K resistors. 100 Ohms is slightly too low for the Arduino but it's way too low for the line-level audio signal that comes from the camera.
The resistors make a passive mixer. The signal will be reduced, but usually the power amplifier has enough gain to make up for it,
The signal from the Arduino is probably louder so you may need separate volume pots on both outputs. Or, you can adjust the resistor values to adjust the volumes.
However, I’d like to add the inputs together,
These things are known as outputs not inputs. You alway view a signal from the point of view of a the processor not the peripherals.
Yes I’m using tone. The amplifier, like most cheap ones, has no gain control (at least none without changing a SMT resistor). The ardiuno level is moderate and camera level is near-silent. My goal is actually have two outputs from MCU - one loud, one moderate, mediated by differing resistor values. Experimentation on this has been abimissal. Since I want it for an alarm I wanted it louder. I guess I can pre-amplify the signal with transistors… but that’s another mess I’ll get into later.
You need three resistors, one from each output to mix them in, and a load resistor (perhaps 1k or so).
The load resistor is needed because the input resistance of amplifiers is not well defined and varies.
So if pin A goes via 10k to the common point, pin B goes via 1k to the common point you'll get about 20dB attenuation for pin A (10:1), and 6 dB attenuation for pin B (2:1).