The purpose of a shunt resistor in an ammeter is to enable the measurement of high currents while only passing a small portion of that current through the ammeter itself. An ammeter is an instrument used to measure electric current in a circuit, and it needs to be connected in series with the load (the device or component through which current is flowing) to measure the current passing through it.
However, many ammeters have a limited capacity in terms of the maximum current they can handle. If the current exceeds this limit, it can damage the ammeter or provide inaccurate readings. To overcome this limitation, a shunt resistor is placed in parallel with the ammeter. The shunt resistor has a known low resistance, and its value is chosen such that when high current flows through it, the majority of the current is diverted through the shunt resistor, and only a small fraction of the current flows through the ammeter.
According to Ohm's law (V = I * R), the voltage drop across a resistor is directly proportional to the current passing through it and its resistance. By knowing the resistance of the shunt resistor and measuring the voltage drop across it, the current passing through it can be calculated. Since the current through the shunt resistor is essentially the same as the current flowing through the load, the ammeter can indirectly measure the high current without being subjected to it directly.
In summary, the shunt resistor in an ammeter serves as a current divider, allowing accurate measurement of high currents while protecting the ammeter from potential damage.