Microprocessor based Design for Biomedical Applications MBE 3

Microprocessor based Design for Biomedical Applications MBE 3 – MDBA I : Introduction

Today: ● Course Introduction and Administrative Information ● Survey of Student Skills ● Microcontrollers in Biomed Applications – Overview ● AVR Family Overview ● Outlook : The Open. EEG Project ● Start to assemble the Eval Boards ?

Semester Schedule: In September, we will meet ● on Mondays ( 16: 10 – 18: 35 ) Monday, Sept. 24 th we will start later, at 16: 55 ! ● on Thursdays ( 16: 10 – 19: 20 ) From October on, we will meet ● on Thursdays ( 16: 10 – 19: 20 ) Thursday, Nov. 1 st there will be no lecture ! Room EDA B 3. 12 !! Check for updates of the Semesterplan on the CIS !!

Modes of evaluation: ● 40 % Project participation, Project reviews, solved programming tasks ● 30 % Review of a scientific paper Paper selection, workout and presentation Presentations will be on Nov. 22 th and Nov. 29 th ● 30 % Examination at the end of the term Theoretical Questions about the course topics ( without PC‘s or other material ) Programming task on paper, PC‘s allowed Exam will be on Dec. , 12 th

Our goals for this term: ● Practical usage of Microcontrollers in the Biomedical Context ● Understanding, usage and modification of a biosignal (EEG-) acquisition system ● See examples of ongoing research in BME ● Implementation of project ideas

Course Topics ● Features of our hardware platform ● Firmware programming, solving programming tasks ● Data transfer and transmission Protocols ● Measurement of bioelectric signals and events ● Signal processing software and methods ● Biofeedback, Brain Computer Interfaces ● Standards for design and certification ● Design examples

http: //people. brandeis. edu/~sekuler/eeg. ERP. html heavens sake!. . . our EEG will have just 2 Channels …

Course Material HARDWARE : ● Atmel AVR microcontrollers ● Evaluation Boards with ATmega 8 microcontroller ● Open. EEG hardware (Monolith. EEG) ● Electrodes and Sensors ● Hardware extensions for projects

Course Material SOFTWARE : ● Win. AVR Toolchain, AVR Studio DIE ● Programming tools, Bootloader ● PCB – Editor and Circuit Simulator ● Signal processing tools and Biosignal Software

The main hardware and software for our course are GPL‘d: ● GNU – The free software foundation ● GPL – GNU General Public License ● free sources, mention the authors ! Richard Stallman http: //www. stallman. org

Draft of a timeline First 2 - 3 weeks: ● Prepare the Evaluation Boards and cabling ● Getting started with the IDE ● Gain some knowledge about AVR features and firmware programming until October: ● Solve programming tasks ● Data Transmission, A/D conversion, ● Interrupt handling

Draft of a timeline October - November: ● Understand the open. EEG hardware ● Switch to the Monolith-EEG amplifier ● work with and modify the system firmware from Novemeber : ● use our knowledge in a practical project ● review research papers, prepare a presentation ● project reviews, debugging, final examination

Survey of your skills

Query the given skills. . to find out synergies and to adapt our timeline (0) Finished Bachelor for Biomedical Engineering ? (1) Concepts and usage of microcontrollers ? (2) AVR microcontrollers + Tools ? (3) Breadboard – circuits, Soldering, SMD ? (4) Analog electronics ( Op. Amps, Filtering ) ? (5) Sampling and A/D Conversion ?

Query the given skills (6) C-Programming, GCC-Toolchain ? (7) Event-based firmware programming, interrupts ? (8) Data Transmission using UART/RS 232 ? (9) Interfacing u. C-firmware and PC (host-) software ? (10) Design of PCBs using a CAD-Tool ? (11) Usage of the Eagle-CAD Layout Editor ?

Query the given skills (12) Soldering and building up electronic circuits (13) Reading datasheets, studying new parts (14) Physiological basics of bioelectricity (15) Measurement of bioelectric events (16) Signal processing with Matlab / Filters What are your ideas / expectations for this course ?

Microcontrollers in embedded biomedical Applications

Microcontrollers in embedded biomedical Applications: We want to have systems that : ● are reliable ● are small and lightweight ● have a low power consumption These issues are critical when we deal with body implants

I: Introduction – Microcontrollers Some features / advantages of microcontrollers: ● ● ● they are small and flexible easy to use ( most of the time. . ) few external components and wires needed low and ultra low power designs possible (-> PSo. C, ASIC ) wide range of different u. Cs available (memory, I/O, speed, busses, A/Ds ) ● data interchange using standard bus systems; -> various peripheral hardware accessible ● IDEs and toolchains for firmware programming / ● Simulation and high level languages -> 90% of the manufactured CPUs are not found in desktop PCs but in embedded systems, with growing areas of application: RFID, hidden "ubiquitous" computing, wearables, "smart environments", MEMS (micro electro-mechanical systems)

