Data Port Solutions for Smartphone Sensors

作者:Jon Gabay

投稿人:电子产品

Smartphones are becoming a pervasive computing and communications platform. With each new generation smartphones get better at performing process- and data-intensive applications that once required computers or dedicated equipment. Modern GHz and multicore processors are now doing real-time tasks using a fraction of the power needed just a few years earlier.  

Smartphones are replacing discrete handheld instruments in the same way in which PCs and laptops replaced larger, bulkier, and more expensive equipment: by becoming both the user interface and the process engine. As this happens, better and faster data ports between clip-on, plug-in, or wireless sensor/transducers are needed.

This article examines common smartphone data ports and describes ways in which engineers can use these solutions to connect a variety of sensors and peripherals, utilizing, as needed, the smartphone as a high-resolution display, touchscreen, process engine, and link to the cloud.  All parts, datasheets, tutorials, and development systems referenced here can be found on the Digi-Key website.

In the beginning

Early computers used handy serial ports like RS-232 as a de facto standard for linking peripherals and terminals as well as for computer-to-computer connection. Printers, plotters, programmers, in-circuit emulators, and all sorts of common and specialty tools took advantage of serial ports to allow easy and universal connectivity. However, while the popular UART-based RS-232 ports are no longer available on smartphones, serial connectivity is still one way in. The lowest cost and simplest I/O link solution is the audio-in and audio-out ports, which are accessible using a small stereo in/out audio jack. Plugging into a headphone jack for example, provides two (stereo 44.1 KHz) audio outputs, which are capable of reliably passing two independent MODEM streams of data very long distances using low-cost, twisted pair or shielded cables.

This solution is attractive because it is a low-cost, well-engineered, well-understood technology supported by several quality manufacturers. A good example is the Maxim 73M2901CE-IGV/F IC modem, which does 300 baud to 9600 baud. Since audio streams are separate, you can separate input and output data rates. High-noise environments can use the more reliable Bell 103A for input and a 9600-baud V.32 data stream on the way out. In both cases, these are relatively slow-data transmission rates so these types of applications are typically for non-data intensive and tokenized control and status.

Multiple-channel barrel jacks like the 2.5 mm Tensility 50-00401 can provide a mono input channel alongside a stereo output channel in a simple plug-in cable (Figure 1). As a low-cost, bolt-on sensor interface, simple circuits can use ASK, FSK, or PSK modulation to provide the smartphone with raw or processed data. Even frequency counter modes can provide gated, updated readings.

Image of Tensility 50-00401 mono input channel and stereo output channel

Figure 1: The lowest-cost connections can use multichannel barrel jacks to feed audio streams into and out of the smartphone. Here, two output streams and one input stream share a common ground shell.

Note that not all phones and/or tablets have direct mono or stereo microphone or line-input capability. Some that support headsets with microphones may implement a 3-channel plug that includes audio in. Older stick-on acoustic coupling rubber housings and cradles are not an elegant solution here, but can be used when a phone or tablet is to be OEM’ed as a part of the equipment.

It is interesting to remember that the data-rate limitations of modems were primarily constrained by the characteristics of the telephone lines that carried the signals. Since telephone lines are not limiting factors anymore, there is no reason that higher-speed modems cannot be implemented using audio output ports or dedicated hardware linked to the smartphone. This is especially true for smartphones with superior audio channels capable of higher data rates.

IRDA transceivers

A wireless line-of-sight port that can take advantage of the framed serial asynchronous UART packet structure is IRDA. These transceivers are relatively small-size, low-cost modules that can be placed in proximity to a smartphone and transmit from 115.2 Kbit/sec to 4 Mbit/sec data rates in packages as small as 2.5 mm.

Even though RF technology is encroaching on IR technology for remote controls, IR is still the dominant leader for entertainment-system remote controls. This high-volume use keeps these parts low cost and competitive and makes them contenders as a solution to couple data connectivity to smartphones and tablets.

Consider, for instance, the Vishay TFDU4301-TT1 115.2 Kb/sec low-profile transceiver that combines an IR emitter with a PIN photodiode (Figure 2). With a remote control range of up to 12 meters, the full-duplex data link can operate from 2.4 V and uses a split power supply allowing transmitter and receiver to use different power levels, be switched on and off independently, and draw less than 1 μA in standby mode.

Image of Vishay TFDU4301-TT1 115.2 Kb/sec low-profile transceiver

Figure 2: Flush or right-angle surface-mount IR-transceiver modules provide the low-cost benefits of high-volume manufacturing and are easy to design with and implement.

Small, higher-speed links can use parts like the Rohm RPM973-H11E2A, supporting higher-speed 4 Mbit/sec data rates. Also able to run down to 2.4 V, this part eats up a bit more power in idle mode (1 mA) but includes complete remote-control functionally built in. This simplifies alarm and alert types of sensor modules since an established set of codes is available for use right out of the box.

An added plus is the amount of technology bundled into these low-cost transceiver modules, which are used in very high volumes. Modulators and demodulators help discriminate noise from signals. Be aware, however, that like microphone input jacks, not every phone or tablet has IRDA so this is an I/O technique to consider if you are aiming at a specific smartphone or tablet that you may want to OEM or support.

USB

The USB-port standard has taken over as the universal interconnect medium for wired peripherals. Limited to a few meters in length, USB is ideal for high-speed links in small and compact form factors. However, unlike its universal name, there are several different standard and proprietary USB connectors.

