Background: In my time at R.N.C Industries we came to find out there was old machine that had been out of commission for over a year. Apparently the company used to have a full time engineer that designed and built a bag making machine, but ultimately left before it was completed. Although it was operational, with a complete user interface and a successful sealing/cutting mechanism, there was a definite problem bag length consistency. The underlying cause was that despite the fact that all of the movement was controlled through an Arduino, there was never a system put in place to tension the plastic (often called a “dancer”). Placing tension on the plastic during the bag making process is vital to consistent production. As a result, this was assigned as my team’s first task for the summer internship. The specifications by the CEO were as follows:
- The movement of the dancer should change with respect to bag length (a user input)
- The machine should be be capable of cutting 50 bags at once within 1/4” of the target measurement
- Bag length will range from 9” to 72”
- Dancer travel is restricted to 20” (indusry standard for bag length to dancer travel is 2:1)
Above is a video of the machine running in it’s finished state. We were able to solve the plastic tensioning problem by introducing a second Arduino to modulate the feed rate of the plastic with a stepper motor. It uses a rotary encoder to track the position of the dancer along it’s permitted travel, and adjusts the feed rate accordingly. If you’d like to learn more about the build process there are additional details below.
Here’s a graphic showing the pathing for the plastic in the machine. The problem involved the coordination between the plastic roll feeder, dancer (roller 2), and the head feeder (roller 4). As the length of the produced bags increased, so did the necessary feed rate. As a result we chose to introduce a second Arduino that would solely be responsible for the feeding of the plastic. The goal was to modulate the feed rate such that the weight of the dancer tensioned the plastic, but never reached the upper or lower extremes of its travel. We were able to derive a formula for the aforementioned feed rate that was dependent on the sealing time, bag length, and roller diameter, all of which are user inputs.
Through the use of I2C communication between Arduinos, we were able to transmit all of the necessary data from the from the primary Arduino to the one that would control the plastic feeder. This also involved adding to the existing wiring system, introducing a new power supply, and repairing faults from previous attempts at fixing the machine.
The position of the dancer itself was tracked using a rotary encoder feeding information to the Arduino. Although previous attempts to track the dancer used an infrared obstacle sensor as well as an ultrasonic sensor, both were forgone as they lacked consistency. It was found that they were frequently influenced by environmental factors such as background noise, lighting, and even the reflectivity of the plastic itself. Not only was the feedback from the encoder the most precise, it was also unaffected by any surrounding activity.
Once the plastic tensioning system was put into place, the accuracy of the bags improved tremendously. Variations in bag length went from over 1.5” to well under 1/4”. Considering that prior to this all bags were measured, cut, and sealed by hand, the automation of this process allowed for bags to be produced at 3x the previous rate. Overall the machine was found to be a success, and it has been in use since May 2021.