Shop OBEX P1 Docs P2 Docs Learn Events
robot navigation — Parallax Forums

robot navigation

mokhlismokhlis Posts: 6
edited 2009-01-11 07:19 in Robotics
In the boe-bot navigation,can i control the pulse width modulation of the boe-bot

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-01-08 05:04
    When you say "pulse width modulation of the boe-bot", are you referring to the control of the servo motors using the control pulse width?

    Any program that changes the speed and direction of the BoeBot's servo motors has to change the pulse widths. This includes any of the navigation programs either included in the "Robotics with the BoeBot" tutorial or in the links for the PING))) sensor.

    Can you explain what you're trying to do or would like to do? Your question doesn't give much information.
  • mokhlismokhlis Posts: 6
    edited 2009-01-08 10:17
    i am new in creating the navigation robot project using boe-bot,so, many thing i am not understandconfused.gif
    i am doing robot navigation with using incremental rotary encoder and RGB sensor,so, i need to change the pwm of the servo motor to make the robot will move curve

    please give comment.....smile.gif
  • SRLMSRLM Posts: 5,045
    edited 2009-01-08 17:11
    The servo can accept a pulse within the range of 1000 to 2000 uS, for the BS2 that translates to PULSEOUT values from 500 to 1000. The simplest thing to do would be to have a some if statements that test a condition, then modify the servo speed based on the results. For example, to go in a straight line you could count whether or not the encoders have traveled equal distance. If they haven't, you can increase the speed on one wheel.

    Still, more information on what exactly you want to do is good, along with any code you may have.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-01-08 17:18
    One thing to remember is that the Stamp doesn't produce a stream of pulses with the PULSOUT statement, just a single pulse. The servos require a control pulse about 50 times a second (every 20ms) or they will shut down until the next pulse comes in. This makes them "stutter". You can either use an external device like the ServoPAL which will generate pulses every 20ms or you can write your program to operate in 20ms cycles. This technique is used in most sample programs in the "Robotics with the BoeBot" tutorial.

    ServoPAL: www.parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/txtSearch/servopal/List/1/ProductID/481/Default.aspx?SortField=ProductName%2cProductName
  • mokhlismokhlis Posts: 6
    edited 2009-01-09 02:38
    how to do interfacing between incremental rotary encoder with boe-bot?is that need a circuit to make the interfacing
    can i also do interfacing the boe-bot with RGB sensor? hop.gif
  • mokhlismokhlis Posts: 6
    edited 2009-01-09 08:38
    can i make the programming for encoder without using the MEMKey?
  • Mike GreenMike Green Posts: 23,101
    edited 2009-01-09 14:59
    For the incremental rotary encoder and the RGB sensor, it depends on the device and the circumstances. For example, some color sensors have analog outputs and some have digital outputs. The Stamp on the BoeBot can directly use a digital signal. For an analog signal, you will need a DAC (digital to analog converter) as described in the "Basic Analog and Digital" tutorial (downloadable from Parallax). For the rotary encoder, it depends on the pulse rate. The Stamp is not very fast. At high pulse rates, it will miss some pulses and you would need some external logic to help.

    You can do keyboard encoding without a MEMKey, but it takes quite a few I/O pins. There are examples of this in one of the Nuts and Volts Columns.

    Tutorials: www.parallax.com/tabid/535/Default.aspx

    Nuts and Volts: www.parallax.com/Resources/NutsVoltsColumns/tabid/272/Default.aspx
  • mokhlismokhlis Posts: 6
    edited 2009-01-10 12:40
    what is mean by external logic,is that about programming?
  • mokhlismokhlis Posts: 6
    edited 2009-01-11 07:19
    what's sort of basic stamp that applicable interfacing with the incremental rotary encoder?
Sign In or Register to comment.