introduction
LPC2132 is a microcontroller based on a 32/16-bit ARM7TDMI-STM CPU that supports real-time embedded tracking and has 32 KB, 64 KB, and 512 KB of embedded high-speed FLASH memory. There is a 10-bit 8-channel A/D converter inside that can be used to collect sensor signals, and a pulse width modulator based on standard timer 0/1 for controlling stepper motors. As a digital component, stepper motors, combined with LPC2132, can achieve precise control.
1 Characteristics of stepper motors
The stepper motor is a motor controlled by electrical pulse signals. It converts the pulse signals into angular displacement, so it is very suitable for microcontroller control. The angular displacement or linear displacement of a stepper motor is proportional to the number of electrical pulses, and its rotational speed or linear speed is proportional to the electrical pulse frequency. Within the load capacity range, these relationships are not affected by fluctuations in power supply voltage, load size, and environmental conditions. And change. By changing the pulse frequency, the speed of the stepper motor can be adjusted within a wide range and can be quickly started, braked and reversed.
In response to the current needs for automation in various fields, this design combines the LPC2132 processor with a stepper motor and applies it to the field of rehabilitation robots, which can greatly reduce the labor intensity of doctors and improve the efficiency of patient treatment.
2 Main functions and applications of LPC2132 control chip
(1) The LPC2132 chip has a pulse width debugger (PWM) built on standard timer 0/1. By setting different matching registers, the positions of the rising edge and falling edge can be controlled independently, and thus multi-phase motors can be controlled.
(2) Has a successive approximation A/D converter. Eight of the pins are reused as input pins, which can convert analog quantities obtained from angle sensors and force sensors into digital quantities and process them.
(3) With asynchronous serial port. Can interact with computers in real time.
(4) It has a stable clock circuit and JTAG download circuit.
3 Control system design
3.1 System control principle
Since the legs of stroke patients do not have normal support capabilities, patients need to lose weight during rehabilitation training [7-8]. The weight loss control platform is built on top of the lower limb exoskeleton rehabilitation training platform. The rope (including force sensor) and vest are connected to the patient and can follow the patient to move on a set track, enabling constant force weight loss for the patient in real time. Under normal circumstances, the weight-reducing platform is directly above the patient, and the sling is vertical to the weight-reducing platform. When the patient performs rehabilitation walking training on the rehabilitation robot training platform, the sling will be driven to deviate from the vertical direction. The angle sensor detects this angle and drives the offset motor to smooth out the angle. The control schematic diagram is shown in Figure 1.
3.2 Overall structural design
There are two stepper motors on the weight reduction platform, namely the offset motor and the weight reduction motor. The offset motor is connected with a nylon rope, and the nylon rope is connected to both ends of the weight-reduction platform, thereby driving the weight-reduction platform to move left and right. The weight reduction motor is connected to the drum through a pair of bevel gears, and the tension of the rope is adjusted by controlling the retraction and release of the rope on the drum to achieve weight reduction.
The structural top view of the weight reduction platform is shown in Figure 2.
3.3 Hardware circuit design
The weight reduction control platform adopts double closed-loop control, namely force closed-loop control and angle closed-loop control. The main control chip adopts the LPC2132 chip of Philips Company and is equipped with a peripheral control circuit module as shown in Figure 3.
In order to eliminate interference from external circuits, a photoelectric coupling circuit is used to isolate the core control circuit and the driver circuit to avoid external circuit interference or damage to the core control circuit [10]. TOSHIBA's TLP521-4 photoelectric coupling chip was selected for this design. The photoelectric isolation circuit is shown in Figure 4. The left PWM is connected to the pin of the chip as the input terminal, and the right PW is connected to the stepper motor driver as the output terminal.
3.4 Software design
(1) The control system needs to process the signals collected by the tension sensor and angle sensor in real time, and convert these analog quantities into digital quantities through the A/D module. Taking the angle sensor as an example, the angle sensor selected in this system converts the angle of rotation into a dynamic voltage.
Figure 5 is the A/D conversion flow chart. Since the full rated voltage of the control chip is 3.3 V and the conversion accuracy is 10 bits, that is, 2^10=1024 levels, if the voltage value read from the A/D conversion register is V, then the actual voltage U is:
(2) In order for the stepper motor to operate, the control system needs to provide corresponding pulse signals. The corresponding pulse signal is obtained by setting different matching registers in the LPC2132 chip. Control the speed of the stepper motor by setting different pulse frequencies. The software is written in C language and completed in the ADS development environment. The written program is converted into a Hex file, and the file is imported into the Protues software for simulation. As shown in Figure 6.
(3) By setting up the serial port, you can interact with the computer in real time.
LPC2132 has 2 asynchronous serial ports, namely UART0 and UART1. When the serial port is initialized, the divisor latch must be set, which stores the VPB clock division value used to generate the baud rate clock. The baud rate clock must It is 16 times the baud rate. The calculation formula is as follows:
The software part needs to be divided into different program modules, including serial port program, information collection program, and pulse debugging program. This software is written in the ADS development environment suitable for ARM chips, and assembly language is used as the startup code, and each program module is programmed in C language. In order to eliminate system errors, increase the response speed of the system, and improve the control accuracy of the system, this system introduces the PID algorithm to achieve closed-loop control of the system.
4 Conclusion
This design takes the lower limb exoskeleton rehabilitation robot as the research background, and based on engineering reality, a rehabilitation robot weight reduction platform is designed. The stepper motor is controlled through LPC2132 to achieve force closed-loop and angle closed-loop dual closed-loop control. Achieve real-time follow-up of patients and constant weight loss function. This reduces the labor intensity of rehabilitation physicians and improves the efficiency of patient rehabilitation training.
Previous article:Design of analog display drive system based on LPC2478 LCD controller
Next article:Car driving recorder based on LPC2104
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- What is the rigidity setting of Panasonic servo drive?
- How to change the inertia ratio of Panasonic servo drive
- What is the inertia ratio of the servo motor?
- Is it better for the motor to have a large or small moment of inertia?
- What is the difference between low inertia and high inertia of servo motors?
- 【RPi PICO】Breathing light
- A busbar power supply plant power rapid protection anti-sway cabinet
- How to put C2000 into low power mode
- GD32F350 is easy to use
- Industrial and Automation Solutions Collection
- Award-winning live broadcast | Use ModusToolbox to build a system to flexibly meet IoT design challenges
- Verilog009
- 5G is a revolutionary advancement in mobile communications
- 【GD32E503 Review】 ADC Experiment
- How to achieve ZigBee fast networking?