Revision 02: IOIO Android
We explored possible solutions to the revision 01 disadvantages. A GPS module would add the live location. And a GSM module could provide a method for live streaming and system manipulation. But both bring size disadvantages. The modules are pretty bulky, and are a steer away from the compact size of the Nano.
So we looked at replacing the control unit with an android IOIO board, and replacing the IR Heart rate detection with a wireless polar ECG system.
The IOIO board is a new product from sparkfun.com.
http://www.sparkfun.com/tutorials/280
The IOIO (pronounced “yo-yo”) is a board specially designed to work with your Android device (OS versions 1.5 and greater). The board provides extensive and robust connectivity to an Android device via a USB connection. The IOIO is fully controllable from within an Android application, using a simple and intuitive Java API.
The IOIO board contains a single MCU that acts as a USB host and interprets commands from an Android app. In addition, the IOIO can interact with peripheral devices in the same way as most MCUs. Digital Input/Output, PWM, Analog Input, I2C, SPI, and UART control can all be used with the IOIO. Code to control these interfaces is written in the same way as you write an Android app with the help of a simple to use app-level library.
IOIO Front:

IOIO Back:

The IOIO board contains the following components:
- USB connector (type A) female connector: Used to connect to the Android device.
- GND pins (9 pins): Ground connection.
- VIN pins (3 pins): Used for power supply to the board. Voltage between 5V-15V should be supplied.
- 5V pins (3 pins): Normally used as 5V output when the board is powered from VIN. Can be used as 5V input in case VIN is not connected.
- 3.3V pins (3 pins): 3.3V output.
- I/O pins (48 pins, numbered 1-48): General purpose I/O pins. Some have special functions,
- power LED: Lights when the IOIO is getting power.
- stat LED: Lights briefly during power-up and then becomes under application control.
- mclr pin: Not normally used. Its purpose is for programming new bootloader firmware on the IOIO board.
- Charge current trimmer (CHG): Adjusts the amount of charge current supplied on the VBUS line of the USB to the Android device. Turning in the (+) direction increases charge current.
Pins:
- A/D: pin can be used as analog input
- I2C: pin can be used as I²C: DAx – data pin if I²C module number x, CLx – clock pin if I²C module number x
- PPSi: pin can be used as input for remappable peripehreals (input capture, UART, SPI)
- PPSo: pin can be used as output for remappable peripehreals (UART, SPI, comparator output)
- 5V: pin is 5V tolerant: can be used as 5V input or 5V output in open-drain mode
- Comp: pin can be used as comparator input number as specified
- Prog: pin can be used for ICSP: use Vpp and either C1/D1, C2/D2 or C3/D3 which are clock and data, respectively
When you connect the IOIO board to an android phone via USB, the phone see’s the IOIO board as an external USB Device (computer / laptop). This allows for data transfer between the devices, but also comes with a disadvantage. The android phone is expecting to be charged by the external device (computer / laptop)?. So the IOIO board needs to pass a tickle charge to the phone. This will eventually drain the battery.
Polar Wireless ECG System:

To overcome the noise problem from the IR Heart rate detection. We decided to replace the IR Heart rate device with a polar wireless ECG system. Polar is a manufacturer of advanced training computers and heart rate monitoring equipment. Their monitors are typically used by athletes, who are interested in monitoring their heart rate to gain maximum efficiency from their training. So noise pollution to the data from physical activity should be reduced.
Polar HR monitors usually comprise of two elements: a chest strap transmitter and a wrist receiver or mobile phone. The chest strap continually transmits your heart rate information to the monitor’s receiver.
Polar wearlink transmitter:

The wearlink transmitter consists of an electrode strap and a connector.
It can be washed in the washing machine, and the batteries are user-replaceable. The coding of the Chest Strap increases the security of the transmission. Aside from the heart rate signal, a coding is transmitted that prevents interference from other heart rate monitors.
To receive the heart rate transmission data, we used a heart rate monitor interface (HRMI) from sparkfun.com.
http://www.sparkfun.com/products/8661
Polar Heart Rate Interface:
The Heart Rate Monitor Interface (HRMI) is a peripheral device that converts the ECG (magnetic wave) signal from the wearlink transmitter into heart rate data. It implements an algorithm for computing the average heart rate, even with noisy or intermittent data from the transmitter.

Features:
- Multiple interfaces: USB, Logic-level serial and I2C
- Dual heart rate processing algorithms: averaged and raw
- Uses the RMCM01 Polar OEM receiver
- Compatible with coded and non-coded Polar transmitters including T31, T31C, T61C and Wearlink®
- 32-entry heart rate data history buffer
- Four 8-bit ADC inputs
- Up to a 5 channel digital input/output utility port
- Simple command/response interface
- Programmable power-on default operation
- Only works with one transmitter (HRM) in range
Applications:
- Custom exercise equipment
- Portable heart rate monitoring devices
- Bio-feedback devices
- Heart beat aware body-worn electronics
The HRMI communicates with the IOIO board through I2C serial communication.
The diagram below shows the updated Bio-Sensing System. Which includes the above replacements, and the integration of an android 3G mobile phone. The phone will add the GPS location/tracking, and 3G data communication.
IOIO Android Bio-Sensing System:

IOIO Android Bio-Sensing System:
Advantages:
1. Live streaming of bio data.
2. Capabilities for real-time system manipulation.
2. GPS location tracking.
3. Reduction in BPM noise from physical activity.
4. The phones onboard sensors (digital compass, accelerometers, NFC etc) extend the system capabilities for future development.
Disadvantages:
1. The ioio needs to provide a trickle charge to the phone. Which will contribute towards the draining of the battery, and the overall operation time of the device.
2. Although the system can receive a voltage input of between 5-15v, it cannot receive power from a single LiPo battery. This again adds restrictions to the overall operation time, and the physical size of the device.