CN104014052B - A kind of method of counting based on sleep timer - Google Patents

A kind of method of counting based on sleep timer Download PDF

Info

Publication number
CN104014052B
CN104014052B CN201410290064.XA CN201410290064A CN104014052B CN 104014052 B CN104014052 B CN 104014052B CN 201410290064 A CN201410290064 A CN 201410290064A CN 104014052 B CN104014052 B CN 104014052B
Authority
CN
China
Prior art keywords
sleep timer
light
speed
sensitive element
chip microcomputer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410290064.XA
Other languages
Chinese (zh)
Other versions
CN104014052A (en
Inventor
胡岳
江秀臣
张星
沈冬
李爱民
施会
茅晓亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Jiaotong University
State Grid Shanghai Electric Power Co Ltd
Original Assignee
Shanghai Jiaotong University
State Grid Shanghai Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Jiaotong University, State Grid Shanghai Electric Power Co Ltd filed Critical Shanghai Jiaotong University
Priority to CN201410290064.XA priority Critical patent/CN104014052B/en
Publication of CN104014052A publication Critical patent/CN104014052A/en
Application granted granted Critical
Publication of CN104014052B publication Critical patent/CN104014052B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention relates to a kind of method of counting based on sleep timer, first the method installs light-sensitive element in the non-dropper side of the ink of infusion set, the light intensity change projecting on light-sensitive element through black non-dropper caused during light-sensitive element sensing drips, the drippage state of monitoring transfusion drop, an I/O pin of single-chip microcomputer it is transferred to after sensing light intensity change pulse signal being converted into electric impulse signal by the sensor constructed by light-sensitive element, single-chip microcomputer utilizes the sleep timer with input capture function that this electric impulse signal is counted, it is thus achieved that dripping of transfusion is fast.Compared with prior art, because the present invention is for adopting environment light as signal input sources, single-chip microcomputer operates in sleep pattern, adopts sleep counter to interrupt counting mode, has energy consumption little, and load is low, counts the advantages such as accurate.

Description

A kind of method of counting based on sleep timer
Technical field
The present invention relates to a kind of method of counting, especially relate to a kind of method of counting based on sleep timer.
Background technology
Current infusion is clinical application aspect is topmost approach.Having investigation display, the inpatient of more than 90% is required for adopting infusion.In recent years, the medical care problem that clinical transfusion causes has caused the extensive concern of professional person.At present, importance due to clinical position, require medical personnel's operationally high concentration spirit, owing to working strength on ordinary days is high, easily cause the overdraw of medical personnel's muscle power, doctor's advice can not be carried out in real earnest or complete the situation for the treatment of task, ultimately result in the problems such as not in place, the infusion bottle replacing not in time of the tour to venous transfusion patient.It addition, patient exists groups of people arbitrarily adjust transfusion speed, if medical personnel can not have found that it is likely that in time can cause that conditions of patients changes.Nurse depends on transfusion outpatient family members unduly and accompanies and attends to, and also results in patient and is discontented with and thus causes doctor-patient dispute.The phenomena appeared above all become head nurses must faced by problem.
If there being the online monitoring system of a kind of transfusion state, can alert when transfusion is abnormal, and be transmitted by signal warning information is transferred to medical personnel's night shift room, then just can relatively improve the safety of infusion treatment.It addition, adopt on-line monitoring technique can be greatly saved manpower and time, strengthen science and the initiative of nurse job, all the period of time monitoring can be realized simultaneously, offer help for transfusion patient in time.
Online monitoring system at transfusion state needs the speed of transfusion is detected, a kind of existing method is that the I/O utilizing single-chip microcomputer interrupts counting, in the method, owing to single-chip microcomputer is constantly in duty from operating load and power consumption, the operating load of the mode that I/O interrupts is big, power consumption is high, single-chip microcomputer often interrupts the life-span on self and also has impact.
Summary of the invention
Defect that the purpose of the present invention is contemplated to overcome above-mentioned prior art to exist and provide a kind of energy consumption little, load is low, and counting is accurately based on the method for counting of sleep timer.
The purpose of the present invention can be achieved through the following technical solutions:
A kind of method of counting based on sleep timer, first the method installs light-sensitive element in the non-dropper side of the ink of infusion set, the light intensity change projecting on light-sensitive element through black non-dropper caused during light-sensitive element sensing drips, the drippage state of monitoring transfusion drop, an I/O pin of single-chip microcomputer it is transferred to after sensing light intensity change pulse signal being converted into electric impulse signal by the sensor constructed by light-sensitive element, single-chip microcomputer utilizes the sleep timer with input capture function that this electric impulse signal is counted, it is thus achieved that dripping of transfusion is fast.
Described sleep timer is provided with two, wherein, sleep timer Timer1 is used for regularly calculating transfusion drip speed, within every 10 seconds, start once, sleep timer Timer0 is configured to the external interrupt input source of I/O pin electric impulse signal input capture function, by interrupt mode, count by the electric impulse signal formed in the drips process of sensor senses.
Electric impulse signal is carried out counting and specifically includes following steps by described single-chip microcomputer:
1) make counting variable count and speed variables speed be 0, initialize sleep timer Timed) and Timer1;
2) judge whether sleep timer Timer1 interrupts, if so, then carry out step 6), if it is not, then carry out step 3);
3) judge whether sleep timer Timer0 catches, if so, then carry out step 4), if it is not, then return step 2);
4) counting variable count++, removes the interrupt identification of time0 and time delay 50ms;
5) pin interrupt identification is removed;
6) calculate speed variables speed=6*count, count=0, preserve speed numerical value, remove interrupt identification, and return step 2), it is fast that speed is dripping of transfusion.
Compared with prior art, the present invention carries out transfusion drip speed counting by arranging sleep timer, it does not have during interruption, single-chip microcomputer is in sleep state, has energy consumption little, and load is low, counts advantage accurately.
Accompanying drawing explanation
Fig. 1 is the method flow diagram of the present invention;
Fig. 2 is the method flow diagram of I/O interrupt mode.
Detailed description of the invention
Below in conjunction with the drawings and specific embodiments, the present invention is described in detail.The present embodiment is carried out premised on technical solution of the present invention, gives detailed embodiment and concrete operating process, but protection scope of the present invention is not limited to following embodiment.
Embodiment
A kind of method of counting based on sleep timer, first the method pastes light-sensitive element on the dropper of transfusion device, the drippage state of light-sensitive element sensing drop, it is transferred to single-chip microcomputer after induced signal being converted into the signal of telecommunication by light sensor passage, single-chip microcomputer utilizes the sleep timer arranged in it that drop is counted, it is thus achieved that dripping of transfusion is fast.Sleep timer is provided with two.Wherein, the function of sleep timer Timer1 is the numerical value that count is read in timing for every 10 seconds, and sends, and then resets this value;Sleep timer Time0 is configured to the Abort Timer with pin input capture function.The electric pulse detected by catching configured I/O pin enters interrupt routine, carries out accumulated counts.Time delay 50ms is the repeat count in order to avoid pulse jitter causes, this value considers infusion set drips speed and is usually no more than 10 drops/sec.
As it is shown in figure 1, for CC2530 single-chip microcomputer, single-chip microcomputer utilizes the sleep timer arranged in it that drop is carried out counting and specifically includes following steps:
In step S11, make counting variable count and speed variables speed be 0, initialize sleep timer Timer0 and Timer1;
In step S12, it is judged that whether sleep timer Timer1 interrupts, if so, then carry out step S16, if it is not, then carry out step S13;
In step S13, it is judged that whether sleep timer Timer0 catches, if so, then carry out step S14, if it is not, then return step S12;
In step S14, counting variable count++, removes interrupt identification STCS.Valid and time delay 50ms;
In step S15, know pin interrupt identification POIFG;
In step S16, calculate speed variables speed=6*count, count=0, preserve speed numerical value, remove interrupt identification, and return step S12, speed be transfusion drip speed.
Sleep timer is by arranging STCC.PORT [1:0] and STCC.PIN [2:0] enable triggering the single-chip processor i/o pin caught.Be interrupt identification when being provided with the I/O pin selected, and 32kHz clock detection to this event time, just there is timer capture.When STCS.VALID becomes high level, namely readable STCV2:STCV1:STCV0 catch value.It is illustrated in figure 2 the schematic diagram that sleep timer capturing function realizes.Enable new catching, it then follows following steps:
(1) STCS.VALID is removed.
(2) first rising edge of SLEEPSTA.CLK32K is waited.
(3) the pin interrupt identification in P0IFG/P1IFG/P2IFG depositor is removed.

