Shop OBEX P1 Docs P2 Docs Learn Events
a new bs2px with a bad communication — Parallax Forums

a new bs2px with a bad communication

RL600RL600 Posts: 40
edited 2012-02-20 06:47 in BASIC Stamp
Hello all,

Recently I have bought a new bs2px. I know that there must be make some changes, but which one and how.
I have changed the baudrate, but the communication with the sayit module isn't seamless.
I hope you can help me.

RL600

Comments

  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2012-02-19 06:53
    Hi, if you are using the Say It Demo.bs2 you will need to modify the baud commands and the PULSOUT commands.

    This is the baud modification from BS2 to BS2px

    BS2
    COM_SPEED           CON         84     ' baud 9600 '------BS2
    

    BS2px
    COM_SPEED           CON         396     ' baud 9600 '------BS2px
    

    Each PULSOUT should be modified by multiplying the PULSOUT value by 2.5

    Example BS2
    PULSOUT LServo, 500
    

    Example BS2px
    PULSOUT LServo, 1250  '--------500 * 2.5 = 1250
    

    Jeff T.
  • RL600RL600 Posts: 40
    edited 2012-02-19 10:46
    Many thanks,

    The PULSOUT command must be changed, but which must be maked with a continuous rotation.
    I'm using the say-it module on a boe-bot.

    RL600
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2012-02-19 14:47
    For a continuous rotation servo the pulse duration should fall between 1.3 mS and 1.7ms and the servo should be calibrated to be stationary at 1.5mS. Anything higher than 1.5mS and the servo should turn ccw anything lower than 1.5mS the servo should turn cw. The pulses should ideally be delivered every 20mS

    Each Basic Stamp has a "unit" of duration and for the BS2px this unit of duration is 0.8 microseconds this can also written 0.0000008 seconds. To determine how many units are required for the stationary value of 1.5mS all you have to do is divide 1.5mS by the unit of duration 0.8 microseconds. Here is the example :- 0.0015 / 0.0000008 = 1875, written in code as follows
    PULSOUT servoPin, 1875
    

    The same goes for each extreme : -

    (1.7mS) 0.0017 / 0.0000008 = 2125 (fully ccw)

    (1.3mS) 0.0013 / 0.0000008 = 1625 (fully cw)

    Jeff T.
  • RL600RL600 Posts: 40
    edited 2012-02-19 22:45
    Hi Unsoundcode,

    Thanks for your fast reply. Before these information I send pulses far beneath. So now I know the reason why he always turn to the left.
    Again many thanks.

    RL600
  • Scott4Scott4 Posts: 45
    edited 2012-02-20 06:47
    Unfortunately I can't seem to upload an Excel file so here is an image of the spreadsheet I made based on the calculator in the Syntax manual.
    Baudmode Variable Calculator.jpg

    If you put a pull-down list in cell D5 you can select the processor from the table at the right. (data...data validation...list...$H6:$H11). -Scott
Sign In or Register to comment.