hi welcome to an Arduino step-by-step course by Robojax
and I’m going to show you to get multiple five volts using breadboard from Arduino in
Arduino uno if you get this type of boards this is a five volts pin we have only one
and if you have this type of boards that you get from eBay or AliExpress as you can see
this has five volts and it has one more five volts here so we got two five volts
but this pin header here that you see ICSP and also and this one this is called in
circuit system programming and it has these pens and this is used for spi communication
spi stands for serial peripheral interface where you can do programming or data
communication between devices this pin on the right side is vcc the middle pin is
for communication and the last pin is ground so we have two pens here
and in this case this is vcc that is five volts exactly the same pin as this five
volts and the last one is the ground so we have extra five volts extra ground here
so this is five volts and this is ground but still this is five volts and you have second five volts
and if you need third or fourth five volts then we can define this digital pens as
extra five volts and the amount of current that you get from five volts it depends on your usb if
you power it from usb then the amount of current is limited by the usb that you are connecting
for example this port that you connect for your computer from charger from wherever you have
whatever is that that will limit amount of current if it is one ampere you can get one ampere if
2.4 ampere or 2.2 ampere you will get that but if you are powering it up let's say from 7 to 12
or 13 volts then the voltage comes here goes to this regulator which is ams1117 this chip
and this has 1.1 ampere 1110 100 milliampere and here current limit for all these chip
for these voltages 1.5 2.8 and they have different voltage but the one that is used is
five and here the amount of current typical is 1100 so minimum is
900 typical is 1100 the maximum it can go up to 1.5 but it needs heatsink and more and it needs
cooling but so keep in mind that that's the maximum that you can get uh from five volts
from this pin or from this pin all of these two are exactly the same connected to this chip
and also connected to the usb 5 volts but if you get from this digital pens which I’m going to
show you how to use them as 5 volts or if you use them as ground in both cases amount of current is
20 milliampere per pin and here Arduino official store it says in out pin 20 milliampere so you
cannot draw more than 20 milliampere and if you get some current from 3.3 volts pin that is
50 milliampere here is the situation that you want to control a servo and in the same time
you have a display this display needs five volts and the servo needs five volts
or maybe you have ultrasonic sensor and the servo these both need five volts or maybe the display
in any case if you need extra five volts I’m gonna show you how you can have extra five volts
and Arduino keep that in mind when you use Arduino’s digital pin as a vcc or extra five
volts the maximum current that I can supply according to Arduino website is 20 milliampere
this is Arduino official website and it shows that dc current per in out each can supply 20 milliamps
if you found this tutorial helpful please thumb up and also click on the
subscribe on the right side in the lower corner I really appreciate it
let me explain the code first we define a new constant let's name it vcc2
and we will assign a pin to it for example right now we want to have pin 5 as a vcc so just
we put our 5 and remember there is no semicolon after defined and then we define another graph
you might not need this line because there is more than one ground but in case if you need a ground
let's put that one as well and then we go inside the setup using the pin mode vcc2 this is as if I
type 5 here and we set pi pin 5 as an output then we use digital write and set the same pin high
when we set this high this pin will have five volts and then we do exactly the same thing but
this time we use this new uh variable this means if I type two so we set pin two as an
output and then to low now this will act as a ground whatever other setting you have you can
add here and the rest of your code if you need it you can put it inside this loop
here's the wiring from pin five this is my vcc I’ve connected it to this point and from here I
have one kilo ohm resistor which has been connected to this led to the anode to the
longer pin and the anode is connected via this to pin two which is my ground
the code is being loaded once the code is loaded you will see that this led will turn on
and it is getting the power from pin five if I connect it to other pens you will see that
they do not have any power here I have connected this lcd 1602 to pin five and pin two
and if you if you need higher current use a breadboard and I’m connecting it this red to the
five volts and on the breadboard this line is all connected as one piece from top to bottom and this
is another line and I’ve labeled it with color so you can connect this five volts for example
and here and all this line will be now five volts will be available you can connect to your devices
and the same way for the ground I’ve connected it to the ground and this this will be connected to
the second wire and this will be all ground and the same way you can do it on this side
for example if you want to test this relay these are this
red is the vcc and this is the ground and I’m connecting it I will connect it to
vcc in here any of those wire will be fine and this one any of this second wire line
so if I connect it now this is powered up because all of this will have five volts
and also this powers up this way that's it this was how to get extra vcc an extra ground from
Arduino uno nano and any Arduino if you like this video learn something please thumb up I
have a lot of other videos related to Arduino please check them out by clicking on the left
which is the description and you will see tons of other codes that I have written and tested
don't forget to subscribe so you can get updates of my upcoming videos
for more videos please click on subscribe button or click on the icon on the right
side of the screen thank you thanks for watching turtle from Robojax if you learned 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 at the comment section below
I try to answer and reply and don't forget subscribe so you get updates on my upcoming videos