With the rapid development of industries such as art models, mechanical processing, and tooling and molds, higher and higher requirements are placed on processing equipment. As an important part of the above industries, engraving machines have also developed rapidly.
At present, traditional engraving machines are large in size, complex to operate, and expensive. Not only do they require a dedicated computer equipped with dedicated software, but they also require professional operators to control them. In addition, traditional engraving machines are mainly used for mass production. For some engraving machine enthusiasts and mold designers who want to use engraving machines to engrave a single piece of their own design, traditional engraving machines are highly professional, expensive, and impractical. In addition, some traditional engraving machines require manual positioning of the engraving head by turning the handwheel in the three-axis direction before use, which has low accuracy and efficiency. Some high-end engraving machines use software to initially position the engraving head, but the equipment is expensive.
In view of this, a mini CNC engraving machine system is carefully designed. The system is not only simple and convenient to operate, but also has precise initial positioning accuracy and high efficiency for the engraving head.
1 Overall design of the system
In order to meet the needs of the mini CNC engraving machine system to complete the engraving of patterns and texts on non-ferrous metal materials, an engraving machine system with ATmega128 microcontroller as the main control chip was designed. The system includes a stepper motor driver module, LCD12864 liquid crystal display module, keyboard operation panel module, ATmega128 microcontroller minimum system module, ultrasonic sensor, power supply, serial communication module and other parts.
The system structure block diagram is shown in Figure 1.
In the design of this system, the ATmega128 microcontroller produced by ATMEL is used as the main control chip. This microcontroller belongs to the AVR series of microcontrollers, has a 128 kB program memory, and comes with a PWM wave generation module, which is convenient for controlling stepper motors and spindle motors. Among them, the PC is used to interpret the G code of the object to be processed using MACH3 software, realize the conversion of related data formats, and then download it to the control motherboard with the ATmega128 microcontroller as the main control chip through the serial communication module. Since the engraving head needs to be initially positioned before the engraving machine works, a key operation panel is designed in the system. The initial positioning of the engraving head can be completed by operating the six buttons on the key operation panel, such as up and down, left and right, and front and back, which improves the processing efficiency and saves materials. The system also designs an LCD12864 liquid crystal display screen to facilitate the observation of parameters such as the position coordinates of the engraving head and the processing time during the engraving machine processing. To control the stepper motors on three axes, this system uses the PWM wave generated by the PWM module of the ATmega128 microcontroller to control the stepper motor driver, thereby achieving precise control of the stepper motors on three axes.
2 Functional module selection
2.1 ATmega128 MCU Minimum System Module
ATmega128 is an 8-bit microprocessor designed by ATMEL. It has 128K bytes of in-system programmable Flash and 53 programmable I/O lines, which can meet the needs of many I/O ports in this design without further expansion. In addition, the microcontroller also has six-channel programmable resolution PWM, which is convenient for generating standard pulse signals. It also has six external interrupt ports, which can be used for anti-collision design. The minimum system schematic is shown in Figure 2.
2.2 LCD12864 Liquid Crystal Display Module
In order to observe the position coordinates of the engraving head and the processing time during the engraving machine processing, this system designed an LCD12864 liquid crystal display module. The LCD12864 liquid crystal display can display Chinese characters, uppercase and lowercase letters, and other various symbols, etc., which meets the design requirements. In this design, the ATmega128 microcontroller is used to control the LCD12864, in which the PC port is used as a parallel data port to transmit data to the LCD12864 parallel serial port. The PF port is used to control chip selection, read and write, reset, and serial-parallel data transmission mode selection. The LCD12864 liquid crystal display module is shown in Figure 3.
2.3 Stepper Motor Driver Module
A stepper motor is an electromagnetic mechanical device that converts electrical pulse signals into angular displacement. It is a commonly used drive actuator in CNC systems. A stepper motor must have a driver and a controller to work properly. The driver's function is to distribute the control pulses in a circular manner and amplify the power, so that the stepper motor windings are energized in a certain order and the motor is controlled to rotate. [page]
In this system design, BL-210 is used as the driver of the stepper motor. The driver realizes high-frequency chopping and constant current drive. It has strong anti-interference, good high-frequency performance, high starting frequency, photoelectric isolation between control signals and internal signals, optional current, simple structure, stable operation, good reliability, low noise, and can drive all stepper motors below 1.0 A. In addition, the number of subdivisions can be selected (1/2, 1/4, 1/8), and the corresponding micro-step angles are (0.9°/STEP, 0.45°/STEP, 0.225°/STEP). The circuit diagram of the BL-210 stepper motor driver is shown in Figure 4. A+ and A- are connected to the A phase of the stepper motor. B+ and B- are connected to the B phase of the stepper motor. The CW- signal is transmitted, otherwise it is turned. The CP- signal controls the speed of the stepper motor. The PWM wave generated by the ATmega128 microcontroller is input from this port. When the PWM wave frequency is high, the stepper motor speed is faster, otherwise it is slower. CP+ and CW+ are the common positive terminals of the input control signals and are both connected to a high level.
2.4 Keyboard Operation Panel Module
Before engraving, we need to preliminarily position the engraving head of the engraving machine so that the engraving head is in an ideal initial processing position. The main purpose of doing this is to save raw materials and improve processing efficiency. In this design system, 6 buttons such as up and down, left and right, front and back are designed. These 6 buttons are connected to the PA port of the microcontroller. We can complete the forward and reverse rotation of the three-axis stepper motor by operating these 6 buttons, thereby completing the preliminary positioning of the engraving head of the engraving machine. The circuit diagram of the keyboard operation board is shown in Figure 5.
3 Software Design
In the software design of this system, AVR Studio is selected as the embedded development environment and C is used as the writing language. The AVR Studio integrated development environment includes the AVR Assembler compiler, AVR Studio debugging function, AVRProg serial, parallel download function and JTAG ICE simulation. With these functions, we can edit the source code online and run it on the AVR device, which is convenient for AVR microcontroller developers to develop. As a high-level language, C language is efficient and easy to understand in writing programs. In writing programs, modular writing ideas are adopted. The entire software system consists of serial communication module, PWM wave module, LCD12864 liquid crystal display module, keyboard scanning module, ultrasonic sensor interruption and other parts. The program flow chart of the system software design is shown in Figure 6.
4. Anti-collision design
Practical production shows that collision accidents often occur in engraving machines during work. There are many reasons for collision accidents, such as incorrect G code generated by the host computer, improper operation during the initial positioning of the engraving head, incorrect parameter settings, etc. Once the engraving machine collides, the engraving knife may break at the least, the stepper motor may burn out, and even the control motherboard may be damaged. Such accidents will not only cause unnecessary economic losses, but also delay work and production. Therefore, it is also necessary to design a device in the control system to avoid such collision accidents.
In order to solve the above problems, in this design, an ultrasonic sensor is installed at both ends of each ball screw. When the mobile platform in the three-axis direction moves quickly to the edge, the ultrasonic sensor will generate a signal and transmit this signal to the control motherboard, which will then stop generating pulse signals and the stepper motor will stop working.
5 Conclusion
As a typical mechatronics equipment, the engraving machine requires high precision and stable system. This solution uses ATmega128 from the AVR series as the main control chip of the system, which has stable performance and is easy to use. The key operation panel designed in this solution performs preliminary positioning of the engraving head, which is convenient and efficient. Through experiments on the homemade mini CNC engraving machine, the control effect is stable and meets the needs of the solution design.
Previous article:Make a gravity sensing remote control using Cortex-M3 and ADXL345
Next article:Car driving recorder based on ARM design
Recommended ReadingLatest update time:2024-11-17 03:27
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- Analysis of common defects, hazards and causes of circuit board welding
- Network port with a speed of 5G or above
- The origin of the BUCK circuit, with three evolutionary circuits
- DSP Learning (1) Introduction to Digital Signal Processors (DSPs)
- Please teach me a resistance measurement circuit
- 8 principles to follow in PCB stackup design
- [Gizwits Gokit3 Review] + AirLink configuration (Arduino)
- Node voltage calculation
- Showing goods + artificial intelligence first board dog bone AI
- [TI mmWave Radar Evaluation]_5_AWR1843BOOST Corridor Ranging Corner Reflector Test