There is an optimal pinhole diameter for any given format and focal length. Use this caclulator: http://www.mrpinhole.com/calcpinh.php

The difficult part is creating the pinhole itself.