ultrasonic sensor hc-sr04 and raspberry pi

Discussion in 'Embedded Systems and Microcontrollers' started by Sajo Joseph, Feb 15, 2015.

  1. Sajo Joseph

    Thread Starter New Member

    Nov 17, 2014
    6
    0
    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..
     
  2. ligo.george

    New Member

    Feb 2, 2013
    19
    2
    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
     
    Sajo Joseph likes this.
  3. Sajo Joseph

    Thread Starter New Member

    Nov 17, 2014
    6
    0
    Thank you Mr. George ..
     
Loading...