Current. Too little of it, and you can’t get where you’re going, too much and your hardware’s on fire. In many projects, it’s desirable to know just how much current is being drawn, and even more desirable to limit it to avoid catastrophic destruction. The humble current shunt is an excellent way to do just that.

Ohm’s Law.

To understand current, it’s important to understand Ohm’s Law, which defines the relationship between current, voltage, and resistance. If we know two out of the three, we can calculate the unknown. This is the underlying principle behind the current shunt. A current flows through a resistor, and the voltage drop across the resistor is measured. If the resistance also is known, the current can be calculated with the equation I=V/R.
This simple fact can be used to great effect. As an example, consider a microcontroller used to control a DC motor with a transistor controlled by a PWM output. A known resistance is placed inline with the motor and, the voltage drop across it measured with the onboard analog-to-digital converter. With a few lines of code, it’s simple for the microcontroller to calculate the current flowing to the motor. Armed with this knowledge, code can be crafted to limit the motor current draw for such purposes as avoiding overheating the motor, or to protect the drive transistors from failure.

In fact, such strategies can be used in a wide variety of applications. In microcontroller projects you can measure as many currents as you have spare ADC channels and time. Whether you’re driving high power LEDs or trying to build protection into a power supply, current shunts are key to doing this.

With the theoretical side of things covered, it’s here that we veer towards the practical. If you’re new to electronics, when you hear “resistor”, you’re probably thinking of a little 1/4 watt beige device with some colourful bands indicating the value. However resistors come in all shapes and sizes. In fact, everything except superconducting materials have resistance – even just bare wire! So when you’re choosing a resistor to use as a current shunt, where should you start? The first thing to remember is that power loss is relative to resistance.

The power lost in the resistor is equal to the current squared, multiplied by the resistance. P = IV = I^2R = V^2/R. A high resistance will limit the current that can pass through the circuit, and also waste power as heat. For these reasons, the current shunt resistance should be as low as possible.

What this means in practical terms is that in some cases, a link of wire is chosen to act as the shunt. This is prevalent in many applications, such as motor controllers you might find on an electric skateboard or e-bike. As long as the resistance of the wire link is known, it can be used to calculate the current passing through it.

The shunt is generally used to protect the speed controller from a load drawing too much current, or to limit the speed of the attached motor. If you want to play fast and loose with such a controller and are thirsty for more speed, there’s a simple trick. By cutting the connection from the shunt to the controller’s sense line, and instead tying the sense line to ground, it will appear as if no current is flowing since no voltage drop is measured. The speed controller will respond by giving all the power it can, which usually ends in flames as the transistors in the controller fail under excessive load.

Other times, a very accurate current shunt may be desired during the bench testing of equipment. In this case, a precision current shunt may be used with a voltmeter to determine the current passing through the circuit. Typical shunts are generally rated to have a voltage drop of 50 mV at their rated current. Armed with a suitably sensitive voltmeter, it’s possible to measure large currents relatively safely – something not achievable with the average multimeter.

These are just a handful of ways current shunts can be used. Fundamentally, proper current measurement can make a wide variety of projects safer, more robust, and more reliable. The key is applying the basic principle of the current shunt with the correct hardware for your application, which will ensure that any measurements taken are reliable and safe.