PING Sonar Sensor Connectivity Question
stuartX
Posts: 88
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?
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
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.
I appreciate the quick advice.
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.