Claims (2)

1. the method for counting based on sleep timer, it is characterized in that, first the method installs light-sensitive element in the non-dropper side of the ink of infusion set, the light intensity change projecting on light-sensitive element through black non-dropper caused during light-sensitive element sensing drips, the drippage state of monitoring transfusion drop, an I/O pin of single-chip microcomputer it is transferred to after sensing light intensity change pulse signal being converted into electric impulse signal by the sensor constructed by light-sensitive element, single-chip microcomputer utilizes the sleep timer with input capture function that this electric impulse signal is counted, what obtain transfusion drips speed,
Described sleep timer is provided with two, wherein, sleep timer Timer1 is used for regularly calculating transfusion drip speed, within every 10 seconds, start once, sleep timer Timer0 is configured to the external interrupt input source of I/O pin electric impulse signal input capture function, by interrupt mode, count by the electric impulse signal formed in the drips process of sensor senses.
2. a kind of method of counting based on sleep timer according to claim 1, it is characterised in that electric impulse signal is carried out counting and specifically includes following steps by described single-chip microcomputer:
1) make counting variable count and speed variables speed be 0, initialize sleep timer Timer0 and Timer1;
2) judge whether sleep timer Timer1 interrupts, if so, then carry out step 6), if it is not, then carry out step 3);
3) judge whether sleep timer Timer0 catches, if so, then carry out step 4), if it is not, then return step 2);
4) counting variable count++, removes the interrupt identification of time0 and time delay 50ms;
5) pin interrupt identification is removed;
6) calculate speed variables speed=6*count, count=0, preserve speed numerical value, remove interrupt identification, and return step 2), it is fast that speed is dripping of transfusion.
CN201410290064.XA 2014-06-24 2014-06-24 A kind of method of counting based on sleep timer Active CN104014052B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410290064.XA CN104014052B (en) 2014-06-24 2014-06-24 A kind of method of counting based on sleep timer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410290064.XA CN104014052B (en) 2014-06-24 2014-06-24 A kind of method of counting based on sleep timer

