Using a speaker as mic simultaneously

Thread Starter

dentistguba

Joined Apr 21, 2013
7
Hello (new here).

I have been thinking about ways to interact with a virtual audio signal in a physical way, the standard method being a simple midi controller FSR or similar with a piezo for input signals. However, this doesn't give the surface a realistic feel.

While experimenting with a speaker and piezo attached to it I realised i could physically affect the sound and then feed it back in to the digital system at some point (with some delay). This got me thinking of the fact that a speaker can be used as a mic and I then wondered if it is possible to do both at once, removing the need for the piezo and giving a more accurate result.

Basically I want to return the signal from the DAC (after being, say, low passed by a hand on the speaker) back into a sound card's ADC but I can't seem to get my head around the requirements for a circuit like this. Would you just add the input in series before the 'return' of the speaker to the output?

Has anyone else experimented with including analogue signal processors within a digital chain or feedback loop?
 

Externet

Joined Nov 29, 2005
2,223
Interesting...
Simoultaneously, I see it very difficult. Alternatively, it is nothing out of the ordinary. The speaker works either as microphone or speaker, but one at time, because the diplexing circuitry would not be able to discern what is input and what is outputted at such different levels.
The problem is feedback.

I would use two speakers in one single box.

< If I understand what you are trying to do; a "talk box" modulated by hand touching the cone instead of mouth cavity modulation.>
 

wayneh

Joined Sep 9, 2010
17,498
I don't think there's any practical approach to use the speaker's main coil as both an output and an input, although you might be able to detect an obstruction (a hand) on the cone since it would prevent movement and would alter the field and current in the coil. It would be tough to sort out what the cone IS doing from what it SHOULD be doing unless you had some sort of calibration.

There might be some way to attach a separate coil or piezo to the cone, and this would be electrically de-coupled from the input. The coupling would depend on audio/mechanical things, which it sounds like you are seeking.
 

Thread Starter

dentistguba

Joined Apr 21, 2013
7
Externet has it basically right with the talk box thing, with the speaker working like a complex resistor as far as the circuit is concerned which attenuates or boosts a signal by the relation to the sign and amplitude of a control signal.

I would have guessed that any feedback would at least be stable assuming matching output and input gain/impedance on the sound card, you probably meant electrical feedback though i suppose which is a much more difficult beast. The speakers frequency and phase response could set up some strange detuned ringing when put in a feedback loop with, say, a clean sine wave. The speaker should actually attenuate any signal a bit unless it is at it's fundamental frequency.

I did just think of maybe just using two insulated coils on one magnet with one used as a mic inducer, would that be likely to work or would there be some interference between the wires.

In the feedback loop example i would be modelling the base attenuation digitally so i was thinking using two separate speakers might affect the sound too much without interaction and would add a small extra delay.

could make an extra accurate convolution recorder if there is a good way to achieve this. I did try a piezo as wayneh suggested but I think it would be quite fiddly to match the response between dissimilar transducers, it kind of works but it would simplify things if i could use at least an exact replication of the speaker in reverse. I suppose i could set up a 'feedback controller' in the dsp code that would calibrate itself to match in and out levels (maybe even frequency and phase) before use but i'm not sure if it would be accurate enough.

I also have a more mechanical challenge in finding a good way to use a strong mesh in place of the moving part of the speaker without affecting the feel by sticking a solid magnet to the centre to sit within coils. would an electromagnet pushing and pulling on a surface above have more of an uneven response up and down? i would guess the upward displacement would be less/slower due to gravity and distance from the magnet, could be compensated a bit though.
 

Externet

Joined Nov 29, 2005
2,223
Hmmmm...
Try a single or very few turns of a coil glued and not moving at one end of the speaker magnet, and call it a microphone. And an iron disc (like a coin or thinner) in place of the speaker paper coil dust cover.
Some old speakers have a cylindrical magnet exposed at its rear, that would be preferred instead of toroidal magnets, unless you somehow manage to glue such new coil with no interference with the moving 'voice' coil.

I believe the iron vibration by cone movement or tapping by hand will induce a microphonic signal on that single turn coil. Give it a try, and come back with findings while I scratch my head.
 

kubeek

Joined Sep 20, 2005
5,795
If you feed the speaker from an amplifier through a suitable impedance, you theoretically could take the difference between the amplifier output and the speaker voltage and use it as your mircophone signal, as the outside sounds should basicaly modulate the speaker impedance.
But there may be some obstacles like how low will the microphone input be below the amp signal and what the noise floor will be. But it seems like a nice and easy idea to try out :)
 

GopherT

Joined Nov 23, 2012
8,009
Kubeek is on the right path here. You just need to compare the signal driving the speaker to the signal of the speaker (measured the same way you would measure back emf of a motor). The difference should be the input to the "microphone".

There was actually a patent some years ago (Harmon Kardon?) who was trying measure and compensate the distortion at one speaker that is caused by the pressures of the other speaker.
 

Thread Starter

dentistguba

Joined Apr 21, 2013
7
I did another simple test with the piezo method and realised the delay is a bit long (obviously it would be at least double the asio buffer size, 256 in my case), did seem to create an interesting effect with a small feedback added to the digital one before but probably makes the impact a bit muddy being echoed a bit (particularly with a short decay sound). Might be worth testing again if I can get a soundcard/dsp unit with a much shorter delay (might be able to lower it for simple dsp, will test later). I was just using a guitar amp with the piezo attached to the mesh cover which made the feedback unpredictable (moved closer to the actual speaker), would work better directly on the moving surface.

I think the best i can do currently (also being more inclusive as a possible product) is probably to use the voltage of a piezo as input allowing constant pressure to be picked up (and e.g. routed to pitch) and then add capacitance measurement to determine damping. Trouble is i'm not sure how to get that data into the program, flowstone does have support for some data acquisition devices so i need to look at them. I guess it's possible to find low latency data acquisition devices and so separate the input and feedback loop from the audio, would be easier for others to set up that way. I was trying to use only cheap soundcards but obviously they only deal with current. Would also make the speaker solution more feasible if i can find a good option. Does anyone know of an audio quality data aquisition device or would it be better to convert voltage to current and put it into a soundcard?

A magnetic system could turn out cheaper at the moment though, could have a wide electromagnet picking up the whole surface to avoid hotspots. It is possible to get piezo film but it's looking a bit costly so far, a piezo polymer coated wire mesh would be ideal but even the thread is hard to get and i haven't seen a mesh apart from those security fences (and that is woven out of separate piezo cables so it would need a contact for each cable). On the plus side the mesh would work ok without the radial polarization needed for the thread / cable as most squeezing would be up and down. I don't know if i could manage to add my own piezo coating to a mesh, could be worth a try though, mostly about applying a voltage to the mesh while a solution of the piezo powder i think, and ensuring a good contact. There might be companies who could do that for me but it might be more expensive than the film anyway.

The idea of getting the difference between the signal before and after the speaker could still be interesting even with the delay as you could then separate the interaction from the main feedback loop so that would be the only delayed part. the surface level would still affect the input but it wouldn't give you cancellation without hefty delay compensation.

Got too many ideas at once as usual haha.
 
Last edited:

Thread Starter

dentistguba

Joined Apr 21, 2013
7
44100hz,16bit would be plenty for the data, not obsessed with huge sample rates like some (reduces the buffer delay though). Also i don't know if soundcards can pick up a DC offset, heard they can't somewhere.

All i really need is voltage and current but it would be nice to be able to extend it to a few pads at once.

Also would want usb power if possible and compatibility with flowstone, could check that last bit after finding something though.
 
Last edited:

#12

Joined Nov 30, 2010
18,224
Umm...dual coil speakers have been invented.
Look under "sub-woofer" and find some sad POS that couldn't do bass with a gun to its head, and you might find a good price.
 

eKretz

Joined Apr 21, 2013
17
Yes, I was just thinking the same thing. I remember hearing of dual-voice-coiled speakers from when I was more into the audio thing years ago. You should be able to use one to drive and one to pick up I would think. You'd have to figure out a way to separate the signal generated by the first out of the second though.
 

Thread Starter

dentistguba

Joined Apr 21, 2013
7
Interesting, may have to try that. would prefer to find a way to have a flat electromagnet under a mesh to get a more even response though, would simply attaching a flat metal plate to the magnet in a speaker do a good enough job of spreading the field out?

I guess i'm basically after a large flat guitar pickup effectively. Is it possible to make a dual flat spiral coil on either side of a metal plate, would a spiral be the best option for creating a large but flat electromagnetic pickup?
 

Thread Starter

dentistguba

Joined Apr 21, 2013
7
Also does anyone know if it's possible to do dc-ac conversion without a power source? I think the best data acquisition method would involve using that to allow any sound card to pickup DC but so far I have only found a powered chopper circuit to do this cheaply. Would be best if there was an existing component/device to do that which could be bought cheaply. I could also do with a little pre-made component to measure capacitance as a voltage output to put into a sound card. Any ideas?

I guess voltage across a surface should at least be proportional to capacitance to an extent, maybe i could just measure that as i only need a rough correlation.

I am now thinking of possibly switching to plastic coated metal mesh, measuring a voltage across the metal for pressure/stretch (more stretch probably) and also measuring a voltage across the plastic (or between it and the wire) to get a separate voltage from contact. a layer of conductive paint (not touching the inner wire) might give a better result with less noise for the touch sensing though.

loose multi strand wires as cores would most likely give a better result for vertical squeeze sensing though which could allow the surface to have no damping and avoid crosstalk (like the acquarian in-head FSR drum head).

would be less obtrusive and heavy than a big electromagnetic pickup underneath i guess although it wouldn't allow the surface to react to the digital model. may put that bit on the back burner till i have the 'passive' bits working, should still be able to improve on existing designs.
 
Last edited:

Thread Starter

dentistguba

Joined Apr 21, 2013
7
As for a no latency feedback pad I would have to build a tiny analogue waveguide effect box to go inside the drum I suppose, maybe one day. Will have to try a crazy low buffer length/high sample rate that eats CPU's for breakfast in the meantime.
 
Top