Let's Make Robots!

Maxbotix "daisy chaining" question via email

I got this email and I thought it wise to post on here for a couple reasons. One, I would like to have other eyes look over my "advice" lol and two maybe it will help someone in a future search. Anyhow...

---------------

Hi JAX,
I decided to contact you directly since you are the only one I have seen
that has really used this method

My name is Ivan and I am a computer science student at UTArlinton. I am
working on a autonomous vehicle for a school project. I saw that you
commented on using a Maxbotix ultrasonic sensor in "daisy chain". I just
ordered 3 sensors and will like to set up the sensors same. I read the PDF
and the page that talks about how to chain them below

http://www.maxbotix.com/documents/LV_Chaining_Constantly_Looping_AN_Out.pdf

Could you offer some advice and answer a couple of questions.

1. I don't know what is the purpose of the 1k resistor. Do you know or did
you need it?
2.Did you use an Arduino? ( I am using an Arduino UNO )

the following is from the link above.
                       "Then the micro controller will have to return it's
pin to a high impedance state so that the next time around the TX output
from the last sensor will make it's way to the RX of the first sensor"

3. How did you set your microcontroller to high impedance?
4. Anything problems you came across?

I really appreciate it.

Thank you

------------------

Hi Ivan,
Yes, I successfully use the daisy chain technique with my EV4s.
1. I don't know what is the purpose of the 1k resistor. Do you know or did
you need it?
I think it's for protection of the input. Many times digital lines like servos have a small resistor inline to protect against any overvoltages that might fry the chip. Most of the time I don't use them but as these Maxbotix were somewhat expensive (for me) and I only had the two, I decided to use the 1K resistor in the name of good form.
2.Did you use an Arduino? ( I am using an Arduino UNO )
No, I used a PICAXE 28X2.
the following is from the link (http://www.maxbotix.com/documents/LV_Chaining_Constantly_Looping_AN_Out.pdf
)above.
"Then the micro controller will have to return it's
pin to a high impedance state so that the next time around the TX output
from the last sensor will make it's way to the RX of the first sensor"

3. How did you set your microcontroller to high impedance?
I'm not versed in the ways of The Arduino but you just need to choose a pin that can be configured as an input or output. First you'll send a brief pulse high (time not too critical. I've done 1us to 1ms with success) to activate the sensors. Then immediately pull the pin low and configure it to be an input pin. In my PIC chip's case the pin I use has a 20K impedance when used as an input.
4. Anything problems you came across?
When I accidentally wired in a pulldown 10K resistor to the signal line everything went haywire, but no surprise there. The app notes demonstration uses the analog signal but I've been using the pulsewidth signal with no problems. If you're looking for instant readings you should probably stick with the analog as it is available constantly. Reading the pw signal means you have to wait for the sensor's turn on the next cycle in order to count the pulse duration. I'm in no hurry, only use two sensors, and like the accuracy of pw method so I stuck with it. That being said I never had any success with the serial communications but that's probably due to errors in protocol on my end.
I really appreciate it.

Thank you
No problem. Good luck with it.
 
------------------------
 
Awesome Thank you very much. This should get me going in the right direction.
I have been doing a lot of research on sensors, servos, servo controllers, etc... for this project. I have never work with the Arduino either. this is my first time. ( In fact this is the first time I have done any significant work with a microcontroller. ( we use the PIC at UTA as well for simpler projects). You're email pointed me in the right direction on how to set the Arduino to high impedance. Pretty much the same thing as the PIC.
Yeah, I think I will go with analog readings since they can be read at any time. Our project is time critical and the time it takes to read 3 sensors is at least 150 ms. Which might be too long.
Thank you JAX
and thanks to letsmakerobots.com