This is a small design for a sand generator. In the schematic I put it in a protective glass because of flooding liquids. You can break the glass if you want, it will work just the same. Without the protective glass, it fits in a 3*4*3 area
If you understand how it works, feel free to mess around with it, i'm almost certain a 3*3*3 sand generator is possible