Tuesday, February 12, 2008

Amplifier Design Challenges

There are two major constraints for designing an OLPC peripheral: cost and power. The laptop project has prescribed a $10 cap for all devices, and of course any design must be low power so as not to drain battery life. Right now I am designing the ECG amplifier for the XO, and I am at the stage where some decisions must be made regarding the trade-offs between performance and the cost and power constraints. The rest of this post consists of technical details, so read on only if you are interested in the engineering design aspects of the project.

Overview
The ECG will consist of an amplifier box with an output plug going to the microphone jack and a set of two or three reusable electrodes as inputs (electrodes are an important technical consideration that we will leave for another post). The ECG application will be an extension of an existing oscilloscope program which can visualize audio jack input. The box will have a separate jack for power supply, probably from the laptop USB port.

This design is in contrast to the other possibility of microcontroller-based device, which we felt presents too many challenges in power consumption and cost. However, we support the idea of different groups working simultaneously on different approaches to the problem, and would welcome discussion with other teams that share our overall goal.

Power
Unless a separate power supply is designed, the USB port of the laptop is the most likely candidate. I knew that mic jacks supply a bias voltage, but a quick check confirmed that the voltage is too low and output resistance is way too high to think about using the bias to power a circuit.

The USB port provides 5V at a maximum of 1 amp (over all ports). Of course we want to minimize the power and so won't come close to that kind of supply current. The bigger question, though, is how (and whether) to split the supply for dual-supply op-amps. It is easy to split to +/- 2.5V with a voltage divider, but for highest CMR (common-mode rejection), the reference terminals on the instrumentation amp require low impedance, requiring an additional op-amp to buffer the new reference voltage. Although if sources of interference (i.e. 50/60 Hz power lines) are sparse or our signal processing is good then this might not be required. Single-supply op-amps can be used, but single-chip instrumentation amplifiers (discussed next) generally require a split supply.

Amplifier
Single-chip instrumentation amps (in-amps) are probably the best bet for cost, power and performance. These chips have a full 3 op-amp circuit inside, with a single external resistor setting the gain. All the resistor trimming is taken care of on the chip so component tolerance is not a big problem. The most common in-amp chip is the AD620, which provides a nice combination of cost, power consumption, and performance. However, I am looking at others, such as the INA126, which has 2 internal op-amps and is cheaper with comparable performance. Luckily they have the same pin-out and we can continue with the rest of the design independent of this choice.

Noise/interference suppression
Some additional modifications can be made to improve CMR, the primary example being a driven right leg (DRL) circuit. One op-amp can be used to tap the average of the two signal electrodes and drive the ground electrode with the inverse of this average. This is an effective way to subtract common-mode interference before it has the chance to be amplified. However, the question in this case is whether interference will be a huge problem in the environments the laptop is meant to be used. I am leaning toward including the DRL circuit, since it is hard to predict what the noise levels of the environment will be. This also applies to the question of whether to buffer the split supply, mentioned above. Again my inkling is yes on this as well.

Second stage
Is it necessary to provide a second stage of amplification? The best performance can be had using a low gain on the in-amp chip, then adding a high gain second stage after the signal is high-pass filtered. However, the mic jack provides a coupling capacitor and the audio card has up to 30dB of preamplification on the mic input, so this might be an opportunity to cut costs and let the laptop do the work, freeing up money and board space for better noise performance.

These are only a few general questions for now. In the future we will have more technical details on this as well as electrode design, modularity of the system, and software interface.

Saturday, February 9, 2008

Who are we?

You might be curious about who we are and how exactly our backgrounds fit within the mesh. So here's a little background on the Snake and I that was taken directly from our OLPC Developer Program applications:


Tom's BIOGRAPHY
I obtained my Bachelors and Masters degree in Electrical and Computer Engineering from Carnegie Mellon University. Much of my coursework focused on VLSI and Computer Architecture, but I am very familiar with Embedded HW and DSP applications through coursework, academic projects and professional experiences. My embedded breadth stretches from the low-level development of a light-weight RTOS on an XScale/ARM platform to an encrypted VoIP system on an Altera FPGA platform. My prototyping skills were also applied as a consultant to an educational NPO, Pittsburgh Voyager, where I architected hand-held device applications that collaborated students' data with databases on-board the vessel and on-shore.

In industry, I worked at Medtronic in their Cardiac Rhythm Management group. During my time at Medtronic, I worked on the migration of Heart Failure SW algorithms to ASICs as well as the power optimization of their Telemetry sub-systems. I also worked on the development of their Carelink Monitor firmware, which enabled clinicians to manage their patients' chronic illnesses remotely. I currently work in the aerospace industry on image processing R&D for tracking and discrimination. These DSP platforms range from custom-RISC processors to PowerPC cores. While my DSP background keeps me tight with various assembly languages, I am also proficient in C/C++/Java/Perl/MATLAB and have some familiarity with Python.



