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 movie of the card factory in action.
The Python code required to run the factory is given 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 | |
---|---|
![]() | This 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. |
![]() | The 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 ![]() ![]() |
![]() | This 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. |
![]() | This 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 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 ![]() |
![]() | This 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. |
![]() | This 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. |
![]() | An 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.
The cracking card factory was designed and built by Matt Parker in March 2015.