Nowadays, with the accelerating pace of people’s life and the increasing improvement of living standards, coffee, as one of the most popular drinks in the world, has entered people’s daily life and is gradually loved by more and more people. The following “coffee machine” has become more and more popular. Making a perfect cup of coffee requires the help of a special coffee machine. The coffee machine uses about 10 atmospheric pressures to force the hot water of about 90 ℃ through about 10 grams of extruded coffee powder, absorb the coffee fat and other aromatic substances in the coffee powder, and flow into the cup after fully dissolving with the hot water. The whole process needs to be completed within 18-28 seconds, so as to effectively avoid the bad taste caused by excessive extraction. Obviously, the coffee machine plays a decisive role in making a cup of high-quality coffee.

 

This paper will introduce the design scheme of coffee machine based on Shanghai Hangxin acm32f070.

one

Coffee machine overview

Now there are many coffee machines on the market. According to the operation mode, they can be divided into two types: semi-automatic and full-automatic.

The main features of the semi-automatic coffee machine are: grinding, pressing, loading, brewing and removing residues by manual operation. The machine has the advantages of simple structure, easy maintenance and convenient use. Its disadvantages are: high requirements for operators, operators need strict training to use this machine to make high-quality coffee, and the work efficiency is low.

Main features of the full-automatic coffee machine: it realizes the automatic control of the whole process of brewing coffee, such as grinding, pressing, loading, brewing and removing residues. It is more convenient, fast, consistent quality and high efficiency. It does not require high requirements for operators and does not need training. Its disadvantages are: complex structure, good maintenance and high maintenance cost. But because of its outstanding advantages, it is more and more loved by many customers.

The design scheme of the coffee machine introduced this time is a fully automatic coffee machine, which can brew coffee according to the most scientific data and procedures, and is equipped with a perfect protection system, which is simple and convenient to use. You can get coffee with one click. Users can set the water temperature and coffee grinding thickness, and can automatically grind coffee beans; Users can also choose to make single cup or double cups of coffee at the same time according to their needs. At the same time, there are three options: large cup, medium cup and small cup. In addition to making coffee, this coffee machine can also make hot water and steam. Hot water can be used to make tea or other drinks; Steam can be used to heat milk or other drinks. High pressure steam can also emulsify milk to produce fragrant milk foam. It can provide users with diversified, easy and fast services.

two

Chip characteristics

Acm32f0x0 series is a general-purpose MCU that supports a variety of low-power modes. It integrates 16 channel touch keys, 12 bit 1.6 MSPs high-precision ADC, analog comparator comp, operational amplifier opamp, Segment LCD controller, built-in high-performance timer, multi-channel UART, lpuart, SPI, I2C and other rich communication peripherals, built-in AES, TRNG, CRC32 and other information security modules, supports a variety of low-power modes, and has the characteristics of high integration, high anti-interference and high reliability. This product adopts a high-performance core with a maximum working frequency of 64mhz.

Figure 2 Acm32f0x0 resource map

Touch the key tkey

Acm32f0x0 chip is internally integrated with self capacitive touch control sensor. The self capacitive touch control sensor detects whether the finger touches the touch surface by detecting the change of capacitance. The sensitivity of the touch is adjusted by adjusting the detected capacitance change.

• highly integrated, up to 16 touch keys tkey;

• self capacitance detection range: 5 ~ 50pF, sensitivity: 0.1pf;

• support channel compensation;

• support a touch panel thickness of up to 10mm;

• support low-power sleep mode, and the minimum power consumption in stop mode is 17ua;

• support setting sensitivity and scanning speed of working mode and sleep mode respectively;

• support active shielding of cshield channel for waterproof control and increased detection sensitivity; It can reduce the parasitic capacitance, reduce the parasitic capacitance, reduce the interference of noise source, and increase the stability of tkey when other conductors are close to the touch electrode;

• support filtering and anti shake mechanism, which can reduce false touch and avoid some interference caused by static electricity;

• support adaptive and self calibration mechanisms to reduce the interference of environmental variables;

• simulate the customer’s use environment and conduct repeated tests for a long time to ensure the reliability of the product. The test methods are as follows:

① Wet environment test: spray water vapor on the touch panel to make the panel full of dew. At this time, there is no false touch and slow response;

② Splashing and flooding test: spray water quickly on the touch panel until a puddle is formed on the panel, and flood several different touch sensing electrodes into a puddle. At this time, there is no wrong touch, slow response, and the B key in the same puddle is triggered when pressing the a key, that is, the key points to the East and the West;

③ High and low temperature test: – 40 ℃ ~ 85 ℃ high and low temperature test. At this time, there is no false contact, slow response and crash;

④ Electromagnetic interference test: use wireless walkie talkie as radio frequency interference source, call and talk about 20cm on the touch panel, and there is no wrong touch, slow response and crash;

⑤ Power interference test: a strong 600 ~ 800V high-voltage pulse group is formed on the power grid, and there is no false contact at this time;

⑥ Long time continuous work test: after 6 months of continuous power and long-time work test, the keys of the prototype work normally without slow response, crash and other phenomena.

LCD controller LCD

Acm32f0x0 chip integrates a digital controller / driver suitable for monochrome passive liquid crystal display (LCD), with up to 8 common terminals (COM) and 40 section terminals (SEG) to drive 160 (4 * 40) or 288 (3 * 36) LCD elements.

• highly flexible frame rate control;

• support static, 1 / 2, 1 / 3, 1 / 4, 1 / 6 and 1 / 8 duty cycle, and support 1 / 2, 1 / 3 and 1 / 4 offset;

• LCD data RAM with up to 16 registers;

• LCD contrast can be configured through software, LCD flicker function is supported, and multiple flicker frequencies can be configured;

• support class A and class B waveforms, and two driving waveform generation methods:

① Internal resistance partial voltage and external resistance partial voltage;

② Optional filter capacitor;

③ The power consumption of internal resistance voltage division can be configured through software to match the capacitance charge required by LCD panel;

• support low power consumption mode: LCD controller can display in active, sleep and stop modes.

Operational amplifier OPAMP

• low working voltage, typical working voltage 3.3V; Low consumption current, typical value 115ua;

• the offset voltage is adjustable.

Analog comparator comp

It is used to compare the magnitude of two input analog voltages and output high and low levels according to the comparison results.

• the comparator output can be used as the brake input or capture input of the timer;

• provide software configurable filtering time to enhance the anti-interference ability of the chip;

• comparator output can be cut off by timer.

12 bit 1.6msps high precision ADC

Support single ended signal conversion and differential signal conversion, up to 21 channels, support up to 16 Regular conversion of settable channels and injection conversion of settable channels at one time. Each a / D conversion can be performed in single, continuous or intermittent mode.

High performance timer

Acm32f0x0 chip has built-in advanced timer, which is composed of a 16 bit automatic loading counter and driven by a 16 bit programmable prescaler (which can be modified in real time). Advanced timer and general timer are completely independent. They do not share any resources, but they can operate synchronously.

• up to 4 independent channels (input capture, output comparison, PWM generation, single pulse mode output); It can measure the pulse width of input signal (input capture) and generate output waveform (output comparison, PWM, embedded dead time complementary PWM, etc.)

• support incremental (quadrature) encoder and Hall sensor circuits for positioning;

• support three-phase PWM, dead zone protection and brake control;

• support perceptual, non perceptual and FOC control algorithms;

three

design scheme

The coffee machine scheme described in this paper is designed based on the MCU of Shanghai Hangxin acm32f070 series. The overall scheme block diagram is as follows:

Figure 3 Design scheme block diagram of coffee machine based on acm32f070

The download link of software resources (touch key part) is as follows:

https://gitee.com/acm32-mcu/ACM32F0X0-Coffee-TKey-Demo

https://github.com/ACM32-MCU/ACM32F0X0-Coffee-TKey-Demo

Digital intelligent control

The human-computer interaction function in the design scheme discussed in this paper is realized by LCD, led and touch key. There is a segment code LCD screen, 9 keys and 10 LEDs. The button needs to realize the functions of on-off, mode selection (steam mode / coffee mode), large and small cup selection, one cup and two cups selection, coffee bean grinding thickness setting, coffee flavor setting, temperature setting and child lock. The device will determine the operation to be performed according to the key indication. 9 of the 10 LEDs are used for key indication, indicating the operation currently being performed; Another LED is used for alarm indication, mainly when the equipment is self checked, if the residue box, residue tank, motor, core components, etc. are not reset, the indicator flashes. The LCD screen is used to display the grinding thickness of coffee beans, coffee flavor, temperature, indication of large, medium and small cups, and indication of one cup and two cups.

1) Standby: default standby mode. Click the button to start up, the indicator light is on and the LCD screen is displayed; Press and hold this key for 5S to enter the Bluetooth pairing mode in the power on state. During standby, the indicator light is off and the LCD is off.

2) Child lock function: the child lock function is enabled by default. When the child lock function is enabled, any other operation keys will temporarily lose their control function, avoiding the danger caused by children’s curious misoperation. When the child lock function is turned on, the key indicator light is red; When off, the indicator light does not light up.

3) Selection of large, medium and small cups: the selection of coffee volume includes large, medium and small cups. Click for the first time to display the current selection. At this time, the key indicator is on. Click again to switch the selection. Each click, the indicator will flash once, and the LCD will display the current selection in the whole process. With memory function, it only needs to be set once.

