Sumobot

domsdoms Posts: 5
edited January 11 in Robotics Vote Up0Vote Down
Hi guys im new in robotics and i bought parallax sumobot yesterday from online store ,i just want to ask if can i replace the IR sensor by Ultrasonic sensor and what do i need to change about the codes about the changes of sensor.
2448 x 3264 - 1M

Comments

  • 13 Comments sorted by Date Added Votes
  • doms,

    What wrong with IR sensors that you need to replace them?
  • Hi genetix , for better vision, ultrsonic is a good sensor than IR. Can you help me how can i replace it, i do not know where to connect does pins of ultrasonic
  • What is it that you are trying to see?

    IR sensors are simple, small, cheap, and don't consume much power.
    Something like a Ping is a lot more expensive, bulkier, and takes a lot more power.
  • You can mount a ping sensor on the breadboard and use a I/O Pin that is not used. It looks like P0 through P4 are unused. You can turn the IR on and off through software. I have never programed the Sumo, so I do not know how much memory is left to use the PING.
    Infernal Machine
  • Programming the Sumobot should be the same as with a BASIC Stamp 2 with PBASIC so the BS2 Ultrasonic example should get you started. You should be able to substitute one of the IR sensor ports for the Ultrasonic sensor, but that is just a guess.
    https://parallax.com/downloads/ping-ultrasonic-distance-sensor-bs2-example-code
  • PublisonPublison Posts: 9,873
    edited January 13 Vote Up0Vote Down
    The IR sensors are on Pins P4, P11, P14 and P15. No need to disconnect them. Just use P0 or P1 or P2 or P3. They are not used by anything else. The Ping only requires one I/O pin plus VCC and VSS.
    Infernal Machine
  • Using the attached Basic Sumo Competition BS2 program, there is 75% of the EEPROM available for PING code. Open I/O pins for the PING are P2, P3, P5 and P6. Only one is needed.
    Infernal Machine
  • Plenty of I/O pins on that robot, can you run both IR and an ultrasonic, since a PING only uses one pin? If possible, use another pin to drive a servo to rotate the PING for more directional input. The sensors have complementary strengths & weaknesses, running both for "sensor fusion" is the best of both worlds.
    "When you make a thing, a thing that is new, it is so complicated making it that it is bound to be ugly. But those that make it after you, they don’t have to worry about making it. And they can make it pretty, and so everybody can like it when others make it after you."

    - Pablo Picasso
  • Genetix
    Our professor require us to use Ping sensor.
    Anyway Thank you for response
  • JonM
    Thank you for that, it will help me more
  • Publison
    Thank you for that, much appreciated
  • OK, if it's a class project then naturally you don't want us to do the work for you! Fortunately for you, Andy Lindsay did most of the legwork for you in his fabulous book "Robotics with the Boe-Bot". It gets even better. That's a free download from Parallax. All you have to do is read through that (great coursework) and it will tell you everything (and more) that you need to know about using the PING sensor. A win-win if ever there was one!
    "When you make a thing, a thing that is new, it is so complicated making it that it is bound to be ugly. But those that make it after you, they don’t have to worry about making it. And they can make it pretty, and so everybody can like it when others make it after you."

    - Pablo Picasso
  • PublisonPublison Posts: 9,873
    edited January 15 Vote Up0Vote Down
    doms wrote: »
    Publison
    Thank you for that, much appreciated

    Here is the Basic code for the PING.

    Infernal Machine
Sign In or Register to comment.