Design and implementation of ultra-thin magnetic stirrer

Publisher:blq0681Latest update time:2011-11-15 Source: 电子产品世界 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

A stirrer is a common device in chemical experiments and is widely used in the fields of chemical industry, medicine, food, coating, paint, environmental protection, cosmetics, etc. Traditionally, the stirring of chemical reaction solutions is mostly done manually, which is not only labor-intensive, but also causes uneven stirring of the reaction solution, resulting in inaccurate experimental results. A magnetic stirrer can solve this problem very well. The magnetic stirrer is not only easy to operate, but also can adjust the stirring speed and stirring direction according to the operator's wishes, which greatly simplifies the operation process and solves the problem of difficulty in stirring toxic or viscous reaction solutions.
The system structure diagram of a conventional magnetic stirrer is shown in Figure 1 [1]. Its basic principle is: the rotation of the motor drives the external permanent magnet to rotate, and then through the action of the magnetic field, the rotation of the external permanent magnet drives the rotation of the internal stirrer (permanent magnet), thereby achieving the purpose of stirring, that is, converting electrical energy into mechanical energy, and then converting mechanical energy into magnetic energy. The structural principle of the magnetic stirrers designed in references [2], [3], and [4] is roughly the same. Its main feature is that they all have a motor, which makes the stirrer larger in size. For portable measuring instruments, the magnetic stirrer is required to be thin and light, but it is difficult to achieve these requirements with traditional design methods.
Based on the principle of electromagnetic conversion, this paper designs an ultra-thin magnetic stirrer. By passing pulse currents of different phases through multiple spiral coils, a magnetic field is directly generated to drive the internal stirrer (permanent magnet) to rotate, so as to achieve the purpose of stirring, that is, the electrical energy is directly converted into magnetic energy. Its advantage is that the middle part of the traditional motor is omitted, which can effectively simplify the structure of the stirrer and reduce the weight. The most important thing is that it can be made ultra-thin, so that the magnetic stirrer can be better used in electrochemical portable detection systems.
1 Electromagnetic conversion design
According to the right-hand spiral rule as shown in Figure 2, after the current passes through the spiral coil, an N-pole magnetic field will be generated above the spiral coil and an S-pole magnetic field will be generated below. If the direction of the current passing through the spiral coil is opposite, the direction of the magnetic field generated above and below the coil will also change. In this way, by changing the presence and direction of the current flowing through the spiral coil, the polarity of the magnetic field in the spiral coil can be controlled according to actual requirements.

In order to make the stirrer of the stirrer rotate smoothly, the question that needs to be considered is how many spiral coils are configured for the stirrer. The more coils, the more stable it is, but the structural complexity and control complexity will also increase accordingly. The spiral coils that can usually be considered are: 4, 6 and 8, that is, the angles between the coils are 90°, 60° and 45° respectively.
The magnetic stirrer designed in this paper uses 4 spiral coils placed diagonally, as shown in Figure 3. The material of the stirrer is a permanent magnet, which is placed on the stirrer. In Figure 3, the two spiral coils on the diagonal are set as a group, that is, coils 1 and 3 are a group, and 2 and 4 are a group. Each group of spiral coils is simultaneously passed through current, but the current direction is opposite, that is, the magnetic field polarity presented at the same time is opposite. In this way, by controlling the on and off and direction of the current in the two groups of spiral coils respectively, the direction of the synthetic magnetic field generated by the two groups of coils at different times can be controlled, and then the rotation of the stirrer can be controlled.

The eight directions of the stirring bar rotating one circle clockwise are set as: northwest, due north, northeast, due east, southeast, due south, southwest, due west, as shown in Figure 4, where N represents the N-pole magnetic field generated by the spiral coil, S represents the S-pole magnetic field generated by the spiral coil, and * represents no magnetic field. In this way, each spiral coil is required to generate a corresponding magnetic field polarity.

According to the requirements of the magnetic field polarity of the spiral coils in Figure 4, as long as the presence and direction of the current in the two sets of spiral coils are controlled at different times, the two sets of spiral coils can be controlled to superimpose magnetic fields of different directions at different times. The timing of the current of the two sets of spiral coils is shown in Figure 5, where T (t/s) is the time for the stirrer to rotate one circle, and I (i/A) is the current value flowing through the coil.

2 Hardware design of magnetic stirrer
2.1 Overall hardware structure

The hardware of magnetic stirrer mainly consists of four parts: single chip microcomputer, drive circuit, spiral coil and power supply, and its block diagram is shown in Figure 6. Among them, the single chip microcomputer is the core of the hardware structure, and the AT89S51 chip is used to read the key and generate the corresponding current timing control signal; the drive circuit uses the L6129DS chip, which outputs the corresponding current timing according to the control signal of the single chip microcomputer; the two sets of spiral coils generate the corresponding magnetic field according to the inflow current; the power supply is responsible for supplying power to the single chip microcomputer and the drive chip.

2.2 Processor Selection
The processor is the AT89S51 microcontroller produced by ATMEL. This microcontroller is a low-power, high-performance CMOS 8-bit microcontroller, which contains 4 KB Flash program memory, 128 B random access data memory, 32 external bidirectional input/output (I/O) ports, 5 interrupt priorities, two levels of nested interrupts, two 16-bit programmable timer counters, two full-duplex serial communication ports, a watchdog (WDT) circuit, and a clock oscillator on the chip. The
microcontroller is mainly responsible for the acquisition of keystrokes, and sends the corresponding current timing to the drive circuit based on the acquired information. The connection between the microcontroller and the drive circuit, the key circuit and the SPI interface circuit is shown in Figure 7. Among them, the microcontroller and the drive circuit are connected through the P2 port.

2.3 Design of driving circuit
The magnetic stirrer designed in this paper is ultra-thin and is used for stirring solutions of portable measuring instruments. The viscosity of the reaction solution is low. The mass of the stirrer is 1.95 g, the length is 20 mm, and the radius is 6.58 mm; the spiral coil winding used is 0.1 mm copper wire, the height is 4.5 mm, and the outer radius of each spiral coil winding is 10 mm. According to the electromagnetic relationship, the output current range of the driver chip is required to be 300 mA~500 mA.
According to relevant literature, several motor driver chips such as THB6064, TB6560, TB8435, and L6219DS can provide current drive with controllable size and phase. According to the changes in parameters such as the spiral coil winding characteristics (number of turns, material, radius, etc.), the viscosity of the solution to be stirred, and the radius of the beaker, the mass, radius, and material of the stirrer need to be changed accordingly, which requires the current output by the driver chip to change accordingly. Taking into account the output current, control difficulty and cost-effectiveness of the driver chip, this system selects the L6219DS chip as the driver chip.
The L6219DS chip is a bipolar integrated chip [5-6]. Under the control of the single-chip microcomputer, it can realize the control and drive of the bipolar stepper motor winding, and can also bidirectionally control two DC motors; the output current value is 167 mA, 333 mA, 500 mA, and the maximum can reach 750 mA; it supports 10 V~46 V working voltage and contains an internal temperature overheating protection circuit. The peripheral circuit of the chip is simple and can be easily connected to the single-chip microcomputer to form a motor control system. In this system, the specific pin connection diagram of the L6219DS chip and the single-chip microcomputer is shown in Figure 7.
The single-chip microcomputer outputs two sets of signals through the P2 port to control the driver chip according to the selection of the button. The two sets of signals have the same function. Each set of signals is used to control a set of current size and current direction output by the driver chip. The control of these two sets of signals is relatively independent. The output current corresponding to one set of control signals is shown in Figure 8. In the figure, I01 and I11 control the magnitude of the output current 1 (OUT1) of the driver chip L6219DS, and PHASE1 controls the direction of the output current 1 of the driver chip, that is, the current flows from A to B or B to A. The two sets of currents generated by the driver chip flow through the two sets of spiral coils of the execution part, and the required magnetic field direction is obtained by superimposing the magnetic fields of the two sets of coils.

3 Software Design of Magnetic Stirrer
3.1 Overall Software Design

