Uniflow Steam Engine
The Uniflow Steam Engine (also know as unaflow) is a very simple kind of steam engine that eliminates counter-flow cycle problems.
A double action uniflow steam engine:
Steam enters one end of a cylinder driving the piston forward. Near the end of it's cycle, an exit hole is uncovered and low pressure (LP) steam escapes. The first valve closes and the second one opens. The piston slides back and forth in it's cylinder. The double action engine is likely to be more efficient, since it doesn't rely on the momentum of the system to return the piston to the next firing position. However, it is bit more complicated (two valves to control, etc.).
The single action uniflow engine is even simpler:
Here, steam enters at one end only and relies on the momentum of the whole system (which could include a flywheel) to bring the piston back to the point where new HP steam is introduced. An encoder on the connector rod could inform a controller (Arduine) as to it's current position.
 Design Challenges
There was discussion in 2009 about creating such a Uniflow Engine out of high pressure steel steam pipe. This greatly simplifies the fabrication of a cylinder, since no boring is needed. Two end caps could be fastened either by threading or by welding. Seals are the major design challenge in this approach. The piston needs a good seal against the cylinder walls, presumably using steam engine piston rings. The connecting rod from the piston to the crankshaft also needs a good seal. Tight tolerances on the rod and hole in the end cap may suffice, but high pressure steam will seek any exit point.
The interior of the cylinder needs to be kept lubricated. Water is corrosive to steel and will eventually compromise the interior of the cylinder. It may be better to have removable end caps either threaded (as mentioned above or bolted on. This would allow the cylinder to be disassembled for cleaning and lubrication.
High pressure steam needs to be properly sequenced to dive the piston in the cylinder. This is usually done with values (poppet values being common). Computer controlled solenoids offer some advantages by being able to fine tune the dynamic operation of the engine.