Shop OBEX P1 Docs P2 Docs Learn Events
Can I program Scribbler as a — Parallax Forums

Can I program Scribbler as a

JoeAJoeA Posts: 33
edited 2007-06-23 04:18 in Robotics
Lots of newbie questions about Scribbler:
I have a Scribbler that I'm trying to get to mimick a LOGO "Turtle".· That is, I want to give it commands to "go forward 1 unit" and "turn 45 degrees"·--so it can "draw" instead of just "scribble".·
I've been programming for years, but I'm just a "newbie" at robots.· Translating from pixels on a screen to a real robot pen on paper is proving to be extremely difficult using only motor speed and time.·
1. When trying to calibrate the two motors to the same speed, I'm finding that they don't even behave the same on two successive runs (possibly slipping on my laminate floors)!
2. And when I stop the motors, one wheel seems to·keep turning·a bit longer than the other, which makes it difficult to program accurate turns.· I even reversed the order of the stop commands but it had no noticeable effect.
3. Are there more sophisticated techniques I could employ?
4. Would I have better control with a BoeBot?·
(Considering a 90 degree turn requires only about 180 degrees wheel rotation, it's not clear that even the digital encoders would significantly improve turning accuracy, if they only provide accuracy to about 22 degrees.··
5. Is it possible to get greater accuracy from the encoders? or some other device?
Of course, a BoeBot with equivalent sensors plus digital encoders for the wheels would cost about twice as much as a Scribbler--would it be worth it?)
BTW, it seems computing wheel rotation angle for turns would be greatly simplified if the axle length were in a simple ratio to the wheel diameter.· As it is, on the Scribbler it is nearly, but not exactly, 2:1 (14.7:8 cm).· But why not "exactly"?·
6. Is it possible to make the ratio exact on the BoeBot, e.g. by changing axle length or effective wheel diameter?
And another thing: Scribbler has a pen but·no penup/pendown.
Guess that would take another servo, or at least a solenoid.·
7. Is there something like a penlifter for the BoeBot (or Scribbler)?·
8. Or even a way to get a hole in the middle of the BoeBot (the optimal position) for a pen?
Any help or suggestions for further reading would be appreciated.

Comments

  • WhitWhit Posts: 4,191
    edited 2007-06-22 13:12
    I don't know if you have you tried the GUI software (see http://www.scribblerrobot.com/). You could use it to quickly try some different schemes to draw something (a box or letter "S"). It allows you to "toggle" to the Basic Stamp editor (so you could check out the PBASIC code). You might give it a try.

    Don't know if you have this either. It is from the Scribbler Download section on the Parallax site
    http://www.parallax.com/dl/docs/prod/robo/scribbler/SPPG-WritingPrograms-v1.2.pdf

    There is a lot of good information in the Online help for the GUI software (including the callibration issue). I will put a link to a recent post about this issue below.

    About the pen up and pen down. I have never seen anything about this. Sound like a neat idea. There is a hackers port inside the Scribbler. This might allow a fairly easy way to work on this problem.

    Hope this helps.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+


    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney

    Post Edited (Whit) : 6/22/2007 6:59:09 PM GMT
  • WhitWhit Posts: 4,191
    edited 2007-06-22 13:24
    See this tread for callibration issues:

    http://forums.parallax.com/showthread.php?p=634274

    One of the manuals listed above said this:
    Over time, your Scribbler’s motors will become more settled in as the lubricant inside them works
    its way through the gears. They may begin to perform differently, and you might need to repeat
    
    this calibration test in the future.
    
    


    I thought I had read somewhere about the motors breaking in over time.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+


    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney

    Post Edited (Whit) : 6/22/2007 7:15:35 PM GMT
  • WhitWhit Posts: 4,191
    edited 2007-06-22 13:57
    JoeA,

    You might check out the program code shown and also·attached below. It is from the Hacker's Hints Download·section of the Scribbler website. You could load and run·it and see how your Scribbler responds.
    ' Scribbler Robot Demonstration Code
    ' Motors.bs2
    ' Drives forward for 2 seconds, turns right for 1 second
    ' using a duration command, and then pauses for an extra second,
    ' in a continuous loop
    ' (C) Parallax Inc. 2005
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    ' I/O Declarations
    MotorRight    PIN 12
    MotorLeft     PIN 13
    
    ' I/O Initialization
    LOW MotorRight
    LOW MotorLeft
    
    DO
      ' Drive forward at half speed
      PULSOUT MotorRight, 2500
      PULSOUT MotorLeft, 2500
      ' Wait 2 seconds
      PAUSE 2000
      ' Turn right for 1 second
      PULSOUT MotorRight, 1500
      PAUSE 1
      PULSOUT MotorRight, 1400
      PULSOUT MotorLeft, 2500
      PAUSE 1
      PULSOUT MotorLeft, 1400
      ' Pause for the 1 second turn and an extra second
      PAUSE 2000
    LOOP
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+


    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney

    Post Edited (Whit) : 6/22/2007 2:04:17 PM GMT
  • JoeAJoeA Posts: 33
    edited 2007-06-22 20:18
    Whit said...
    JoeA,

    You might check out the program code shown and also·attached below. It is from the Hacker's Hints Download·section of the Scribbler website. You could load and run·it and see how your Scribbler responds.
    ' Scribbler Robot Demonstration Code
    ' Motors.bs2
    ' Drives forward for 2 seconds, turns right for 1 second
    ' using a duration command, and then pauses for an extra second,
    ' in a continuous loop
    ' (C) Parallax Inc. 2005
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    ' I/O Declarations
    MotorRight    PIN 12
    MotorLeft     PIN 13
    
    ' I/O Initialization
    LOW MotorRight
    LOW MotorLeft
    
    DO
      ' Drive forward at half speed
      PULSOUT MotorRight, 2500
      PULSOUT MotorLeft, 2500
      ' Wait 2 seconds
      PAUSE 2000
      ' Turn right for 1 second
      PULSOUT MotorRight, 1500
      PAUSE 1
      PULSOUT MotorRight, 1400
      PULSOUT MotorLeft, 2500
      PAUSE 1
      PULSOUT MotorLeft, 1400
      ' Pause for the 1 second turn and an extra second
      PAUSE 2000
    LOOP
    

    Whit,
    I notice this seems to be sending two pulses, 1ms apart, to each servo (driver?);
    I didn't notice anything about that in the Scribbler PBASIC guide·or even in the BoeBot Robotics doc.
    But I also understand that the Scribbler has a separate processor for the servos so you don't need to repeat the speed pulse every 20ms.· Is the 1400 a second operand for duration?· If so, how does it·get "1 sec" from 1400?

    JoeA
  • WhitWhit Posts: 4,191
    edited 2007-06-23 04:18
    JoeA,

    Don't have time for a complete answer and will be away for about a week at camp. See attached file (or ·http://www.parallax.com/dl/docs/prod/robo/scribbler/SPPG-WritingPrograms-v1.2.pdf) - espcially page 15. The PAUSE sets time. PULSOUT sets motor (left or right)·speed (forward or backward). Hope this helps. I'll see what you're up to when I get back. Good luck!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+


    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney

    Post Edited (Whit) : 6/23/2007 4:26:50 AM GMT
Sign In or Register to comment.