1
\$\begingroup\$

Trying to connect Ultrasonic sensor to my raspberry Pi. Im aware of two methods:

  1. connect the trig to a 1k resister before connecting to raspberry pi
  2. Use a 8-Channel Logic level converter

I trying out method 2 but cant find good example of how the logic converter works/wired up.

The example I'm currently looking it is this instructable. I don't understand why this example board 3.3 V is wired up.

The configuration I'm thinking of is:

  1. Raspberry 5v to Ultra Sensor VCC.
  2. Ultra Sensor GND to PiGND.
  3. PI Gpio pin to Echo pin of Ultra Sensor.
  4. Ultra sensor Trig to Level converter to PI Input Pin.

Can someone tell me how to hook this thing up?

\$\endgroup\$

closed as too broad by Chris Stratton, Oleg Mazurov, JRE, Huisman, hacktastical Sep 6 at 2:47

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • \$\begingroup\$ It's really simple, and it's also explained in the Instructable. Raspberry Pi's logic works on 3.3V, and the sensor on 5V, so: 1) Connect RPi 3.3V Pin to LV on LLC 2) Connect RPi 5V to HV on LLC and to VCC on sensor 3) Connect RPi GND to GND on the L-side of the LLC 4) Connect RPi pin for triggering to TRIG pin on sensor, directly 5) Connect RPi pin for echo signal to LVx (eg LV1) on LLC 6) Connect sensor ECHO pin to HVx on LLC (ie to HV1 if you connected the RPi to LV1 - this is the signal you want to shift) 7) Connect sensor GND to GND on the H-side of the LLC \$\endgroup\$ – Martin Bøgelund Sep 9 at 12:06
1
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

You may choose a ratio from 3 to 3.3V

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.