Go to Post I was considering letting Big Mike bearhug me for the warmth. - Barry Bonzack [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 20-02-2014, 19:24
CRITICALThinker's Avatar
CRITICALThinker CRITICALThinker is offline
New user, first time FRC
FRC #5064 (Opcom Robotics)
Team Role: Electrical
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Canada
Posts: 6
CRITICALThinker is an unknown quantity at this point
Wiring Maxbotix ultrasonic sensor to serial on cRIO?

My team is planning to add a ultrasonic sensor at the pits (MB 1013 http://www.maxbotix.com/Ultrasonic_Sensors/MB1013.htm ) to our bot using the serial port on the cRIO to aim our launcher.

What is the best way to wire it (even through another port), and how would we go about coding it? Thanks all for the help to a very inexperienced team
  #2   Spotlight this post!  
Unread 20-02-2014, 19:34
BitTwiddler's Avatar
BitTwiddler BitTwiddler is offline
electronics/programming mentor
AKA: Mr Tanguay
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Oct 2008
Rookie Year: 2006
Location: Sierra Vista, AZ
Posts: 254
BitTwiddler is on a distinguished road
Re: Wiring Maxbotix ultrasonic sensor to serial on cRIO?

Are you programming in LabView?
If so go to the opening splash screen, select Support, Find FRC Examples, go down to sensors folder and open it, find EZ-1 MB1010 Sonar - Analog.lvproj. and start it. The example shows how its done.
Whoops, I just re-read your post where you say you plan to use the serial port. Sorry, that's gonna be trickier.

Last edited by BitTwiddler : 20-02-2014 at 19:37.
  #3   Spotlight this post!  
Unread 20-02-2014, 19:48
CRITICALThinker's Avatar
CRITICALThinker CRITICALThinker is offline
New user, first time FRC
FRC #5064 (Opcom Robotics)
Team Role: Electrical
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Canada
Posts: 6
CRITICALThinker is an unknown quantity at this point
Re: Wiring Maxbotix ultrasonic sensor to serial on cRIO?

we are also programming in C++
  #4   Spotlight this post!  
Unread 20-02-2014, 19:55
RoboMo786's Avatar
RoboMo786 RoboMo786 is offline
Student - Design
AKA: Mo Baig
FRC #3538 (Avondale RoboJackets)
Team Role: CAD
 
Join Date: Feb 2014
Rookie Year: 2014
Location: Auburn Hills, MI
Posts: 30
RoboMo786 is an unknown quantity at this point
Re: Wiring Maxbotix ultrasonic sensor to serial on cRIO?

Look at the attached pics. One will show you what to wire to the rangefinder. The other pic is from team 358 website. It shows you the Analog Input Module (NI 9201) and the Analog Breakout. You should plug the pwm cable from the ultrasonic rangefinder to any of ports 1-7 on the analog breakout.

My team is programming in LabVIEW, so I can't help you with code, sorry.

Hope this helps.
Attached Thumbnails
Click image for larger version

Name:	EZ-1 ultrasonic wiring.PNG
Views:	113
Size:	392.5 KB
ID:	16347  Click image for larger version

Name:	AnalogModule.JPG
Views:	58
Size:	271.6 KB
ID:	16348  
  #5   Spotlight this post!  
Unread 20-02-2014, 19:57
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,171
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: Wiring Maxbotix ultrasonic sensor to serial on cRIO?

We are doing the same thing. The serial port on the Maxbotix sensor (at least our model) is not real RS-232. It is an inverted TTL serial port. We had to make a circuit to invert the signals then pass it through a TTL-RS232 converter to get it to work.

Good luck!
__________________
Fast, cheap or working - pick any two!
  #6   Spotlight this post!  
Unread 20-02-2014, 20:01
BitTwiddler's Avatar
BitTwiddler BitTwiddler is offline
electronics/programming mentor
AKA: Mr Tanguay
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Oct 2008
Rookie Year: 2006
Location: Sierra Vista, AZ
Posts: 254
BitTwiddler is on a distinguished road
Re: Wiring Maxbotix ultrasonic sensor to serial on cRIO?

you could run the TTL signals to and from the DIO ports but then you'd need a driver to extract out the serial data. Not sure if there's a library API that does that.
  #7   Spotlight this post!  
Unread 20-02-2014, 20:11
mega900997's Avatar
mega900997 mega900997 is offline
Registered User
FRC #0263 (Sachem Aftershock)
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Ronkonkoma
Posts: 58
mega900997 is on a distinguished road
Re: Wiring Maxbotix ultrasonic sensor to serial on cRIO?

We are using the same sensor on our robot. I wired it so it would give an Analog voltage(white wire on a PWM to pin 3) and plugged it into the analog module on the cRIO. In the code, I did:
Code:
AnalogChannel *UltrasonicSensor;
UltrasonicSensor = new AnalogChannel(1);

float Distance = UltrasonicSensor->GetVoltage();
I don't remember the conversion from voltage to feet offhand but that can be figured out with a bit of testing.

Heres the datasheet for the sensor. Read the pin out section of the sensor and wire accordingly. http://www.maxbotix.com/documents/HR..._Datasheet.pdf
__________________
2015
Suffield Shakedown Winners & Most Points Scored
South Florida Regional 6th Seed, #5 Alliance Captains, Regional Winners w/ 2383 & 386, Innovation in Control Award
NY Tech Valley Regional 5th Seed, QF, Excellence in Engineering Award
SBPLI Long Island Regional 4th Seed, Finalists

Hopper Division 14th Seed, QF
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 19:22.

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