I have a problem in understanding of gears (spur gears). I designed some spur gears but I don't understand how the modulus works. I saw that this modulus is some standard thing and it's calculated by diametral pitch. Do I need to make this diametral pitch from standards, or could I make whatever I want? How does this work?
Whenever you choose to design standard gears, you typically have two main parameters: the number of teeth $N$ and the module, or modulus $m$. The module can generally be interpreted as the distance between the gear teeth. In fact, the module is defined as the circular pitch $p$ (the circumferential distance between the same point on two neighbouring teeth) divided by pi.
The reason the parameter 'module' is popular is because it allows you to work with rational numbers. You can calculate the gear's pitch diameter from the circular pitch $d=Np/\pi$, but this means either the pitch diameter or the circular pitch is an irrational number. It is not useful or practical to have either a standard set of values for gears (circular pitch) or the distance between gear shafts (from pitch diameters) be based on irrational numbers.
So instead, the module is preferred, and used in sets of standardised values (i.e. you are more likely find off the shelf gears of module like 4mm or 5mm than something like 4.123mm). You can calculate pitch diameter from the module via $d = Nm$ and all the variables can be rational numbers. For example, a gear of 16 teeth and module of 2.5mm turns out to have a pitch diameter of 40mm. All nice round numbers, easy to work with without having to bring out a calculator too often.
Because module can be interpreted as the distance between gear teeth, it is also important to note that only gears with the same module can mesh together. Also, in general, gears with a large module can withstand higher bending stresses at the root of teeth.