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 distributes the control pulses in a circular manner and amplifies the power, so that the stepper motor windings are energized in a certain order and the motor rotates.
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 with Cortex-M3 and ADXL345
Next article:A simple and practical design scheme of STC89C52RC programmer
- Popular Resources
- Popular amplifiers
- RAQ #223: How to measure and determine soft-start timing without a soft-start equation?
- Vicor high-performance power modules enable the development of low-altitude avionics and EVTOL
- Bourns Launches Two Thick Film Resistor Series with High Power Dissipation Capabilities in Compact TO-220 and DPAK Package Designs
- Bourns Launches New High-Pulse Brake Resistor Series with Superior Energy Dissipation Capabilities
- Nexperia launches new 120 V/4 A half-bridge gate driver to further improve robustness and efficiency in industrial and automotive applications
- Vishay's New 150 V MOSFETs Offer Industry-Leading Power Loss Performance
- The first generation of SGT MOSFET series from Qiangmao: innovative trench technology, automotive-grade 60 VN channel, breakthrough in high-efficiency performance of automotive electronics
- DC/DC Power Supplies for Automotive Applications
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- Network Integration of Fieldbus and DCS
- The way charger industry engineers express their love is very practical
- Are supercapacitors close to our lives?
- EEPROM address problem
- How many ohms are the resistors with silk screen 010 and 300?
- Compact lithium-ion secondary battery for IoT and wearable devices with both performance and safety
- The matching problem between op amp and ADC
- ZigBee-WSN temperature and humidity monitoring system
- Help: After selecting the package in AD09, no corresponding description appears
- TI HVI Power Technology Detailed 2019