jsMath

The cracking card factory

The industrial revolution changed the face of manufacturing, with a sea change from handmade products in small batches to mass-produced items, all made possible by the mechanisation of the production process. Today, production automation is a huge industry which underpins the manufacture of almost all the products we use. The aim of this project is to design and build a machine that produces folded and stamped greetings cards from a stack of plain paper. This requires a paper feeding system, a folding mechanism, a stamping mechanism and some way of ejecting the finished product. The Lego kits have only three motors, so achieving all this requires a clever mechanism, described below, that enable one motor to drive multiple actuators. To start with, though, take a look at this external link: movie of the card factory in action.

The Python code required to run the factory is given external link: here, almost in its entirety: you will just need to tune some constants to match the physical characteristics of your model. Remember, though, that any changes or improvements you make to the model will require corresponding changes to the software.

Some annotated photographs 
card factory overviewThis photograph shows the fully assembled model with annotations for the main components. The sequence of operations is: (1) calibrate the light sensor; (2) feed a sheet of paper until the light sensor is occluded; (3) constrain one half of the paper by lowering the retainer; (4) fold the paper; (5) stamp the folded paper; (6) eject the finished greeting card; and (7) return to the starting position.
output selectorThe card factory uses three motors to drive four actuators. To do this, one motor is dedicated to one action while the remaining two motors work together to produce three actions. This photograph shows the mechanism used to drive one of three possible outputs using just two motors. The design is based on the example given external link: here; a video showing how it operates can be found external link: here. The original design requires an operator to manually select the desired output, but here we automate the process using the second motor. The main drive motor turns gear A which transfers power through idler gear B to the desired output gear (1, 2 or 3). B is mounted on B' (the large black ring), so by driving C (the output select motor) we can physically move B and select different outputs. The original design used 8-tooth gears for the outputs, but here we use 24 (for paper feeding, output 1) and 40 (for folding and stamping, outputs 2 and 3 respectively). The teeth of the 8-tooth gears splay apart due to the small radius, resulting in a very narrow alignment range where the gears will mesh without slipping. Increasing the size of the output gears solves this problem: the consequential gear reduction is also rather convenient. One last point to note is that the original design has four outputs, whereas the card factory variant has only three, which raises the possibility of enhancing the factory in any manner of imaginative ways using a fourth output.
output selector animationThis animation shows the output selector in the three alternative drive positions. Note how the output select motor has been stacked on top of the main drive motor to save space on the base plate.
light sensorThis photograph shows the light sensor, which is used to stop the paper feeding when it reaches the retainer. The Python program starts by taking two light sensor readings, one with the retainer lifted out of the way, another with the light sensor covered by the retainer. A threshold can then be set midway between the two readings, allowing the sensor to distinguish optimally between "no paper" and "paper". By performing this calibration process immediately before the model is run, we gain some robustness to changes in the ambient light level in the room.
paper feederPaper feeding is a difficult engineering problem and a more sophisticated feeder could easily be the sole focus of a standalone project. Anyone who has ever struggled with a printer or photocopier will know that even the most evolved feeder designs are not totally reliable: in particular, they sometimes feed more than one sheet at a time. Commercial paper feeders use a series of rollers and belts, as well as precision slots to restrict the motion of the paper, as seen external link: here. Some systems go further, using an air blower to separate the pages before the top sheet is pulled off by suction. The card factory's relatively simple feeder takes advantage of the fact that the frictional force between the sheets increases down the stack (due to the additional weight). Therefore, if the bottom page is held in place by the wide tyres, the other sheets should adhere to it, allowing only the top sheet to be fed. The inclined slope also helps by ensuring that the paper naturally resists feeding. The feeder wheels rest on the stack of paper under their own weight, pivoting to accommodate different stack heights. The elastic bands add little resistance in the normal operating position, but prevent the wheels from lifting and bouncing.
folding mechanismThis photograph shows the folding mechanism. First, the retainer motor lowers the retainer card, which holds the paper in position and ensures the fold is in the correct place. With the paper thus constrained, the folding arm zeros by pressing touch sensor 1 before turning through a defined angle and folding the paper. Zeroing the arm’s position is important, since the arm tends to move when changing outputs (the idler gear B can knock gear 2 as it passes by) and this leads to an uncertain starting position. Paper is fairly elastic and will tend to unfold unless a very good pinch is achieved, so repeating the folding procedure a few times is a good idea.
stamping mechanismThis photograph shows the stamping mechanism, which also zeros, using touch sensor 2. There is a large gear reduction between the stamp and the drive motor, including a worm gear in the gear chain.
alternative stamping mechanismAn alternative (and perhaps more amusing) mechanism would require the stamp to be coated with ink from a pad, before rotating onto the card. If you decide to attempt this, you might find the mechanism (left) useful. As the arm flips through 180 degrees, the axle also turns through 180 degrees.

Here are some possible extensions that you might like to attempt.

  • Can you improve the paper feeding mechanism?
  • Can you improve the folding mechanism?
  • Implement the 180-degree twist stamping mechanism, as described above.
  • Can you find a way of zeroing the position of the output selector (gear B)?
  • Modify the code to produce cards continuously.
  • Add a fourth action, of your choice, to the output selector.

The cracking card factory was designed and built by Matt Parker in March 2015.