Techniques for providing power and communicating data via an audio interface to a peripheral device are described herein. In one embodiment, a peripheral device is communicatively coupled to a host device via an audio interface of the host device, where the audio interface includes a first stereo output channel, a second stereo output channel, an audio input channel, and a ground pin. The peripheral device receives from the host device a first audio signal via the first stereo output channel and a second audio signal via the second stereo output channel. In response, the peripheral device harvests energy from both the first audio signal and the second audio signal to generate direct current (DC) power to power one or more hardware components of the peripheral device including a processor of the peripheral device.
|
9. A peripheral device, comprising:
a microcontroller;
an interface circuit capable of communicatively coupling to a host device via an audio interface of the host device, the audio interface having a first stereo output channel, a second stereo output channel, an audio input channel, and a ground pin, wherein the interface circuit is to receive from the host device a first audio signal via the first stereo output channel and a second audio signal via the second stereo output channel;
an energy harvesting circuit coupled to the interface circuit to harvest energy from both the first audio signal and the second audio signal to generate a direct current (DC) voltage to power up the peripheral device; and
a program executed by the microcontroller to receive the first audio signal and the second audio signal from the interface circuit and to demodulate data from the first and the second audio signals, wherein the data is transmitted from an application running within the host device.
19. A computer-implemented method, comprising:
receiving, at a peripheral device communicatively coupled to a host device via an audio interface of the host device, the audio interface having a first stereo output channel, a second stereo output channel, an audio input channel, and a ground pin, a first audio signal via the first stereo output channel and a second audio signal via the second stereo output channel;
harvesting energy from both the first audio signal and the second audio signal to generate direct current (DC) power to power one or more hardware components of the peripheral device including a processor of the peripheral device; and
receiving data from the first stereo output channel and the second stereo output channel by demodulating data which has been modulated on the first and the second audio signals transmitted via the first and the second stereo output channels by host device, wherein the modulated data on the first and the second stereo output channels are complementary signals.
1. A computer-implemented method, comprising:
activating a first application at a host device that requires a service from a peripheral device, wherein the first application drives a first audio signal into a first stereo output channel of an audio interface circuit of the host device and drives a second audio signal into a second stereo output channel of the audio interface circuit, and wherein the first audio signal and the second audio signal are complementary signals;
harvesting energy by a power harvest module of the peripheral device from both the first audio signal and the second audio signal to generate a direct current (DC) voltage to power up one or more hardware components of the peripheral device including a microcontroller of the peripheral device;
powering up and completing an initializing process at the peripheral device, wherein the microcontroller on the peripheral device generates peripheral device ready data, modulates the peripheral device ready data to a third signal, and transmits the third signal to an input channel of the audio interface circuit of the host device;
confirming by the first application of the host device readiness of the peripheral device by receiving the third signal from the input channel of the audio interface circuit of the host device and demodulating the peripheral device ready data sent from the third signal received from the peripheral device;
establishing by the first application of the host device duplex data communication with the peripheral device, by transferring data through the first and the second audio output channels of the audio interface circuit, and receiving data from the input channel of the audio interface circuit; and
continuously receiving power by the peripheral device by harvesting energy from the first and the second audio channels of the audio interface circuit of the host device, while demodulating the data from the first and the second audio channels, wherein the peripheral device receives data sent from the host device, and wherein the peripheral device modulates data received from a second application on the peripheral device, and transmits the data to the host device via the audio input channel of the audio interface circuit of the host device.
2. The method of
3. The method of
4. The method of
5. The method of
detecting a fourth signal that has been modulated onto the first audio signal and the second audio signal;
extracting the fourth signal from the first audio signal and the second audio signal; and
processing the extracted fourth signal as part of data communicated from the host device to the peripheral device, including delivering the extracted data to the second application running within the peripheral device as an intended recipient.
6. The method of
recognizing a first portion of the fourth signal that has been modulated in a first predetermined frequency;
translating the first portion into a first binary data value;
recognizing a second portion of the fourth signal that has been modulated in a second predetermined frequency; and
translating the second portion into a second binary data value.
7. The method of
8. The method of
10. The device of
11. The device of
12. The device of
13. The device of
14. The device of
detect a fourth signal that has been modulated onto the first and the second audio signals,
extract the fourth signal from the first and the second audio signals, and
process the extracted fourth signal as part of data communicated from the host device to the peripheral device, including delivering extracted data to an application as an intended recipient.
15. The device of
16. The device of
recognize a first portion of the fourth signal that has been modulated in a first predetermined frequency,
translate the first portion into a first binary data value,
recognize a second portion of the fourth signal that has been modulated in a second predetermined frequency, and
translate the second portion into a second binary data value.
17. The device of
18. The device of
20. The method of
21. The method of
receiving data from an application running within the peripheral device;
modulating the data into a third audio signal; and
transmitting the third audio signal with the modulated data from the peripheral device to the host device via the audio input channel of the audio interface.
22. The method of
|
This application claims the benefit of U.S. Provisional Patent Application No. 61/692,238, filed Aug. 23, 2012, which is incorporated by reference herein in its entirety.
Embodiments of the present invention relate generally to operations of electronic devices. More particularly, embodiments of the invention relate to providing power and communicating between a host device and a peripheral device via an audio interface.
An audio port in a personal computer and a mobile electronics device is very rarely used for data communication and power transferring. As a modern electronics device is getting smaller and more powerful, it can be made with more and more functions, due to the portability requirement. Most of them have very limited external interfaces to communicate with a peripheral device. Besides universal serial bus (USB) and wireless interface, an audio port or interface provides a very non-expensive approach for a host device to communicate with a peripheral device.
In the mean time, to simplify the design of both host and peripheral devices and reduce the cost; it is desirable to transfer power from the host device to the peripheral device through the audio interface. Conventional systems use one channel of stereo audio port to provide power to a peripheral device and the other channel used for data communication. Limited to the driving strength of audio port, one audio channel is not sufficient to provide enough power for many applications.
Embodiments of the invention are illustrated by way of example and not limitation in the figures of the accompanying drawings in which like references indicate similar elements.
Various embodiments and aspects of the inventions will be described with reference to details discussed below, and the accompanying drawings will illustrate the various embodiments. The following description and drawings are illustrative of the invention and are not to be construed as limiting the invention. Numerous specific details are described to provide a thorough understanding of various embodiments of the present invention. However, in certain instances, well-known or conventional details are not described in order to provide a concise discussion of embodiments of the present inventions.
Reference in the specification to “one embodiment” or “an embodiment” means that a particular feature, structure, or characteristic described in conjunction with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase “in one embodiment” in various places in the specification do not necessarily all refer to the same embodiment.
According to some embodiments, an improved method is provided to use an audio port or interface to connect a host device with a peripheral device. Through this connection the host device delivers power to the peripheral device, and duplex data communication is established between the host device and its peripheral device. Referring to
Host device 101 can be any of the computing or electronics device, such as, for example, a desktop, a laptop, a tablet, a personal digital assistant (PDA), a gaming device, a media player, a mobile phone, a set top box, or any other devices that can run user application program to do data processing and have a compatible audio interface or port. In one embodiment, audio interface 103 can be any of audio plug or jack that have four contact pins representing, with respect to host device 101, a left stereo output channel, right stereo output channel, an audio input channel (e.g., microphone), and a ground. In a particular embodiment, audio interface 103 is a 3.5 millimeter (mm) audio plug having four contacts as described above.
The term peripheral device is generally defined as any data acquisition devices such as an electrocardiography (ECG) sensor, a temperature sensor, a humidity sensor; auxiliary devices, such as a mouse, keyboard, etc. that connects to and communicates with the host device through this host device's audio port.
Unlike a conventional method which uses one of the stereo output channels to deliver power, and uses the other channel to transmit data; in one embodiment of the invention, host device 101 utilizes two audio output channels and audio interface 103 as a differential pair to deliver power to peripheral device 102. In addition, host device 101 will use a differential audio signal which delivers power to peripheral device 102 as a carrier, modulate data onto this differential audio carrier signal and transmit data to peripheral device 102 via this differential pair. Peripheral device 102 is configured to harvest power from the audio signals received from the differential pair and also to demodulate the data from the audio signals. When peripheral device 102 attempts to respond or communicate data back to host device 101, peripheral device 102 may transmit the data, which may be encoded to a format can be transferred direct in audio interface or may also be modulated onto a separate audio carrier signal, via an audio input channel of audio interface 103.
In this example, by driving two stereo output channels with complementary AC signals, host device 101 can deliver as much as twice power to peripheral device 102 compared to using only one channel by a conventional system. By modulating data onto the differential AC signal, data also transferred to peripheral using same audio port. Assuming the maximum output peak to peak voltage delivered to one audio channel is Vpp, if we drive the other channel −Vpp (phase inverted), we will obtain 2Vpp on the peripheral side. Assuming that output impedance of each audio channel of host device 101 equals to Zo, and input impedance of peripheral device 102 optimized to 2Zo, the maximum power received by peripheral device 102 is
Comparing to one channel approach maximum power that can be delivered is
This approach doubles the output power. Because both stereo output channels are used to deliver power, the data will be transferred to peripheral device 102 by modulating the differential audio signal as a carrier.
An operating system (e.g., Andriod™, iOS™, Windows™) will run on the host device processor(s), includes various software components and/or drivers to make all components work.
A software application (not shown) may be executed from memory 202 by processor(s) 201 which will request services from the peripheral device 102 through the audio port. For example, host device 101 may be a mobile device having a mobile application running therein to communicate with peripheral device 102 via the audio interface, In one embodiment, when the application is launched within the host device, such as, a mobile device, the application attempts to access an audio stack or framework of an operating system of the host device. For example, the application may attempt to drive predetermined audio data or waveforms to the audio interface via the audio framework provided by the operating system.
According to one embodiment, when an application is activated or executed by processor 201 from memory 202, the application communicates with an operating system (e.g., Andriod™, iOS™, Windows™) to drive audio data onto audio output channels 211-212. The application may communicate with an audio subsystem of the operating system, for example, via an application programming interface (API) provided by the operating system. The audio data is handled by an audio driver and converted to audio signals by the audio circuitry 206. The audio signals may be delivered via paths 221-222 and received by peripheral device 102. The audio signals transmitted on paths 221-222 are complementary signals to form differential audio signals. The differential audio signals are received by voltage converter 261. Voltage converter 261 is to convert the signals received from host device 101 to a predetermined range optimized for circuit in power harvest module 262. One embodiment of voltage converter 261 may be a transformer, if the power harvest circuit can work with differential audio signal voltage from host device directly, then voltage converter 261 can be just two wires pass through the original signal. The output of voltage converter is connected to a power harvest module 262 and a downstream data path to be processed by analog-to-digital (A/D) converter 263.
In one embodiment, power harvest module 262 is to harvest energy from the differential audio signals and convert the energy into DC voltage to power up other components, such as microcontroller and user application circuit of peripheral device 102. In one embodiment, power harvest module 262 may include a variety of rectifier, such as, for example, circuits as shown in
Referring back to
Referring to
Referring to
Voltage converter 265 is used to convert the voltage level of output of microcontroller 264 to a proper range required by host device audio input channel. In one embodiment voltage converter 265 is a voltage divider consists of two resistors.
The data may be modulated onto the audio carrier signals via a phase-shift keying (PSK) method or a frequency-shift keying (FSK) modulation method.
Referring back to
At block 602, the host device's processing logic (e.g., application and/or operating system) transmits a differential audio signal on the audio interface (e.g., audio socket or jack) of the host device, which is communicatively coupled to and received by the peripheral device. The transmitted differential audio signals are used to provide power to the peripheral device. At block 603, host device's processing logic waits for a response from the peripheral device via the audio interface of the host device input channel (e.g., microphone) for a predetermined time period. If the host device application receives a response from the peripheral device which confirms the peripheral power on process completes successfully, and then host device application starts a process at block 604, otherwise, the application will inform a user to check connection of the peripheral device and keeps executing black 603 until a confirmation is received. At block 604, processing logic starts duplex data communication by encoding and modulating data onto the differential audio signals (as carrier signals) on output channels to be sent to the peripheral device. At the same time, the application will receive data from the input audio channel.
At block 803, when it is determined that the application has data to be sent to the peripheral device, the application drives a second predetermined frequency and number of cycles of pulses onto the audio carrier signal at block 804. In one embodiment, the application drives T seconds (e.g., 1/1102.5 seconds or 907.029 microseconds or μs) of a differential signal at a second predetermined frequency. The second predetermined frequency may be 8.82 KHz. The first T seconds of the second predetermined frequency after IDLE state may be used as a start bit for receiver to synchronize with the transmitter. After the start bit, at block 805, application will send out data bit, including parity check bit or cyclic redundancy check (CRC) bits depend on the communication protocol (e.g., universal asynchronous receiver/transmitter or UART protocol). In one embodiment, for each bit having a logical value of one, processing logic sends out T seconds of pulses having the first predetermined frequency at block 807. For each bit having a logical value of zero, processing logic will send out T seconds of pulses having the second predetermined frequency at block 806. After all data bits are completed, processing logic completes the transaction with T seconds of pulses having the first predetermined frequency at block 809, which serve as a stop bit and keep sending until next data are ready.
The following table is an example sending a byte 5A at 1102.5 baud rate, it sends out 907.029 us of 8.82K signal as start bit. Then it sends 907.029 μs of 11.025K as binary 1, and so on until all data bits and stop bit are sent and return to idle state.
Code
Interval
Frequency
Bus state
name
(μs)
(Hz)
Cycles
Idle
1
907.029
11025
10
Start bit
0
907.029
8820
8
D7
0
907.029
8820
8
D6
1
907.029
11025
10
D5
0
907.029
8820
8
D4
1
907.029
11025
10
D3
1
907.029
11025
10
D2
0
907.029
8820
8
D1
1
907.029
11025
10
D0
0
907.029
8820
8
Parity bit
0 (even)
907.029
8820
8
Stop
1
907.029
11025
10
Idle
1
907.029
11025
10
In one embodiment, at block 851, a predetermined number of cycles, in this example, 18, is selected as a threshold to determine types of signals received. Since the bit rate is 1.1025 KHz baud, each bit will take 907.029 μs. Every bit 0 will last eight 8.82 KHz cycles (block 852) and every bit 1 will last ten 11.025 KHz cycles (block 853). After application starts, the host will keep sending the 11.025 KHz signal to the peripheral device, which represents an IDLE state (block 854). The microcontroller will count the Tint cycles between two rising edges of comparator output. If the count is smaller than 18, then the signal is an 11.025 KHz signal; otherwise it is 8.82 KHz signal cycle.
After the peripheral receives first 8 consecutive 8.82 KHz signal cycles, which represents a start bit in many communication protocols, the peripheral device enters a DATA state (block 855). In the DATA state, for 10 consecutive 11.025 KHz cycles, a bit 1 is received (block 856). For 8 consecutive 8.82 KHz cycles, a bit 0 is received (block 857). The microcontroller keeps receiving data until all data bits in one transfer session are received (block 858). After one transfer session is done, the host will keep sending 11.025 KHz signal cycles, which put the transfer in an IDLE state (block 859).
Note that while
Some portions of the preceding detailed descriptions have been presented in terms of algorithms and symbolic representations of operations on data bits within a computer memory. These algorithmic descriptions and representations are the ways used by those skilled in the data processing arts to most effectively convey the substance of their work to others skilled in the art. An algorithm is here, and generally, conceived to be a self-consistent sequence of operations leading to a desired result. The operations are those requiring physical manipulations of physical quantities.
It should be borne in mind, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise as apparent from the above discussion, it is appreciated that throughout the description, discussions utilizing terms such as those set forth in the claims below, refer to the action and processes of a computer system, or similar electronic computing device, that manipulates and transforms data represented as physical (electronic) quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer system memories or registers or other such information storage, transmission or display devices.
The techniques shown in the figures can be implemented using code and data stored and executed on one or more electronic devices. Such electronic devices store and communicate (internally and/or with other electronic devices over a network) code and data using computer-readable media, such as non-transitory computer-readable storage media (e.g., magnetic disks; optical disks; random access memory; read only memory; flash memory devices; phase-change memory) and transitory computer-readable transmission media (e.g., electrical, optical, acoustical or other form of propagated signals—such as carrier waves, infrared signals, digital signals).
The processes or methods depicted in the preceding figures may be performed by processing logic that comprises hardware (e.g. circuitry, dedicated logic, etc.), firmware, software (e.g., embodied on a non-transitory computer readable medium), or a combination of both. Although the processes or methods are described above in terms of some sequential operations, it should be appreciated that some of the operations described may be performed in a different order. Moreover, some operations may be performed in parallel rather than sequentially.
In the foregoing specification, embodiments of the invention have been described with reference to specific exemplary embodiments thereof. It will be evident that various modifications may be made thereto without departing from the broader spirit and scope of the invention as set forth in the following claims. The specification and drawings are, accordingly, to be regarded in an illustrative sense rather than a restrictive sense.
Patent | Priority | Assignee | Title |
10883927, | Jun 05 2019 | TAIWAN REDEYE BIOMEDICAL INC | Hemoglobin detecting device |
9805730, | Aug 16 2013 | PayPal, Inc | Dynamic decoding of communication between card reader and portable device |
Patent | Priority | Assignee | Title |
5909555, | Jan 26 1996 | HANGER SOLUTIONS, LLC | Method and system for supporting data communication between personal computers using audio drivers, microphone jacks, and telephone jacks |
20040169971, | |||
20090011652, | |||
20100260341, | |||
20110103608, | |||
20120052910, | |||
20120326736, | |||
20130012796, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Date | Maintenance Fee Events |
Aug 05 2019 | M2551: Payment of Maintenance Fee, 4th Yr, Small Entity. |
Oct 16 2023 | REM: Maintenance Fee Reminder Mailed. |
Apr 01 2024 | EXP: Patent Expired for Failure to Pay Maintenance Fees. |
Date | Maintenance Schedule |
Feb 23 2019 | 4 years fee payment window open |
Aug 23 2019 | 6 months grace period start (w surcharge) |
Feb 23 2020 | patent expiry (for year 4) |
Feb 23 2022 | 2 years to revive unintentionally abandoned end. (for year 4) |
Feb 23 2023 | 8 years fee payment window open |
Aug 23 2023 | 6 months grace period start (w surcharge) |
Feb 23 2024 | patent expiry (for year 8) |
Feb 23 2026 | 2 years to revive unintentionally abandoned end. (for year 8) |
Feb 23 2027 | 12 years fee payment window open |
Aug 23 2027 | 6 months grace period start (w surcharge) |
Feb 23 2028 | patent expiry (for year 12) |
Feb 23 2030 | 2 years to revive unintentionally abandoned end. (for year 12) |