Loading ...
Sorry, an error occurred while loading the content.

using continuousrotationservo to control an esc

Expand Messages
  • William J. Rust
    Hi, I ve finally gotten back to using my IB to control a TA RC car. The problem that I am having is that it won t go into reverse. When I use the RC
    Message 1 of 4 , Mar 28 10:34 PM
    • 0 Attachment
      Hi,

      I've finally gotten back to using my IB to control a TA RC car. The
      problem that I am having is that it won't go into reverse. When I use
      the RC controller, I have to flip it into reverse twice before it
      actually takes but I believe that to be an artifact of the controller
      instead of the esc. In any case, I recently got a javelin stamp and used
      its servo port to make it go both forward and reverse. When I hooked up
      both the IB and the JS to a 'sillicope, I found that the IB has a
      slightly shorter period than the JS. This might mean that the esc sees
      the pulse as being longer than it really is. When I shortened the pulse
      times on the JS, it acted just like the IB does, not going into reverse.
      The JS gives you really nuts and bolts access to the servo pwm. Is there
      somewhere in the servo code that lets you do the same thing?

      Thanks,

      wjr

      --
      William J. Rust, PhD
    • RidgeSoft
      Hi William, You might try using the Servo interface directly, rather than the ContinuousRotationServo facade. This will allow you to experiment with various
      Message 2 of 4 , Mar 29 6:14 AM
      • 0 Attachment
        Hi William,

        You might try using the Servo interface directly, rather than the
        ContinuousRotationServo facade. This will allow you to experiment with
        various pulse widths to see how the ESC responds. Another option is to
        use one of the pulse output ports. These have more flexibility in terms
        of pulse duration and frequency. To create a pulse train similar to
        what the servo ports do, you would have to have a high priority thread
        wake up every so often to fire a pulse on the port.

        Regards,

        RidgeSoft Support


        --- In intellibrain@yahoogroups.com, "William J. Rust" <wjr@...> wrote:
        >
        > Hi,
        >
        > I've finally gotten back to using my IB to control a TA RC car. The
        > problem that I am having is that it won't go into reverse. When I use
        > the RC controller, I have to flip it into reverse twice before it
        > actually takes but I believe that to be an artifact of the controller
        > instead of the esc. In any case, I recently got a javelin stamp and
        used
        > its servo port to make it go both forward and reverse. When I hooked
        up
        > both the IB and the JS to a 'sillicope, I found that the IB has a
        > slightly shorter period than the JS. This might mean that the esc sees
        > the pulse as being longer than it really is. When I shortened the
        pulse
        > times on the JS, it acted just like the IB does, not going into
        reverse.
        > The JS gives you really nuts and bolts access to the servo pwm. Is
        there
        > somewhere in the servo code that lets you do the same thing?
        >
        > Thanks,
        >
        > wjr
        >
        > --
        > William J. Rust, PhD
        >
      • William J. Rust
        I tried using Servo directly and it didn t work. However, using a pulse output port does work. I got the motors to turn both ways. I should know this but is
        Message 3 of 4 , Mar 31 12:53 PM
        • 0 Attachment
          I tried using Servo directly and it didn't work. However, using a pulse
          output port does work. I got the motors to turn both ways. I should know
          this but is the threading preemptive or will I need to put in yields to
          make sure the motors keep running?

          BTW, when I decompiled the jar, I notice the servos are native calls.
          Any chance that the parameters to the PWM call are, or could be, public?

          Thanks,

          wjr

          RidgeSoft wrote:
          >
          >
          > Hi William,
          >
          > You might try using the Servo interface directly, rather than the
          > ContinuousRotationServo facade. This will allow you to experiment with
          > various pulse widths to see how the ESC responds. Another option is to
          > use one of the pulse output ports. These have more flexibility in terms
          > of pulse duration and frequency. To create a pulse train similar to
          > what the servo ports do, you would have to have a high priority thread
          > wake up every so often to fire a pulse on the port.
          >
          > Regards,
          >
          > RidgeSoft Support
          >
          > --- In intellibrain@yahoogroups.com
          > <mailto:intellibrain%40yahoogroups.com>, "William J. Rust" <wjr@...>
          > wrote:
          > >
          > > Hi,
          > >
          > > I've finally gotten back to using my IB to control a TA RC car. The
          > > problem that I am having is that it won't go into reverse. When I use
          > > the RC controller, I have to flip it into reverse twice before it
          > > actually takes but I believe that to be an artifact of the controller
          > > instead of the esc. In any case, I recently got a javelin stamp and
          > used
          > > its servo port to make it go both forward and reverse. When I hooked
          > up
          > > both the IB and the JS to a 'sillicope, I found that the IB has a
          > > slightly shorter period than the JS. This might mean that the esc sees
          > > the pulse as being longer than it really is. When I shortened the
          > pulse
          > > times on the JS, it acted just like the IB does, not going into
          > reverse.
          > > The JS gives you really nuts and bolts access to the servo pwm. Is
          > there
          > > somewhere in the servo code that lets you do the same thing?
          > >
          > > Thanks,
          > >
          > > wjr
          > >
          > > --
          > > William J. Rust, PhD
          > >
          >
          >


          --
          William J. Rust, PhD
        • RidgeSoft
          William, It s preemptive. All you need to do is give the thread higher priority. It isn t a simple matter to expose the lower level servo PWM control. The
          Message 4 of 4 , Mar 31 1:50 PM
          • 0 Attachment
            William,

            It's preemptive. All you need to do is give the thread higher priority.

            It isn't a simple matter to expose the lower level servo PWM control.
            The eight servos are multiplexed off of a single output, which makes it
            tightly coupled to the hardware.

            Regards,

            RidgeSoft Support


            --- In intellibrain@yahoogroups.com, "William J. Rust" <wjr@...> wrote:
            >
            > I tried using Servo directly and it didn't work. However, using a
            pulse
            > output port does work. I got the motors to turn both ways. I should
            know
            > this but is the threading preemptive or will I need to put in yields
            to
            > make sure the motors keep running?
            >
            > BTW, when I decompiled the jar, I notice the servos are native calls.
            > Any chance that the parameters to the PWM call are, or could be,
            public?
            >
            > Thanks,
            >
            > wjr
            >
            > RidgeSoft wrote:
            > >
            > >
            > > Hi William,
            > >
            > > You might try using the Servo interface directly, rather than the
            > > ContinuousRotationServo facade. This will allow you to experiment
            with
            > > various pulse widths to see how the ESC responds. Another option is
            to
            > > use one of the pulse output ports. These have more flexibility in
            terms
            > > of pulse duration and frequency. To create a pulse train similar to
            > > what the servo ports do, you would have to have a high priority
            thread
            > > wake up every so often to fire a pulse on the port.
            > >
            > > Regards,
            > >
            > > RidgeSoft Support
            > >
            > > --- In intellibrain@yahoogroups.com
            > > <mailto:intellibrain%40yahoogroups.com>, "William J. Rust" wjr@
            > > wrote:
            > > >
            > > > Hi,
            > > >
            > > > I've finally gotten back to using my IB to control a TA RC car.
            The
            > > > problem that I am having is that it won't go into reverse. When I
            use
            > > > the RC controller, I have to flip it into reverse twice before it
            > > > actually takes but I believe that to be an artifact of the
            controller
            > > > instead of the esc. In any case, I recently got a javelin stamp
            and
            > > used
            > > > its servo port to make it go both forward and reverse. When I
            hooked
            > > up
            > > > both the IB and the JS to a 'sillicope, I found that the IB has a
            > > > slightly shorter period than the JS. This might mean that the esc
            sees
            > > > the pulse as being longer than it really is. When I shortened the
            > > pulse
            > > > times on the JS, it acted just like the IB does, not going into
            > > reverse.
            > > > The JS gives you really nuts and bolts access to the servo pwm. Is
            > > there
            > > > somewhere in the servo code that lets you do the same thing?
            > > >
            > > > Thanks,
            > > >
            > > > wjr
            > > >
            > > > --
            > > > William J. Rust, PhD
            > > >
            > >
            > >
            >
            >
            > --
            > William J. Rust, PhD
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.