Electronic – How to convert the current from a fan to the microphone headset input on an iphone

faniphonemicrophonevoltagevoltage measurement

I am working on creating an anemometer (or wind meter) for the iPhone. I am a programmer and know exactly how I could do this on the software side of things, but I am a complete noob when it comes to electronics. I have seen many other posts about putting voltage or an audio line to the microphone, but I'm trying to convert the current generated by a small spinning fan into a microphone input that I can measure on the iPhone. How can I make sure that the volts generated by the fan will appropriately scale to the input of the iPhone microphone?

Best Answer

"Best": The "best" solution is to use a low cost microcontroller to measure the data and to output a signal that is suited to what the iPhone can handle. This could eg be a tone sequence or frequency or about anything else measureable. All up parts cost could be under $1. This takes some microcontroller hardware experience - but may be an acceptable approach.

"Simpler": As long as extra hardware is acceptable, a reasonably level independent way is to convert voltage to frequency and then to measure the frequency in software. If in-device measurement is too hard the sound could eg be saved to a file, sent to a remote point, measured and returned. Or it could be relayed live. But hopefully you have enough access to processing power to do it directly. The frequency can be as low or high as you wish - and if you can measure time periods you could gate the tone on and off for a period related to voltage. Achievable reolution may not be large but it should be able to meet the ned. Averaging over many samples would be possible.


DIY with an LM555 - cheap and may be good enough.
EDN - NE555 timer sparks low-cost voltage-to-frequency converter
Related circuit from here shown below. Opamp can be common and low cost LM358 or LM324 BUT a virtual ground at about half supply would be needed as opamp output must swing negative relative to ground to operate integrator. Supply voltage can be 5V or more with LM358 or LM324.

enter image description here

LM331 dedicated precision voltage to frequency converter

Analog Devices MT028 - V-to-F tutorial - 7 pages. Good and has links.

AD VtoF IC selection guide

Linear technology AN14 Designing high performance V to F converters - overkill for what you want but gives ideas.

Microchip says ...

Many many idea starters and some complete circuits