Publications (2)

Publication Number Publication Date
CN104014052A CN104014052A (en) 2014-09-03
CN104014052B true CN104014052B (en) 2016-07-06

Family

ID=51431228

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410290064.XA Active CN104014052B (en) 2014-06-24 2014-06-24 A kind of method of counting based on sleep timer

Country Status (1)

Country Link
CN (1) CN104014052B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2721111Y (en) * 2004-07-09 2005-08-31 吕化寒 Infusion counter for patient
CN202909210U (en) * 2012-10-15 2013-05-01 无锡市第三人民医院 Intravenous drip velocity measurement circuit

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2721111Y (en) * 2004-07-09 2005-08-31 吕化寒 Infusion counter for patient
CN202909210U (en) * 2012-10-15 2013-05-01 无锡市第三人民医院 Intravenous drip velocity measurement circuit

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
医用智能输液监控系统的研究与设计;郭雯;《CNKI优秀硕士学位论文全文库》;20131231;图3.1、3.7、3.20,正文第20页第3.1.1节第3段、第21页倒数第2段、第22页第3段、第25页第1-2段、第33页第3.4节、第42页第4.2.2节第3点 *

Also Published As

Publication number Publication date
CN104014052A (en) 2014-09-03

Similar Documents

Publication Publication Date Title
CN204636330U (en) A kind of surveillance for hemodialysis
CN101201605A (en) System for monitoring and controlling medical transfusion speed based on machine vision
CN109200393A (en) A kind of interactive mode transfusion monitoring system and monitoring method
CN201969115U (en) Clinic infusion alarm system
CN105126201A (en) Transfusion monitoring system capable of monitoring abnormal transfusion state and performing automatic intervention
CN104174094A (en) Control system for medical transfusion alarm
CN204275175U (en) Transfusion dripping center intelligent monitoring and controlling device
CN102397601A (en) Wireless sensor network-based venous transfusion monitoring system
CN202314708U (en) Liquid detection device based on photoelectric detection technology
CN201783021U (en) Fully automatic intelligent transfusion monitor capable of monitoring clinical heartbeat
CN104014052B (en) A kind of method of counting based on sleep timer
CN114596521A (en) Venous transfusion monitoring method and system based on vision measurement
CN104922767A (en) Wireless infusion monitoring alarming device and system
CN104958810A (en) Liquid level automatic alarm device in medical transfusion
CN204840508U (en) Infrared induction formula infusion alarm device
CN201847677U (en) Radio frequency identification device (RFID) based health condition monitoring device
CN2479985Y (en) Transfusion alarm
CN204468885U (en) A kind of ward management system with camera function infusion warning device
CN109602975A (en) A kind of intelligent control method and system
CN202844245U (en) Multifunctional medical drip infusion recording and prompting apparatus
CN205411836U (en) Infusion dropping speed detection monitoring device
CN104548273A (en) Infusion monitoring system and method
CN205796151U (en) A kind of micro-injection pump of remote alarms
CN205339745U (en) Medical infusion reminding device
CN204543100U (en) A kind of drip stand suspension hook with auto-alarm function

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant