DIY Current Sensor - 2.0 : 14 Steps (with Pictures) - autreysenessobling
Introduction: DIY Current Sensor - 2.0
Hi there! I hope you totally are fine and in cracking health. This instructable is about qualification your personal current sensor that is compatible with Arduino and most other widely popular microcontrollers. This design features a compact design and an all SMD component based circuit, making this sensing element module identical thickset for information technology's rove.
This rife sensor can easily be used for measuring currents up to 15 Amps staunch and stern even up cover about 20 Amps peak. I had previously built a shunt electric current measurement module victimisation a family made electrical shunt just IT had a few limitations- The wire was quite long which May not be appropriate for small devices. It besides got rusted finished time and one major drawback was heating at higher currents even at 10 amperes. Well, this mental faculty 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 equivalent for you also!
Let's get started :)
As with previous tutorials, the detailed videos is attached here:
https://youtu.follow/FzYkN5Y9bjc
Step 1: Gather Your Components
This build is a pretty simple build and does not require a mint of components. How ever a few requirement things are required to make the PCB since it is a SMD based circuit.
Here are all the components you will need:
- LM358 general purpose dual OP-Amp IC (SMD version)
- 2.2 KiloOhm resistor (222- SMD cypher)
- 100 KiloOhm resistor (104-SMD code)
- 1uF SMD capacitor - 2
- 100nF operating room 0.1uF SMD capacitor - 1
- 5 MilliOhms shunt resistor (R005 SMD cypher)
- Screw period of time - 1
- 3 peg male header - 1
- Multimeter
- Small piece of copper clad circuit board
- Ferric Chloride solution for engraving
- Hand practice or a miniskirt practice with bits of 1.2mm and 0.8 millimeter diam
- A black and white out of your electric circuit on a glossy paper for toner transfer(I'll discuss this in detail in forthcoming step)
- Pliers, tweezers and other accessories
- Small plastic container for playacting the etching process
- Fine steer soldering iron
- Good character solder and flux
- A fleck of solitaire to solder SMD components!
Step 2: The Bypass Resistor
The chief component and probably the nigh determining one in this build is the shunt resistance. Information technology is by this resistor that we evaluate a small voltage drop and past hyperbolize to mensurable limits for the arduino or any other microcontroller. It is big that the value of this resistor is small enough As to non create a significant electromotive force come by the load electric circuit in which we are trying to cadence modern. Minuscule impedance in the range of milliohm also ensures that the total power dissipated is very small and thus the resistance itself does not hot up. The electromotive force drop is quite teeny-weeny for a microcontroller to directly assess it, so we are using the OPAmp As an amplifier.
The electrical shunt used in my circuit has the label -R005 which means it has a resistance of 5 MilliOhms- double-dyed for our use!
I got this unstylish of an old laptop computer battery pack but you can easy get information technology online or from local electronics store.
Step 3: A bit Bit of Theory
The main construct of shunt based underway measurement system to produce a same small voltage drop across the shunt resistor and then to hyperbolize if using suitable amplification techniques whose output can then be measured by a microcontroller or some other data acquisition system.
Considering that the ohmic resistanc of the shunt remains fairly constant, it is safe to articulate that the voltage drop is directly proportional to the current through the cargo using the Ohm's Law of nature concept (V= I * R).
This small voltage drop is then amplified by an Op-Amp designed as a non-inverting amplifier. As you can see from the figure that the gain is determined away two resistors Rf and Rin.
In my application Rf= 100K and Rin= 2.2K so we have a reach of approximately 46, as per the normal.
Note that taboo shunt resistor lies between the load and the round connection and the empiricist philosophy supply is directly joined to the load. This topology is called low face mensuration. This has a in effect advantage of having the ground common to both the load and the measuring circuit soh the soft potential difference drop across the shunt is directly measured with respect to ground.
Step 4: Designing the Circuit
With the theory in mind, it was now time to design a suitable schematic and so create a PCB layout for the same.
I have used the Easy EDA online software for scheming this cordiform circuit and then exported the PDF of the layout which I testament have to black and white for the toner transfer method acting.
I have attached the PF for your reference just in case you need to use the same.
Step 5: Cutting the Copper Display panel to Conformation
After completing the schematic and layout design, I exported the layout and printed it to exfoliation such that the print size matches the actual PCB size every bit intended. This print was then my book of fact to cut out a small piece of copper board according to size. I marked the boundaries using permanent marker then cut the copper instrument panel using a dremel tool around. You can also use a hacksaw.
Whole tone 6: Sanding Off the Oxide Layer
Copper when left exposed to air for a weeklong time tends to form a oxide layer which can effect the whole conduction. it is important that this oxide layer is removed using a very fie sand paper of a scrubbing brush.
Gently usage the sand paper to remove the oxide layer. Get to confident to do it gently because applying too much pressure will cause the actual copper layer to consume which is not what we wish.
At the end we will have a shiny copper clad board as shown ready for toner transfer.
Step 7: Toner Transfer
For the toner remove method, we actually need to mirror the PCB layout then impress the mirrored layout in a glossy paper. In the 1st epitome you can see the actual PCB layout and the corresponding mirrored version that we will use to flip and sooner or later transfer the toner ink onto the copper surface so that we again induce out original layout on the board.
Keep the glossy paper faced Down onto the pig board and using a iron apply constant heat and pressure so that all the toner ink gets transferred to the cop.
After that sink the board in water and after 10 transactions slowly Peel off the paper leaving rear exclusively the ink connected copper. Brawl this very mildly without victimization any pointed object.
Step 8: Engraving the Board
Now with the toner set on the board, it is metre to polish of the unwanted copper off the board. For this I will be using the popular ferric chloride solution.
I used a small container and poured a little amount of the solution so immersed the board into the solution and unbroken IT in there for 10 minutes with episodic stirring to speed up the procedure. You rump see that the unwanted copper is etched out in the last image.
Step 9: Cleaning the Board
After etching swear out, te ink necessarily to be removed from the atomic number 29 layout for which I wealthy person used some acetone and using some cotton gently removed the ink, exposing the bull layout.
Step 10: Drilling Holes for THT Components
I stimulate used a hand over drill with a bit size of 0.8mm for the male cope pins and 1.2 millimeter for the bang terminal.
Step 11: Soldering the Components
With our PCB now in the end complete, let's move onto the soldering swear out. As you can see that I ingest placed all the components in their respective places for soldering.
Unfortunately I do not have a flaming air station so I will have to do the soldering exploitation an cast-iron. This process is a bit tricky and required longanimity. The main thing here is to have a fine tap soldering iron thus As to allow good contact with SMD pins but not have to much solder on the tip soh as to short two pins together, basically, finer the tip off the better results you'll suffer.
Step 12: And Done!
After about 15 minutes, the soldering process was absolute for the SMD components. All that is left is to solder the Screw terminal and the header for which there are two possible orientations. one is to solder on the copper side where as the some other alternative is to ass those components to the past side. This is more clear through images attached in this step. I went ahead and soldered them on the copper side itself. this requires some attainment but keeps the overall form constituent nice.
Step 13: Coding and Calibration
With our hardware potion complete it is now time for coding the microcontroller and calibrating the sensor values to give accurate readings.
To keep things simple I have used the Arduino Nano which I have programmed in the Arduino IDE itself to keep on things simple. You crapper well larboard this code to your favourite microcontroller environment.
Okay the main code hind end be broken downwards into the following stairs:
- Initialise the libraries for the OLED display(I feature used the Adafruit library for this)
- Configure analog pin 0 as stimulation
- Record the analog value from the output of the OP-Ampere at analog fall 0
- Multiply the parallel evaluate with the calibration factor to get the correct current reading in Amps(or milliamps)
- Display the apprais in the Organic light-emitting diode display
Now A we experience that the OP-Amp Acts atomic number 3 a non inverting amplifier in our electric circuit and produces a voltage that is proportional to the emf drop across the shunt. This emf is and so deliberate using the Arduino's ADC which gives out a number betwixt 0 and 1023 (10 bit resolution of the ADC in arduino). Well this figure is certainly non equal to the current current value so some mathematical manipulation must be done in software to get the right value. This is where a Multimeter comes to play. About multimeters can accurately measure current upto 10 Amps so this can be used as a reference to determine our calibration factor.
The trick is to use a small payload along with a power ply with a miltimeter and our ongoing shunt in series with the shipment.
So Here the multimeter can measure the factual current consumed by the load and from our current electrical shunt mental faculty, we can get the corresponding linear value via arduino.
The calibration factor can this be premeditated as:
Calibration ingredien = (reading in multimeter / analogRead value of Arduino )
We can atomic number 75 write this arsenic:
current interpretation = analogRead value * standardization factor and this is exactly what I have done in my code!
Check this line:
plasterer's float val=analogRead(A0);
float amp=val*0.015426; // this is the standardisation factor
I Bob Hope this makes sentience.
Ill-use 14: Breadboard Testing-Measuring Phone Charging Current
With the ironware and software setup all completed, the final thing leftover is to test dead the functionality and the accuracy of the current detector module. For this I have utilised a 12 volt battery pack and a 5 volt buck converter faculty to charge my mobile phone and eventually measure the charging current with some- a multimeter and our current sensor to compare the values. The OLED screen displays the analogRead value too s the actual current consumed past the loading.A you can see in the final image that the values match up with that of a multimeter.
This project was a success!
I hope you guys wish this project. Feel free to take the PCB layout and the code and use it for yourself. If you have any suggestions operating theatre doubts you can post in in the comment below and I will be prosperous to respond :)
Do watch the entire instructor video then that you get a overmuch better understanding of the entire project and while you are there, consider subscribing to my Youtube channel likewise :)
Till so see you in the close instructable!
Constitute the First to Share
Recommendations
-
Anything Goes Contest 2022
Source: https://www.instructables.com/DIY-Current-Sensor-20/
Posted by: autreysenessobling.blogspot.com

0 Response to "DIY Current Sensor - 2.0 : 14 Steps (with Pictures) - autreysenessobling"
Post a Comment