Introduction: The PVS control system is based on the PIC16F628 microcontroller, and has the advantages of high integration, stable performance, strong anti-interference ability, and high cost performance. The PVS control system has been manufactured and sold as a finished product. After 6 months of online production verification by Suzhou Xiangqing Precision Machinery Co., Ltd. and other units, it has been proved that the design is reliable and feasible. Using the PVS control system to transform the CM402 type placement machine is expected to increase productivity by about 4%, which has good practical value.
1. Analysis
Current status of CM402 chip mounter:
The CM402 high-speed placement machine is developed and produced by Panasonic Corporation of Japan. It is a special equipment for batch processing of certain specific workpieces according to specific procedures. In the production process of splicing materials, if the splicing material detection stops during the traditional CM402 high-speed placement machine, the time of stopping to scan the material will affect the production efficiency.
ways to improve:
Through on-site investigation and demonstration, careful analysis of the equipment's process flow and reading its user manual, the splicing material detection and shutdown material sweeping procedures can be technically transformed, and the PVS control system can be used to replace the Timer on the original electronic control system to achieve the control function of material connection without stopping the machine, thereby improving its production efficiency. This paper uses the PIC16F628 single-chip microcomputer to form a PVS control system to improve the CM402 type placement machine control system.
2. Hardware System Design
The PVS control system is based on the PIC16F628 single-chip microcomputer and consists of the PIC16F628 single-chip microcomputer and its peripheral components, power supply module, and relay module. The printed circuit board and circuit schematic are shown in Figures 1 and 2.
Figure 1 Printed Circuit Board
Figure 2 Schematic diagram
PIC16F628 microcontroller and its peripheral components
PIC16F628 microcontroller is one of the PIC series 8-bit CMOS flash microcontrollers produced by Microchip. This series of microcontrollers adopts RISC (Reduced Instruction Set Computer) embedded structure, with high execution speed, low power consumption, compact size, low operating voltage, strong driving ability, rich variety and other superior performance. Its bus structure adopts the Harvord structure with separate data bus and instruction line, and has a very high pipeline processing speed. Compared with similar 8-bit microcontrollers, the program memory can be saved by half, and the instruction running speed can be increased by about 4 times. The PIC16F628 microcontroller is packaged in DIP-18. With the corresponding program, the chip can realize the intelligent control function of the relay, that is, with other supporting circuits, it can form a PVS control system to realize the control function of the CM402 type placement machine without stopping the material receiving. JP2 is the alarm signal input terminal, JP5 is the PC parallel port unlock signal input terminal, SB1 and SB2 are timing time adjustment buttons, and LED1 to LED6 constitute the timing time display circuit. A single LED lights up for 10 seconds, and all lights up for 60 seconds.
Power Module
The quality of the power module design is directly related to the stability of the PVS control system. This control system directly uses the +24V regulated power supply of the CM402 SMT machine, so the three-terminal voltage regulator integrated circuit LM7812 and LM7805 with good voltage regulation performance are used to achieve two-stage voltage regulation, providing +5V DC regulated power supply for components such as single-chip microcomputers and photocouplers. JP1 is the 24V power input terminal, which is directly connected to the corresponding socket of the CM402 SMT machine.
Relay Module
The relay module is composed of a transistor drive circuit and a solid-state relay. VT1 and VT2 use C9014 transistors; Omron TQ2-24V 24V relay. The working state of the module is controlled by the microcontroller RA4 (pin 3) and connected to the corresponding port of the CM402 SMT machine through JP3 and JP4.
3. Software System Design
The software environment is based on MPLAB IDE V8.33, compiler HI-TECH C, and simulator ICD2.0 to burn PIC16F628 chip to realize the control system transformation design function of CM402 type placement machine.
The implementation procedure is as follows:
#include
__CONFIG(0x1F3C);
#define ulong unsigned long
#define uint unsigned int
#define uchar unsigned char
#define RD (1)
#define WR (1<<1)
#define WREN (1<<2)
#define WRERR (1<<3)
#define FREE (1<<4)
#define CFGS (1<<6)
#define EEPGD (1<<7)
#define START_READ_EEPROM() EECON1=EECON1|RD
#define START_WRITE_EEPROM() EECON1=EECON1|WR
#define ENABLE_WRITE_EEPROM() EECON1=EECON1|WREN
#define DISABLE_WRITE_EEPROM() EECON1=EECON1&(~WREN)
#define SELECT_EEPROM() EECON1=EECON1&(~(EEPGD|CFGS))
#define out RA3
uint js=1;
uchar Key_Num = 0x00,Key_Num1 = 0x00; //This key code
uchar Key_Backup = 0x00,Key_Backup1 = 0x00; //Backup key code
uchar key,temp,key1,temp1;
bit Key_Dis_F = 0,Key_Dis_F1 = 0,OFF_ON=0;
uchar ES=1,ES_DATA=1;
bit a;
ulong z=1;
uchar ES_BC_DATA;
void ms(uint b);
void keyscan(void);
char readByte(char addr);
void writeByte(char addr, char data);
void X_Y_IN(void);
void main()
{ TRISB2=0;
TRISB3=0;
TRISB4=0;
TRISB5=0;
TRISA6=0;
TRISA7=0;
RB2=1;
RB3=1;
RB4=1;
RB5=1;
RA6=1;
RA7=1;
TRISB0=1;
TRISB1=1;
RB0=1;
RB1=1;
TRISB6=1;
TRISB7=1;
RB7=1;
RB6=1;
GIE=1;
PEIE=1;
T1CON=0X01;
TMR1IE=1;
TMR1IF=0;
TMR1L=0XEF;
TMR1H=0XD8;
CM0=1;
CM1=0;
CM2=1;
C2OUT=0;
C2INV=1;
TRISA4=0;
RA4=1;
TRISA3=0;
RA3=1;
a=out=1;
ES_BC_DATA=readByte(0x00);
ES_DATA=ES=ES_BC_DATA;
while(1)
{ asm("clrwdt"); // Clear watchdog
keyscan();
X_Y_IN();
if((C2OUT==1)&(OFF_ON==1)&(a==0))
{ ms(4);
if((C2OUT==1)&(OFF_ON==1)&(a==0))
{ C2OUT=0;
ES_DATA=ES_BC_DATA;
OFF_ON=0;
a=out=1;
z=1;
}
}
switch(ES)
{ case 1:
RB2=1;
RB3=1;
RB4=1;
RB5=1;
RA6=1;
RA7=0;
break;
case 2:
RB2=1;
RB3=1;
RB4=1;
RB5=1;
RA6=0;
RA7=0;
break;
case 3:
RB2=1;
RB3=1;
RB4=1;
RB5=0;
RA6=0;
RA7=0;
break;
case 4:
RB2=1;
RB3=1;
RB4=0;
RB5=0;
RA6=0;
RA7=0;
break;
case 5:
RB2=1;
RB3=0;
RB4=0;
RB5=0;
RA6=0;
RA7=0;
break;
case 6:
RB2=0;
RB3=0;
RB4=0;
RB5=0;
RA6=0;
RA7=0;
break;
}
}
}
void ms(uint b)
{ uchar c;
while(b--)
for(c=123;c>0;c--);
}
void interrupt tmr1(void)
{ if(TMR1IF==1)
{TMR1IF=0;
TMR1L=0XEF;
TMR1H=0XD8;
js++;
if(js==1000)
{ js=1;
if(OFF_ON==1)
{ if(ES_DATA!=0);
{ ES_DATA--;
if(ES_DATA==0)
{ a=out=0;
}
}
}
}
}
}
void X_Y_IN(void)
{ if((RB0==0)&(RB1==0))
{ ms(2);
if((RB0==0)&(RB1==0)&((z++)==500))
{ temp1=1;
}
}
else
{ z=1;
temp1=0;
}
Key_Num1=temp1;
if((Key_Num1!=0x00)&&(Key_Num1 == Key_Backup1 ))
{ if(!Key_Dis_F1)
{Key_Dis_F1 = 1;
asm("clrwdt");
if((RB0==0)&(RB1==0))
{ OFF_ON=1;
}
}
}
else
{ Key_Backup1 = Key_Num1;
Key_Dis_F1 = 0;
}
}
void keyscan(void)
{ if((RB7==0)|(RB6==0))
{ ms(10);
if((RB7==0)|(RB6==0))
{ temp=1;
}
}
else
{ temp=0;
}
Key_Num=temp;
if((Key_Num!=0x00)&&(Key_Num == Key_Backup ))
{ if(!Key_Dis_F)
{Key_Dis_F = 1;
asm("clrwdt");
if((RB6==0)&(RB7==1))
{ ES--;
if(ES<=1)
{ ES=1;
}
if(ES!=ES_BC_DATA)
{ ES_DATA=ES_BC_DATA=ES;
writeByte(0x00,ES_BC_DATA);
writeByte(0x01,out);
writeByte(0x02,RA4);
writeByte(0x03,RB1);
writeByte(0x04,RB0);
writeByte(0x05,z);
}
}
if((RB6==1)&(RB7==0))
{ ES++;
if(ES>=6)
{ ES=6;
}
if(ES!=ES_BC_DATA)
{ ES_DATA=ES_BC_DATA=ES;
writeByte(0x00,ES_BC_DATA);
}
}
}
}
else
{ Key_Backup = Key_Num;
Key_Dis_F = 0;
}
}
char readByte(char addr)
{ char tmpEEPROM;
EEADR = addr;
SELECT_EEPROM();
START_READ_EEPROM();
tmpEEPROM = EEDATA;
return tmpEEPROM;
}
void writeByte(char addr, char data)
{ EEADR = addr;
EEDATA = data;
SELECT_EEPROM();
ENABLE_WRITE_EEPROM();
EECON2 = 0X55;
EECON2 = 0Xaa;
START_WRITE_EEPROM();
ENABLE_WRITE_EEPROM();
while(1 != EEIF);
EEIF = 0;
}
IV. Conclusion
The PVS control system is based on the PIC16F628 microcontroller, and has the advantages of high integration, stable performance, strong anti-interference ability, and high cost performance. The PVS control system has been manufactured and sold as a finished product. After 6 months of online production verification by Suzhou Xiangqing Precision Machinery Co., Ltd. and other units, it has been proved that the design is reliable and feasible. Using the PVS control system to transform the CM402 type placement machine is expected to increase productivity by about 4%, which has good practical value.
Previous article:PlC microcontroller C language programming (10)
Next article:Design of intelligent cleaning and nursing machine using PIC microcontroller
- Popular Resources
- Popular amplifiers
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!
- 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
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- 06 Make GD32L233C expansion board
- The names, wavelengths, characteristics and application fields of each band in the electromagnetic spectrum
- [TI Course] How is the anti-interference ability of TI millimeter-wave radar?
- The ampere-second product of capacitance and the volt-second product of inductance
- Regarding the distinction between NMOS tubes and PMOS tubes
- Pins 2 and 4 are missing from the schematic and package of the BNX016-01 device
- SIMetrix-SIMPLIS ~1~
- What is the difference between a vector signal source and an RF signal source?
- I don't have enough download points. Is there any good way to earn points?
- Commonly used algorithms for drones - Kalman filter (VIII)