中国电子技术网

设为首页 网站地图 加入收藏

 

[原创] Microchip PIC16LF1786低成本血糖仪设计方案

关键词:医疗电子 血糖仪 PIC16LF1786

时间:2015-10-26 11:19:41       作者:Microchip       来源:中电网

microchip公司的PIC16LF1786是不8位MCU,工作频率高达32MHz,多达8KB闪存程序存储器,具有超低功耗管理,和多种模拟特性和外设特性.本文介绍了PIC16LF1786主要特性,框图和血糖仪设计主要特性,包括测试原理图,框图,设计指标,电路图和PCB设计文件.

PIC16LF1786主要特性:

High-Performance RISC CPU:
• Only 49 Instructions
• Operating Speed:
- DC – 32 MHz clock input
- DC – 125 ns instruction cycle
• Interrupt Capability with Automatic ContextSaving
• 16-Level Deep Hardware Stack with optionalOverflow/Underflow Reset
• Direct, Indirect and Relative Addressing modes:
• Two full 16-bit File Select Registers (FSRs)
- FSRs can read program and data memory
Memory Features:
• Up to 8 KB Flash Program Memory:
- Self-programmable under software control
- Programmable code protection
- Programmable write protection
• 256 Bytes of Data EEPROM
• Up to 1024 Bytes of RAM
High-Performance PWM Controller:
• Three Programmable Switch Mode Controller(PSMC) modules:
- Digital and/or analog feedback control ofPWM frequency and pulse begin/end times
- 16-bit Period, Duty Cycle and Phase
- 16 ns clock resolution
- Supports Single PWM, Complementary,Push-Pull and 3-phase modes of operation
- Dead-band control with 8-bit counter
- Auto-shutdown and restart
- Leading and falling edge blanking
- Burst mode
Extreme Low-Power ManagementPIC16LF1784/6/7 with XLP:
• Sleep mode: 50 nA @ 1.8V, typical
• Watchdog Timer: 500 nA @ 1.8V, typical
• Timer1 Oscillator: 500 nA @ 32 kHz
• Operating Current:
- 8A @ 32 kHz, 1.8V, typical
- 32A/MHz @ 1.8V, typical
Analog Peripheral Features:
• Analog-to-Digital Converter (ADC):
- Fully differential 12-bit converter
- Up to 75 ksps conversion rate
- 11 single-ended channels
- 5 differential channels
- Positive and negative reference selection
• 8-bit Digital-to-Analog Converter (DAC):
- Output available externally
- Positive and negative reference selection
- Internal connections to comparators, op amps,
Fixed Voltage Reference (FVR) and ADC
• Four High-Speed Comparators:
- 50 ns response time @ VDD = 5V
- Rail-to-rail inputs
- Software selectable hysteresis
- Internal connection to op amps, FVR and DAC
• Up to three Operational Amplifiers:
- Rail-to-rail inputs/outputs
- High/Low selectable Gain Bandwidth Product
- Internal connection to DAC and FVR
• Fixed Voltage Reference (FVR):
- 1.024V, 2.048V and 4.096V output levels
- Internal connection to ADC, comparators andDAC
I/O Features:
• Up to 36 I/O Pins and 1 Input-only Pin:
• High Current Sink/Source for LED Drivers
• Individually Programmable Interrupt-on-ChangePins
• Individually Programmable Weak Pull-Ups
• Individual Input Level Selection
• Individually Programmable Slew Rate Control
• Individually Programmable Open Drain Outputs
Digital Peripheral Features:
• Timer0: 8-Bit Timer/Counter with 8-BitProgrammable Prescaler
• Enhanced Timer1:
- 16-bit timer/counter with prescaler
- External Gate Input mode
- Dedicated low-power 32 kHz oscillator driver
• Timer2: 8-Bit Timer/Counter with 8-Bit PeriodRegister, Prescaler and Postscaler
• Two Capture/Compare/PWM modules (CCP):
- 16-bit capture, maximum resolution 12.5 ns
- 16-bit compare, max resolution 31.25 ns
- 10-bit PWM, max frequency 32 kHz
• Master Synchronous Serial Port (SSP) with SPIand I2CTM with:
- 7-bit address masking
- SMBus/PMBusTM compatibility
• Enhanced Universal Synchronous AsynchronousReceiver Transmitter (EUSART):
- RS-232, RS-485 and LIN compatible
- Auto-baud detect
- Auto-wake-up on start
Oscillator Features:
• Operate up to 32 MHz from Precision Internal
Oscillator:
- Factory calibrated to ±1%, typical
- Software selectable frequency range from32 MHz to 31 kHz
• 31 kHz Low-Power Internal Oscillator
• 32.768 kHz Timer1 Oscillator:
- Available as system clock
- Low-power RTC
• External Oscillator Block with:
- 4 crystal/resonator modes up to 32 MHzusing 4x PLL
- 3 external clock modes up to 32 MHz
• 4x Phase-Locked Loop (PLL)
• Fail-Safe Clock Monitor:
- Detect and recover from external oscillatorfailure
• Two-Speed Start-up:
- Minimize latency between code executionand external oscillator start-up
General Microcontroller Features:
• Power-Saving Sleep mode
• Power-on Reset (POR)
• Power-up Timer (PWRT)
• Oscillator Start-up Timer (OST)
• Brown-out Reset (BOR) with Selectable Trip Point
• Extended Watchdog Timer (WDT)
• In-Circuit Serial ProgrammingTM (ICSPTM)
• In-Circuit Debug (ICD)
• Enhanced Low-Voltage Programming (LVP)
• Operating Voltage Range:
- 1.8V to 3.6V (PIC16LF1784/6/7)
- 2.3V to 5.5V (PIC16F1784/6/7)

