Go to Post The thought of destroying any robot is just......depressing :( - Richard McClellan [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 07-02-2015, 15:55
alambert14's Avatar
alambert14 alambert14 is offline
Student Programmer
AKA: Abby Lambert
FRC #2035 ("Rockin" Bots)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2014
Location: Carmel
Posts: 14
alambert14 is an unknown quantity at this point
Attaching MaxBotix Ultrasonic Sensor to RoboRIO

Hi, I am a programmer from team 2035 ("The Rockin' Bots") and we are trying to use an MaxBotix Ultrasonic sensor for autonomous. We are wondering how to hook it up to the custom electronics port on the roboRIO and how to program it as well? Our robot is in java. Any help would be appreciated, thank you!
  #2   Spotlight this post!  
Unread 07-02-2015, 16:44
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,800
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Attaching MaxBotix Ultrasonic Sensor to RoboRIO

It can be connected to either an Analog Input or the TTL serial port.
Check the datasheet for your model. Here is a datasheet for the EZ-1:
EZ1 datasheet
Page 2 describes the pins.

For instance, an Analog hookup uses
  • GND
  • +5V
  • AN - ~9.8mV per inch
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #3   Spotlight this post!  
Unread 16-02-2015, 00:32
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Attaching MaxBotix Ultrasonic Sensor to RoboRIO

How do we hook up two Maxbotix ultrasonic sensors to RoboRIO? According to the spec, to do multiple sensors, you need to daisy chain them using one digital output channel connected to the RX pin and then chain the TX pin to the RX pin of another sensor. Then each sensor is connected to a separate analog input channel. Am I interpreting the spec correctly? Also, I looked at ultrasonic.java in WPILibJ, am I correct that I cannot use that module because that module seems to use one digital output (ping channel) and one digital input channel (echo channel) and it's timing the interval between ping and echo. It has hinted you can use multiple sensors (m_firstSensor) but I can't figure out how. In addition, the comment in the code seems to say the code is really for Daventech SRF04 or a Vex ultrasonic sensors. That leads me to think it cannot be used for the Maxbotix sensors. So is it correct that I just write a pulse out (20uS or more) to the digital out channel (RX pin) then delay 50msec and read the Analog channel scaling it back to inches according to the spec (9.8mV/inch)? Or alternatively, I can do automatic range mode by chaining RX and TX in a loop (i.e. TX of sensor 1 connects to RX of sensor 2 and TX of sensor 2 connects to RX of sensor 1 through a 1K resistor) so it will keep ranging over and over again. But it sounds like I still need an digital output channel connected to the RX pin of the first sensor to start the cycle. Will this work as expected? Automatic range mode is only appealing to me if I can avoid using a digital output channel. If I can't avoid using a digital output channel, then I may just do single range by writing a pulse (> 20us) to the digital output channel and then wait for 100 msec before reading both analog channels. Am I correct here?
__________________
  #4   Spotlight this post!  
Unread 05-03-2015, 17:21
MaxBotixInc MaxBotixInc is offline
Registered User
no team
 
Join Date: Mar 2015
Location: Minnesota
Posts: 1
MaxBotixInc is an unknown quantity at this point
Re: Attaching MaxBotix Ultrasonic Sensor to RoboRIO

You state the following information: According to the spec, to do multiple sensors, you need to daisy chain them using one digital output channel connected to the RX pin and then chain the TX pin to the RX pin of another sensor. Then each sensor is connected to a separate analog input channel. Am I interpreting the spec correctly?

I apologize, but I do not know which specific sensor line you are using. As such I will provide this link to our general information on using multiple sensors in chained operation.

Multiple Sensor Chaining: http://maxbotix.com/articles/031.htm

You state the following information: Also, I looked at ultrasonic.java in WPILibJ, am I correct that I cannot use that module because that module seems to use one digital output (ping channel) and one digital input channel (echo channel) and it's timing the interval between ping and echo. It has hinted you can use multiple sensors (m_firstSensor) but I can't figure out how. In addition, the comment in the code seems to say the code is really for Daventech SRF04 or a Vex ultrasonic sensors. That leads me to think it cannot be used for the Maxbotix sensors.

Excluding our USB and 4-20mA lines of sensors, all MaxBotix sensors include serial data and analog voltage outputs and either a choice between pulse-width and analog envelope depending on the sensor line. In essence the Ping pin described is similar to the RX pin on a MaxBotix sensor, and the Echo pin is similar to the pulse-width pin. However, we recommend using the analog voltage pin in chaining operations.


You state the following information: So is it correct that I just write a pulse out (20uS or more) to the digital out channel (RX pin) then delay 50msec and read the Analog channel scaling it back to inches according to the spec (9.8mV/inch)?

This is correct.

You state the following information: Or alternatively, I can do automatic range mode by chaining RX and TX in a loop (i.e. TX of sensor 1 connects to RX of sensor 2 and TX of sensor 2 connects to RX of sensor 1 through a 1K resistor) so it will keep ranging over and over again. But it sounds like I still need an digital output channel connected to the RX pin of the first sensor to start the cycle. Will this work as expected?

Yes that is accurate, but I strongly recommend looking through the previously linked chaining guide or the datasheet specific to the sensor you choose to use.

You state the following information: Automatic range mode is only appealing to me if I can avoid using a digital output channel. If I can't avoid using a digital output channel, then I may just do single range by writing a pulse (> 20us) to the digital output channel and then wait for 100 msec before reading both analog channels. Am I correct here?

If free run mode (automatic ranging), you just need to hook your sensor to a power supply at the proper voltage and supply a ground reference and then you can choose to read the analog voltage or pulse-width output on our sensors without the need for a digital output channel.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:33.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi