A program written in the C programming language on a PC using the C compiler provided with the PIC18F4520 development kit is used to communicate with different components of the control system to perform the singulation process. The program was downloaded to the microcontroller using the ICD unit provided with the kit for programming and debugging.
Once the microcontroller is programmed, it operates in a stand-alone mode, commencing and finishing the singulation process continuously for a given number of napkins. The actuators are run by their driver controllers upon receiving pulses or high/low voltage signals sent to them form the microcontroller by the program.
The infrared sensor switches offer a non-contact method of providing position feedback of different moving objects in the singulation system to the microcontroller. The top infrared sensor switch provides position feedback of the left crank during carriage slider-crank operation, and the remaining three sensor switches provide position feedback of the carriage during carriage travel, which are used by the program in the microcontroller for decision making.
The napkin removing and napkin engaging linear actuators have been mounted on the device in a way such that they are expanded or retracted completely during singulation process, such that their position feedback capabilities have not been used by the program.
This has reduced the complexity of the code and also has resulted in saved memory and execution time. To better illustrate how the program executes, a flowchart for the entire singulation algorithm is given in Figure 1.