Jake's BIOGRAPHY
I obtained Bachelors degrees in both Electrical and Biomedical Engineering from the University of Wisconsin - Madison. There I was mentored by Prof. John Webster, a well-known expert in bioinstrumentation, both in classes and in several engineering design projects including a portable electroencephalograph, portable voice amplifier, and mosquito bite vibration sensor. My EE classes at UW focused on signal processing and circuit design. During my time at Wisconsin I also worked as a technician in the Chemistry Dept. electronics shop, where I learned practical skills in design, prototyping, and repair of instruments.

I am currently in my final year as a PhD in Bioengineering at the Univ. of California, San Diego. My thesis project, written entirely in Python, required me to build a software platform for automated measurement of heart function in adult fruitflies, including hardware interface (video, robotic stage, temperature and oxygen sensors). Design of this software required low-level memory management, threading, and GUI design. I am also proficient in data analysis languages (Matlab, IDL, R), and have some familiarity with Java, C, and Perl from some bioinformatics work over the course of my research.



Who would've thought 4 years after our days at Medtronic that we would be collaborating again.

Although a tech background would be most applicable, we invite all who share the passion to join us. Our primary efforts lie in the front-end development, but there are many areas we have not even begun to address, such as program awareness, possible fundraising. If you are interested at all, send us a brief description of your HW/SW experience as well as areas in which you'd like to contribute.

Any other questions? Shoot us an email.
olpc.goldenstate@yahoo.com

Friday, February 8, 2008

OLPC Golden State Mission

First off, I'd like to say thanks to everyone I've contacted. This is my first global effort, so I'd like to thank all those who have supported calls and Skype sessions with me. Everyone was extremely patient in helping me to understand their organizational infrastructure and vision:

Habib Khan, PhD - Director of Education for South and Central Asia, OLPC
Sreeram Dhurjaty, PhD - Medical electronics consultant
Michail Bletsas - Director of Network Computing, MIT Media Lab / OLPC
Arnan (Roger) Sipitakiat, PhD - former MIT Media Lab grad / OLPC Thailand
Santi Tisayakorn - DSIL Provost
Dr.Thaweesak Koanantakool - VP of NSTDA / OLPC Thailand
Dr. Stephen J. Atwood, MD - Unicef EAPRO
Phonchan (Newey) Kraiwatnutsorn - Director of Youth Venture
Sinee Chakthranont - Ashoka Thailand



For those not really familiar with the XO laptop let me discuss some of its unique capabilities:

DURABILITY: Certified to operate in temperatures up to 45 degrees celsius; withstands 125G of shock due to lack of a hard drive; dual-mode screen (reflective B/W mode) that can be read in direct sunlight

MOBILITY: IEEE 802.11s. For those not familiar with geek-speak, it's a standard for MESH networks, where only one computer needs to maintain an internet connection. Thus it creates the potential for internet access and connectivity where technical infrastructure doesn't exist. According to early tests, the WiFi antennae range reached 1000 meters.
Check out this interactive flash demo

EFFICIENCY: Consumes about 2 watts, 1/10th the power of standard laptops. Low-power consumption allows the XO to be recharged through human powered alternatives.

More technical details can be found here



However, the most interesting feature of the XO that allowed us to explore non-traditional application extensions is the dual-mode microphone input that also serves as a SENSOR INPUT. The embedded Analog-to-Digital converter facilitates the integration of various biological sensors:

  • Electrocardiogram (ECG) = Heart rhythm analysis
    • Arrythmia, Heart Failure
  • Electromyogram (EMG) = Muscle condition
    • Nerve compression or injury (Carpal Tunnel Syndrome)
  • Spirometer = Breathing measurements
    • Asthma (Occupational), Chronic Obstructive Pulmonary Disease
  • Pulse Oximeter = Oxygenation of blood
  • Bioelectrical Impedance = Body fat analysis

We’ve introduced a very powerful computing platform that can perform diagnostics on the human body, but how specifically can we leverage this technology to help others?

Can we bring basic primary care to others in rural villages?
Can we help elders manage chronic illness?
Are our bodies endangered by our surroundings?
Can we educate others about basic sanitation, dietary needs, etc.?

We could certainly develop a hardware peripheral for remote patient monitoring to address issue #2, but this form of patient management has been around for some time and we didn't want the focus of our effort to stray from the educational goals of the organization: the enrichment of the children.

OLPC Educational Proposition
It is critically important to adequately educate all the children of the emerging world. Simply doing more of the same is no longer enough, if it ever was. If their citizens are to benefit, as they should from the spread of the technology-based, global information economy, these nations must rethink the old top-down classroom paradigm, and replace it with a dynamic learning model that leverages the children themselves, turning them into “teachers” as well as “learners.” The tool with which to unlock their enormous potential is the XO. Put this ultra-low-cost, powerful, rugged and versatile laptop in their hands, and the kids will do the rest.