The most widely deployed USB is USB 2.x which peaks out at around 480 Mbits/sec. Legacy support means, for example, that USB 2.0 will still support the USB 1.1 12 Mbit/sec rate, so locking into a needed rate can assure accessibility with future generations of the standard.

Several good self-contained USB peripheral interface devices can be leveraged to create compact, embedded add-ons for modern cellphones. Take for instance the simple 14-pin MCP2221-I/SL from Microchip. This interfaces and acquires power directly from the USB side and provides a local side UART and I2C port. Both of these are common to most every microcontroller, making it easy to interface directly. Note the GPIO matrix including the A/D and D/A converter (Figure 3). This makes this part a good solution since it contains communications and data acquisition in a universally connected medium.

Diagram of Microchip single-chip USB interface

Figure 3: A single-chip USB interface also contains generic UART and I2C interfaces for external communications. GPIO pins can be digital inputs or outputs, as well as analog.

An interesting benefit of USB is that it offers a bridgeable monolithic means in which to interface to a variety of canned functions such as Ethernet, ATA, SMBus, and SPI, to name a few. The debate is still continuing as to whether or not next-generation smartphones need to implement USB 3.x or if it represents too much of a cost and complexity issue. The 5 Gbit/sec data rate is an order of magnitude faster than the 480 Mbit/sec data rates of 2.0, but the 3.1 10 Gbit/sec flavor is right around the corner.

No wires needed

Wireless interconnect techniques offer the best solutions for distributed sensor array applications. Many good high-speed wireless protocols can be used to route data from a variety of co-located positions into a central processing unit and communications hub.

While smartphones and connected tablets may have 3G and 4G connectivity built in, this is not the way to connect to localized sensors. These cellular networks operate pretty much globally, and national and international laws and standards may prohibit private deployment of competing airwave links. However, for some applications, this special conformance and licensing may not be an issue; and, if taking advantage of the global cellular network is part of your design, cellular connectivity devices like the Lime Microsystem LMS7002M can provide CDMA, GSM, HSPA, LTE, TD-SCDMA, and WCDMA protocol coverage for global connectivity.

A mre practical approach for most designs would be to take advantage of widely deployed and lower-cost wireless protocols that most every smartphone and tablet provides direct support for. An advantage of using a monolithic Wi-Fi transceiver chip is the ability to create a fairly vast network of distributed sensors. Low-cost, wireless routers and switches can be deployed and sensor information can come from long distances away.

Well-supported parts like the Texas Instruments CC3100R11MRGC, a member of TI’s SimpleLink family, encapsulate a 2.4 GHz 16 Mbit/sec Wi-Fi 802.11 b/g/n functionality network alongside an internal ARM processor. Targeting the Internet of Things (IoT), the embedded stack handles eight simultaneous TCP or UDP sockets and two simultaneous TLS and SSL sockets to provide more than enough high-speed connectivity for almost any sensor. Real-high-def and high-frame-rate video, however, may be an issue, especially if it has an extended color palette and IR sensitivity.

The other common protocol implemented by most smartphones and tablets for use with sensor arrays is Bluetooth, especially Bluetooth Low Energy. Again, because of legacy support and dual-mode devices, lower-speed modes as well as higher-speed modes can be taken advantage of. For 1 Mbit and below, parts like the STMicroelectronics BLUENRGQTR, a member of the company’s BlueNRG family, takes advantage of the Bluetooth Low-Energy modes of version 4.x. With a complete embedded protocol stack, the embedded ARM processor provides full link control and host security (Figure 4). What’s more, this part can act as a master or a slave while drawing 10 mA peak.

Diagram of STMicroelectronics dedicated communications peripheral chips

Figure 4: Dedicated communications peripheral chips implement RF transceivers alongside power management, security, I/O, and timing, making these parts ideal solutions for low power and distribute sensor arrays linked to a smartphone.

When 54 Mbit/sec speeds are needed for higher-speed linking to more demanding sensors, modular EPCOS (TDK) modules are worth considering. The B30931D7020Y918 runs at 1.8 Volts and provides a UART output for easy embedded interfacing. It will draw up to 65 mA while receiving and up to 345 mA while transmitting. The overall power could be lower though if the 54 Mbit/sec speeds let this unit go to sleep much sooner.

On the whole, engineers should note that the number of open sockets or the number of tethered devices may be a limitation to both Wi-Fi and Bluetooth respectively, so verify your topology constraints before committing.

Other interfaces that can be tapped into are the video streams that can be used to transfer high-speed data (if you don’t care about impacting the display). Display memory can be used to store data blocks that HDMI ports, for example, burst out repetitively. While perhaps a novel idea for a very-high-speed burst of outputting data this is not practical for most.

As we have demonstrated in this article, for most applications the plug-in and wireless ports on modern smartphones and tablets are flexible enough and supported well enough to handle anything sensor-wise that might arise in the near future. So choose your technology and go.

For more information about the parts discussed in this article, use the links provided to access product pages on the Digi-Key website.

免责声明:各个作者和/或论坛参与者在本网站发表的观点、看法和意见不代表 DigiKey 的观点、看法和意见,也不代表 DigiKey 官方政策。

关于此作者

Jon Gabay

关于此出版商

电子产品

《电子产品》杂志和 ElectronicProducts.com 网站服务于负责电子设备和系统设计的工程师和工程管理人员。