4) Cup quantity control: you can choose to make one cup of coffee or two cups of coffee at the same time. Click for the first time to display the current selection. At this time, the key indicator is on. Click again to switch the selection. Each click, the indicator will flash once, and the LCD will display the current selection in the whole process. With memory function, it only needs to be set once.

5) Coffee bean grinding thickness setting: the grinding degree of 13 grades of coffee beans, combined with coffee beans and taste, can adjust the richness of coffee oil. Click for the first time to display the current selection. At this time, the key indicator is on. Click again to switch the selection. Each click, the indicator will flash once, and the LCD will display the current selection in the whole process. With memory function, it only needs to be set once.

6) Coffee intensity and taste setting: adjust the amount of coffee beans. The more coffee beans are used, the stronger the coffee is. Click for the first time to display the current selection. At this time, the key indicator is on. Click again to switch the selection. Each click, the indicator will flash once, and the LCD will display the current selection in the whole process. With memory function, it only needs to be set once.

7) Temperature setting: 4 gears can adjust the coffee temperature. Click for the first time to display the current selection. At this time, the key indicator is on. Click again to switch the selection. Each click, the indicator will flash once, and the LCD will display the current selection in the whole process. With memory function, it only needs to be set once.

8) Steam mode selection: when steam mode is selected, it will start heating until the set value is reached. In this process, the key indicator flashes. When the set value is reached, the indicator is always on.

9) Coffee mode selection: the program defaults to coffee mode. Click to start making coffee. When making coffee, the user can stop the outflow of coffee at any time by clicking this button.

Mobile intelligent control

The mobile phone can be connected through ble Bluetooth, and the mobile phone can be started with one click; The grinding degree, taste, temperature and other parameters of large, medium and small cups and coffee beans can be set through the mobile phone; It also supports one click reservation. The coffee opportunity makes coffee according to the settings. After making, the coffee machine enters the state of waiting for coffee and notifies the mobile phone.

Functions of coffee machine controller (MCU)

1) Initialize the coffee machine

The coffee machine is connected to the power supply and powered on. Click the standby button to start the machine. MCU will control the whole coffee machine system to carry out a series of initialization, such as system safety detection, multi position travel switch normal detection, water volume of water tank, coffee bean detection, emptying residue and so on, so as to make necessary preparations for making coffee or steam. During the initialization process, if any of the above items has a problem, MCU will immediately send out an alarm signal to make the alarm indicator flash and the buzzer sound. Other operations can be carried out only after the alarm is eliminated.

2) Making coffee

After the initialization of the coffee machine is completed, the system enters the coffee mode by default. The MCU controls the heater to work and the water temperature rises. At this time, the coffee indicator flashes. During the heating process, you can click the temperature setting button to adjust the temperature. The temperature sensor detects the water temperature in real time. When the set value is reached, the coffee machine turns to the heat preservation state, the coffee indicator turns to the normally on state and the coffee is ready for brewing.

MCU can control the production of single and double cups of coffee with adjustable capacity. Click the button of one cup and two cups for the first time to display the current selection. Click again to switch the selection. If it is a single cup, it will switch to double cups; If it is currently a double cup, it will be switched to a single cup. In the process of making two cups of coffee, it cannot be switched to a single cup. The amount of coffee can be selected through the large, medium and small selection keys, generally large, medium and small cups. MCU controls the water volume by controlling the operation of the water pump.

The control of grinding coffee powder motor ensures the adjustment and thickness of coffee powder production, so as to control the taste and taste of coffee. In addition, when it is detected that a hard object is stuck in the grinding, MCU controls the motor to stop running after 2 seconds at the latest.

When making coffee, MCU controls the motor to move the core parts and align the water outlet with the coffee powder; Reset after making coffee, and pour the coffee bean residue into the residue box at the same time.

When coffee is served, the user can stop the flow of coffee at any time by pressing the coffee mode key.

3) Making steam

In the default coffee mode, press the steam mode key, MCU will control the heater to heat, the water temperature will continue to rise until steam is generated, and the temperature will be maintained later. During this period, the steam indicator turns from flashing to normally on. At the same time, MCU also controls the detection of steam pressure, which must be within the specified range to ensure safety.

In the steam mode, press the coffee mode key and the system will switch to coffee mode. At this time, the steam alarm indicator will flash and the indicator light will sound at the same time. Because the temperature of making steam is higher than that of making coffee, it needs to be cooled. During the cooling process, MCU will detect the water temperature in real time through the temperature sensor, when the requirements for making coffee are met. The steam indicator light and alarm indicator light change from flashing to dark, while the coffee indicator light changes from flashing to normally on, which indicates that the coffee is ready.

one

END

one

The main purpose of the design scheme proposed in this paper is to make the coffee machine intelligent and civilian, improve work efficiency, save time and liberate hands. While improving the comfort and convenience of people’s life, it can also further ensure the quality of people’s life.

Leave a Reply

Your email address will not be published. Required fields are marked *