Ios Hardware As a Sensor Platform: DMM Case Study
Total Page:16
File Type:pdf, Size:1020Kb
iOS Hardware as a Sensor Platform: DMM Case Study Daniel Brateris Dwight Bedford, David Calhoun, Aaron Johnson, Atlanticus Innovations Nickolas Kowalski, Kelli Martino, Thomas Mukalian, 1082 Sky Hill Road Justin Reda, Anthony Samaritano and Robert R. Krchnavek Bridgewater, New Jersey 08807 Rowan University Email: [email protected] Glassboro, New Jersey USA http://www.atlanticusinnovations.com/contact Email: [email protected] Abstract—iOS is Apple’s mobile operating system and is communication hardware and functional user interfaces. In presently used on the iPhone, iPad, and iPod Touch. The hard- this context, an accessory is an attachment to the iOS hard- ware platforms associated with the iOS operating system provide ware. The attachment can be physical through the 30-pin a powerful platform for sensor applications. In this paper, we provide a case study on the development of a digital multimeter dock connector (UART serial data transfer or USB 2.0 data (DMM) using an iPod Touch. The DMM case study addresses the transfer) or virtual through a wireless (Bluetooth) connection major subsystems (hardware, software, and firmware) of a typical [2]. The accessory would contain the sensing elements as sensor platform and specific advantages of implementation using well as associated hardware. The designer can focus on the an iOS device. development of the electronics and instrumentation within the accessory. Once data is digitized or the control process can I. INTRODUCTION accept digital commands, then the device can be hooked up An embedded sensor system can often utilize a relatively to an iOS device to exchange data and be configured and simple, low-cost microcontroller to achieve the required mea- controlled. The device gains all the functionality offered by surement functionality. However, as the sensor increases in the iOS operating system. complexity, requiring network connectivity or a graphical user Apple’s iOS operating system is used on over 82 million interface, the processor requirements increase significantly and products. It has become one of the most ubiquitous operating so does development time. Communication protocols such as systems/hardware platforms. WiFi, Ethernet, and 3G require a large processing overhead. Some advantages: Graphical user interfaces have similar overheads while the • Low cost. An iPhone can be purchased for $200 (with core processing requirements of the sensor application remain a wireless plan). An iPod Touch running iOS can be relatively simple. purchased for $229. Developing sensor applications using Apple’s iOS system • Communications. An iPhone comes complete with Wi-Fi offers several advantages over traditional, high-performance, and 3G communication capabilities built in. An iPhone embedded system development. The combined feature set also includes Bluetooth technology. An iPod does not of the iOS operating system and associated devices offer a have 3G capability, but does include Bluetooth and Wi-Fi. highly attractive platform for embedded development. The • Camera/video and audio interface. core features offered in iOS devices are a high performance • Easy updates and distribution via the iTunes store or a ARM CPU, power supply, battery management, WiFi support, private distribution server. 3G support, rich touch-based user interface support and many • Software-defined interface. more. • Rigidly controlled and documented development tools. The iOS operating system is a fully featured modern oper- ating system, which is extensively documented and fully sup- II. CASE STUDY:DEVELOPMENT OF AN IOS-BASED DMM ported by Apple Inc. Offering more functionality for a lower development cost than many embedded operating systems, iOS The development of an iOS-based digital multimeter provides a unique alternative. Additionally, there are thousands (DMM) provides a comprehensive study of using iOS-based of application examples and hundreds of books written on devices for sensor platforms. Figure 1 is a block diagram indi- developing iOS applications. Overall, the operating system is cating the required subsystems for an iOS-based DMM. There state of the art and the hardware is proven, affordable, and are 4 essential subsystems. First, to attach a hardware device readily available [1]. to an iOS system, Apple requires an authentication routine Using an iOS accessory as the processing and connec- to be performed. Second, the attached hardware requires a tivity portion of a system will allow the designer to avoid microcontroller to handle communications between the iOS the difficulties normally encountered in developing reliable device and the sensor. Third, the sensor, in this case a DMM, 978-1-4244-8064-7/11/$26.00 ©2011 IEEE is required. And finally, an interface needs to be developed for B. DMM Development the iOS. Details on these subsystems are presented below. Single-chip solutions, e.g., Maxim 133, exist for DMM products. Unfortunately, we did not find a chip that worked Accessory Inputs and Outputs at less than 9 volts. For example, the MAX133 required a 9 V supply [5]. The voltage supplied from the connector on the iPod Touch is 3.3 V. Therefore, a system requiring 9 V would Sensor Elements either require a separate battery in the accessory or a DC/DC and Instrumentation Electronics boost conversion circuit to raise the voltage. Adding a separate 9 V battery significantly increases the size of the accessory. Even watch-type batteries in series add to the size of the accessory. A booster circuit has a minimal impact on size, but Accessory could potentially cause RF noise problems. These problems Microcontroller Authentication can cause performance issues when used with cellular devices Hardware like the iPhone. A second problem with using the MAX133 for this appli- cation is the inability to write information to the registers on 30-Pin Connector (USB, UART) or Bluetooth the device to control its functions. Our goal was to use the same microcontroller required for authentication to control the accessory. The MAX133 is primarily designed to be controlled 30-Pin Connector (USB, UART) or Bluetooth using a rotary switch. This significantly complicated the design goal of using a microcontroller to set the functions. WiFi and 3G With this in mind, we decided to create the DMM using a Operating System User Interface analog MUX to select resistor values followed by an ADC. iOS Hardware iOS The schematic of the DMM is shown in Fig. 2. Final part numbers, values, and DMM performance will be presented at Fig. 1. A block diagram indicating the major subsystems of the accessory SAS and in the final manuscript. and the iOS hardware. A. Authentication Membership in the Apple Made for iOS (MFi) program gives the licensed company access to the resources necessary to design, build and test an iOS accessory. This includes hard- ware components, technical documentation, technical support, and certification logos. After joining this program a licensed developer can build accessories that communicate with iOS applications through the 30-pin dock connector over USB, UART serial, or wirelessly over Bluetooth. Developers also have access to Developer Technical Support and Compatibility Labs to assist in product development and testing [3]. Membership in the program is a simple process and requires a day or two of effort between your company and Apple Inc. The technical materials required for development are confidential so your company must sign an NDA with Apple. Fig. 2. Schematic representation of the DMM circuit. Once completed, developing an accessory is a relatively easy process requiring a basic knowledge of microprocessors and a few simple communication protocols [2]. C. Microcontroller – Atmel AVR Mega Series Authentication is Apples unique way of controlling what devices are allowed to communicate with iOS applications The processor is the center of the accessory; it manages and Apple devices. Registered MFi developers have access communication between the iOS device and the electronics in to a microchip called the Authentication Coprocessor [4]. the accessory. For the DMM an Atmel AVR microprocessor This device stores proprietary algorithms and keys required was selected because of its low cost and relatively high for the authentication process. Details on the authentication performance in the 8-bit MCU realm. Selection of a processor process are provided to MFi members and development kits is entirely up to the designer of the accessory, only a few are available to speed product development [3]. criteria need to be met. For this design the criteria were: • At least one UART interface with simultaneous bi- are developed or the privacy of your protocols. This means directional support. an accessory can be developed to use a private or public 2 • Hardware I C or SPI support. protocol. As an example, the initial DMM accessory uses a • Extremely low power consumption. basic application that functions as a standard DMM. If we • Minimum of a 10-Bit linear ADC with multiple ADC were to publish our protocol, companies could develop their channels. own iOS applications to work with our DMM accessory. If a • Flexible boot loader with UART support for field company wanted a long term voltage recording system, they firmware upgrades. could design an iOS application to read and record the data • Flexible interrupt controller. over time and then send the data to a server every day. This • Minimal required external components and internal os- application could be built using the already existing DMM cillator. that