Also, here's a clever electronic circuit that could be used to move the displacer at the correct time.
Explanation:
the switches are momentary, normally open switches. They will be 'connected' when the power piston reaches the end of its travel (or as close to it as you put them). The lefthand circle is a motor, and the righthand one is a (fly)wheel attached to a dynamo of some kind, to convert the up/down into rotation and into electricity. This could also be a linear generator instead of a flywheel/dynamo, but those are slightly more tricky to use, and less flexible (eg can't add gears to change speed)
The motor and dynamo are both DC, and the capacitor should be sized so it has JUST enough power to move the displacer motor/piston.
The 'M' in the circuit diagram is the lefthand motor, attached to the displacer piston.
OK, assume the engine in the drawing has the heat-source at bottom.
When the power piston reaches the top, it will close switch-a, which will cause the capacitor to charge, and that charge will have to go through the motor, so it will turn and move the displacer. Once the capacitor is full, it will no longer pass current, the motor will stop, and the displacer will be at the bottom.
Now that the displacer is 'blocking' the hot side, the power piston will start to move as the working gas cools. it will release switch-a, and travel downwards. Once switch-a is released, there are no viable paths for the electricity to flow down, so the capacitor will keep its charge.
When the power piston reaches the bottom, it will close switch-b. Now the fully charged capacitor will discharge in the opposite direction, and again it has to go via the motor, but it will turn in the reverse direction from before (since the current is reversed) and will move the displacer back to where we started. When the capacitor is fully-discharged, the motor will stop and we'll be back at the starting position, ready for the gas to expand.
The + and - are assumed to be the capacitor/battery that your generator is charging.
Some efficiency notes:
DC motors probably aren't very efficient, so this may not be worth the trouble vs a normal flywheel design, or some of the geared designs mentioned above.. This is because we are converting motion to electricity, then electricity back to motion. we'll lose efficiency both ways.
Also, you will need to use diodes to keep the generator motor from spinning backwards if the power-piston stops, and that eats up a bit of voltage. This means that this may not work on a small scale, and to test it, it's probably best to use a battery as the power-source, and just forgo the generator on the power piston. Gearing may also be required to get the motor turning fast enough to generate the amount of voltage you need.
Hope this is useful or at least interesting.. it's a very elegant circuit at the very least :)
-tmk