Presentation on theme: "Microprocessor based Design for Biomedical Applications MBE 3 – MDBA I : Introduction."— Presentation transcript:
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 OpenEEG Project ● Start to assemble the Eval Boards ?
Semester Schedule: In September, we will meet ● on Mondays ( 16:10 – 18:35 ) Monday, Sept. 24th 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. 1st there will be no lecture ! Room EDA B3.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. 22th and Nov. 29th ● 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
heavens sake!... our EEG will have just 2 Channels … http://people.brandeis.edu/~sekuler/eegERP.html
Course Material HARDWARE : ● Atmel AVR microcontrollers ● Evaluation Boards with ATmega8 microcontroller ● OpenEEG hardware (MonolithEEG) ● Electrodes and Sensors ● Hardware extensions for projects
Course Material SOFTWARE : ● WinAVR 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 openEEG 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
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 ( OpAmps, 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/RS232 ? (9) Interfacing uC-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 (-> PSoC, ASIC ) ● wide range of different uCs 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 uC-based biomed devices / applications: ● various sensors or meters: Body temperature, Blood Pressure, Blood Sugar Level, … ● Implants and prostetics ● Pacer makers (for heart, breathing,...) ● functional Electrostimulation ● Orthesis and artificial limbs ● Biosignal acquisition equipment Adam blood glucose meter www.heartratemonitor.co.uk
I: Introduction – Microcontrollers Some examples for uC-based biomed devices / applications: ● portable emergency equipment (defibrillator,..) ● Sports medicine ● Patient monitoring ● “Smart Homes", service robotics ● support of Communication for disabled persons ● wireless sensor networks / Body Area Network (BAN) ● Sensors and Actuators for stationary medical equipment Life-point defibrillator Spo2 Module
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 uCs ● good support on the development side: AVR-GCC (WinAVR Toolchain), AVR Studio ● widely used in OpenSource projects, huge knowledge base and reference designs ● OpenEEG project is based on AVRs
I: Introduction – The Atmel AVR family of microcontrollers Members of the AVR family, different packages: 90s, Mega- and Tiny variants http://superpositioned.com/articles/tag/exclusive
I: Introduction – The Atmel AVR family of microcontrollers AVR Product Families ● tinyAVR General purpose Microcontroller with up to 4K Bytes Flash program memory 128 Bytes SRAM and EEPROM. ● megaAVR Self programming memory enables remote reprogramming without additional circuitry. Up to 256K Bytes Flash, 4K Bytes EEPROM and SRAM. ● LCD AVR Integrated LCD driver, contrast control. power consumption at 32 kHz < 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 MegaAVR 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 (I2C) – Interfaces ● JTAG in >16KB megaAVRs
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 WinAVR GCC, Make, IDE 3.) Use hardware link and programmer software to download firmware image to uC
I: Introduction – The Atmel AVR family of microcontrollers AVR programming options: Atmel AVR Quick Reference Guide http://www.atmel.com Firmware security: locking via fuse-bits
I: Introduction – The Atmel AVR family of microcontrollers http://www.mikrocontroller.net/articles/AVR_In_System_Programmer ISP: In system programming ● native Serial Peripheral Interface (SPI) 10-pin Kanda Dongle 6-pin Atmel (STK200) connector
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 STK500 Evaluation Board http://shop.mikrocontroller.net Firmware download via RS232, using the STK500v2 protocol. The STK500 hardware platform transforms the RS232 commands to SPI commands Supported by all AVRs On-Board Leds, Keys, Cables
I: Introduction – The Atmel AVR family of microcontrollers AVR ISP : In-System Programmer http://www.raphnet.net/divers/avrprog/avrisp.jpg http://www.btnode.ethz.ch The ISP- Programmer: An Adapter between PC / RS232 and the on-chip SPI programming interface
I: Introduction – The Atmel AVR family of microcontrollers AVR ISP mkII : In-System Programmer, USB-Version http://lintel.ls0578.net/Article The ISP mkII - Programmer: An Adapter between PC / USB and the on-chip SPI programming interface
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://avrtools.co.kr http://hubbard.engr.scu.edu/embedded/avr/boards
I: Introduction – The Atmel AVR family of microcontrollers AVR Dragon Board http://www.bfrdesign.com/blog.htm Atmel's new low-cost generic programmer + debugger JTAG, DebugWire, ISP, USB. 53x105mm, price less than $100
I: Introduction – The Atmel AVR family of microcontrollers JTAG ICE / JTAG ICE mkII: Atmel AVR Quick Reference Guide http://www.atmel.com
I: Introduction – The Atmel AVR family of microcontrollers ICE50 Emulator: Atmel AVR Quick Reference Guide http://www.atmel.com
I: Introduction – The Atmel AVR family of microcontrollers AVR Application Notes regarding programming: http://www.atmel.com/dyn/products/app_notes.asp?family_id=607 AVR910AVR910 (PDF) "Low-cost" In-system programming (AVRISP) AVR911AVR911 (PDF) Open source serial programmer (AVROSP) AVR109AVR109 (PDF) Self-Programming with a Bootloader
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 EvalBoard2 : Features: ISP / JTAG connectors, RS232 level converter, 2 Leds, 3 Buttons, buzzer, 40Pin extension header. Price: 14.99 €
I: Introduction – The Atmel AVR family of microcontrollers EvalBoard2 top view: Sockets for Attiny2313/21/15, Atmega8/16/32/8535
I: Introduction – The Atmel AVR family of microcontrollers EvalBoard2 jumper settings
I: Introduction – Outlook: The OpenEEG Project Outlook: the OpenEEG 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 : ModularEEG (6 Chn, non-SMD, Kit) MonolithEEG (2 Chn, SMD, USB) SoundcardEEG (FM/AM - Modulation
I: Introduction – Outlook: The OpenEEG Project Outlook: the OpenEEG 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 ModularEEG: AVR-Atmega8 Microcontroller Resolution: 10bit / 0.5 uV Samplingrate: 1kHz up to 6 Channels DRL (driven right leg) – circuit CMRR < -94dB ModularEEG, digital + analog boards. Author: Jörg Hansmann, http://openeeg.sf.net
I: Introduction – Outlook: The OpenEEG Project Outlook: Monolith EEG ● Small and leightweight SMD ● USB-powered ● one double-sided board with extension plug MonolithEEG amplifier. Author: Reiner Münch, http://openeeg.sf.net
I: Introduction – Outlook: The OpenEEG Project Outlook: BrainBay ● Windows software for Biosignal Processing and Biofeedback ● Real time graphical configuration of designs using Input-, Processing- and Output-Elements BrainBay OpenSource software. Author: Chris Veigl, http://brainbay.lo-res.org
I: Introduction – Outlook: The OpenEEG Project Preparation of Cables Eval Boards and Extension Boards