图1.PIC16LF1784/6/7框图

血糖仪

A glucose meter is a medical device used to determinethe concentration of glucose in the solution. Theglucose concentration is measured in units of milligramper decilitre (mg/dl) or millimole per litre (mmol/L),depending on the different regions.

The glucose meter is a key element of the Home BloodGlucose Monitoring (HBGM) device used by peoplewith diabetes mellitus. The measurements can betaken multiple times in a single day.

The glucose meter determines the concentration ofglucose in the solution. This application note focuseson the design of a glucose meter, including thenecessary hardware design and softwaredevelopment.

Most glucose meters are based on electrochemicaltechnology. They use electrochemical test strips toperform the measurement. A small drop of the solutionto be tested is placed on a disposable test strip that theglucose meter uses for the glucose measurement. The two most common methods used in electrochemicalmeasurement of glucose are the Colorimetric methodand the Amperometric method.

In this method, the typical sensors such as LEDs orphoto sensors form the analog interface. Thesesensors are followed by a TransimpedanceAmplifier (TIA) for the glucose concentrationmeasurement in the solution. The Color Reflectanceprinciple is used in this method to sense the colorintensity in the reaction layer of the test strip by the photometry. The glucose meter generates a numericalvalue, that is a measurement of the glucoseconcentration present in the solution.

In this method, the electrochemical test strip contains acapillary that is used to draw in the solution placed atone end of the test strip. The test strip also contains anenzyme electrode containing a reagent such asGlucose Oxidase. Glucose undergoes a chemical reaction in the presence of enzymes and electrons areproduced during the chemical reaction. Theseelectrons (i.e., the charge passing through theelectrode) are measured and this is proportional to theconcentration of glucose in the solution. An ambienttemperature measurement is also made in order tocompensate for the effect of temperature on the rate ofthe reaction.

图2.血糖仪测试原理图

图3.血糖仪框图

设计指标:

• Glucose measurement range: 20 mg/dl to 600mg/dl (1 mmol/l to 33 mmol/l)
• Test result is displayed within five seconds
• Automatic storage of last 32 glucose readingswith date and time stamp
• No test strip coding: Generic regression equationwill be implemented and can be modified basedon the test strip characteristics

硬件设计特性:

