Hi, welcome to nor doing a tutorial from Robojax. my name is Ahmad Shamshiri. In
this tutorial I am going to show you how we can display the current we measured
from the shunt resistor up to 500 ampere using Arduino and this 4 digits LED
display with TM1637. you can get the code for this by clicking at the link below
the video in the description which will take you to
www.robojax.com/learn/arduino let's get started with this.
you
in continuing with my other videos to measure the current with shunt
resistor with Arduino, this is just to display the current that is
measured with this on the led 7-segment display with TM1637 chip.
I'm not going to explain all those detail you have to watch the
introduction video for the shunt resistor if you want to know how it
works and also I have another video explaining this TM1637 4 digit
display either this module or this. you have to watch that install the library make
sure you are able to display something on the screen some number after that
come to this because for this it will be very long to explain fully this one and
this and because I have separate videos if you do not install the library it
will not work. and because the sensitivity of this shunt resistor when
using it with arduino is low the decimal point doesn't have any meaning anyways
for that reason when you're using it the death the decimal point is discarded and
we are getting a whole number. and here is a chart that it shows you for 50A
100A, 200A, 300A and 500A ampere shunt. if your Arduino is
set with 10 bits and these are the errors that you are getting so make sure
that any value below this will have no meaning and this this is the minimum
value that you can measure with those shunt resistors.
you
because when we when we measure the voltage the maximum voltage is 75
millivolts and the 75 millivolts is representing 100 amp ere especially if
you have 200 or 4 or 500 ampere the sensitivity will be reduced now because
with this 100 amperes 75 millivolt is 100 ampere and if you reduce it the
the minimum that this can measure is around 4.88mV
millivolts at the input for this value now this four point eight eight
millivolts is representing 6.7% of current which means anything below
six hundred seven percent will not be displayed so that this is now in 100
amperes. six point seven percent will be displayed like zero and this one has
zero point five percent error and that means zero point 5 ampere is only in
this one plus the six point five percent that we have from the reading for that
reason do not use this for less than 10 ampere and if you are using 200 ampere
or 4 or 500 ampere the error will be greater.
Wiring Explained
now let me explain the wiring . I'm using electronic load as my load where the
power is connected to my electronic load this is the electronic load Rigol DL 30 31 and
these are the two terminal that from the circuit will be connected in here
and we will see the voltage here and the current. I'll be connecting at connecting
it like this my load is here I will put this in series between the negative
terminal and the load if you want you can also do it this way I'm doing it
this way. as you saw the Seska this has been connected to electronic load this
is coming from negative of power supply coming and passing from here and
this goes to the negative terminal of my electronic load. from these two points have
taken these two wires the side that is connected to the negative terminal of
power supply is my negative and this side is automatically positive. here that
black wire is connected to this point to ground and the red from this side this
is a positive this has been connected to A0. for this module the this pin 5
volt is connected to 5 volts ground is connected using this gray wire to the
ground and then we have data and out white has
been connected to pin 6 and then clock CLK of being connected to pin 5 and if
you have this one this is exactly the same. VCC
the VCC is connected to 5 volts this will be connected to ground and then
Clark is to pin 5, DIO will be to pin 6. to this module ground is
connected to ground , VCC will be connected to 5 volts and then we have
DIO and then CLK will be to pin 5, DIO will be connected to pin 6 exact
same order. if you need a wiring diagram for
it is available as part of my Arduino course at udemy. if you want to learn
Arduino I have a best seller course on udemy where you can learn Arduino
from ground up with hundreds of projects all course material library codes wiring
diagram everything available in one place. the link for module new courses
below this video in the description
Code Explained
You should have installed the TMR 1637 library but here quickly I will provide
you the link with a zip file download the library after that save it in your
computer and after that click on Sketch-> include library->add dot zip
library and then pointed to where we have saved it for example if this was
inside this folder select that zip that you have downloaded the library and
click open it will be included. and then the schedule work fine. let me now
explain the code we are defining the inPin from the shunt resistor where we
read the voltage A0 and then this is a shunt current either whatever
value you have fifty hundred two hundred three or four hundred you just enter
that value as you can see this is the hundred twenty four amperes 25
millivolts and this is a 50 amp ere so enter the proper values 25 is 25
millivolts do not change it and then this correction factor is just for the
calculation purpose do not change it. miniMumCurrent is the amount of
current that the system will ignore because with this you cannot measure
those values so anything above 10 will be suitable otherwise you will not get a
proper reading this is for the display TM1637 we are defining
pin five for the clock and pin six for the DIO. and to use it this is how
we use inside the loop we use this display.showNumberDec and
here getCurrent this is the value of the current false means no zeros before
the digit now again here now we don't have any zeros before the actual number
or value and then four digits because we have three I just put it for the maximum
color will be like five hundred will be three digits no decimal points and then
zero means start from this side from here if you plan it will start from here
this way and if you need for explanation of the
it is available as part of my renewal course at udemy.com.
Demonstration
let me now demonstrated I've connected this larger display the small is exactly
the same currently the current shows to be zero this is my load electronic load
and here is what we are reading the I've connected the 100 ampere shunt. let me
put 20 ampere and turn it on. as you can see this is 20 and we are an average
that's how we read it. because this is now this car thing that the similar
point so let's go with 30 I've just changed it to 30A
and let's go to 35A I changed it to 35
I'm going now 40A. now this is the current that we are reading and if I
remove that it goes zero. so we are reading 40 amperes let's go 50A and the
current is 50 and we are reading this value here this was 60A. now I have
changed it to 60 ampere and we are reading 60 if I go 10 ampere because we
are discarding the decimal point point this is what we are reading let's go to
5 amp see if we can read it so it goes between 0 and 5 because less than 10 is
not recommended.
and now let me disconnect this and now I have connected this smaller display
let's go 20A I changed it now 50A just change it to 50
as you can see it is displaying exactly the same as the other one so now I
change it to 60A
let's go to 12A
25A
Subtitle typed and corrected on may 22, 2020 by Ahmad Shamshiri in Ajax, Ontario, Canada.
I did my part to help you learn.
You can simply subscribe and thumb up 👍 the video. That is the best thank you.
I would like to thank my Patrons from Patreon.com
you
if you want to donate money, the link to my PayPal is below this video.
thank you for watching this was how to use the shunt resistor and measure the
current and displayed on the LED seven segment display with TM`1637 chip. if
you learn something and found this useful please thumb up 👍 as this will help
my video in the search algorithm of YouTube. if you have comment or question please
post it in the comment section below I try to answer and reply. if you want to
get updates of my upcoming videos make sure to subscribe.
Extra Clips
and now let me demonstrate it I've connected this display it works exactly
the same with this currently the current is zero
if you want to learn arduino i have a best seller course on udemy where you
can learn our dinner from ground up with hundreds of projects all course material
library codes wiring diagram everything available in one place the liang former
do a new courses below this video in the description