I: Introduction – Microcontrollers Some examples for u. C-based biomed devices / applications: ● various sensors or meters: Body temperature, Blood Pressure, Blood Sugar Level, … ● Implants and prostetics ● Pacer makers (for heart, breathing, . . . ) Adam blood glucose meter ● functional Electrostimulation ● Orthesis and artificial limbs ● Biosignal acquisition equipment www. heartratemonitor. co. uk

I: Introduction – Microcontrollers Some examples for u. C-based biomed devices / applications: ● portable emergency equipment (defibrillator, . . ) ● Sports medicine ● Patient monitoring ● “Smart Homes", service robotics ● support of Communication for disabled persons Life-point defibrillator Spo 2 Module ● wireless sensor networks / Body Area Network (BAN) ● Sensors and Actuators for stationary medical equipment

In a medical Context: Dependability and Fault Tolerance are major issues. ● Failsafe: safe state after failure ● Fault recovery: normal operation can be restored ● Gracefully Degradation: system continues (restricted) work MTBF Mean Time Between Failure Environment conditions / Materials Redundant Hardware / Software makes sense here !

System Design and Integration: ● Hardware Selection for Development / Production ● Hardware and Software Co - Development ● System Modelling and Simulation, UML The earlier a design bug is found, the better !

I: Introduction – The Atmel AVR family of microcontrollers AVR microcontrollers

I: Introduction – The Atmel AVR family of microcontrollers Why will we use an 8 -bit AVR microcontroller in our course ? ● sufficient for many biomedical applications ● AVR Mega 8 features built-in A/D converters ● Fast and cheap ( < 3 € per unit ) ● needs less power than more sophisticated u. Cs ● good support on the development side: AVR-GCC (Win. AVR Toolchain), AVR Studio ● widely used in Open. Source projects, huge knowledge base and reference designs ● Open. EEG project is based on AVRs

I: Introduction – The Atmel AVR family of microcontrollers Members of the AVR family, different packages: 90 s, Mega- and Tiny variants http: //superpositioned. com/articles/tag/exclusive

I: Introduction – The Atmel AVR family of microcontrollers AVR Product Families ● tiny. AVR General purpose Microcontroller with up to 4 K Bytes Flash program memory 128 Bytes SRAM and EEPROM. ● mega. AVR Self programming memory enables remote reprogramming without additional circuitry. Up to 256 K Bytes Flash, 4 K Bytes EEPROM and SRAM. ● LCD AVR Integrated LCD driver, contrast control. power consumption at 32 k. Hz < 20 μA. ● CAN AVR Integrated CAN Controller

I: Introduction – The Atmel AVR family of microcontrollers AVR general features: ● RISC: most instructions need a single clock cycle ● Special Function Registers to access the built in peripherals ● Low power and sleep modes ● In-system- programmable Flash memory Mega. AVR features: ● ● ● Self programming options Operating voltages from 1. 8 -volt to 5. 5 -volt 10 -bit A/D converter with channel multiplexer USART, SPI and TWI (I 2 C) – Interfaces JTAG in >16 KB mega. AVRs

I: Introduction – The Atmel AVR family of microcontrollers Programming the AVR

I: Introduction – The Atmel AVR family of microcontrollers Programming the AVR 1. ) Write source code in assembler or higher language Text editor, IDE 2. ) Compile, Link (and locate) executable file Win. AVR GCC, Make, IDE 3. ) Use hardware link and programmer software to download firmware image to u. C

I: Introduction – The Atmel AVR family of microcontrollers AVR programming options: Firmware security: locking via fuse-bits Atmel AVR Quick Reference Guide http: //www. atmel. com

I: Introduction – The Atmel AVR family of microcontrollers ISP: In system programming ● native Serial Peripheral Interface (SPI) 10 -pin Kanda Dongle (STK 200) 6 -pin Atmel connector http: //www. mikrocontroller. net/articles/AVR_In_System_Programmer

I: Introduction – The Atmel AVR family of microcontrollers The AVR Studio IDE: Atmel AVR Quick Reference Guide http: //www. atmel. com

I: Introduction – The Atmel AVR family of microcontrollers AVR STK 500 Evaluation Board Firmware download via RS 232, using the STK 500 v 2 protocol. The STK 500 hardware platform transforms the RS 232 commands to SPI commands Supported by all AVRs On-Board Leds, Keys, Cables http: //shop. mikrocontroller. net

I: Introduction – The Atmel AVR family of microcontrollers AVR ISP : In-System Programmer http: //www. btnode. ethz. ch The ISP- Programmer: An Adapter between PC / RS 232 and the on-chip SPI programming interface http: //www. raphnet. net/divers/avrprog/avrisp. jpg

