DIY Current Sensor - 2.0
Introduction: DIY Current Sensor - 2.0
Hello there! I hope you all are fine and in good health. This instructable is about making your own current sensor that is compatible with Arduino and most other widely popular microcontrollers. This project features a compact design and an all SMD component based circuit, making this sensor module very compact for it's range.
This current sensor can easily be used for measuring currents up to 15 Amps constant and can even handle about 20 Amps peak. I had previously built a shunt current measurement module using a home made shunt but it had a few limitations- The wire was quite long which may not be suitable for small devices. It also got rusted over time and one major drawback was heating at higher currents even at 10 amperes. Well, this module solves almost all of these problems in a more efficient design.
This was a great learning project for me and I hope it will be same for you as well!
Let's get started :)
As with previous tutorials, the detailed videos is attached here:
https://youtu.be/FzYkN5Y9bjc
Step 1: Gather Your Components
This build is a pretty simple build and does not require a whole lot of components. How ever a few essential things are required to make the PCB since it is a SMD based circuit.
Here are all the components you will need:
1. LM358 general purpose dual OP-Amp IC (SMD version)
2. 2.2 KiloOhm resistor (222- SMD code)
3. 100 KiloOhm resistor (104-SMD code)
4. 1uF SMD capacitor - 2
5. 100nF or 0.1uF SMD capacitor - 1
6. 5 MilliOhms shunt resistor (R005 SMD code)
7. Screw terminal - 1
8. 3 pin male header - 1
9. Multimeter
10. 982
Small piece of copper clad board
11. Ferric Chloride solution for etching
12. Hand drill or a mini drill with bits of 1.2mm and 0.8 mm diameter
13. A print out of your circuit on a glossy paper for toner transfer(I'll discuss this in detail in upcoming step)
14. Pliers, tweezers and other accessories
15. Small plastic container for performing the etching process
16. Fine tip soldering iron
17. Good quality solder and flux
18. A bit of patience to solder SMD components!
Step 2: The Shunt Resistor
The main component and probably the most crucial one in this build is the shunt resistor. It is by this resistor that we measure a small voltage drop and then amplify to measurable limits for the arduino or any other microcontroller. It is important that the value of this resistor is small enough as to not create a significant voltage drop in the load circuit in which we are trying to measure current. Small resistance in the range of milliohm also ensures that the total power dissipated is very small and thus the resistor itself does not heat up. The voltage drop is quite small for a microcontroller to directly measure it, so we are using the OPAmp as an amplifier.
The shunt used in my circuit has the label -R005 which means it has a resistance of 5 MilliOhms- perfect for our use!
I got this out of an old laptop battery pack but you can easily get it online or from local electronics store.
Step 3: A Little Bit of Theory
The main concept of shunt based current measurement system to create a very small voltage drop across the shunt resistor and then to amplify if using suitable amplification techniques whose output can then be measured by a microcontroller or some other data acquisition system.
Considering that the resistance of the shunt remains fairly constant, it is safe to say that the voltage drop is directly proportional to the current through the load using the Ohm's Law concept (V= I * R).
This small voltage drop is then amplified by an Op-Amp configured as a non-inverting amplifier. As you can see from the figure that the gain is determined by two resistors Rf and Rin.
In my application Rf= 100K and Rin= 2.2K so we have a gain of approximately 46, as per the formula.
Note that out shunt resistor lies between the load and the round connection and the positive supply is directly connected to the load. This topology is called low side measurement. This has a good advantage of having the ground common to both the load and the measuring circuit so the small voltage drop across the shunt is directly measured with respect to ground. 552