Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
102 views

Using A Temperature Sensor To Control The Speed of A Motor Using Arduino - 2

bla bla

Uploaded by

marcosscarato
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
102 views

Using A Temperature Sensor To Control The Speed of A Motor Using Arduino - 2

bla bla

Uploaded by

marcosscarato
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

let's make Explore(/tag/typeid/) Publish(/about/create.

jsp) You (/you/)

Classes NEW! (/classes/)


Featured: share what you make
(/id/intel/) IntelIoT(/id/intel/)
(/)
(/tag/typeid/categorytechnology/channelarduino/) Arduino(/tag/typeid/categorytechnology/channelarduino/)

(/tag/typeid/categorycraft/channelknittingandcrocheting/) Yarn(/tag/typeid/categorycraft/channelknittingandcrocheting/)

Usingatemperaturesensortocontrolthespeedofamotorusing
arduino byHesham_Gaber(/member/Hesham_Gaber/)intools(/tag/typeid/categoryworkshop/channeltools/)
Download h(/id/Usingatemperaturesensortocontrolthespeedof/?ALLSTEPS) 2Steps .

Collection IMadeit! Favorite Share

Step2:Timeforcoding
AboutThisInstructable
Usingthearduinosoftwareandwritethiscodedown.
floattemp 8 31.860 views Posted:
May23,
inttempPin=A0//arduinopinusedfortemperaturesensor 123 favorites 2015
License:
inttempMin=25//thetemperaturetostartthebuzzer
inttempMax=70
Hesham_Gaber
intfan=6//thepinwherefanisconnected (/member/Hesham_Gaber/)
intfanSpeed=0 Follow 10

voidsetup(){ (/member/Hesham_Gaber/)

pinMode(fan,OUTPUT) MorebyHesham_Gaber:

pinMode(tempPin,INPUT)
Serial.begin(9600) (/id/Usinga
}

voidloop(){
temperaturesensortocontrolthespeed
temp=analogRead(tempPin) of/)

temp=(temp*5.0*100.0)/1024.0//calculatethetemperatureinCelsius
Addinstructableto:
Serial.println(temp)
; Group
delay(1000)//delayinbetweenreadsforstability

if(temp<tempMin){//iftempislowerthanminimumtemp
fanSpeed=0//fanisnotspinning

digitalWrite(fan,LOW)

}
if((temp>=tempMin)&&(temp<=tempMax))//iftemperatureishigherthanthe
minimumrange

{
fanSpeed=map(temp,tempMin,tempMax,32,255)//theactualspeedoffan

analogWrite(fan,fanSpeed)//spinthefanatthefanSpeedspeed

}
}

Nowafterverifyinganduploadingthecodetothearduino,youcanopenthe
serialmonitorupattherightofthearduinosoftwaretoshowthetemperatureof
thesurrounding.
youwillnoticedthatihaveaddedthe"Serial.begin(9600)"functionthatshows
thetemperatureintheserialmonitor.
Toincreasethetemperatureyoucanheatitbytransferringheatfromyourbody
bytouchingit.
youcaneditthetempMinandtempMaxthevaluesyouwantdependingonyour
applicationspecification.

lm35.txt(/ORIG/FZN/AF1I/IA0WFW6D/FZNAF1IIA0WFW6D.txt)

Previous(/id/Usingatemperaturesensortocontrolthespeedof/) Next

ViewAllSteps(/id/Usingatemperaturesensortocontrolthespeedof/?ALLSTEPS)

Download

Wehaveabenicecommentpolicy.
Pleasebepositiveandconstructive. wIMadeit! AddImages PostComment

MeghanaM3(/member/MeghanaM3) 3monthsago Reply

motorisnotcontrollingitsspeed??howcanicontrolitpleasegivemethe
solutionforthatimmediately

Flag

rashedkhan(/member/rashedkhan) 5monthsago Reply

myfanisrotatingthoughihavereducedthemintempbutmotorisnot
stopping.itisspinning

Flag

MetroidChild.(/member/MetroidChild.) ayearago Reply