I: Introduction – The Atmel AVR family of microcontrollers AVR ISP mk. II : In-System Programmer, USB-Version The ISP mk. II - Programmer: An Adapter between PC / USB and the on-chip SPI programming interface http: //lintel. ls 0578. net/Article

I: Introduction – The Atmel AVR family of microcontrollers Lots of ISP Clones: cheap remakes of the AVR ISP http: //www. restek. dk/grafik/ispclone. jpg http: //hubbard. engr. scu. edu/embedded/avr/boards http: //avrtools. co. kr

I: Introduction – The Atmel AVR family of microcontrollers AVR Dragon Board Atmel's new low-cost generic programmer + debugger JTAG, Debug. Wire, ISP, USB. 53 x 105 mm, price less than $100 http: //www. bfrdesign. com/blog. htm

I: Introduction – The Atmel AVR family of microcontrollers JTAG ICE / JTAG ICE mk. II: Atmel AVR Quick Reference Guide http: //www. atmel. com

I: Introduction – The Atmel AVR family of microcontrollers ICE 50 Emulator: Atmel AVR Quick Reference Guide http: //www. atmel. com

I: Introduction – The Atmel AVR family of microcontrollers AVR Application Notes regarding programming: AVR 910 (PDF) "Low-cost" In-system programming (AVRISP) AVR 911 (PDF) Open source serial programmer (AVROSP) AVR 109 (PDF) Self-Programming with a Bootloader http: //www. atmel. com/dyn/products/app_notes. asp? family_id=607

I: Introduction – The Atmel AVR family of microcontrollers The most simple and cheap solution for AVR firmware programming: Parallel Port Cable + ISP Sofware

I: Introduction – The Atmel AVR family of microcontrollers Our Evaluation platform - the Pollin Eval. Board 2 : Features: ISP / JTAG connectors, RS 232 level converter, 2 Leds, 3 Buttons, buzzer, 40 Pin extension header. Price: 14. 99 €

I: Introduction – The Atmel AVR family of microcontrollers Eval. Board 2 top view: Sockets for Attiny 2313/21/15, Atmega 8/16/32/8535

I: Introduction – The Atmel AVR family of microcontrollers Eval. Board 2 jumper settings

I: Introduction – Outlook: The Open. EEG Project Outlook: the Open. EEG project ● Online since 1999 ● Project aims: development of a lost cost, high quality EEG amplifier development of Open Source firmware / PC-software sharing of knowledge the area of EEG / biosignal instrumentation and application ● Major Hardware Designs : Modular. EEG (6 Chn, non-SMD, Kit) Monolith. EEG (2 Chn, SMD, USB) Soundcard. EEG (FM/AM - Modulation

I: Introduction – Outlook: The Open. EEG Project Outlook: the Open. EEG project ● Available Software: different firmware implementations PC host software in JAVA, C++ Client/Server architecture for biosignal sharing Software for filter design and application Experimental BCI-software ● Hardware overview Modular. EEG: AVR-Atmega 8 Microcontroller Resolution: 10 bit / 0. 5 u. V Samplingrate: 1 k. Hz up to 6 Channels DRL (driven right leg) – circuit CMRR < -94 d. B Modular. EEG, digital + analog boards. Author: Jörg Hansmann, http: //openeeg. sf. net

I: Introduction – Outlook: The Open. EEG Project Outlook: Monolith EEG ● Small and leightweight SMD ● USB-powered ● one double-sided board with extension plug Monolith. EEG amplifier. Author: Reiner Münch, http: //openeeg. sf. net

I: Introduction – Outlook: The Open. EEG Project Outlook: Brain. Bay ● Windows software for Biosignal Processing and Biofeedback ● Real time graphical configuration of designs using Input-, Processing- and Output-Elements Brain. Bay Open. Source software. Author: Chris Veigl, http: //brainbay. lo-res. org

I: Introduction – Outlook: The Open. EEG Project Preparation of Cables Eval Boards and Extension Boards

I: Introduction – Hardware Preparation

I: Introduction – Hardware Preparation Monolith. EEG Extension Board 16 Pin Monolith Extension Header 16 Signals 1: 1 wired to a prototyping connector; Signals GND, MISO, MOSI, /RESET, SCK additionally routed to the 10 Pin AVRISP Connector firmware programming 4 Buttons with pulldown resistors (->GND) 8 Leds + Led-Driver IC Led Anodes connected to Outputs (B 0 -B 7) of 74 HC 245 – Bus. Driver-IC (Dir=VCC, /OE=GND) Led-Cathodes connected to Resistor Net (Resistor Net GND = Pin 1)
- Slides: 52