OLPC Golden State's mission is driven by this proposition. We truly believe that one of the most effective ways to improve the lives of youth is to empower them to realize their own ability to make positive social change.

- Engage the children to think about health concerns in their community
- Educate the students about basic health diagnostics and primary care/preventive medicine
- Develop HW peripherals and SW applications geared towards health related issues they want to address
- Support deployment and execution of pilot projects

Since there is much complexity behind these health issues and fundamentals, we realize a great deal of mentorship from technical and medical disciplines is needed to produce an effective project. Yet this is what makes our effort much more than just another technical effort. Here is just one example of how we can make a social impact...

Sample Case: Air Pollution in Bangkok

Situation: Over the past 5 years, the air pollution in BKK has become better, but it continues to plague those in the most urban areas. Air pollutants can worsen asthma and allergies and induce asthma attacks even in healthy people.
Main Barrier Addressed: Insufficient evidence that air conditions are better for all citizens. Despite an overall better Air Pollution Index record are certain segments of the population still at risk?
Experiment: Use a spirometer to gather demographics.
Results:
Create awareness of pollution levels
Educate urban dwellers how to protect themselves (asthma treatment/prevention)
Early detection of asthma (occupational asthma)
Education of asthma/allergy management

MAKE THE CASE! Tell us how you could see diagnostics improving society!

OLPC Mission

Mission Statement (courtesy of http://www.laptop.org)

Most of the nearly two–billion children in the developing world are inadequately educated, or receive no education at all. One in three does not complete the fifth grade.

The individual and societal consequences of this chronic global crisis are profound. Children are consigned to poverty and isolation—just like their parents—never knowing what the light of learning could mean in their lives. At the same time, their governments struggle to compete in a rapidly evolving, global information economy, hobbled by a vast and increasingly urban underclass that cannot support itself, much less contribute to the commonweal, because it lacks the tools to do so.

It is time to rethink this equation.

Given the resources that developing countries can reasonably allocate to education—sometimes less than $20 per year per pupil, compared to the approximately $7500 per pupil spent annually in the U.S.—even a doubled or redoubled national commitment to traditional education, augmented by external and private funding, would not get the job done. Moreover, experience strongly suggests that an incremental increase of “more of the same”—building schools, hiring teachers, buying books and equipment—is a laudable but insufficient response to the problem of bringing true learning possibilities to the vast numbers of children in the developing world.

Standing still is a reliable recipe for going backward.

Any nation's most precious natural resource is its children. We believe the emerging world must leverage this resource by tapping into the children's innate capacities to learn, share, and create on their own. Our answer to that challenge is the XO laptop, a children's machine designed for “learning learning.”

XO embodies the theories of constructionism first developed by MIT Media Lab Professor Seymour Papert in the 1960s, and later elaborated upon by Alan Kay, complemented by the principles articulated by Nicholas Negroponte in his book, Being Digital.

Extensively field-tested and validated among some of the poorest and most remote populations on earth, constructionism emphasizes what Papert calls “learning learning” as the fundamental educational experience. A computer uniquely fosters learning learning by allowing children to “think about thinking”, in ways that are otherwise impossible. Using the XO as both their window on the world, as well as a highly programmable tool for exploring it, children in emerging nations will be opened to both illimitable knowledge and to their own creative and problem-solving potential.

OLPC is not, at heart, a technology program, nor is the XO a product in any conventional sense of the word. OLPC is a non-profit organization providing a means to an end—an end that sees children in even the most remote regions of the globe being given the opportunity to tap into their own potential, to be exposed to a whole world of ideas, and to contribute to a more productive and saner world community.

Until then, stay tuned.

Brief Intro

Welcome all!

Jake (Snake) and I (Coach B) look to maintain this blog to help update everyone on our progress. A blog is definitely an excellent way to communicate our results and approach to others; however, I was so quickly overwhelmed with cold calls, program planning and research, and the scope of our project was so rapidly changing that I found it difficult to capture any concrete thoughts. Not too mention, my old T40 (~5 yrs. old) was starting to give me grief with HD and motherboard failures that made any remote communication much harder. It's times like these when I realize how I've taken technology and the internet as a whole for granted. Even more of a reason why I believe in the mission of OLPC.

To supplement this blog, I've also created a Facebook group to gather more interest in our project and facilitate some discussion about our objectives amongst peers.
http://cmu.facebook.com/group.php?gid=6383934385

We also encourage the use of LoudAppeal to continue discussion of all grassroot efforts outside of the Wiki medium. So get ready for one long post-update of the developments since July of 2007.