Go to Post For FIRST robots, the phenomena listed above just do not apply. - Paul Copioli [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 19-01-2008, 12:14
Lucretius Lucretius is offline
#395 Mentor, #1884 Alumnus
FRC #0395 (2 Train Robotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: New York, NY
Posts: 42
Lucretius is an unknown quantity at this point
Parallax and Maxbotix ultrasonic sensors

Does anyone know if there are device drivers for the Parallax Ping))) and the Maxbotix EZx written for WPIlib? I've looked at the SONAR driver and Qbranch's Ping))) code, but it's based off the default IFI code, and I have no idea any of it works.

We're using a makefile with mcc18 under Wine.
  #2   Spotlight this post!  
Unread 21-01-2008, 09:01
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Parallax and Maxbotix ultrasonic sensors

I was just reading the spec sheet for the Maxbotix EZ1 sensor. It looks like one of it's outputs is analog. So you should be able to connect it directly to an analog input and read range values. The datasheet lists the output at about 9.8mV/inch, so with some simple scaling you could convert the 0-1023 analog input value directly to inches. It also looks like if you use the pulse output it may be directly compatible with the existing driver, but I haven't tested it.

The sensor looks really good - I'm going to order one to play with. More news as it happens.

The Parallax sensor uses timing much like the supported SRF04 (or Vex) sensor, the problem is it does the trigger (digital output) and echo (interrupt) on the same pin. The driver would have to be modified slightly to flip the pin from an output to an input to make it work.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
  #3   Spotlight this post!  
Unread 21-01-2008, 10:41
Phalanx's Avatar
Phalanx Phalanx is offline
Formerly Team 1089 (Mercury)
AKA: Michael Reffler
FRC #5431 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jun 2005
Rookie Year: 1999
Location: Lewisville, TX (previously NJ)
Posts: 384
Phalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond repute
Re: Parallax and Maxbotix ultrasonic sensors

We used the Maxbotics EZ-1 last season using analog with good results.

The formula we used:
Mv =( (adc * 5000) / 1024 )
Inches = Mv / 10
Gave use the distance in inches for the version that used 10mV per inch.

It was changed from 10mV to 9.8mV
So in your case you might want to try:
Mv =( (adc * 5000) / 1024 )
Inches = Mv * 10 / 98
__________________
Don't just ask the experts, become one!
Leadership is not about ability. It's about responsibility!
Diagonally Parked in a Parallel Universe. It's okay we do Quantum Physics


  #4   Spotlight this post!  
Unread 21-01-2008, 15:56
Lucretius Lucretius is offline
#395 Mentor, #1884 Alumnus
FRC #0395 (2 Train Robotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: New York, NY
Posts: 42
Lucretius is an unknown quantity at this point
Re: Parallax and Maxbotix ultrasonic sensors

Thanks for the tips regarding the Maxbotix EZ sensors (we'll be using the EZ0).

We actually got the Parallax Ping))) working with the built-in WPIlib functions. The only modification was to convert the two ends of a PWM Y-connector to female so we could plug them into two digital in/outs. Worked like a charm!
  #5   Spotlight this post!  
Unread 20-02-2008, 00:39
pogenwurst pogenwurst is offline
Ubuntu User
AKA: Brian
FRC #2007 (Robots of the Round Table)
Team Role: Leadership
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Duluth, GA
Posts: 78
pogenwurst is on a distinguished road
Send a message via AIM to pogenwurst
Re: Parallax and Maxbotix ultrasonic sensors

Quote:
Originally Posted by Phalanx View Post
We used the Maxbotics EZ-1 last season using analog with good results.

The formula we used:
Mv =( (adc * 5000) / 1024 )
Inches = Mv / 10
Gave use the distance in inches for the version that used 10mV per inch.

It was changed from 10mV to 9.8mV
So in your case you might want to try:
Mv =( (adc * 5000) / 1024 )
Inches = Mv * 10 / 98
I was just looking at the datasheet for the newer versions with 9.8 mV / in. scaling, and it does not specify "9.8" but rather "~9.8". The exact scaling factor for 5V power is (5000 / 512) mV / in.

It shouldn't make much of a difference, but that sort of thing bothers me.
  #6   Spotlight this post!  
Unread 20-02-2008, 14:34
d235j d235j is offline
Registered User
FRC #4454
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Philadelphia, PA
Posts: 25
d235j has a spectacular aura aboutd235j has a spectacular aura about
Re: Parallax and Maxbotix ultrasonic sensors

We just divide the analog output by 2 to get the reading in inches.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ultrasonic range sensors for Vex Robot OneCoolDude Programming 1 01-12-2007 09:22
can we use ultrasonic sensors? GMKlenklen Electrical 20 15-01-2007 14:34
Gryo, Camera, Accelorometer, Ultrasonic, and Gear Tooth Sensors in one program EHaskins Programming 8 22-05-2006 12:08
Programming the parallax PING))) Ultrasonic Sensor edman Programming 3 18-02-2006 23:37
Programming Parallax Ultrasonic Rangefinder edman Programming 2 17-02-2006 08:35


All times are GMT -5. The time now is 03:01.

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