Sunday, July 29, 2012

Rotary Encoder for the Quality Inspection Machines

In my current job, we use several inspection machines that utilize some old fashioned but certainly accurate mechanical counters.  The operators, load the machines with jumbo rolls of finished fabric and inpect them meter by meter, by unrolling the roll and creating several smaller ones.
After finishing inspection, they type the meters for each roll inspected in a small self adhesive label and stick it on the fabric and also write down the number of deffects that were found on each roll. Although this procedure is not very time consuming, it happend many times, to write down the wrong data on the label. The result led to dissapointed customers that received the wrong amount of meters or deffects. Some years ago, I decided to write down my own code to automate this procedure. I actually rewrote from scratch some routines of a ready made software writen for a similar application and altered its code in order to automaticaly capture the meters of each roll and classify it according to the number the deffects that the operator found. For each deffect found, the operator had just to press an approriate deffect button and the rest of the job was done by the software.
The actual problem was the way to capture the data of the mechanical counter and automatically do the calculations for classifying the fabric. The solution was to create a small data aquisition system, that counted the pulses generated from a rotary encoder (instead of a mechanical one), translate them into linear meters and send them through RS232 to a PC. Although I used a ready made solution at that time, later I tried to make a small aquisition system of my own and install it into other machinery.
I used a 16F628A microcontroller and a small HD44780 LCD screen to print the data. Although this is something I made a couple of years ago, a friend of mine found it really interesting and I decided to demonstrate it here.