whatexactlydoesthediodethatgoesacrossthefanterminalsdo?Isthata
safetymeasureincasethefanspinsbackwardsbyitselftopreventfryingthe
npntransistororsomething,orisitjustthereforshow?

Flag

DanielP406(/member/DanielP406) . MetroidChild.(/member/MetroidChild.)
5monthsago Reply
Youmight'vehadthisquestionanswered,butfor
otherswhoarecuriousthefanisaninductiveload,andthediode
thereforeservesasa'flybackdiode'.

Technically,thefan'smotordevelopsamagneticfieldinordertospin.
Whenthefansuddenlylosespower(whenyouturnitoffattheswitch),it
triesto'feeditself'usingthemotor'scollapsingmagneticfieldasits
source,insteadoftheoriginalsourcewhichisnowmissing.
Dependingonthemagnitudeofthisfield,theinductorcreatesanegaitve
potentialwhereitwasoncepositive,andtheinductiveloadtriesto
essentially'force'thevoltageacrossthepowerswitch,creatinganarc.
Thisisdangerousforthecircuit.

Adiodeisthereforeplacedacrossthemotorsuchthattheintended
sourcewon'tbypassthefanwhenoperating,andtheinductorwill'power
itselfdown'PROPERLY(untilitdies)whenthefanisturnedoff.

Hopethishelps:)

Flag

TuryaB(/member/TuryaB) ayearago Reply

canyougivethespecificationofthemotorused?

Flag

wilsondm(/member/wilsondm) 2yearsago Reply

BOMDIA,timoTrabalhoPretendoeFcil.defazer

Flag

X Hesham_Gaber(/member/Hesham_Gaber)(author) . wilsondm
8
(/member/wilsondm) 2yearsago Reply

thankyou,
itissimplyapartofabigproject,youmightuseitinsomething

Flag

X tomatoskins(/member/tomatoskins) 2yearsago Reply


|
8 Reallycoolidea!

Flag

X Hesham_Gaber(/member/Hesham_Gaber)(author) . tomatoskins
8
(/member/tomatoskins) 2yearsago Reply

itcouldbeinvolvedinalargeprojectlikeasmerthome!

Flag

FEATURED CHANNELS

Woodworking Paper KitchenHacks Puzzles LaserCutting Space Homesteading 3DPrinting Sewing


(/tag/type (/tag/type (/tag/type (/tag/type (/tag/type (/tag/type (/tag/type (/tag/type (/tag/type
id/category id/category id/keyword id/category id/category id/keyword id/category id/category id/category
workshop/channelcraft/channel kitchen%20hacks/?play/channel workshop/channel astronomy/? home/channel technology/channel
craft/channel
woodworking/) paper/) sort=FAVORITES) puzzles/) lasercutting/) sort=FAVORITES)homesteading/) 3DPrinting/) sewing/)
Newsletter AboutUs
Join2million+toreceiveinstant WhoWeAre(/about/)
DIYinspirationinyourinbox. Advertise(/advertise/)
Contact(/about/contact.jsp)
enteremail I'min!
Jobs(/community/PositionsavailableatInstructables/)
Help(/id/howtowriteagreatinstructable/)
FindUs Resources
Facebook(http://www.facebook.com/instructables) ForTeachers(/teachers/)
Youtube(http://www.youtube.com/user/instructablestv) ArtistsinResidence(/air)
Twitter(http://www.twitter.com/instructables) GiftPremiumAccount(/account/give?sourcea=footer)
Forums(/community/)
Pinterest(http://www.pinterest.com/instructables)
Answers(/tag/typequestion/?sort=RECENT)
Google+(https://plus.google.com/+instructables)
Sitemap(/sitemap/)

TermsofService(http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21959721) |
PrivacyStatement(http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21292079) |
LegalNotices&Trademarks(http://usa.autodesk.com/legalnoticestrademarks/) | MobileSite(http://www.instructables.com)
(http://usa.autodesk.com/adsk/servlet/pc/index?id=20781545&siteID=123112)
2016Autodesk,Inc.

You might also like