Can I make my own p-trap
Don't know what country you're in but from a physics perspective you could certainly do it. You seem to know the basics about the depth of the weir. The other things you need to consider is to avoid building an S trap. The tail from the P trap needs to come off of it horizontally with a 1/4" per foot slope to the drain and note the max lengths of pipe below. Sounds as if you've got it.