Differences between revisions 5 and 6
Revision 5 as of 2010-02-15 08:48:26
Size: 1541
Editor: BobAdamson
Comment:
Revision 6 as of 2010-02-15 09:13:51
Size: 1905
Editor: BobAdamson
Comment: more values
Deletions are marked like this. Additions are marked like this.
Line 29: Line 29:
 * Servo 2 (speed control)
  * Reverse:
  * Stop:
  * Forward:
 * Servo 2 (speed control) - note lower values are faster. Also, these boundaries will never change because it's an electronic controller.
  * Reverse:0xb8
  * Neutral Range:0x95 to 0x9c
  * Stop: to stop, simply send a signal for the opposite direction, braking strength is variable. You can always go forward from reverse, but you have to brake before going to reverse from forward (or something like that)
  * Forward:0x79

The control trimming and centering presents a number of problems for the LURC, as the serial control allows us to push the servos past soft-limits imposed by standard remote control transmitters. This means we need to do sanity checking on values sent, both in the car (on the avr) and on the desktop. The in-car sanity checking should only check if the value is outside the physical capabilities of the servo, while the desktop software should check the values are within 'useful' ranges. As such, the in-car checking does not need to be varied and can be hard-coded in, while the desktop ranges need to be adjustable so that the controls can be trimmed and centered.

The physical capability boundaries for each servo are as follows, given in hex values. Even though the servos are very similar or identical, the values differ due to different timer modes:

  • Servo 0 (webcam tilt)
    • Left:0x35

    • Right:0xF0

  • Servo 1 (steering)
    • Left:0x35

    • Right:0xF0

  • Servo 2 (speed control)
    • Lower:
    • Upper:
  • Servo 3: (webcam pan)
    • Left:0x35

    • Right:0xF0

The 'useful' values for each servo are subject to change because of adjustments to the car and parts. Here are some one-off values to give an idea of what they should be close to:

  • Servo 0 (webcam tilt)
    • Down:
    • Level:
    • Up:
  • Servo 1 (steering)
    • Left:0x7b

    • Center: 0x92
    • Right:0xb3

  • Servo 2 (speed control) - note lower values are faster. Also, these boundaries will never change because it's an electronic controller.
    • Reverse:0xb8

    • Neutral Range:0x95 to 0x9c

    • Stop: to stop, simply send a signal for the opposite direction, braking strength is variable. You can always go forward from reverse, but you have to brake before going to reverse from forward (or something like that)
    • Forward:0x79

  • Servo 3: (webcam pan)
    • Left:
    • Right: