Professional Documents
Culture Documents
HC SR04Users Manual
HC SR04Users Manual
HEADtoTOE
ProductUsersManualHCSR04UltrasonicSensor
User'sManual
V1.0
May2013
CreatedbyCytronTechnologiesSdn.Bhd.AllRightsReserved 1
ROBOT.HEADtoTOE
ProductUsersManualHCSR04UltrasonicSensor
Index
1. Introduction 3
2. PackingList 4
3. ProductLayout 5
4. ProductSpecificationandLimitation 6
5. Operation 7
6. HardwareInterface 8
7. ExampleCode 9
8. Warranty 10
CreatedbyCytronTechnologiesSdn.Bhd.AllRightsReserved 2
ROBOT.HEADtoTOE
ProductUsersManualHCSR04UltrasonicSensor
1.0INTRODUCTION
The
HCSR04 ultrasonic sensor uses sonar to determine distance to an object like bats or
dolphins do. It offers excellent noncontact range detection with high accuracy and stable
readings in an easytouse package. From 2cm to 400 cm or 1 to 13 feet.Itoperationisnot
affected by sunlight or black material like Sharp rangefinders are (although acousticallysoft
materials like cloth can be difficult to detect). It comes complete with ultrasonic transmitter
andreceivermodule.
Features:
PowerSupply:+5VDC
QuiescentCurrent:<2mA
WorkingCurrnt:15mA
EffectualAngle:<15
RangingDistance:2cm400cm/1"13ft
Resolution:0.3cm
MeasuringAngle:30degree
TriggerInputPulsewidth:10uS
Dimension:45mmx20mmx15mm
CreatedbyCytronTechnologiesSdn.Bhd.AllRightsReserved 3
ROBOT.HEADtoTOE
ProductUsersManualHCSR04UltrasonicSensor
2.0PACKINGLIST
1. 1x
HCSR04module
CreatedbyCytronTechnologiesSdn.Bhd.AllRightsReserved 4
ROBOT.HEADtoTOE
ProductUsersManualHCSR04UltrasonicSensor
3.0PRODUCTLAYOUT
VCC=+5VDC
Trig=TriggerinputofSensor
Echo=EchooutputofSensor
GND=GND
CreatedbyCytronTechnologiesSdn.Bhd.AllRightsReserved 5
ROBOT.HEADtoTOE
ProductUsersManualHCSR04UltrasonicSensor
4.0PRODUCTSPECIFICATIONANDLIMITATIONS
Parameter Min Typ. Max Unit
WorkingCurrent 10 15 20 mA
UltrasonicFrequency 40 kHz
CreatedbyCytronTechnologiesSdn.Bhd.AllRightsReserved 6
ROBOT.HEADtoTOE
ProductUsersManualHCSR04UltrasonicSensor
5.0OPERATION
The timing diagram of HCSR04 isshown.Tostartmeasurement,TrigofSR04mustreceive
a pulse of high (5V) for at least 10us, this will initiate the sensorwilltransmitout8cycleof
ultrasonicburstat40kHzandwaitforthereflectedultrasonicburst.Whenthesensordetected
ultrasonic from receiver, it will set the Echo pin to high (5V) and delay for a period(width)
whichproportiontodistance.Toobtainthedistance,measurethewidth(Ton)ofEchopin.
Time=WidthofEchopulse,inuS(microsecond)
Distanceincentimeters=Time/58
Distanceininches=Time/148
Oryoucanutilizethespeedofsound,whichis340m/s
Note:
PleaseconnecttheGNDpinfirstbeforesupplyingpowertoVCC.
2
Please make sure the surface of object to be detect should have at least 0.5 meter
forbetterperformance.
CreatedbyCytronTechnologiesSdn.Bhd.AllRightsReserved 7
ROBOT.HEADtoTOE
ProductUsersManualHCSR04UltrasonicSensor
6.0HARDWAREINTERFACE
HereisexampleconnectionforUltrasonicRangingmoduletoArduinoUNOboard. Itcanbe
interfacewithanymicrocontrollerwithdigitalinputsuchasPIC,
SK40C
,
SK28A
,
SKds40A ,
Arduinoseries.
CreatedbyCytronTechnologiesSdn.Bhd.AllRightsReserved 8
ROBOT.HEADtoTOE
ProductUsersManualHCSR04UltrasonicSensor
7.0EXAMPLECODE
Thisis
examplecode
UltrasonicRangingmodule.
Pleasedownloadthecompletecodeatthe
productpage.
CreatedbyCytronTechnologiesSdn.Bhd.AllRightsReserved 9
ROBOT.HEADtoTOE
ProductUsersManualHCSR04UltrasonicSensor
8.0WARRANTY
Productwarrantyisvalidfor6months.
Warrantyonlyappliestomanufacturingdefect.
Damagedcausedbymissuseisnotcoveredunderwarranty
Warrantydoesnotcoverfreightcostforbothways.
Preparedby
CytronTechnologiesSdn.Bhd.
19,JalanKebudayaan1A,
TamanUniversiti,
81300Skudai,
Johor,Malaysia.
Tel: +6075213178
Fax: +6075211861
URL: www.cytron.com.my
Email:
support@cytron.com.my
sales@cytron.com.my
CreatedbyCytronTechnologiesSdn.Bhd.AllRightsReserved 10