A kind of health is drunk the intelligent wineglass and its implementation of management
Technical field
The present invention relates to intelligent wineglass fields, and in particular to a kind of health drink management intelligent wineglass and its realization side
Method.
Background technique
With the raising of wine industry greatly developed with domestic per capita income, Chinese alcohol consumption growth rate is more than the world
Other areas, China has 6% male and 1% female adults to die of alcohol related disease according to statistics, lethal number of drinking
It is higher by AIDS, violence and the lethal total number of persons of traffic accident.Early in 2006, China was just classified as the world by the World Health Organization
The disease incidence of alcohol " severely afflicated area ", the death rate as caused by alcohol and various diseases is above smoking.According to the World Health Organization
Data statistics, 60 kinds of diseases be as drink it is unhealthy caused by.In daily life, people often not can control when drinking
Drinking amount and cause drunk, excessive drinking is very harmful to the body, or even life danger occurs, and once drinking beyond one's capacity can
Cause acute alcoholism;Long-term often excessive consumption of alcohol can cause chronic alcoholism;Itself so if having it is a specifically for
The intelligent wineglass for management of drinking with the health reminded is counted in concentration of alcohol detection, drinking amount, for guaranteeing the majority of consumers'
Health is of great significance.
Wineglass on the market is the simple vessel that wine is contained as one at present.There is no any other function, lacks
To concentration of alcohol detection, drinking amount statistics and remind.The design puts forward a completely new intelligence based on healthy management of drinking
Wineglass temperature, concentration of alcohol, capacity and the user of wine can be drunk and rate and be shown on the outside of wineglass in real-time detection cup body
Show, and drinking amount can be counted whithin a period of time, be more than certain certain value, issue the user with alarm, while in a certain setting time,
The total amount of drinking of counting user, and shown on the display of wineglass, while can be drunk by mobile terminal real time monitoring
The time cycle and alarming value of total amount and customized setting statistics.
Summary of the invention
For above-mentioned deficiency in the prior art, a kind of health provided by the invention is drunk the intelligent wineglass and in fact of management
The wineglass that existing method solves at present on the market is the simple vessel that wine is contained as one, cannot achieve and examines to concentration of alcohol
The problem of survey, drinking amount statistics are with user is reminded.
In order to achieve the above object of the invention, the technical solution adopted by the present invention are as follows: a kind of health is drunk the intelligent wine of management
Cup, comprising: cup body, cup holder, main control module, Weighing module, power module, temperature detecting module, level sensing module, touch are opened
Close module, OLED display screen, the first RGB indicator light and bluetooth module;
The soft-touch control module includes touch sheet and touch switch circuit;The touch sheet is set to the peripheral wall of cup body
It is fixedly connected on body and with cup body;
The main control module, power module, temperature detecting module, touch switch circuit, level sensing module and bluetooth mould
Block is all set in inside cup holder;
The Weighing module is set to the geometric center position of cup holder inside upper surface;
The OLED display screen is set in cup body outer peripheral wall;
The first RGB indicator light is set in the outer peripheral wall of cup holder;
The main control module is opened with power module, Weighing module, temperature detecting module, level sensing module, touch respectively
Close module, OLED display screen, the first RGB indicator light and bluetooth module electrical connection;
The power module respectively with Weighing module, temperature detecting module, level sensing module, soft-touch control module,
OLED display screen, the first RGB indicator light and bluetooth module electrical connection.
Further: the power module includes charging and protective module and 3.3V power module of voltage regulation, the charging and
The peripheral interface of protective module includes: the end+5V, the end GND and the end BAT+, and the charging and protective module include power management chip
SE9017, the 2nd RGB indicator light, battery and USB interface, the USB interface are set in cup holder outer peripheral wall, outer for connecting
Portion USB, the 2nd RGB indicator light are set to the side of USB interface, the BAT pin and battery of power management chip SE9017
Anode connection, and as charging and the end BAT+ of protective module, the PROG pin and ground resistance of power management chip SE9017
The CHRG pin of R16 connection, power management chip SE9017 is connect with the R pin of the 2nd RGB indicator light, power management chip
The CHRGT pin of SE9017 is connect with the G pin of the 2nd RGB indicator light, anode and the one end resistance R13 of the 2nd RGB indicator light
Connection;The other end of resistance R13 is connect with the VCC pin of power management chip SE9017, USB interface and ground capacity C10, electricity
The VCC pin of source control chip SE9017 draws as charging and the end+5V of protective module, the GND of power management chip SE9017
Foot is connect with the ground terminal of battery cathode, the ground terminal of ground resistance R16 and ground capacity C10 respectively, and as charging and is protected
The end GND of module is protected, the end+5V and the end GND of charging and protective module are connect by USB interface with external power supply.
Above-mentioned further scheme has the beneficial effect that external power supply accesses charging and protective module through USB interface, to fill
Electricity and protective module provide 5V voltage source, are battery charging, power management chip SE9017 by power management chip SE9017
It is the lithium battery charging IC of a constant current, constant pressure, is battery charging by the BAT pin of power management chip SE9017, fills
Electric current isVPROGFor the voltage value of the PROG pin of power management chip SE9017, can pass through
The resistance value for adjusting resistance R16, reaches control charging rate, during charging, the CHRG pin of power management chip SE9017
Low level is exported, the 2nd RGB indicator light sends out a warning, when charging saturation, the CHRGT pin output of power management chip SE9017
Low level, the 2nd bright orange lamp of RGB indicator light, the lamp of the 2nd RGB indicator light extinguishes after external power supply disconnects.
Further: the peripheral interface of 3.3V power module of voltage regulation includes: the end Batter_ADC, the end EN_POWER, BAT+
End, the end 3V3, the end VCC and the end GND;The end BAT+ of the end BAT+ of the 3.3V power module of voltage regulation and charging and protective module connects
It connects, the end GND of the 3.3V power module of voltage regulation is connect with the end GND of charging and protective module;The 3.3V regulated power supply mould
Block include: ground resistance R14, resistance 15, voltage stabilizing chip HT7133, metal-oxide-semiconductor Q2, resistance R10, resistance R11, ground capacity C13,
Ground capacity C12 and ground capacity C11, one end of the resistance R15 are connect with ground resistance R14, and as 3.3V pressure stabilizing electricity
The end Batter_ADC of source module, the other end are connect with the end Vin of ground capacity C13 and voltage stabilizing chip HT7133 respectively, and
As the end BAT+ of 3.3V power module of voltage regulation, the end Vout of voltage stabilizing chip HT7133 and ground capacity C12, ground capacity C11,
One end of resistance R11 is connected with the source S of metal-oxide-semiconductor Q2, and the end 3V3 as 3.3V power module of voltage regulation, the voltage stabilizing chip
The end GND of HT7133 and ground terminal, the ground terminal of ground capacity C12 and the ground terminal of ground capacity C11 of ground capacity C13 connect
Connect, and the end GND as 3.3V power module of voltage regulation, the other end of the resistance R11 respectively with one end of resistance R10 and MOS
The grid G of pipe Q2 connects, EN_POWER end of the other end of the resistance R10 as 3.3V power module of voltage regulation, the metal-oxide-semiconductor
VCC end of the drain D of Q2 as 3.3V power module of voltage regulation.
Above-mentioned further scheme has the beneficial effect that 3.3V power module of voltage regulation arrives the voltage pressure stabilizing that battery inputs
3.3V, and inhibit power supply ripple, the performance of stabilizing circuit system, user be not used health drink management intelligent wineglass when,
The drink intelligent wineglass of management of health is in standby, only main control module, power module, the first RGB indicator light, soft-touch control
Module and OLED display screen are in running order, reduce the power consumption of the intelligent wineglass hardware system of healthy management of drinking.
Further: the main control chip of main control module uses the main control chip of STM8L151K4T6, and peripheral interface includes:
The end 3V3 and the end GND, the end 3V3 are connect with the end 3V3 of 3.3V power module of voltage regulation, the end GND and 3.3V power module of voltage regulation
The connection of the end GND.
Further: the peripheral interface of Weighing module includes: the end VCC and the end GND, the end VCC and 3.3V regulated power supply mould
The end VCC of block connects, and the end GND is connect with the end GND of 3.3V power module of voltage regulation;The Weighing module includes: A/D conversion core
Piece HX711, triode Q1, ground capacity C4, ground capacity C6, capacitor C9, resistance R6, resistance R9, resistance R2, resistance R3, electricity
Hinder one of R4, resistance R5, ground resistance foil gauge R7 and ground resistance R8, the ground resistance foil gauge R7 respectively with resistance R4
End is connected with one end of resistance R9, the other end of the resistance R9 respectively with one end of capacitor C9 and A/D conversion chip HX711
The connection of INPA pin, the ground resistance R8 are connect with one end of one end of resistance R5 and resistance R6 respectively, the resistance R6's
The other end is connect with the INNA pin of the other end of capacitor C9 and A/D conversion chip HX711 respectively, the other end of the resistance R4
Respectively with the other end of resistance R5, ground capacity C4, one end of resistance R2, the AVDD pin of A/D conversion chip HX711 and three poles
The collector C connection of pipe Q1, the VBG pin of the A/D conversion chip HX711 are connect with ground capacity C6, the resistance R2's
The other end is connect with the VFB pin of ground resistance R3 and A/D conversion chip HX711 respectively, the base stage B and A/ of the triode Q1
The BASE pin of D conversion chip HX711 connects, the INPB pin of the A/D conversion chip HX711 respectively with A/D conversion chip
The INNB pin of HX711, the AGND pin of A/D conversion chip HX711, the RATE pin of A/D conversion chip HX711, A/D conversion
The XI pin of chip HX711, the ground terminal of ground resistance foil gauge R7, the ground terminal of ground resistance R8, ground resistance R3 connect
Ground terminal, ground capacity C4 ground terminal connected with the ground terminal of ground capacity C6, and the end GND as Weighing module, the A/D
The VSUP pin of conversion chip HX711 connects with the emitter E of the DVDD pin of A/D conversion chip HX711 and triode Q1 respectively
It connects, and the end VCC as Weighing module.
Above-mentioned further scheme has the beneficial effect that resistance R4, resistance R5, resistance strain gage R7 and resistance R8 constitute favour
Qualitative data on resistance strain gage R7 is accurately transferred to A/D conversion chip HX711 by stone electric bridge, and analog signal is turned
Digital signal is turned to, and by digital data transmission to main control module, A/D conversion chip HX711 has integrated level height, response speed
Fastly, the advantages that strong interference immunity.
Further: temperature detecting module is using the thermistor of model MF52AT as temperature detection sensor;Institute
Level sensing module is stated using Proximity Sensor VL6180X as liquid level detecting sensor;The soft-touch control module is adopted
With model TTP223N touch detection IC, the bluetooth module uses the bluetooth module of model JYD_19.
The touch sheet for having the beneficial effect that user's point touching switch module of above-mentioned further scheme, user's finger with
Parasitic capacitance is generated between touch sheet, equivalent capacity is caused to change, to change the charge and discharge time, the capacitance of variation is converted into
The variable quantity of electric signal is transferred to main control module, after main control module receives the signal that user wakes up hardware system, main control module
PA5 foot export high level, be connected between the drain D and source S of the metal-oxide-semiconductor Q2 of 3.3V power module of voltage regulation, be Weighing module,
Temperature detecting module, level sensing module and bluetooth module provide operating voltage, and temperature detecting module detects the temperature of wine, and will
In OLED display screen, the first bright orange lamp of RGB indicator light prevents the temperature value real-time display of wine for warning user's wine temperature too low
Wine temperature is too low to cause stomach to damage, and by Weighing module and level sensing module, obtains the quality and liquid height of wine in wineglass,
To calculate the disposable drinking amount of user and the number of drinking in a period of time;Establish the company of mobile terminal and bluetooth module
It connects, when bluetooth module does not establish connection with mobile terminal, the STAT pin of bluetooth module exports low level, the LED of bluetooth module
Lamp is in OFF state, and after bluetooth module and mobile terminal establish connection, the STAT pin of bluetooth module exports high level, bluetooth
The LED light of module is lighted, and disposable drinking amount and the number of drinking in a period of time are transferred to movement by bluetooth module
End.
A kind of health drink management intelligent wineglass implementation method, comprising the following steps:
S1, hardware system is waken up by touch sheet, initializes main control module;
S2, floor space S, threshold value of the drinking P for setting wineglassh, drink threshold speed vh, temperature threshold kh, superthreshold of drinking time
Number C and statistics drinking days Tt, wherein C=0;
S3, wineglass is pre-processed, configuration mobile terminal is communicated with bluetooth module;
S4, pass through Weighing module, level sensing module and temperature detecting module, obtain the qualitative data of wine, the liquid level of wine
The temperature data of altitude information and wine;
At the time of the liquid level data of S5, the qualitative data for remembering wine and wine change for the first time for user drink beginning when
Carve ta, and remember i=1, and the tass number that j=1, i are one day, j TtIt drinks in it number;
S6, the qualitative data according to wine obtain user and drink speed v, and whether the judgement speed v that drinks is greater than speed threshold of drinking
Value vh, if so, the first RGB indicator light sends out a warning, and the S7 that gos to step, if it is not, the S7 that then gos to step;
Whether S7, the liquid level data for judging qualitative data and wine are 0, if so, enabling F1=i, i=F1+1;F1For
It is data cached, and the S8 that gos to step, if it is not, the S4 that then gos to step;
S8, the temperature data by wine obtain current temperature value ka, and by temperature value kaReal-time display is shown in OLED
On screen, temperature value k is judgedaWhether temperature threshold kh is lower than, if so, the first bright orange lamp of RGB indicator light, and go to step
S9, if it is not, the S9 that gos to step;
S9, according to the qualitative data of wine, the liquid level data of wine and floor space S, be calculated i-th glass of user and drink
Amount of alcohol vc(i);
S10, judge t0In time the liquid level data of the qualitative data of wine and wine whether no change, if so, will work as
The preceding moment is denoted as the finish time t that drinksb, obtain duration of alcohol consumption t, wherein t=tb-t0-ta, and remember, F2=j, j=F2+ 1, F2For
Data cached, hardware system enters standby mode, and the S11 that gos to step, if it is not, the S4 that then gos to step;
Tass number N and amount of alcohol v in S11, record time tc(i), 1≤i≤N, the user in calculating jth time time t
The amount of alcohol drunkBy amount of alcohol PjReal-time display judges amount of alcohol P in OLED display screenjIt is whether big
In the threshold value P that drinksh, if so, note F3=C, C=F3+ 1, F3To be data cached, drunk by bluetooth module to mobile terminal push
Superthreshold message and the superthreshold number C that drinks, the first RGB indicator light sends out a warning, and jumps to step S12, if it is not, then jumping to
Step S12;
S12, with TtIt is periodic recording TtIt the number M and amount of alcohol P that drinksj, 1≤j≤M obtains user TtDrink in it
Amount of alcohol G,And by amount of alcohol G, time Tt, drink number M and TtAlarm times C passes through bluetooth in it
Module is pushed to mobile terminal.
Further: step S3 the following steps are included:
S31, detection battery voltage value UBAT, and by battery voltage value UBATReal-time display judges electricity in OLED display screen
Whether cell voltage meets UBAT< UL, ULFor minimum operating voltage, if so, the S32 that gos to step, if it is not, the S4 that then gos to step;
S32, user's charging is reminded by the flashing of the first RGB indicator light, the 2nd RGB indicator light sends out a warning when charging, judges
Whether cell voltage meets UBAT≥UH, UHFor charging voltage surplus lower limit value, if so, being given a green light by the 2nd RGB indicator light
Prompt user's charging has been expired, and the S4 that gos to step, if it is not, the S31 that then gos to step.
Further: step S6 the following steps are included:
The acquisition time at the qualitative data interval of S61, default wine is t1, current time T;
S62, the qualitative data according to wine, obtain the quality of wine;
S63, note T-t1The quality of the wine at moment is mt, T+t1The quality of the wine at moment is mt+, obtain 2t1User in time
The quality of beverage wine is mh, wherein mh=mt+-mt-;
S64, the speed of drinking for remembering current time T are v, v=(mt+-mt-)/2t1, judge whether to meet v > 0, if so,
It is drunk speed v, and the S65 that gos to step by OLED display screen real-time display, if it is not, the S7 that then gos to step;
Whether S65, the judgement speed v that drinks are greater than the threshold speed v that drinksh, if so, the first RGB indicator light sends out a warning, and
Go to step S7, if it is not, the S7 that then gos to step;
Further: step S9 the following steps are included:
S91, according to the qualitative data of wine and the liquid level data of wine, obtain i-th glass of the user quality m that drinks to drinki
With liquid level hi;
S92, according to floor space S and liquid level hi, the volume v to drink is calculatedi, wherein vi=Shi;
S93, the quality m that drinks to be drunk according to i-th glassiWith the volume v to drinki, obtain the density p of winei;
S94, the density p according to winei, search density and the concentration of alcohol table of comparisons obtain concentration of alcohol ci, by concentration of alcohol ci
Real-time display is in OLED display screen;
S95, according to concentration of alcohol ciWith the volume v to drinki, obtain i-th glass of amount of alcohol v to drinkc(i)。
The invention has the benefit that the present invention is realized by Weighing module and level sensing module to concentration of alcohol in wine
Detection, by the amount of alcohol real-time display disposably drunk in OLED display screen, when once drinking superthreshold, by the amount of alcohol
Mobile terminal is pushed to, and counts the amount of alcohol drunk in a period of time, the amount of alcohol drunk in a period of time is pushed into movement
End, user can inquire situation of itself drinking at any time, be used for specification itself drinking amount, there are wine temperature during drinking too low, drink
Amount of alcohol superthreshold can warn user, and OLED by the light color of the first RGB indicator light in wine excessive velocities and beverage wine
Display screen understands real-time display battery capacity, user drinks speed, concentration of alcohol and wine temperature value, after user drinks, hardware
Circuit can enter standby mode, and hardware system power consumption is preferably minimized.
Detailed description of the invention
Fig. 1 be a kind of health drink management intelligent wineglass structural schematic diagram;
Fig. 2 be a kind of health drink management intelligent wineglass module for power supply functional block diagram;
Fig. 3 be a kind of health drink management intelligent wineglass the first RGB indicator light circuit figure;
Fig. 4 be a kind of health drink management intelligent wineglass OLED display screen circuit diagram;
Fig. 5 be a kind of health drink management intelligent wineglass charging and protective module circuit diagram;
Fig. 6 be a kind of health drink management intelligent wineglass 3.3V power module of voltage regulation circuit diagram;
Fig. 7 be a kind of health drink management intelligent wineglass main control module circuit diagram;
Fig. 8 be a kind of health drink management intelligent wineglass Weighing module circuit diagram;
Fig. 9 be a kind of health drink management intelligent wineglass temperature detecting module circuit diagram;
Figure 10 be a kind of health drink management intelligent wineglass level sensing module circuit diagram;
Figure 11 be a kind of health drink management intelligent wineglass soft-touch control module circuit diagram;
Figure 12 be a kind of health drink management intelligent wineglass bluetooth module circuit diagram;
Figure 13 be a kind of health drink management intelligent wineglass implementation method flow chart;
Wherein: 1, cup body;2, cup holder;3, touch sheet;4, Weighing module;5, OLED display screen;6, the LED of bluetooth module
Lamp;7, the 2nd RGB indicator light;8, the first RGB indicator light;9, USB interface.
Specific embodiment
A specific embodiment of the invention is described below, in order to facilitate understanding by those skilled in the art this hair
It is bright, it should be apparent that the present invention is not limited to the ranges of specific embodiment, for those skilled in the art,
As long as various change is in the spirit and scope of the present invention that the attached claims limit and determine, these variations are aobvious and easy
See, all are using the innovation and creation of present inventive concept in the column of protection.
The intelligent wineglass of management as shown in Figure 1, a kind of health is drunk, comprising: cup body 1, cup holder 2, main control module, weighing mould
Block 4, power module, temperature detecting module, level sensing module, soft-touch control module, OLED display screen 5, the first RGB indicator light
8 and bluetooth module;
The soft-touch control module includes touch sheet 3 and touch switch circuit;The touch sheet 3 is set to the outer of cup body 1
It is fixedly connected on wall body and with cup body 1;
The main control module, power module, temperature detecting module, touch switch circuit, level sensing module and bluetooth mould
Block is all set in inside cup holder 2;
The Weighing module 4 is set to the geometric center position of 2 inside upper surface of cup holder;
The OLED display screen 5 is set in 1 outer peripheral wall of cup body;
In the outer peripheral wall of first RGB indicator light 8 setting and cup holder 2;
The main control module is opened with power module, Weighing module 4, temperature detecting module, level sensing module, touch respectively
Close module, OLED display screen 5, the first RGB indicator light 8 and bluetooth module electrical connection;
As shown in Fig. 2, the power module respectively with Weighing module 4, temperature detecting module, level sensing module, touch
Switch module, OLED display screen 5, the first RGB indicator light 8 and bluetooth module electrical connection.
Fig. 3 is 8 circuit diagram of the first RGB indicator light;
Fig. 4 is the circuit diagram of OLED display screen 5;
Power module includes charging and protective module and 3.3V power module of voltage regulation, as shown in figure 5, charging and protective module
Peripheral interface include: the end+5V, the end GND and the end BAT+, the charging and protective module include power management chip SE9017,
2nd RGB indicator light 7, battery and USB interface 9, the USB interface 9 is set in 2 outer peripheral wall of cup holder, for connecting outside
USB, the 2nd RGB indicator light 7 are set to the side of USB interface 9, the BAT pin and battery of power management chip SE9017
Anode connection, and as charging and the end BAT+ of protective module, the PROG pin and ground resistance of power management chip SE9017
The CHRG pin of R16 connection, power management chip SE9017 is connect with the R pin of the 2nd RGB indicator light 7, power management chip
The CHRGT pin of SE9017 is connect with the G pin of the 2nd RGB indicator light 7, anode and the resistance R13 mono- of the 2nd RGB indicator light 7
End connection;The other end of resistance R13 and VCC pin, USB interface 9 and the ground capacity C10 of power management chip SE9017 connect
Connect, the VCC pin of power management chip SE9017 as charging and the end+5V of protective module, power management chip SE9017's
GND pin is connect with the ground terminal of battery cathode, the ground terminal of ground resistance R16 and ground capacity C10 respectively, and as charging
And the end GND of protective module, the end+5V and the end GND of charging and protective module are connect by USB interface 9 with external power supply.
External power supply accesses charging and protective module through USB interface 9, provides 5V voltage source for charging and protective module, leads to
Power management chip SE9017 is crossed as battery charging, power management chip SE9017 is the lithium battery charging of a constant current, constant pressure
IC, is battery charging by the BAT pin of power management chip SE9017, and charging current is
VPROGFor the voltage value of the PROG pin of power management chip SE9017, control can be reached by the resistance value of adjusting resistance R16
Charging rate, during charging, the CHRG pin of power management chip SE9017 exports low level, 7 azarin of the 2nd RGB indicator light
Lamp, when charging saturation, the CHRGT pin output low level of power management chip SE9017, the bright orange lamp of the 2nd RGB indicator light 7,
The lamp of the 2nd RGB indicator light 7 extinguishes after external power supply disconnects.
As shown in fig. 6, the peripheral interface of 3.3V power module of voltage regulation includes: the end Batter_ADC, the end EN_POWER, BAT+
End, the end 3V3, the end VCC and the end GND;The end BAT+ of the end BAT+ of the 3.3V power module of voltage regulation and charging and protective module connects
It connects, the end GND of the 3.3V power module of voltage regulation is connect with the end GND of charging and protective module;The 3.3V regulated power supply mould
Block include: ground resistance R14, resistance 15, voltage stabilizing chip HT7133, metal-oxide-semiconductor Q2, resistance R10, resistance R11, ground capacity C13,
Ground capacity C12 and ground capacity C11, one end of the resistance R15 are connect with ground resistance R14, and as 3.3V pressure stabilizing electricity
The end Batter_ADC of source module, the other end are connect with the end Vin of ground capacity C13 and voltage stabilizing chip HT7133 respectively, and
As the end BAT+ of 3.3V power module of voltage regulation, the end Vout of voltage stabilizing chip HT7133 and ground capacity C12, ground capacity C11,
One end of resistance R11 is connected with the source S of metal-oxide-semiconductor Q2, and the end 3V3 as 3.3V power module of voltage regulation, the voltage stabilizing chip
The end GND of HT7133 and ground terminal, the ground terminal of ground capacity C12 and the ground terminal of ground capacity C11 of ground capacity C13 connect
Connect, and the end GND as 3.3V power module of voltage regulation, the other end of the resistance R11 respectively with one end of resistance R10 and MOS
The grid G of pipe Q2 connects, EN_POWER end of the other end of the resistance R10 as 3.3V power module of voltage regulation, the metal-oxide-semiconductor
VCC end of the drain D of Q2 as 3.3V power module of voltage regulation.
The voltage pressure stabilizing that 3.3V power module of voltage regulation inputs battery inhibits power supply ripple to 3.3V, stabilizing circuit system
The performance of system, user be not used health drink management intelligent wineglass when, health drink management intelligent wineglass be in it is standby
State, only main control module, power module, the first RGB indicator light 8, soft-touch control module and OLED display screen 5 are in work shape
State reduces the power consumption of the intelligent wineglass hardware system of healthy management of drinking.
As shown in fig. 7, the main control chip of main control module uses the main control chip of STM8L151K4T6, peripheral interface packet
Include: the end 3V3 and the end GND, the end 3V3 are connect with the end 3V3 of 3.3V power module of voltage regulation, the end GND and 3.3V regulated power supply mould
The end GND of block connects.
As shown in figure 8, the peripheral interface of Weighing module 4 includes: the end VCC and the end GND, the end VCC and 3.3V regulated power supply
The end VCC of module connects, and the end GND is connect with the end GND of 3.3V power module of voltage regulation;The Weighing module 4 includes: that A/D turns
Change chip HX711, triode Q1, ground capacity C4, ground capacity C6, capacitor C9, resistance R6, resistance R9, resistance R2, resistance
R3, resistance R4, resistance R5, ground resistance foil gauge R7 and ground resistance R8, the ground resistance foil gauge R7 respectively with resistance
One end of R4 is connected with one end of resistance R9, the other end of the resistance R9 respectively with one end of capacitor C9 and A/D conversion chip
The INPA pin of HX711 connects, and the ground resistance R8 is connect with one end of one end of resistance R5 and resistance R6 respectively, the electricity
The other end of resistance R6 is connect with the INNA pin of the other end of capacitor C9 and A/D conversion chip HX711 respectively, the resistance R4's
The other end respectively with the other end of resistance R5, ground capacity C4, one end of resistance R2, A/D conversion chip HX711 AVDD pin
It is connected with the collector C of triode Q1, the VBG pin of the A/D conversion chip HX711 is connect with ground capacity C6, the electricity
The other end of resistance R2 is connect with the VFB pin of ground resistance R3 and A/D conversion chip HX711 respectively, the base of the triode Q1
Pole B is connect with the BASE pin of A/D conversion chip HX711, and the INPB pin of the A/D conversion chip HX711 turns with A/D respectively
Change the INNB pin of chip HX711, the AGND pin of A/D conversion chip HX711, A/D conversion chip HX711 RATE pin,
The XI pin of A/D conversion chip HX711, the ground terminal of ground resistance foil gauge R7, ground resistance R8 ground terminal, ground resistance
The ground terminal of R3, the ground terminal of ground capacity C4 are connected with the ground terminal of ground capacity C6, and the end GND as Weighing module 4,
The VSUP pin of the A/D conversion chip HX711 hair with the DVDD pin of A/D conversion chip HX711 and triode Q1 respectively
Emitter-base bandgap grading E connection, and the end VCC as Weighing module 4.
Resistance R4, resistance R5, resistance strain gage R7 and resistance R8 constitute Wheatstone bridge, accurately by resistance strain gage R7
On qualitative data be transferred to A/D conversion chip HX711, convert digital signal for analog signal, and by digital data transmission
To main control module, A/D conversion chip HX711 has many advantages, such as integrated level height, fast response time, strong interference immunity.
As shown in figure 9, temperature detecting module is using the thermistor of model MF52AT as temperature detection sensor, electricity
Resistance R2 connects with thermistor NTC1, and temperature change is converted to the voltage change on thermistor NTC1;As shown in Figure 10, liquid
Position detection module is using Proximity Sensor VL6180X as liquid level detecting sensor;As shown in figure 11, soft-touch control module
Using model TTP223N touch detection IC, as shown in figure 12, the bluetooth module uses the bluetooth mould of model JYD_19
Block.
The touch sheet 3 of user's point touching switch module, generates parasitic capacitance between user's finger and touch sheet 3, causes
Equivalent capacity variation, to change the charge and discharge time, the variable quantity that the capacitance of variation is converted into electric signal is transferred to master control mould
Block, after main control module receives the signal that user wakes up hardware system, the PA5 foot of main control module exports high level, 3.3V pressure stabilizing
It is connected between the drain D and source S of the metal-oxide-semiconductor Q2 of power module, is Weighing module 4, temperature detecting module, level sensing module
Operating voltage is provided with bluetooth module, temperature detecting module detects the temperature of wine, and by the temperature value real-time display of wine in OLED
On display screen 5, the bright orange lamp of the first RGB indicator light 8 is used to warn user's wine temperature too low, prevents wine temperature is too low from stomach being caused to damage,
By Weighing module 4 and level sensing module, the quality and liquid height of wine in wineglass are obtained, so that it is disposable to calculate user
Drinking amount and a period of time in number of drinking;The connection for establishing mobile terminal and bluetooth module, bluetooth module not with movement
When connection is established at end, the STAT pin of bluetooth module exports low level, and the LED light 6 of bluetooth module is in OFF state, in bluetooth
After connection is established in module and mobile terminal, the STAT pin of bluetooth module exports high level, and the LED light 6 of bluetooth module is lighted, by one
Number of drinking in the drinking amount and a period of time of secondary property is transferred to mobile terminal by bluetooth module.
As shown in figure 13, a kind of health is drunk the implementation method of the intelligent wineglass of management, comprising the following steps:
S1, hardware system is waken up by touch sheet 3, initializes main control module;
S2, floor space S, threshold value of the drinking P for setting wineglassh, drink threshold speed vh, temperature threshold kh, superthreshold of drinking time
Number C and statistics drinking days Tt, wherein C=0
S3, wineglass is pre-processed, configuration mobile terminal is communicated with bluetooth module;
Step S3 the following steps are included:
S31, detection battery voltage value UBAT, and by battery voltage value UBATReal-time display judges electricity in OLED display screen 5
Whether cell voltage meets UBAT< UL, ULFor minimum operating voltage, if so, the S32 that gos to step, if it is not, the S4 that then gos to step;
S32, user's charging is reminded by the flashing of the first RGB indicator light 8, the 2nd RGB indicator light 7 sends out a warning when charging, sentences
Whether power-off cell voltage meets UBAT≥UH, UHFor charging voltage surplus lower limit value, if so, passing through 7 brilliant green of the 2nd RGB indicator light
Lamp prompt user's charging has been expired, and the S4 that gos to step, if it is not, the S31 that then gos to step.
S4, pass through Weighing module 4, level sensing module and temperature detecting module, obtain the qualitative data of wine, the liquid level of wine
The temperature data of altitude information and wine;
At the time of the liquid level data of S5, the qualitative data for remembering wine and wine change for the first time for user drink beginning when
Carve ta, and remember i=1, and the tass number that j=1, i are one day, j TtIt drinks in it number;
S6, the qualitative data according to wine obtain user and drink speed v, and whether the judgement speed v that drinks is greater than speed threshold of drinking
Value vh, if so, the first RGB indicator light 8 sends out a warning, and the S7 that gos to step, if it is not, the S7 that then gos to step;
Step S6 the following steps are included:
The acquisition time at the qualitative data interval of S61, default wine is t1, current time T;
S62, the qualitative data according to wine, obtain the quality of wine;
S63, note T-t1The quality of the wine at moment is mt, T+t1The quality of the wine at moment is mt+, obtain 2t1User in time
The quality of beverage wine is mh, wherein mh=mt+-mt-;
S64, the speed of drinking for remembering current time T are v, v=(mt+-mt-)/2t1, judge whether to meet v > 0, if so,
It is drunk speed v, and the S65 that gos to step by 5 real-time display of OLED display screen, if it is not, the S7 that then gos to step;
Whether S65, the judgement speed v that drinks are greater than the threshold speed v that drinksh, if so, the first RGB indicator light 8 sends out a warning,
And the S7 that gos to step, if it is not, the S7 that then gos to step.
Whether S7, the liquid level data for judging qualitative data and wine are 0, if so, enabling F1=i, i=F1+1;F1For
It is data cached, and the S8 that gos to step, if it is not, the S4 that then gos to step;
S8, the temperature data by wine obtain current temperature value ka, and by temperature value kaReal-time display is shown in OLED
On screen 5, temperature value k is judgedaWhether temperature threshold kh is lower than, if so, the bright orange lamp of the first RGB indicator light 8, and go to step
S9, if it is not, the S9 that gos to step;
S9, according to the qualitative data of wine, the liquid level data of wine and floor space S, be calculated i-th glass of user and drink
Amount of alcohol vc(i);
Step S9 the following steps are included:
S91, according to the qualitative data of wine and the liquid level data of wine, obtain i-th glass of the user quality m that drinks to drinki
With liquid level hi;
S92, according to floor space S and liquid level hi, the volume v to drink is calculatedi, wherein vi=Shi;
S93, the quality m that drinks to be drunk according to i-th glassiWith the volume v to drinki, obtain the density p of winei;
S94, the density p according to winei, search density and the concentration of alcohol table of comparisons obtain concentration of alcohol ci, by concentration of alcohol ci
Real-time display is in OLED display screen 5;
S95, according to concentration of alcohol ciWith the volume v to drinki, obtain i-th glass of amount of alcohol v to drinkc(i)。
S10, judge t0In time the liquid level data of the qualitative data of wine and wine whether no change, if so, will work as
The preceding moment is denoted as the finish time t that drinksb, obtain duration of alcohol consumption t, wherein t=tb-t0-ta, and remember, F2=j, j=F2+ 1, F2For
Data cached, hardware system enters standby mode, and the S11 that gos to step, if it is not, the S4 that then gos to step;
Tass number N and amount of alcohol v in S11, record time tc(i), 1≤i≤N, the user in calculating jth time time t
The amount of alcohol drunkBy amount of alcohol PjReal-time display judges amount of alcohol P in OLED display screen 5jWhether
Greater than the threshold value P that drinksh, if so, note F3=C, C=F3+ 1, F3To be data cached, pushed and drunk to mobile terminal by bluetooth module
Wine superthreshold message and the superthreshold number C that drinks, the first RGB indicator light 8 sends out a warning, and jumps to step S12, if it is not, then jumping
Go to step S12;
S12, with TtIt is periodic recording TtIt the number M and amount of alcohol P that drinksj, 1≤j≤M obtains user TtDrink in it
Amount of alcohol G,And by amount of alcohol G, time Tt, drink number M and TtAlarm times C passes through bluetooth in it
Module is pushed to mobile terminal.
Each module of table one and main control module communication interface connection table
The invention has the benefit that the present invention is dense to ethyl alcohol in wine by Weighing module 4 and level sensing module realization
Degree detection, by the amount of alcohol real-time display disposably drunk in OLED display screen 5, when once drinking superthreshold, by the second
Alcohol amount pushes to mobile terminal, and counts the amount of alcohol drunk in a period of time, and the amount of alcohol drunk in a period of time is pushed to
Mobile terminal, user can inquire situation of itself drinking at any time, be used for specification itself drinking amount, there are wine temperature mistakes during drinking
Amount of alcohol superthreshold can warn user by the light color of the first RGB indicator light 8 in low, excessive velocities of drinking and beverage wine, and
And OLED display screen 5 can real-time display battery capacity, user drink speed, concentration of alcohol and wine temperature value, drink end in user
Afterwards, hardware circuit can enter standby mode, and hardware system power consumption is preferably minimized.