The Emic 2 can be directly connected to an 8 ohm speaker, according to the documentation. I cannot find any info on the speaker used in the S2. Is it 8 ohm? If it isn't, what would I need to do to make it work with the Emic 2?
It's no less than 8 ohms, but it could be 16. In either event, it should be safe to use it with the Emic2. But here's another thought: why not couple the Emic2's output to one of the S2's analog inputs and just pass the resulting data to the S2's onboard speaker amp?
But here's another thought: why not couple the Emic2's output to one of the S2's analog inputs and just pass the resulting data to the S2's onboard speaker amp?
That sounds good. Any examples of how to code that?
Well, I spoke off the cuff and too soon. Theoretically, it could be done, but it would entail not calling the S2's start method, which -- among other necessary functions -- sets up a round-robin sampling sequence for the analog multiplexer. Unfortunately, this sequence is much too slow for sampling audio input and would have to be killed for my idea to be effective. The microphone input has it's own, dedicated sigma-delta ADC, but using that would entail some hacking. Maybe it's better just to unplug the speaker and drive it driectly.
Wouldn't the microphone to headphone object be a good starting point for something like this? I think you'd want to use the highest sample rate practical.
It would be, except that the main sigma-delta ADC in the S2 is multiplexed with other vital inputs that have to be monitored, such as motor current. The microphone ADC is dedicated, but would have to be hacked on the PCB to gain access.
Doesn't the S2 use a hardware Mux? So could the program make the mux only pay attention to the Emic while it's speaking?
I'm guessing this would require a change in the S2 object.
I wasn't suggesting using the on board mic, but doesn't the ADC work the same for the analog pins as it does for the mic (assuming the mux can hold position at the analog pin)?
It might be easier (but who would want to do it that way?) to use a Veho 360 with the Emic and not use the S2 speaker.
So could the program make the mux only pay attention to the Emic while it's speaking?
I'm guessing this would require a change in the S2 object.
A change to the S2 object would make it possible, although holding the mux on one channel long enough for an utterance would interfere with other vital functions.
A better solution may be to hack the Emic2 to tap its digital output before conversion to analog and output that to the S2's digital inputs. Or, just add an SPI ADC between the Emic2 and the S2's hacker port.
Edit: Oops, I thought you wanted to plug the Emic in externally. If you run off 3x 14500 Li-Ion AAs. you can reclaim half of the battery compartment for a small second speaker.
If you add an additional hardware MUX, you could control which device is connected to the speaker, the Emic or the S2's normal audio. Just use one of the S2's I/O pins to control the MUX.
Or even simplier, use a relay. (I can't believe I suggested this before erco). You might need a DPDT one I'm not sure if it would be okay to leave the negative lines of the Emic and S2 tied together. You'd still need to use one of the S2's IO pins to control the relay.
The S2's Speaker amp has a differential output, so you'd have to break both connections. At those power levels, an IC mux would be too wimpy. 'Better, I think, just to add an SPI or I2C ADC to the hacker port.
Comments
-Phil
That sounds good. Any examples of how to code that?
-Phil
-Phil
-Phil
I'm guessing this would require a change in the S2 object.
I wasn't suggesting using the on board mic, but doesn't the ADC work the same for the analog pins as it does for the mic (assuming the mux can hold position at the analog pin)?
It might be easier (but who would want to do it that way?) to use a Veho 360 with the Emic and not use the S2 speaker.
A change to the S2 object would make it possible, although holding the mux on one channel long enough for an utterance would interfere with other vital functions.
A better solution may be to hack the Emic2 to tap its digital output before conversion to analog and output that to the S2's digital inputs. Or, just add an SPI ADC between the Emic2 and the S2's hacker port.
-Phil
http://www.ebay.com/itm/2pcs-1-8-3-5mm-Female-Phono-Mono-Panel-Phone-Jack-K1-/180738189027?pt=US_Audio_Cables_Adapters&hash=item2a14d5e6e3
or
http://www.ebay.com/itm/4pcs-Panel-PCB-3-5mm-1-8-Female-TRS-Headphone-Jack-K3A-/290571856792?pt=US_Audio_Cables_Adapters&hash=item43a76eab98
Edit: Oops, I thought you wanted to plug the Emic in externally. If you run off 3x 14500 Li-Ion AAs. you can reclaim half of the battery compartment for a small second speaker.
Or even simplier, use a relay. (I can't believe I suggested this before erco). You might need a DPDT one I'm not sure if it would be okay to leave the negative lines of the Emic and S2 tied together. You'd still need to use one of the S2's IO pins to control the relay.
-Phil
I want this to be an easy hack so I am trying to keep it as simple as possible.
Then I will withold my thought to use a center-tapped audio transformer to allow two different sources to drive one speaker.
Would that work?
Wouldn't the transformer still back drive the S2's amp?