In order to provide an implementation scheme for automatically sucking and clamping an IC card and accurately fixing the position of the IC card, the embodiment of the present invention provides a method and device for testing the service life of an IC card. The preferred embodiments of the present invention will be described below with reference to the drawings. .
 Refer to figure 1 As shown, an IC card service life test method provided by an embodiment of the present invention includes the following steps:
 Step 100: After the power is turned on, the IC card is inserted, and the rubber roller of the clamping mechanism rotates to wind the IC card and clamp it.
 Specifically, the IC card service life testing device includes a housing. From the outside, the housing is provided with a card insertion slot corresponding to the position where the IC card is rolled, so that the IC card can be inserted into the correct position. After the power is turned on, the DC motor rotates forward. The forward rotation in the embodiment of the present invention refers to clockwise rotation, which drives the gear set to rotate, and the gear set drives the rubber roller of the clamping mechanism to rotate counterclockwise, rolls in the IC card and clamps the IC card together with the IC card support shaft.
 After the rubber roller of the clamping mechanism rotates to roll in and clamp the IC card, before receiving the correct insertion signal, when the edge of the IC card is inserted into contact with the fixed baffle of the clamping mechanism, stop rotating the rubber roller , Generate the correct insertion signal, wherein the fixed baffle is arranged on the side of the rubber roller away from the IC card insertion guide slot.
 Step 110: When the correct signal is received, the stepping motor is driven. The stepping motor drives the screw nut to move forward and backward along the screw, and the screw nut drives the clamping mechanism and the IC card to move forward and backward together.
 Specifically, after receiving the correct insertion signal, confirm that the IC card has been rolled and clamped in the correct position, stop the DC motor, control the stepper motor driver by the micro-control unit, and then drive the stepper motor through the stepper motor driver. The stepping motor can convert the electrical pulse signal into angular displacement, rotate the screw, the screw can be rotated forward or reverse, so that the screw nut can move forward and backward along the screw, and the screw nut is connected with the clamping mechanism to drive the clamping The mounting mechanism and the IC card clamped on the clamping mechanism move back and forth.
 Step 120: Every time the IC card is moved forward and inserted into the card reader, the card reader reads and writes the IC card. When receiving a feedback signal of incorrect reading or writing, the stepper motor is stopped. , And count the number of read operations or write operations.
 Specifically, when the lead screw nut moves forward and backward along the lead screw, it drives the IC card to move forward and backward. Each time it moves forward, the IC card is inserted into the card reader, and the card reader starts to perform reading and writing operations on the IC card. If both read and write operations are normal, it is determined that the IC card status is normal. If one of the read operation or write operation fails to be performed normally, it is determined that the IC card status is abnormal, and the micro-processing unit is fed back a signal indicating that the read operation or write operation is not correct. After receiving the feedback signal, the micro-processing unit stops driving the stepper motor, stops the insertion and removal operations of the IC card, and counts the number of read operations or write operations as a parameter for judging the life of the IC card.
 Refer to figure 2 As shown, the device for realizing the IC card service life test method in the present invention includes the following parts, wherein, based on the same inventive concept, according to the IC card service life test method provided in the above embodiment of the present invention, correspondingly, the present invention is another An embodiment also provides an IC card service life test device. The device structure specifically includes: a clamping mechanism 1 for winding and clamping the IC card 5 after the IC card 5 is inserted; and a plug-in unit 2 for passing The stepping motor 6 drives the screw nut 7 to move back and forth along the screw 8, and the screw nut 7 drives the clamping mechanism 1 connected to it to move back and forth together to complete the operation of moving the IC card 5 back and forth; the card reader 3 is used for IC The card 5 performs reading and writing operations. When the reading operation or writing operation is not performed correctly, the stepper motor 6 is stopped. Among them, the IC card 5 can be inserted or removed from the card reader 3 when it moves back and forth; the control unit 4 It is used to control the cooperation of the clamping mechanism 1, the plug-in unit 2 and the card reader 3, and to count the number of read operations or write operations.
 Specifically, see image 3 As shown, the clamping mechanism 1 includes: a DC motor 8, a DC motor support 9, a gear set 10, a bearing support 11, a rubber roller 12, an IC card support shaft 13, a connecting plate 14, an IC card baffle 15 and a sensor 16; The DC motor 8 is fixed on the side of the DC motor support 9 away from the card reader 3 and drives the gear set 10 connected to it to rotate. The DC motor support 9 is L-shaped; the rubber roller 12 is connected to the gear set 10, and Drive rotation through the gear set 10; among them, see Figure 4 As shown, the gear set 10 includes a smaller drive gear and two larger passive gears. The DC motor is directly connected to the drive gear so that the drive gear rotates at a uniform speed. The drive gear drives the two larger passive gears to rotate. When the card reader looks towards the DC motor, when the driving gear rotates counterclockwise, the two passive gears rotate clockwise. At this time, the rubber roller can be driven to rotate clockwise to wind the IC card 5 in. When the driving gear rotates clockwise When the two driven gears rotate counterclockwise, the rubber roller can be driven to rotate counterclockwise to roll out the IC card 5, and the rubber roller 12 and the IC card support shaft 13 can clamp the IC card together. The bearing support 11 is fixed on the side of the connecting plate 14 away from the card reader 3 for fixing the rubber roller 12; the IC card support shaft 13 is parallel to the rubber roller 12, located on the underside of the rubber roller 12, and passes through the connection The board 14 is fixed on the bearing support 11 and is used to clamp the IC card 5 together with the rubber roller 12; the IC card baffle 15 is fixed on the side of the connecting plate 14 away from the IC card inserted, and the sensor 16 is fixed on the IC card baffle 15 on; the sensor 16 is not marked in the figure, after the IC card 5 is clamped, one end close to the card reader 3 is exposed outside the rubber roller 12. The plug-in unit 2 includes: stepping motor 6, coupling 17, screw support 18, screw nut 7, screw 8, clamping mechanism support 19, linear guide 20, linear guide support 21, and linear bearing 22 The stepping motor 6 is connected with the screw 8 through the coupling 17; the screw support 18 is installed on the bottom plate for fixing the screw 8; the screw nut 7 and the screw 8 form a screw pair; the clamping mechanism bracket 19 and The screw nut 7 is connected to carry the clamping mechanism 1; the linear guide support 21 is fixed on the bottom plate, located on both sides of the screw 8, and is used to fix the linear guide 20, and the linear bearing 22 is sleeved on the linear guide 20, Used to support the bracket 19 of the clamping mechanism.
 The device also includes: a card reader support structure 23, which includes a card reader support 24, bolts and springs 25, a card slot 26, and a clamping four-bar mechanism 27; the card reader support 24 is installed on On the bottom plate, bolts and springs 25 are used to support the card slot 26, and the clamping four-bar mechanism 27 can clamp or loosen the card reader 3. Among them, the support structure of the card reader is usually fixed, but in the embodiment of the present invention, the bolt and the spring 25 are sleeved into an integrated structure, so that the support structure of the card reader can be made flexible, so that after the card reader is clamped, It can be shaken in a small area. When inserting the IC card, it is easy to insert the card reader. It will not cause friction between the IC card and the card reader due to the inaccurate alignment when inserting, which will cause the IC card to be easily damaged or card off Card reader.
 The clamping four-bar mechanism 27 includes: a buckle 28, a rotating shaft 29, a short link 30 and a long link 31; the buckle 28 is fixedly connected to the upper end of the rotating shaft 29, and the lower end of the rotating shaft 29 is fixedly connected to one end of the short link 30, The other end of the short link 30 is hinged with the long link 31; the card reader 3 can be clamped or released by rotating the buckle 28. Among them, see Figure 5 As shown, pull one of the buckles 28, for example, clockwise and counterclockwise in the following expressions are all viewed from top to bottom; pull the left buckle 28 counterclockwise to drive the left shaft to rotate counterclockwise to drive fixation The connected left short link rotates counterclockwise, that is, with the left short link 30 as the radius, the connection point of the left shaft 29 and the left short link 30 is the center of the circle, driving the left short link 30 and the long link The connecting point of the articulation 31 draws a circle counterclockwise, the long link 31 moves right and inward under the drive of the left short link 30, and drives the right short link 30 to move clockwise, drives the shaft to move clockwise, and drives the right side The buckle 28 moves clockwise, so that the card reader 3 placed in the card holder 24 can be taken out; similarly, turning the left buckle 28 clockwise will make the right buckle 28 rotate counterclockwise to clamp Tight card reader 3.
 The control unit 4 includes: a DC switching power supply, four-way relays, a micro-control unit, and a stepping motor driver; the DC switching power supply is used to power the DC motor 8 and the micro-control unit, and the stepping motor driver is electrically connected to the micro-control unit for Drive stepper motor 6, four relays are used to control DC motor 8 to rotate forward, reverse or stop.
 The device also includes a housing, and the housing is provided with a card insertion slot corresponding to the position where the IC card is inserted. A liquid crystal display is embedded in the shell to display the number of insertion and removal of the IC card.
 The working principle of the device is: turn on the power, the DC motor 8 starts to rotate, drives the driving gear, the driving gear drives the passive gear to rotate, the passive gear drives the rubber roller 12 connected to it, and inserts the IC card 5 from the IC card into the guide slot. The roller 12 and the IC card support shaft 13 are rolled into the IC card 5. The sensor 16 on the IC card baffle 15 senses that the IC card 5 has contacted the IC card baffle 15, and then sends a feedback signal to the micro processing unit, which is controlled by the micro control unit The stepper motor driver, the stepper motor driver drives the stepper motor 6 to work. The stepper motor 6 makes the lead screw rotate forward and reverse according to the cycle. The lead screw nut moves forward and backward along the lead screw when it rotates forward and backward, and drives it when it moves forward and backward. The plug-in unit 2 connected to the bracket 19 of the clamping structure completes the function of moving the IC card back and forth, and the IC card can be inserted or removed from the card reader when it is moved back and forth. The stepper motor repeatedly drives the screw nut to move forward, so that the IC card is inserted into the card reader, and then the stepper motor stops. After the reader completes the reading and writing operation, the stepper motor drives the screw nut to move backward, making the IC card Pull it out from the card reader and repeat it all the time. At this end of the card reader, the card reader 3 needs to be inserted into the card slot 26 in advance. Each time the card reader is inserted, the card reader performs a read operation or a write operation. After normal reading and writing, it sends a signal to the micro-control unit and counts it in the number of times the IC card is inserted and removed. When the card reader cannot read and write correctly, it sends a signal to the micro-control unit, the micro-control unit counts the number of insertions and removals and displays it on the LCD display, and stops the stepper motor, drives the DC motor, drives the gear, and rolls out the IC card. Take out the IC card 5 from the IC card insertion guide slot.
 To sum up, the solution provided by the embodiment of the present invention uses a DC motor to drive the rubber roller to directly roll in and clamp the card, which saves human resources during testing, improves the efficiency of batch testing, and the clamping position is fixed. There will be no artificial changes. It can be aligned with the reader of the test IC card every time, and the support structure for clamping the reader adopts a flexible support, so that the reader can be shaken in a small area, making it easier to insert the IC card Pulling out is closer to the situation of inserting an IC card during human operation, and it is not easy to damage the card reader and the IC card. In the embodiment of the present invention, an easy-to-implement four-bar mechanism is used to clamp the card reader, which makes the operation more convenient.
 Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. In this way, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.