This hinge is based on a piano hinge
It can be printed flat
The hinge has a 2mm bore and I use 1.75 filament as a pin, this is cut long and melted at each end so it stays in place.