Maker Pro
Maker Pro

hc-sr04 and raspberry pi

Sajo Joseph

Nov 17, 2014
5
Joined
Nov 17, 2014
Messages
5
please help me to interface hc-sr04 ultrasonic sensor with raspberry pi.
i think that the raspberry pi will get damaged if i connect directly to hc-sr04....
hc-sr04 is a 5v device while raspberry pi is a 3.3v device..
 

ligo.george

Feb 2, 2013
12
Joined
Feb 2, 2013
Messages
12
Yes you are right..
You can connect the 3.3V output of raspberry pi directly to ECHO input of HC-SR04.... It will detect 3.3V as HIGH level... as TTL logic...
but the 5V TRIGGER output of HC-SR04 should not be directly connected to 3.3V input of Raspberry Pi.. it may damage it..
You should use additional voltage divider resistors to reduce .. 5V to 3.3V...
I hope that the following link might help you..
Interfacing HC-SR04 Ultrasonic Sensor with Raspberry Pi
 
Top