Shop OBEX P1 Docs P2 Docs Learn Events
ping talk — Parallax Forums

ping talk

boe-crazyboe-crazy Posts: 53
edited 2009-01-14 04:07 in Robotics
This is a subject where you can get help, share ideas, and talk about the ping sensor.· We have a lot of random stuff about ping sensors, so why dont we put it in one subject?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
To make something work one must build, test, and verify bfore proceding.· -- myself

Comments

  • GWJaxGWJax Posts: 267
    edited 2009-01-03 14:48
    Great Idea boe-crazy, this could be a catch all for all routines and quick questions about the Ping))).

    Jax

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If a robot has a screw then it must be romoved and hacked into..
  • boe-crazyboe-crazy Posts: 53
    edited 2009-01-03 15:46
    Thanks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    To make something work one must build, test, and verify bfore proceding.· -- myself
  • boe-crazyboe-crazy Posts: 53
    edited 2009-01-03 16:01
    I have a problem with my ping sensor. My boebot will run through the servo actions but it won't quite 'ping', if you know what i mean. The full thread is the 'ping problem!!!!!!!!!!!' thread.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    To make something work one must build, test, and verify bfore proceding.· -- myself
  • GWJaxGWJax Posts: 267
    edited 2009-01-03 17:03
    I'll have to check that thread out to see what is happening and did you post your code?

    Jax

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If a robot has a screw then it must be romoved and hacked into..
  • boe-crazyboe-crazy Posts: 53
    edited 2009-01-03 17:06
    no, i just used the douwnload from the parallax website. code type:bssc

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    To make something work one must build, test, and verify bfore proceding.· -- myself
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-01-05 17:26
    boe-crazy said...
    I have a problem with my ping sensor. My boebot will run through the servo actions but it won't quite 'ping', if you know what i mean. The full thread is the 'ping problem!!!!!!!!!!!' thread.
    Please keep support issues in one thread.· This is the third place I have seen this mentioned, but there is no link to the other thread you keep referring to. ·This is why you should not cross-post.· Since the message is already posted in another thread just allow any replies to be posted there.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • boe-crazyboe-crazy Posts: 53
    edited 2009-01-06 01:08
    sorry. :-(

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    To make something work one must build, test, and verify bfore proceding.· -- myself
  • GeorgeCollinsGeorgeCollins Posts: 132
    edited 2009-01-08 23:38
    I love the Ping! Nothing is better in terms of ease of use vs. usefulness for hobby robots.

    Here are my Ping questions
    - How far does a ping sensor have to be from a parallel surface, and at what distance? How wide is the cone of sensitivity and at what angle does it open up at?
    - Some have said that it helps to have a sound dampening surface behind the ping sensor? Is that true?
    - How much motion can a Ping sensor handle while it is working? How fast could a servo with a ping pivot and be expected to work? What about a less smooth motion like a motor vibrating or the gait of a walking robot?
    - What about other forms of electrical interference. I know you should put a capacitor across motor lines, but should you take other precautions?

    I would love to just spend a few days running tests, and perhaps I will, but in the meantime I would like to see what I can get out of this great knowledge base.
    www.youtube.com/watch?v=lI6ACgbyUj8
  • SRLMSRLM Posts: 5,045
    edited 2009-01-09 00:15
    1) Look at the data sheet. It's your main resource for this sort of data.
    2) Supposedly, yes.
    3) I've had the ping take about two 180 degree sweeps with a servo per second, and 18 points each time.
    4) Separate the motor power supply from the electronics.
  • GWJaxGWJax Posts: 267
    edited 2009-01-10 03:58
    This is a small demo on how fast the ping sensors can detect its location and when you see my video you see that the servos are running full speed and it has enough time to grab all information from the ping))) One thing I did not show which I wish I did was a shot of the screen taking the measurements of each swing of the servo.



    Jax

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If a robot has a screw then it must be romoved and hacked into..
  • GeorgeCollinsGeorgeCollins Posts: 132
    edited 2009-01-10 05:49
    If you can sample that fast and have every reading be reliable, that is encouraging for me.
  • JohnBFJohnBF Posts: 107
    edited 2009-01-10 17:30
    The Ping is fast and reliable enough to balance a robot - this one and others have done likewise...

    http://uk.youtube.com/watch?v=L6SGsV9uHfs

    two pitfalls -

    - If you try to take readings too close together they get confused by echoes still bouncing around.
    - Things you wouldn't think of can produce ultrasonic noise that confuses the sensor, like keys jangling.

    /John
  • Just JeffJust Jeff Posts: 36
    edited 2009-01-12 06:39
    Hello Folks,

    I am working on a BS2 project to rejuvenate an old Tomy Omnibot and want to have two Ping))) sensors in operation in the front as bump sensors.· I have been using one for awhile on a standard Boe-Bot chassis and have no issue with that.· When I started playing with hooking two units up near each other (8 inches apart) I am finding it difficult to program to even test if it will work correctly... The difficulty is in my head not the Ping))) sensor! [noparse]:)[/noparse]

    I am looking for PBasic assistance in the correct way to read one Ping))) store the value and quickly read the second Ping))) and then I will do some·(as yet undecided) decision making on movement and further action.

    1. So I am wondering what is the proper time to pause between Ping#1 read and Ping#2 read?
    2. I need 2 variables... right? to store the seperate reads and from that I will then be able to make "turn X direction" decisions.
    3. Looking for input and suggestions as a broad topic and did not find any examples while browsing/searching

    Thanks!
    Jeff·

    PS I wish the old Omnibot chassis would work with the servo mounted Ping that scans back and forth... I love that and it works great, but would not look "good" on the old robot chassis.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    "Twenty years from now you will be more disappointed by the things you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore. Dream. Discover." - Mark Twain

    Post Edited (The Hero Flag) : 1/12/2009 6:46:26 AM GMT
  • SRLMSRLM Posts: 5,045
    edited 2009-01-12 07:20
    1.Well, we know from the datasheet that the Max amount of time in the burst is 115 uS, so add a buffer of that between readings and you should be fine.
    2. You need two variables if you don't do any processing between readings of one ping and the other.

    The easiest thing to do (as is the case in general programming) is to break things up into functions. So, put the ping stuff in one function, put the decision making stuff in another, and put the calls to both in a main loop. Just a suggestion, but it works well.
  • Just JeffJust Jeff Posts: 36
    edited 2009-01-12 07:31
    SRLM, Thanks! I am getting bleary eyed from web searching for examples of using multiple ping units and am giving up for the night. I will work tomarow on determining the timing between the units and do appreciate the programmming sugestion.

    On another note I finally got the motorized base of the Omnibot working via the stamp and can chase the cat around the room (with wires dangling) so that is progress!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    Currently working on Omnibot v2 - A "rejuvinated" Tomy Robot

    "Twenty years from now you will be more disappointed by the things you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore. Dream. Discover." - Mark Twain
  • MovieMakerMovieMaker Posts: 502
    edited 2009-01-12 13:40
    When you do a google search for Multiple Ping, you will usually wind up with stuff having to do with Networking for the internet. It is better to hang around the Parallax sight when asking about PING. or , look up Multiple Ultrasonic Ping. This will get you more good results.
  • Just JeffJust Jeff Posts: 36
    edited 2009-01-13 17:22
    The two resources I have found and am looking over for using multiple Ping units is;

    John Williams March 2005 Nuts&Volts article "nz119.pdf"- Also called PingISeeYou.pdf elswhere

    Camp L. Peavy, Jr. "Ultimate TABLEBot" - "Ultimate.pdf" that has 3 Ping units.

    Good resources!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    Currently working on "Omnibot v2" - A "rejuvenated" 1980's Tomy Omnibot 2000 Robot

    "Twenty years from now you will be more disappointed by the things you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore. Dream. Discover." - Mark Twain
  • ZootZoot Posts: 2,227
    edited 2009-01-13 23:23
    I have some 'bots with multiple Ping units... They all trigger/read sequentially, so no two are firing at the same time. On a Stamp, by the time the data is processed, enough time has passed that I haven't had any echo/interference problems. They are mounted on pan/tilt units, and the current sonar reading is stored along with servo pan/tilt values for that reading (in brads). The servo stuff is not shown here.

    I setup my sonar subroutines so the the PIN and assigned space in RAM (arrays) are set by the main program, and then any Ping can be triggered, read, adjusted and stored in RAM for use elsewhere, e.g.

    
    sonars PIN 3 ' pings on pins 3, 4, 5
    idx VAR Nib
    ioWord VAR Word
    sonarVals VAR Word(3) ' or in my case, scratchpad ram assignments on bs2p:
    ' sonarVals CON $40 ' 6 bytes starting at SRAM $40
    
    Start:
      FOR idx = 0 TO 2
         LOW sonars+idx
         sonarVals(idx) = 0
        ' or on bs2p etc
        ' PUT sonarVals(idx), Word 0
      NEXT
    
    Main:
    
      FOR idx = 0 TO 2
         GOSUB Get_Ping
      NEXT
    
      DEBUG HOME, "Sonar Vals:", CLREOL, CR
      FOR idx = 0 TO 2
         DEBUG "#", DEC2 idx, ": ", DEC5 sonarVals(idx), CLREOL, CR
      NEXT
    
      GOTO Main
    
    'Use:
    ' idx = pin offset index # for ping, and block of ram (two bytes per ping)
    ' GOSUB Get_Ping
    ' returns word ping value in ram
    Get_Ping:
       PULSOUT sonars+idx, 10
       PULSIN sonars+idx, ioWord
       ioWord = ( ioWord ** constant ) + 1 >> 1 ' scale round, divide by return trip
       sonarVals(idx) = ioWord
      ' or on bs2p, etc....
      ' PUT idx<<1+sonarVals, Word ioWord
       LOW sonars+idx
      RETURN
    
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • Just JeffJust Jeff Posts: 36
    edited 2009-01-14 04:07
    Thanks Zoot!!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    Currently working on "Omnibot v2" - A "rejuvenated" 1980's Tomy Omnibot 2000 Robot

    "Twenty years from now you will be more disappointed by the things you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore. Dream. Discover." - Mark Twain
Sign In or Register to comment.