[ADMIN] This thread was somehow lost from the forum archive, but I have reconstructed the main content ...
==================================
I found some answers in the Maxbotics FAQ -
http://www.maxbotix.com/MaxSonar-EZ1__FAQ.html#How_can_I_use_more_than_one_MaxSo
nar_EZ1_in_the_same_system It appears that we will have to use a trigger signal to coordinate the firing of multiple transducers. If there's only a single transducer, we don't need a trigger. So I think we will assign these signals to read the PW from the transducers -
pin 27 GPIO-H10 - sonar 1
pin 28 GPIO-H11 - sonar 2
pin 29 GPIO-H12 - sonar 3
pin 30 GPIO-H13 - sonar 4
and assign this signal as the trigger to connect to the RX signal of each module if there are multiple modules -
pin 18 GPIO-H1 - sonar trigger
If there is just a single module, we will connect it here -
pin 27 GPIO-H10 - sonar 1
To support this, we will need to add a command for ranging. Not sure which letter to use yet - maybe 'd' for distance, with commands 'd1' for a single module, 'd4' for multiple modules.
==================================
Just checked with the manufacturer - looks like there's no problem triggering 4 modules from the same control signal, but to be safe, plan on putting a current-limiting resistor between the GPIO pin and the RX lines of the 4 modules - 2.7k is a good value.
The sensors work fine with 3.3V. I have tested this.
The interface is the same with EZ1's. Here's how I have them wired.
The 3.3V, GND, and Trigger leads are chained together across multiple modules (if you have 4 modules, just continue to extend 3.3V, GND and Trigger). The PW signal lines are separate for each module. The pin numbers for the S-32 expansion connector are indicated in the photo.
I added a 'p' command to ping the sonar. It supports up to 4 channels, connected as described above to pins 27, 28, 29, 30 with the shared trigger on pin 18. Channels with no sonar attached return 0.
Not certain yet what units to use. At the moment, the return value is inches * 100 (i.e. 2500 = 25 inches). Maybe we should go metric or change the scaling, based on user feedback.
Note that different board sets have different header setups, but this shows you the relative location of the pins. If you don't have extended headers, I'd suggest just soldering to the bottom of the header on the underside of the motor control board.