This simple Stirling engine was built from materials that are available in most school science labs and can be used to demonstrate a simple heat engine.
Pressure volume diagram for the cycle
Process 1→2 Expansion of working gas on hot end of test tube, heat is transferred into gas and gas expands thus increasing volume and pushing syringe piston upwards.
Process 2→3 As marbles move to the hot end of the test tube gas is displaced from the hot end of the test tube to the cold end, as gas moves it gives up heat into the test tube wall.
Process 3→4 Heat is removed from the working gas and volume decreases, the syringe piston moves downwards.
Process 4→1 Completes the cycle working gas moves from the cold end of the test tube to the hot end, as the marbles displace it, acquiring heat from the test tube wall as it moves thus increasing the gas pressure.
Above is a short video clip of a simple test tube stirling engine using glass marbles as the displacer and a glass syringe as the power piston.