Shop OBEX P1 Docs P2 Docs Learn Events
PING Sonar Sensor Connectivity Question — Parallax Forums

PING Sonar Sensor Connectivity Question

stuartXstuartX Posts: 88
edited 2012-02-14 11:26 in Accessories
I'm currently building a robot in which I would like to have the PING sonar sensors on the front, right side, left side and rear. In other words, I would like to have a total of ten sensors, two in front; three on right side; three on left side and two on rear.
In an effort to save pins on my BS2 my question is:
Can I tie sensor connections from three sensors to connect to one pin of the BS2?

Comments

  • T ChapT Chap Posts: 4,223
    edited 2012-02-14 07:42
    You cannot tie the sensor pins together. There would be no way to determine which sensor the response came from.

    With a series of gates and an expander IC(ie PCF8575 using I2C), you could probably get by with 3 pins. 2 for I2C and 1 for the signal. If you already have a dedicated set of I2C pins then you only need the one sensor pin. The expander IC would enable the specific device by controlling a bi directional gate to allow the signal to travel both to and from the sensor one at a time. So you would turn on the signal path to one device via the expander, do the Ping scan, then go to the next device, repeat. There are numerous options for a bidirectional gate, or you could use something as simple as a H11F2 Opto Fet type device, use the expander to pull the LED input to GND and this allows the transistor side to act as a straight wire for your signal. This device would simply float when the LED is not turned on, so you can sum the devices together back to the single I/O pin.
  • stuartXstuartX Posts: 88
    edited 2012-02-14 08:26
    Thanks for the information. To fully understand I have to pull the sheet for the gate and expander and hook it up to test.
    I appreciate the quick advice.
  • T ChapT Chap Posts: 4,223
    edited 2012-02-14 09:26
    Here is what I had in mind. Someone may know of a gate that will allow the 10 sensors to be monitored without having to use the 10 Opto's. But the gates will have to go to a hi-z state when not used so that they can be multed to go to the micro.
    452 x 476 - 46K
  • stuartXstuartX Posts: 88
    edited 2012-02-14 11:26
    That gives me a better idea.
    Because my thought was the following: If I have three on the left side, If any of the three sensors detects something within a certain distance, it would go right.
    That's good information. Thanks again.
Sign In or Register to comment.