如何从耳机插孔获取电力?
我的问题是是否有人知道如何创建一个可以通过设备的耳机插孔发送电荷的 Android 应用程序,就像这个视频 iPocket_LED。该视频展示了一款 iPhone 应用程序,可控制插入耳机插孔的 LED。
我想知道如何访问该设备来发送电信号。
抱歉我的英语不是我的语言,我希望有人能理解我
My quest is if anyone knows how to create an Android app that can send electric charge through the device's headphone jack, like in this video iPocket_LED. The video shows an app for iPhone that controls a LED plugged into the headphone jack.
I want to know how to access the device to send an electric signal.
Sorry about my English, is not my language, I hope some one understand me
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
许多接受外部麦克风的消费设备将提供“插入电源”。这是麦克风连接中两个触点上的小电压,通常为 1 至 5 伏。
Apple 和(大多数)Android 设备也不例外。大多数使用具有以下引脚分配的 4 导体 TRRS 连接:
智能手机上的插入电源通常约为 2V,并在麦克风(套管)导体上作为 +2V 供电。只有当手机检测到麦克风就位时才会供电,它通过测试麦克风对地的电阻来查看它是否与麦克风的阻抗一致——比如 200 到 5000 欧姆的阻抗,我听到了 iphone 的声音。对此可能非常挑剔,并且需要非常接近 1600 欧姆。
这意味着您可以从中汲取的最大功率(看起来仍然像麦克风一样)非常小 - 大约 1.25 毫安。您可以使用此功能为一些低功耗微控制器或其他设备供电。
请注意,插入式电源可能与专业音频设备中使用的“幻象电源”概念类似,但它是不同且不兼容的标准。 “插入电源”使得智能手机耳机中的微型驻极体麦克风不需要自己的小电池即可工作。
至于如何通过应用程序实际控制所连接的设备,这涉及到更复杂的电子设备。如果您使用左和/或右耳机输出线向设备发送信号,那么大概是可能的。
Many consumer devices which accept an external microphone will provide "plug-in power". This is a small voltage typically from 1 to 5 volts across two of the contacts in the microphone connection.
Apple and (most) Android devices are no exception. Most use a 4-conductor TRRS connection with the following pin-out:
The plug-in power is usually around 2V on smartphones and is supplied as +2V on the microphone (sleeve) conductor. The phone will only supply it if it detects that a microphone is in place, which it does by testing the resistance across Mic to Ground to see if it's consistent with a microphone's impedance - something like 200 to 5000 ohms impedance, and I hear the iphones can be very fussy with this and need very close to 1600 ohms.
This means the maximum power you could draw from this and still seem like a microphone would be pretty small - around 1.25 milliamps. There are some low powered microcontrollers or other devices you may be able to power with this.
Note that plug-in power may be a similar concept to "phantom power" as used in pro audio gear but it's a different and incompatible standard. "plug-in power" is what causes the tiny electret microphones in smartphone headsets to work without needing their own small battery.
As for how to actually exert control over your attached device from an app, that's getting into much more complicated electronics. Presumably it is possible if you use the left and/or right headphone out lines to send signals to the device.
您需要播放一些音频。每当播放音频时都会有少量电流流动,这就是移动耳机中微小扬声器的原因。电压会随着音频电平的变化而变化。它也是交流电流,因此声音的频率(音调)会影响交流周期的频率。
使用这种方法与设备集成将会很困难,特别是因为交流电流。您可以确定适当的音调来发送所需的电压,但大多数“设备”可能需要 +3.3v 或 +5v DC 信号。您可能需要进行交流到直流转换才能使其工作。
我相信有一种方法可以通过 USB 接口与 Android 设备集成。这可能会更好、更容易。您可以为自己准备一个带有内置 USB 扩展板/控制器的 Arduino 套件,并在此基础上构建您的设备。
请参阅Android 手机的外部 USB 设备?
You'll need to play some audio. A small amount of current flows anytime audio plays, that's what moves the tiny little speakers in your headphones. The voltage will vary with the level of the audio. It is also AC current, such that the frequency of the sound (pitch) affects the frequency of the AC cycle.
It is going to be difficult to integrate with a device using this approach, especially because of the AC current. You can determine the appropriate pitch to send the voltage you want, but most "devices" are probably going to want a +3.3v or +5v DC signal. You'll probably need to do an AC to DC conversion to make that work.
I believe there is a means to integrate with an Android device via the USB interface. That would probably be far better and easier. You could get yourself an Arduino kit with a built-in USB shield/controller, and build your device on top of that.
See External USB devices to Android phones?
是的,同时使用两者是可能的,因为这就是手机的设计工作方式。事实上,根据您拥有的特定设备,超越音量限制也将为您提供更多的电量。
尽可能降低损耗的最佳选择是主动整流:在零点将其切换到+2V,其余时间以最高峰值为准进行整流。足够简单,只需使用两个双 MOSFET,这应该可以为您提供足够的电量,至少可以初始化手机,尽管可能无法为其充电。
Yes using both at the same time is possible as this is how phones are designed to work. In fact depending on which specific device you have, overriding the volume limit will also give you a bit more power.
The best bet as far as lowest possible loss would be active rectification: at the null point have it switch over to +2V and the rest of the time whichever is the highest peak gets rectified. Simple enough to use two dual MOSFETs and this should get you enough power to at least initialize a phone though probably not charge it.