How to Add Web Access to Your Smart Device
“Originally appeared in Sensors Magazine, (C)2002 Advanstar Publications”
You can turn your product into an Internet appliance with an embedded modem.
Perry S. Marshall, Perry S. Marshall & Associates
A vending machine transmits a refill request for 7 UP cans. A postage meter debits the customer’s account remotely. The refrigeration system in a convenience store reports low lubricant levels to an outsourced maintenance crew. An electric submeter tracks energy consumption and transmits a usage profile to the utility every night.
In the old days, you might have done those jobs with two modems – one in the device to send the data, the other at the home office to receive it. There was no connection to the Internet, just two devices talking to each other over the phone lines. But what if you’ve got 1000 postage meters, convenience stores, or utility customers? Do you need a boatload of modems at headquarters and a staggered access schedule? Not anymore.
An Internet modem combines familiar modem circuitry with built-in Internet protocols, so the listening end can be a Web server, via your local Internet service provider (ISP), instead of another modem. The device opens up a world of possibilities for reYote data acquisition while minimizing cost with mature modem technology (see Figure 1).
If you produce smart devices, you can now drop an Internet modem into your design for under $100, and perhaps a lot less. It won’t tie up your processor’s bandwidth, and you don’t have to learn a bunch of network protocols.
What Kind of Device Needs to Use the Web?
The consumer market offers a growing list of Internet appliances, such as e-mail readers, Web radios, and the ever-popular TiVo (a video recorder, with an embedded PC, hard drive, and Linux operating system, that can simultaneously play a program and record another). But any device that must send data to a remote location occasionally or sporadically and that stays in place long enough to be plugged into a phone line is a candidate for an Internet modem.
Appliances can request periodic maintenance or report emergencies, service machines can bill customers and send usage statistics, credit card terminals can batch the day’s transactions, and blood analyzers can report abnormal readings. Bar-code readers can access faraway databases, and industrial controllers can download updated programs. Could your product be next?
Why Complicate Things with the Internet?
Modems have been around for years, but Internet modems are a new breed that adds a layer of complexity – the Transmission Control Protocol/Internet Protocol (TCP/IP) and the Point-to-Point Protocol (PPP) – to the design. Why bother?
Internet modems simplify your life and invite the use of standardized data formats. Two modems talking to each other over a long-distance phone link often use poorly documented, proprietary data formats to send data. With Internet protocols, however, smart devices can send e-mail messages or serve up Web pages, making life much easier for your customers.
The Web Is More Reliable
On the morning of September 11, telephone switchboards in New York were jammed, but e-mails were still going through, even at ground zero. Why? Telephone connections devote exclusive bandwidth to each conversation, but the Internet breaks data into pieces. It divides available bandwidth more or less equally among all contenders.
When many devices have data to transmit, a single point-to-point connection has finite capacity. TCP/IP packet switching is more flexible – rather than one device getting wide-open access, many devices share small slices. A smart product that dials a local ISP not only has easier access to the host server but also sidesteps long-distance charges.
Make vs. Buy
Because Internet modem technology is not the least bit bleeding edge, many engineers will be sorely tempted to roll their own solution. There’s no question that you could do it yourself, but do you really want to?
“Modems are not something you really want to design from scratch,” says John Rinaldi of Real Time Automation, an embedded network design firm in Milwaukee, WI. “The technology has been pretty well researched. They’ve wrung the cost and bugs out of modem design selling millions of PCs. Testing and certifying a modem can also be costly. So at this point, it’s better to use an existing solution.”
The hardware design is a cookbook process, but programming the software, incorporating the PPP modem protocol, and linking the software and protocol to a TCP/IP stack can easily consume a person-year or more. Engineering time costs money, but possibly more significant is the opportunity cost””how much money does your company lose by not having the hot new product available?
When you’re planning to add a relatively mature, stable technology to your product, outsourcing is almost always better than reinventing the wheel. Focus your engineering efforts on your core competencies, and leave the rest to someone else.
Hardware, Win Modems, and Embedded Modems
A modem in a PC has a luxury that an embedded modem does not: a Pentium processor nearby. In the past three years or so, most modems have taken advantage of this fact and omitted a number of expensive circuit-board components (e.g., DSP chips) and replaced them with software that runs on the host processors. These are called Win modems, in contrast to traditional hardware modems, which offer better performance at a higher price.
These days, you can purchase a Win modem for your PC for about $30; a true hardware modem costs close to $100 at retail. This price difference has implications for embedded product design because smart devices normally aren’t endowed with a Pentium-class processor.
You can process signals and run TCP/IP software on the existing processor and interface directly to a modem chip. Or you can reach the same end by using a coprocessor and simply sending it commands and data via serial or parallel ports. In some cases, using the existing processor is less expensive, but it certainly incurs more development cost and imposes significant demands on your processor.
Because most embedded devices don’t have lots of extra processor power lying around, many designers opt for a modular design, which performs modem and TCP/ IP functions in separate components.
As with most embedded systems, the hardware in this application is relatively straightforward. On the other hand, you can agonize endlessly over software details. In addition to standard modem functions, an Internet modem has two major software components, TCP/IP and PPP.
TCP/IP is the basis of Internet communications, the mechanism that ensures that data on the Web reach their destination complete and intact. TCP/IP is not a single protocol but actually an extensive family of protocols, such as Hypertext Transfer Protocol (http) for Web pages, File Transfer Protocol (FTP), Simple Mail Transfer Protocol (SMTP) for sending e-mail, and Post Office Protocol (POP) for retrieving it.
TCP/IP is quite complex, and although it’s available in Windows and open-source versions (e.g., Linux), porting it to a small microprocessor involves considerable effort – or else licensing fees.
The Internet Modem Module (IMM), a modem on a circuit board (see the sidebar “A Tale of Two Modems”), takes a different approach. It uses Seiko’s iChip, which implements TCP/IP in a hardware-based state machine rather than in software running on a microprocessor. Chips of this kind started appearing about a year ago, and they offer several advantages to the traditional hardware/software scenario. They consume less power, operate at line speed with no processing delays, require no external memory, and free you from the need to do any programming.
PPP is a protocol for communication between two computers using a serial interface, typically a personal computer connected by phone line to a server. PPP is implemented as a subset of TCP/IP and allows simultaneous communication in both directions.
A key issue when designing a modem is obtaining certification from the FCC. All modems must pass FCC Part 68 before they can be sold.
The test is strict, and designing a modem from scratch invites the distinct possibility of spending months reworking the circuit until the test is passed. Using an off-the-shelf design, which has already been certified, all but guarantees that your product will pass the first time.
Choosing an ISP for Your Smart Device
If you want Internet access for your smart device, you don’t have to use MSN or AOL and pay $20 per month or more. You can contact small and mid-size local ISPs for dial-up accounts with a few hours’ usage per month, and if you are deploying hundreds or thousands of smart devices, you can negotiate low-volume prices.
The price of dial-up service certainly factors into the cost of ownership of an Internet appliance. Fortunately, there are services designed for appliances that connect for only a few minutes per day. Internet modem manufacturer Cermetek offers dial-up service across North America by contracting with the same facilities that are used by large ISPs. Cermetek charges $2 per month and offers text-to-voice conversion and call forwarding for an additional per-call charge. That means your device can dial up the ISP and e-mail an emergency text message or send a cellular phone message that notifies your maintenance manager of a problem. Other companies, such as Ziplink, function solely as ISPs and cater to manufacturers of smart devices and resellers of Internet service.
Independent ISP connections require only a phone number, user name, and password from a connecting device. At that point, the kind of device dialing in, PC or otherwise, makes no difference.
An Internet appliance can share a phone line with other devices (including telephones) as long as it’s acceptable if the line is busy at times. The Internet appliance can share the dial-up account with other smart devices as long as only one unit is dialing in at any one time.
Encrypting Your Data
The traditional telephone connection to the home office is appealing because of the built-in security, but the security problem can be solved on the Internet with a virtual private network (VPN).
A VPN uses encryption at each access point to keep data secure, despite its use of publicly available communication channels (e.g., the Internet). Certainly some smart devices will need data security, and there’s nothing to prevent you from encrypting your data at both ends and creating a VPN yourself.
International Modem Standards
Vendors who sell internationally will generally have no problem with technical standards in Asia and South America, as long as they conform to FCC Part 68. Europe can be troublesome, though, because some European countries follow a standard called TBR21, which involves different impedance terminations than the U.S. standards. Spotty performance sometimes results if the modem is not expressly designed for this purpose.
Changes to the data-access-arrangement circuitry solve this problem. The larger issue, however, is import regulations because TBR21 is used as a trade barrier by some countries. In any case, checking with your vendor and gaining full understanding of these issues is a good idea.