• Number of boards: Single board
• PIC16LF178X Device: 28-pin device
• Debug/program: In-Circuit Serial Programming™(ICSP™) connection provided
• Monitoring/indication: Test points
• Test strip connection: Terminals/connectorprovided
• RTCC (using internal Timer1): Date and timestamp for the glucose meter
• Internal EEPROM:
- Record last 32 readings of the glucose meter
- Store any parameters or calibration datarelated to the test strip
• LCD:
- Display the solution glucose content in unitsof mg/dl or mmol/l
- Display the messages: “Insert Test Strip”,“Strip Inserted Place The Sample”, “FaultyTest Strip”
• Test strip sensing: To detect insertion of the teststrip
• Temperature sensing: Provision given to considertemperature variation for the glucose calculations.If relation between the temperature and theglucose concentration is known, it can be incorporatedin the regression equation to take care ofany changes in the glucose concentration due totemperature variations.
• Battery voltage sensing: Battery health sensingand low battery indication
• Two push buttons: To read previously stored dataon the LCD, and to set date and time
• Battery: CR2032: 3V, 225 mAH lithium battery

固件特性:

• Sensing of test strip current using the internal opamp, DAC, and ADC of PIC16LF178X
• Captures ADC readings after the test strip isinserted and checks for a rise above 450 mV
• Starts recording the ADC readings, 1.5 secondsafter the test sample is placed on the test stripand calculates the average
• Calculates the glucose concentration using theregression equation and the average ADCreadingFirmware modules are available for the followingfeatures:
• LCD interface and display routines
• Configuration of op amp
• Configuration of DAC
• Store glucose readings into the internal EEPROM
• Reading the ADC channel
• Calculation of glucose concentration
• Implementation of the RTCC using Timer1 fortime-stamping

图4.血糖仪演示板外形图(正视图)

图5.血糖仪演示板外形图(底视图)

Diabetes mellitus is a growing worldwide health problem. Fortunately, the availability of modern glucose meters enable quality diabetes patient care. Glucose meters measure the amount of glucose in the blood, so patients can make decisions about taking necessary medications.

The low cost glucose meter demo from Microchip uses the amperometric method for measuring blood glucose content.

The Microchip low cost glucose meter was implemented using the PIC16LF1786 device. The features of the PIC16LF1786 integrated measurement engine are:

eXtreme Low-Power operation (XLP)
Two operational amplifiers (OPAMP)
8-bit digital-to-analog converter (DAC)
12-bit SAR analog-to-digital converter (ADC), up to 11 channels
Integrated EEPROM
I2C/SPI
PWM

The analog front end is embedded in the PIC16LF1786 and utilizes two op-amps, a precision ADC, and an accurate voltage reference. An integrated 8-bit DAC is used to properly bias the sensor. The demo board’s Real time Clock and Calendar (RTCC) is used to record the measurement time stamps and the internal EEPROM stores up to 32 readings for later reference. Microchip’s eXtreme Low Power (XLP) technology used by this family of devices helps to achieve the low power requirements for this fully integrated glucose meter demo.

This reference design helps to develop a low cost/low power handheld, portable or wearable glucose meter with a user interface for everyday use.*


图6.血糖仪框图

PIC16LF1786 XLP device with internal OPAMP, ADC, DAC and EEPROM
Demonstration Highlights:
All features driven by a single device – PIC16LF1786
Glucose measurement range - 20mg/dl to 600mg/dl
RTCC uses an internal timer for time stamp
Internal EEPROM for storing 32 readings
Temperature and battery voltage sensing
Push buttons for user interface
LCD displays glucose content and other messages


图7.血糖仪演示板电路图

图8.血糖仪演示板PCB设计图(1)

图9.血糖仪演示板PCB设计图(2)
详情请见:
http://ww1.microchip.com/downloads/en/DeviceDoc/40001637C.pdf
http://ww1.microchip.com/downloads/en/DeviceDoc/Glucose%20Meter.PDF
以及http://ww1.microchip.com/downloads/en/DeviceDoc/00001560A.pdf
40001637C.pdf
00001556B.pdf
Glucose Meter.PDF

 

猜你喜欢