ultrasonic sensor hc-sr04 and raspberry pi

Thread Starter

Sajo Joseph

Joined Nov 17, 2014
7
how to itnerface hc-sr04 ultrasonic sensor with raspberry pi.
hc-sr04 is a 5v device.. it needs 5v input and provides 5v output .. but raspberry pi provides 3.3v output and inputs are rated at 3.3v..
please help me..
 
You can connect 3.3V output of Raspberry Pi directly to TRIGGER input of HC-SR04... It can detect 3.3V as HIGH level..
But the voltage level of ECHO is 5V, it should not be directly connected to Raspberry Pi, hence it may damage it.. So you should use proper 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