The software uses C language to program the single-chip microcomputer, and the program adopts a modular structure. The main functions of the software: single-chip microcomputer initialization, key detection and generation of spiral coil current sequence. Since the forward, reverse, stop, start, acceleration and deceleration can be selected by key, it is necessary to correctly allocate the work tasks of the main program and the timing interrupt. The generation of the current sequence requires relatively accurate timing, so this part of the function is completed by the timing interrupt; the key detection adopts the query method, so the initialization of the single-chip microcomputer and the key processing program are completed by the main program. The working state of the stirrer is transmitted between the main program and the timing interrupt through the memory variable, that is, the main program obtains the status information through the key detection, and modifies the corresponding forward (reverse) state variable, stop (run) state variable, and acceleration (deceleration) state variable. In the timing interrupt, according to the running state of the stirrer, the corresponding action is executed to generate the corresponding spiral coil current sequence.
It should be noted that, since 8 directions of the stirrer are set, 8 serial numbers (called steps) corresponding to the 8 directions are set in the software implementation. Whether it is forward or reverse, the definition of the steps remains unchanged, but the next step is to determine whether to add 1 or subtract 1 according to the forward (reverse) state variable.
3.2 Main program design
The main program flow chart is shown in Figure 9. After the system is powered on, the initialization operation is performed, including the initial value of the timer and the interrupt setting. In the initialization function, first set the timing time of timer 0, and select the longest time (that is, the slowest stirring speed) as 50 ms; then, open the global interrupt and timer 0 overflow interrupt; finally, enter the key acquisition module, use an infinite loop to scan the keyboard, and set the corresponding flag bit (acceleration, deceleration, forward, reverse, stop, start) according to the corresponding input key value.

3.3 Timing interrupt design
The timing interrupt flow chart is shown in Figure 10. After entering the timing interrupt function, first turn off the interrupt, and then determine whether the stop button is pressed according to the stop flag. If it is pressed, call the stop function, the stirrer stops rotating, and waits for the start button; if the stop button is not pressed, determine the direction of the stirrer (forward, reverse) according to the direction flag, and set the direction number that the stirrer should point to at the next moment (that is, the step value shown in the flowchart). Then determine whether there is an acceleration and deceleration operation. If so, change the corresponding timing time flag (timing time increases, the stirring speed is slow; timing time decreases, the stirring speed is fast), and call the output function (that is, control the output current of L6219DS); if not, call the output function directly. Finally, assign the corresponding timing time to the timer according to the timing time flag, and open the interrupt.

In view of the existing magnetic stirrer that generates a rotating magnetic field by rotating a permanent magnet driven by the rotation of an electric motor, this paper designs a magnetic stirrer that generates a rotating magnetic field by energizing a spiral coil. The magnetic stirrer has a simple structure, stable operation, flexible and convenient control, and the stirring speed is adjustable in the range of 150 r/min~1 500 r/min. Since the magnetic stirrer adopts the method of directly converting electrical energy into magnetic energy, the intermediate link of mechanical conversion used by conventional magnetic stirrers is omitted, so that the volume of the magnetic stirrer is further reduced, and the thickness is reduced to 1 cm, which can be very conveniently used in various portable measuring instruments.
References
[1] Wang Xiaoning, Huang Xiaosheng, Feng Yanfeng, et al. Research and development of ultra-low temperature magnetic stirring cold trap [J]. Medical and Health Equipment, 2010(7): 19-21.
[2] Yuan Jianrui, Wang Yuling. Large infusion mixing barrel using magnetic coupling stirrer [J]. Medical Equipment Information, 2000(1): 10-11.
[3] Chen Dengfeng. Development of stirrers and stirring containers [J]. Pressure Vessels, 2008(2): 33-41, 46.
[4] Fang Yizhuo, Hu Jun, Fang Chunhui. Research and development of intelligent digital magnetic stirrer [J]. Salt Lake Research, 2003(3): 47-50.
[5] Wang Huajian, Luo Weibing. Design of magnetic stirring system based on L6219DSA motor driver chip [J]. Electronic Components Application, 2005(9): 68-70.
[6] STMicroelectronics. L6219 stepper motor driver. pdf. http://www.st.com/internet/com/search/search, 2010-08-19.

Reference address:Design and implementation of ultra-thin magnetic stirrer

Previous article:Design of a new computer anti-theft system
Next article:Model Verification Technology for Real-time Embedded Systems

Latest Industrial Control Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号