Professional Documents
Culture Documents
HowtoPoweraProjectlearn.sparkfun.com
HowtoPoweraProject
CONTRIBUTORS:
FAVORITE
JORDANDEE
11
Overview
Thistutorialwillcoverthevariouswaysyoucanpoweryourelectronicprojects.Itwillgointosomedetail
aboutvoltageandcurrentconsiderationsyoumaywanttomake.Itwillalsogointotheextra
considerationsyouhavetomakeifyourprojectismobile/remoteor,inotherwords,notgoingtobe
sittingnexttoawallpoweroutlet.
Ifthisistrulyyourfirstelectronicproject,youhavetheoptionofreadingthroughthistutorialorsticking
withtherecommendedsupplyfortheprojectordevelopmentboardofyourchoice.TheSparkFun
InventorsKitcontainstheUSBcableyouneedforpowerandworksfineforalltheprojectsinthekitas
wellasmanymoreadvancedprojects.Ifyourefeelingoverwhelmed,thatkitisthebestplacetostart.
SuggestedReading
Herearerelatedtutorialsyoumaywanttocheckoutbeforereadingthisone:
Voltage,Current,Resistance,andOhmsLaw
ElectricPower
BatteryTechnologies
ConnectorBasics
HowtoUseaDigitalMultimeter
VoltageRegulators
ParallelvsSeriesCircuits
WaystoPoweraProject
Herearesomeofthemostmethodsusedforpoweringaproject:
ACtoDCpowersupplies(likeacomputerorlaptopwoulduse)
VariableDCbenchpowersupply
Batteries
ViaaUSBcable
Fourcommonwaystosupplypowertoyourproject
https://learn.sparkfun.com/tutorials/howtopoweraproject?_ga=1.196543276.1048841463.1455969176
1/6
3/18/2016
HowtoPoweraProjectlearn.sparkfun.com
WhichoptionshouldIpicktopowermyproject?
Theanswertothisquestionlargelydependsonyourprojectspecificrequirements.
IfyourestartingoffwiththeSparkFunInventorsKitoranotherbasicdevelopmentboard,youwilllikely
justneedaUSBcable.TheArduinoUnoisanexamplethatrequiresonlyaUSBAtoBcabletosupply
thepowertoruntheexamplecircuitsinthekit.
Ifyoureinthebusinessofbuildingprojectsandtestingcircuitsregularly,acquiringavariableDCbench
powersupplyishighlyrecommended.Thiswillallowyoutosetthevoltagetoaspecificvaluedepending
onwhatyouneedforyourproject.Italsobuysyousomeprotectionasyoucansetamaximumcurrent
allowed.Then,ifthereisashortcircuitinyourproject,thebenchsupplywillshutdownhopefully
preventingharmtosomecomponentsinyourproject.
AspecificACtoDCpowersupplyisoftenusedafteracircuitisproven.Thisoptionisalsogreatifyou
oftenusethesamedevelopmentboardagainandagaininyourprojects.Thesewalladaptersusually
haveasetvoltageandcurrentoutput,soitsimportanttomakesurethattheadapteryouchoosehas
thecorrectspecificationsastheprojectyouwillbepoweringandtonotexceedthosespecifications.
IfyouwantyourprojecttobemobileorbasedinaremotelocationawayfromwhereyoucangatherAC
wallpowerfromthegrid,batteriesaretheansweryourelookingfor.Batteriescomeinahugevarietyso
besuretocheckoutthelaterpartsofthistutorialsoyoucanfigureoutpreciselywhattochoose.
CommonchoicesincluderechargeableNiMHAAsandlithiumpolymerion.
Voltage/CurrentConsiderations
HowmuchvoltagedoIneedforprojectX?
Thisdependslargelyonthecircuit,sothereisnoeasyanswertothisquestion.However,most
microprocessordevelopmentboardsliketheArduinoUnohaveavoltageregulatoronboard.Thisallows
ustosupplyavoltageinaspecifiedrangeabovetheregulatedvoltage.Alotofmicroprocessorsand
ICsondevelopmentboardsrunat3.3or5Voltsbuthavevoltageregulatorsthatcanhandleanywhere
from6Vto12V.
Thepowercomesfromapowersupplyandisthenregulatedcloselybyavoltageregulatorsothateach
chipispoweredataconsistentvoltageevenwhenthecurrentdrawmayfluctuateatdifferenttimes.
HereatSparkFun,weuse9Vpowersuppliesformanyofourproductsthatoperateinthe3.3Vto5V
range.However,toverifywhatvoltagesaresafe,itisrecommendedthatyoucheckthedatasheetforthe
voltageregulatoronthedevelopmentboardtoseewhatvoltagerangeisrecommendedbythe
manufacturer.
HowmuchcurrentdoIneedforprojectX?
Thisquestionalsodependsonthedevelopmentboardandmicroprocessoryoureusingaswellaswhat
circuitsyouplanonconnectingtoit.Ifyourpowersupplycannotgiveyoutheamountofjuicetheproject
needs,thecircuitmaystartactinginastrange,unpredictableway.Thisisalsoknownasabrownout.
Aswithvoltage,itsrecommendedtocheckthedatasheetsandestimatewhatthedifferentbitsand
piecesofthecircuitmightneed.Itsalsobetterpracticetoroundupandassumeyourcircuitwillneed
morecurrentthantonotprovideenoughcurrent.Ifyourcircuitincludeselementsthatrequiremassive
https://learn.sparkfun.com/tutorials/howtopoweraproject?_ga=1.196543276.1048841463.1455969176
2/6
3/18/2016
HowtoPoweraProjectlearn.sparkfun.com
amountsofcurrent,likemotorsorlargeamountsofLEDs,youmayneedalargesupplyoreven
separatesuppliesforthemicroprocessorandtheextramotors.Again,itsalwaysinyourbestinterestto
getapowersupplyratedforahighercurrentandnotusetheextrathantohaveasupplythatcant
provideenough.
Havenoideahowmuchcurrentyourprojectdraws?
Onceyouvebeenplayingwithcircuitsforawhile,itwillbeeasiertoestimatetheamountofcurrentyour
projectrequires.However,thecommonwaystofigureitoutexperimentallyaretoeitheruseavariable
DCpowersupplythathasareadoutforcurrentortouseadigitalmultimetertomeasurethecurrent
goingtoyourcircuitwhileitsrunning.Ifyoudontknowhowtomeasurecurrentwithamultimeter,
pleaseseeourmultimetertutorial.
DigitalMultimeter
WehighlyrecommendhavingaDMMinyourelectronicstoolbox.Itsgreatformeasuringcurrentor
voltage.
Connections
HowdoIconnectmybatteryorpowersupplytomycircuit?
Therearemanywaystoactuallyconnectapowersupplytoyourproject.
Commonwaystoconnectapowertoyourcircuit
Variablebenchtoppowersuppliescommonlyconnecttocircuitsusingbananajacksorwiresdirectly.
Thesearealsosimilartotheconnectorsfoundonthemultimeterprobecables.
Manyprojectsarebuiltonabreadboardfirst,asaprototype,beforetheybecomeafinalproduct.There
arenumerouswaystopoweryourbreadboardcircuit,manyoftheminvolvingathesameconnectors
mentionedhere.
https://learn.sparkfun.com/tutorials/howtopoweraproject?_ga=1.196543276.1048841463.1455969176
3/6
3/18/2016
HowtoPoweraProjectlearn.sparkfun.com
Onceaprojectispasttheprototypingphase,itwillusuallyenduponaPCB.Oneofthemostcommon
powerconnectorsusedonafinishedPCB,inbothconsumerelectronicsandhobbyelectronicsalike,is
thebarrelconnector,alsoknowasabarreljack.Thesecanvaryinsize,buttheyallfunctionthesame
andprovideasimply,reliablewaytopoweryourproject.
Batteriesaregenerallyheldinacasethatholdsthebatteriesandconnectsthethecircuitviawiresora
barreljack.SomebatterieslikeLithiumPolymerIonbatteriesoftenuseaJSTconnector.
Tolearnmoreaboutdifferentpowerconnectors,pleaseseeourconnectorstutorial.
Remote/MobilePower
WhichbatteryshouldIchoose?
Whenyourepoweringaremotecircuit,thesameissuesoffindingabatterythatdeliverstheproper
voltageandcurrentstillapply.Batterylife,orcapacity,isameasureoftotalchargethebatterycontains.
Thecapacityofabatteryisusuallyratedinamperehours(Ah)ormilliamperehours(mAh),andittells
youhowmanyampsafullychargedbatterycansupplyoveraperiodofonehour.Forexample,a
2000mAhbatterycansupplyupto2A(2000mA)foronehour.
Batterysize,shape,andweightisalsosomethingtoconsiderwhenmakingyourprojectmobile,
especiallyifitsgoingtobeonsomethingthatflieslikeasmallquadcopter.Youcangetaroughideaof
thevarietybyvisitingthiswikipedialist.Learnmoreaboutbatterytypesinourbatterytechnologytutorial.
Batteriesinseriesandparallel
Youcanaddbatteriesinseriesorparalleltoproducethedesiredvoltageandcurrentneededforyour
project.Whentwoormorebatteriesareplacedinseries,thevoltagesofthebatteriesareadded
together.Forexample,leadacidcarbatteriesareactuallymadeoutofsixsinglecellleadacidbatteries
tiedtogetherinseriesthesix2.1Vcellsadduptoproduce12.6V.Whentyingtwobatteriesinseries,its
recommendedthattheybeofthesamechemistry.Alsobewaryofchargingbatteriesinseriesasmany
chargersarelimitedtosinglecellcharging.
https://learn.sparkfun.com/tutorials/howtopoweraproject?_ga=1.196543276.1048841463.1455969176
4/6
3/18/2016
HowtoPoweraProjectlearn.sparkfun.com
Whenyouconnecttwoormorebatteriesinparallel,thecapacitiesadd.Forexample,fourAAbatteries
connectedinparallelwillstillproduce1.5V,howeverthecapacityofthebatterieswillbequadrupled.
HowmuchbatterycapacitydoIneedformyproject?
Thisquestioniseasiertoansweronceyouhavedeterminedtheamountofcurrentthatyourcircuit
normallydraws.Inthefollowingexample,wewilluseestimation.However,itisencouragedthatyou
measurecurrentdrawofyourcircuitusingaDigitalMultimetertogetaccurateresults.
Asanexample,letsstartwithacircuit,estimateitscurrentoutput,thenselectabatteryandcalculate
howlongitthecircuitwillrunonbatterypower.LetschooseaATmega328microcontrollertobeour
brainsforthecircuit.Itdrawsabout20mAundernormalconditions.LetsnowconnectthreeredLEDs
andthestandard330ohmcurrentlimitingresistorstodigitalI/Opinsofthemicrocontroller.Inthat
configuration,eachLEDaddedmakesthecircuitdrawabout10mAmorecurrent.Nowletsconnecttwo
MicroMetalmotorstothemicrocontrolleraswell.Eachoneoftheseusesapproximately25mAwhen
turnedon.Ourtotalpossiblecurrentdrawisnow:
LetschooseastandardalkalineAAbatteryforthisbecauseithasmorethanenoughcurrentcapability
(upto1A),hasadecentbatterycapacity(usuallyintherangeof1.5Ahto2.5Ah),andisverycommon.
Wellassumetheaverageis2Ahforthisexample.ThedownsidetousingaAAisitonlyhasa1.5V
output,and,sincetherestofourcomponentswillrunon5V,weneedtostepupthevoltage.Wecanuse
this5Vstepupbreakouttogetthevoltageweneed,orwecanusethreeAAbatteriesinseriestogetus
closetothevoltageweneed.ThreeAAsinseriesgivesusavoltageof4.5V(3times1.5V).Youcould
alsoaddanotherbatteryforatotalof6Vandregulatethevoltagedowntowhatyourcircuitrequires.
Tocalculatehowlongacircuitwilllastonbatterypower,weusethefollowingequation:
Foracircuitpoweredby3AAsinparallelthatsconnectedtoacircuitwithaconstant100mAcurrent
draw,thistranslatesto:
Wewouldideallyget60hoursofbatterylifeoutofthesethreealkalineAAsinthisparallelconfiguration.
However,itsgoodpracticetoderatebatteries,whichmeanstoassumeyouregoingtogetlessthan
idealbatterylife.Letsconservativelysaythatwellget75%oftheidealbatterylife,andthereforeabout
45hoursofbatterylifeforourproject.
Batterylifecanalsovarybasedontheactualcurrentdrawamount.HeresagraphfromanEnergizerAA
batteryshowingitsexpectedbatterylifebasedonconstantcurrentdraw.
https://learn.sparkfun.com/tutorials/howtopoweraproject?_ga=1.196543276.1048841463.1455969176
5/6
3/18/2016
HowtoPoweraProjectlearn.sparkfun.com
EnergizerAA,CurrentvsBatteryLife
Thisisjustoneofthenumerousconfigurationsyoucouldusetopoweryourprojectremotley.
ResourcesandGoingFurther
Youshouldnowknowthemostcommonwaystopoweryourcircuitandhowtofigureoutwhichwayis
bestforyoudependingonyouryourprojectsspecificrequirements.Youcanmakeabetterjudgment
nowbasedoncurrent,voltage,connector,andmobilityconsiderationsforyourproject.
Ifyouwouldliketolearnmoreaboutprototypingcircuits,pleasecheckoutourbreadboardtutorial:
Breadboards
FormoreinformationondesigningandbuildingyourownPrintedcircuitboards,visitthesetutorials:
WhatisaPCB
HowtoReadaSchematic
DesigningPCBsinEagle
LearnhowtoSolder
https://learn.sparkfun.com/tutorials/howtopoweraproject?_ga=1.196543276.1048841463.1455969176
6/6