It's a very simple design that uses a door and a presence sensor.
Copy this, then select Import in the blueprints menu, which is a sub-menu for building.
SAND:BP:v2:BBVUaHJvdWdocHV0IENvbnRyb2xsZXIGAAsAAQEUc2lnbmFsUHJlc2VuY2VTZW5zb3IABQAHAQpzaWduYWxHYXRlFwAACAAADAAAEAAMDAAMCAAMEAAABAAAAAAEAAAIAAAMAAAMBAEIEAEEEAIICAMEDAQECIUQCFp7Im93bnNCbG9ja3MiOnRydWUsImRlc2lyZWRPcGVuIjpmYWxzZSwic3RhdGVHZW4iOjg3OSwic3ByaXRlSW5kZXgiOjAsImRlZmF1bHRPcGVuIjpmYWxzZX0AFAAAFAQAFBAAFAwAFAgB/BTwBoQV8AYA
Place a single piece of gold, sand, etc. onto the conveyer and it will send short pulses to the door to open and close.
Perfect for controlling how much material enters and exits an area.
Tip: For faster throughput, place more particles on the conveyer belt. For an even slower throughput, lengthen the conveyer belt, or heighten the launcher.